Menu

Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Devices REST: Fleets

A Fleet is the top most organizing resource acting as a scoping mechanism for deployed devices. Fleets are logically separate from other Fleets, and Devices within a Fleet should have no logical interoperability or connection with Devices in another Fleet.

A Fleet is also a composition of all other resources in the IoT Device Manager REST API. It owns Devices, Deployments, Certificates, Keys, and all other data for any Sync for IoT application. Fleets allow the developer to:

  • Create multiple environments (dev, stage, prod) under the same Twilio account with segregated data
  • Safely isolate access to resources across fleets, such as device configuration and credentials.
  • Provision hardware for different applications or purposes that are logically grouped but would never work together as a system.

Each account that uses Sync for IoT is automatically provisioned with a default Fleet. The unique name of that Fleet is "default", and it may be accessed via REST API by that handle instead of SID.

In order to simplify the on-boarding and typical configurations, each provisioned Fleet, including the default one will automatically receive:

  • A default Deployment for device provisioning (refer to default_deployment_sid below)
  • A default Sync service instance (refer to sync_service_instance attribute under Deployment resource)

For more information on managing device fleets and their dependencies, please refer to Using Fleets documentation.

Twilio Console

You can manage Fleets of your devices using your Twilio console when logged in to the console.

Properties

Each Fleet resource has the following properties. Some of them are optional and allowed to be null: unique_name, friendly_name, default_deployment_sid.

Names in PHP format
sid
sid<TH> Not PII

Contains a 34 character string that uniquely identifies this Fleet resource.

url
url Not PII

Contains an absolute URL for this Fleet resource.

uniqueName
string Not PII

Contains a unique and addressable name of this Fleet, e.g. 'default', up to 128 characters long.

friendlyName
string Not PII

Contains a human readable descriptive text for this Fleet, up to 256 characters long.

accountSid
sid<AC> Not PII

Speicifies the unique string identifier of the Account responsible for this Fleet.

defaultDeploymentSid
sid<DL> Not PII

Contains the string identifier of the automatically provisioned default Deployment of this Fleet.

dateCreated
date_time<iso8601> Not PII

Specifies the date this Fleet was created, given in UTC ISO 8601 format.

dateUpdated
date_time<iso8601> Not PII

Specifies the date this Fleet was last updated, given in UTC ISO 8601 format.

links
uri_map Not PII

Contains a dictionary of URL links to nested resources of this Fleet.

List All Fleets

GET /Fleets

Retrieve a list of all Fleets belonging to your account.

Note: By default, this will return the first 50 Fleets. Supply a PageSize parameter to fetch up to 100 items at once. See paging for more information.

        
        
        
        

        Create a Fleet

        POST /Fleets
        

        Create a new Fleet for scoping of devices within your account.

        Parameters

        Names in PHP format
        friendlyName
        Optional
        post string Not PII

        Provides a human readable descriptive text for this Fleet, up to 256 characters long.

              
              
              
              

              Retrieve a Fleet

              GET /Fleets/{FLxx}
              
              GET /Fleets/{UniqueName}
              

              Fetch information about a specific Fleet in your account.

                    
                    
                    
                    

                    Update a Fleet

                    POST /Fleets/{FLxx}
                    
                    POST /Fleets/{UniqueName}
                    

                    Update the friendly name property of a specific Fleet in your account.

                    Parameters

                    Names in PHP format
                    sid
                    Required
                    post sid_like<FL> Not PII

                    Provides a 34 character string that uniquely identifies the requested Fleet resource.

                    friendlyName
                    Optional
                    post string Not PII

                    Provides a human readable descriptive text for this Fleet, up to 256 characters long.

                    defaultDeploymentSid
                    Optional
                    post sid<DL> Not PII

                    Provides a string identifier of a Deployment that is going to be used as a default one for this Fleet.

                          
                          
                          
                          

                          Delete a Fleet

                          DELETE /Fleets/{FLxx}
                          
                          DELETE /Fleets/{UniqueName}
                          

                          Delete a specific Fleet from your account, also destroys all nested resources: Devices, Deployments, Certificates, Keys.

                                
                                
                                
                                
                                Rate this page:

                                Need some help?

                                We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.