App Resource
Microvisor Public Beta
Microvisor is in a pre-release phase and the information contained in this document is subject to change. Some features referenced below may not be fully available until Microvisor's General Availability (GA) release.
An App instance represents application code uploaded to the Twilio cloud and able to be installed on one or more Microvisor-empowered Devices.
App resources are accessed at this endpoint:
_10https://microvisor.twilio.com/v1/Apps
Make a GET
request to the endpoint to receive a list (in JSON) of all App resources.
Every App instance can be referenced in the API either by its unique SID or a user-defined unique name:
_10https://microvisor.twilio.com/v1/Apps/{sid}
_10https://microvisor.twilio.com/v1/Apps/{uniqueName}
Application code represented by an App resource can be installed on a device using its Device resource.
You do not create App resources directly. Instead, a new App resource is created for you whenever you upload application code, in the form of a Microvisor app bundle, to the Twilio cloud. This is achieved with the following curl
command:
_10curl -X POST https://microvisor-upload.twilio.com/v1/Apps \
_10 -H 'Content-Type: multipart/form-data' \
_10 -F File=@/path/to/app/bundle \
_10 -u <YOUR_ACCOUNT_SID>:<YOUR_AUTH_TOKEN>
This call will return App metadata in JSON form from which you can read the App's unique SID and which you will use to deploy the application to a device.
Resource properties
sid
type: SID<KA>
A 34-character string that uniquely identifies this App.
Pattern:
^KA[0-9a-fA-F]{32}$
account_sid
type: SID<AC>
The unique SID identifier of the Account.
Pattern:
^AC[0-9a-fA-F]{32}$
hash
type: string
App manifest hash represented as hash_algorithm:hash_value
.
unique_name
type: string
A developer-defined string that uniquely identifies the App. This value must be unique for all Apps on this Account. The unique_name
value may be used as an alternative to the sid
in the URL path to address the resource.
date_created
type: string<date-time>
date_updated
type: string<date-time>
url
type: string<uri>
The URL of this resource.
links
type: object<uri-map>
GET https://microvisor.twilio.com/v1/Apps/{Sid}
URI parameters
Sid
type: string
A 34-character string that uniquely identifies this App.
_10// Download the helper library from https://www.twilio.com/docs/node/install
_10// Find your Account SID and Auth Token at twilio.com/console
_10// and set the environment variables. See http://twil.io/secure
_10const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10const authToken = process.env.TWILIO_AUTH_TOKEN;
_10const client = require('twilio')(accountSid, authToken);
_10client.microvisor.v1.apps('KAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
_10 .then(app => console.log(app.sid));
_12 "sid": "KAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_12 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_12 "unique_name": "look at this crazy app",
_12 "date_created": "2015-07-30T20:00:00Z",
_12 "date_updated": "2015-07-30T20:00:00Z",
_12 "url": "https://microvisor.twilio.com/v1/Apps/KAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_12 "app_manifests": "https://microvisor.twilio.com/v1/Apps/KAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Manifest"
GET https://microvisor.twilio.com/v1/Apps
URI parameters
PageSize
type: integer
How many resources to return in each list page. The default is 50, and the maximum is 1000.
Page
type: integer
The page index. This value is simply for client state.
PageToken
type: string
The page token. This is provided by the API.
_10// Download the helper library from https://www.twilio.com/docs/node/install
_10// Find your Account SID and Auth Token at twilio.com/console
_10// and set the environment variables. See http://twil.io/secure
_10const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10const authToken = process.env.TWILIO_AUTH_TOKEN;
_10const client = require('twilio')(accountSid, authToken);
_10client.microvisor.v1.apps
_10 .then(apps => apps.forEach(a => console.log(a.sid)));
_25 "sid": "KAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_25 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_25 "unique_name": "unique name",
_25 "date_created": "2015-07-30T20:00:00Z",
_25 "date_updated": "2015-07-30T20:00:00Z",
_25 "url": "https://microvisor.twilio.com/v1/Apps/KAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_25 "app_manifests": "https://microvisor.twilio.com/v1/Apps/KAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Manifest"
_25 "first_page_url": "https://microvisor.twilio.com/v1/Apps?PageSize=50&Page=0",
_25 "previous_page_url": "https://microvisor.twilio.com/v1/Apps?PageSize=50&Page=0",
_25 "url": "https://microvisor.twilio.com/v1/Apps?PageSize=50&Page=0",
_25 "next_page_url": "https://microvisor.twilio.com/v1/Apps?PageSize=50&Page=1",
DELETE https://microvisor.twilio.com/v1/Apps/{Sid}
URI parameters
Sid
type: string
A 34-character string that uniquely identifies this App.
_10// Download the helper library from https://www.twilio.com/docs/node/install
_10// Find your Account SID and Auth Token at twilio.com/console
_10// and set the environment variables. See http://twil.io/secure
_10const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10const authToken = process.env.TWILIO_AUTH_TOKEN;
_10const client = require('twilio')(accountSid, authToken);
_10client.microvisor.v1.apps('KAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx').remove();