Skip to contentSkip to navigationSkip to topbar
Rate this Page:

App Resource


(warning)

Warning

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:


_10
https://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:


_10
https://microvisor.twilio.com/v1/Apps/{sid}
_10
https://microvisor.twilio.com/v1/Apps/{uniqueName}

Application code represented by an App resource can be installed on a device using its Device resource.


New App resources

new-app-resources page anchor

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:


_10
curl -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.

(information)

Resource properties
sidtype: SID<KA>Not PII

A 34-character string that uniquely identifies this App.


account_sidtype: SID<AC>Not PII

The unique SID identifier of the Account.


hashtype: stringNot PII

App manifest hash represented as hash_algorithm:hash_value.


unique_nametype: stringNot PII

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_createdtype: string<DATE TIME>Not PII

The date that this App was created, given in ISO 8601(link takes you to an external page) format.


date_updatedtype: string<DATE TIME>Not PII

The date that this App was last updated, given in ISO 8601(link takes you to an external page) format.


urltype: string<URI>Not PII

The URL of this resource.


linkstype: object<URI MAP>Not PII

GET https://microvisor.twilio.com/v1/Apps/{Sid}

Parameters

fetch-parameters page anchor
URI parameters
Sidtype: stringNot PII
Path Parameter

A 34-character string that uniquely identifies this App.

Request a single App resource

request-a-single-app-resource page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_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
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.microvisor.v1.apps('KAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
_10
.fetch()
_10
.then(app => console.log(app.sid));

Output

_12
{
_12
"sid": "KAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_12
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_12
"hash": "hash",
_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
"links": {
_12
"app_manifests": "https://microvisor.twilio.com/v1/Apps/KAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Manifest"
_12
}
_12
}


GET https://microvisor.twilio.com/v1/Apps

URI parameters
PageSizetype: integerNot PII
Query Parameter

How many resources to return in each list page. The default is 50, and the maximum is 1000.


Pagetype: integerNot PII
Query Parameter

The page index. This value is simply for client state.


PageTokentype: stringNot PII
Query Parameter

The page token. This is provided by the API.

Request a list of all App resources

request-a-list-of-all-app-resources page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_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
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.microvisor.v1.apps
_10
.list({limit: 20})
_10
.then(apps => apps.forEach(a => console.log(a.sid)));

Output

_25
{
_25
"apps": [
_25
{
_25
"sid": "KAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_25
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_25
"hash": "hash",
_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
"links": {
_25
"app_manifests": "https://microvisor.twilio.com/v1/Apps/KAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Manifest"
_25
}
_25
}
_25
],
_25
"meta": {
_25
"page": 0,
_25
"page_size": 50,
_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",
_25
"key": "apps"
_25
}
_25
}


DELETE https://microvisor.twilio.com/v1/Apps/{Sid}

URI parameters
Sidtype: stringNot PII
Path Parameter

A 34-character string that uniquely identifies this App.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_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
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.microvisor.v1.apps('KAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx').remove();


Rate this Page: