メニュー

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: Devices

A Device is the main resource within the Twilio Sync for IoT resources. A Device represents a physical device, with a hardware identifier, mapped to a unique Device SID within a Fleet. Devices cannot exist within 2 separate Fleets, nor can they belong to more than one Deployment (within a Fleet). A Device may not be unbound; if we cannot determine the appropriate Fleet from the device's credentials, it will not get authorized to connect or access Twilio services.

Devices can interact with Twilio services, such as Sync and inherit settings from their Deployments. For more information on managing devices and their dependencies, please refer to Deploying Devices documentation.

Twilio コンソール

You can manage Sync IoT devices using your Twilio console when logged in to the console.

プロパティ

Each Device resource has the following properties. Some of them are optional and allowed to be null: unique_name, friendly_name, identity, deployment_sid, date_authenticated.

Names in PHP format
sid
sid<TH> Not PII

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

url
url Not PII

Contains an absolute URL for this Device resource.

uniqueName
文字列 Not PII

Contains a unique and addressable name of this Device, assigned by the developer, up to 128 characters long.

friendlyName
文字列 Not PII

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

fleetSid
sid_like<FL> Not PII

Specifies the unique string identifier of the Fleet that the given Device belongs to.

enabled
boolean Not PII

Contains a boolean flag indicating whether the device is enabled or not, blocks device connectivity if set to false.

accountSid
sid<AC> Not PII

Specifies the unique string identifier of the Account responsible for this Device.

identity
文字列 Not PII

Contains an arbitrary string identifier representing a human user associated with this Device, assigned by the developer, up to 256 characters long.

deploymentSid
sid<DL> Not PII

Specifies the unique string identifier of the Deployment group that this Device is associated with.

dateCreated
date_time<iso8601> Not PII

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

dateUpdated
date_time<iso8601> Not PII

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

dateAuthenticated
date_time<iso8601> Not PII

Specifies the date this Device was last authenticated, given in UTC ISO 8601 format.

List All Devices

GET /Fleets/{FLxx|UniqueName}/Devices

Retrieve a list of all Devices belonging to the Fleet.

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

リストフィルター

The following GET query string parameters allow you to limit the list returned. Note that the parameters are case-sensitive:

Names in PHP format
deploymentSid
オプション
GET sid<DL> Not PII

Filters the resulting list of Devices by a unique string identifier of the Deployment they are associated with.

        
        
        
        

        Deviceを作成する

        POST /Fleets/{FLxx|UniqueName}/Devices
        

        Create a new Device in the Fleet, optionally giving it a unique name, friendly name, and assigning to a Deployment and/or human identity.

        In case the DeploymentSid parameter is omitted, the Device is created with a default deployment of the fleet it belongs to (see default_deployment_sid attribute under the Fleet resource).

        パラメーター

        Names in PHP format
        uniqueName
        オプション
        post 文字列 Not PII

        Provides a unique and addressable name to be assigned to this Device, to be used in addition to SID, up to 128 characters long.

        friendlyName
        オプション
        post 文字列 Not PII

        Provides a human readable descriptive text to be assigned to this Device, up to 256 characters long.

        identity
        オプション
        post 文字列 Not PII

        Provides an arbitrary string identifier representing a human user to be associated with this Device, up to 256 characters long.

        deploymentSid
        オプション
        post sid<DL> Not PII

        Specifies the unique string identifier of the Deployment group that this Device is going to be associated with.

              
              
              
              

              Retrieve a Device

              GET /Fleets/{FLxx|UniqueName}/Devices/{THxx}
              
              GET /Fleets/{FLxx|UniqueName}/Devices/{UniqueName}
              

              Fetch information about a specific Device in the Fleet.

                    
                    
                    
                    

                    Update A Device

                    POST /Fleets/{FLxx|UniqueName}/Devices/{THxx}
                    
                    POST /Fleets/{FLxx|UniqueName}/Devices/{UniqueName}
                    

                    Update the given properties of a specific Device in the Fleet, giving it a friendly name, assigning to a Deployment, or a human identity.

                    パラメーター

                    Names in PHP format
                    sid
                    必須
                    post sid_like<TH> Not PII

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

                    friendlyName
                    オプション
                    post 文字列 Not PII

                    Provides a human readable descriptive text to be assigned to this Device, up to 256 characters long.

                    identity
                    オプション
                    post 文字列 Not PII

                    Provides an arbitrary string identifier representing a human user to be associated with this Device, up to 256 characters long.

                    deploymentSid
                    オプション
                    post sid<DL> Not PII

                    Specifies the unique string identifier of the Deployment group that this Device is going to be associated with.

                          
                          
                          
                          

                          Delete A Device

                          DELETE /Fleets/{FLxx|UniqueName}/Devices/{THxx}
                          
                          DELETE /Fleets/{FLxx|UniqueName}/Devices/{UniqueName}
                          

                          Delete a specific Device from the Fleet, also removing it from associated Deployments. The Certificate and Key credentials that were previously used by this device will not be deleted, and will be released instead, with respective device_sid fields reset to null.

                                
                                
                                
                                
                                Rate this page:

                                ヘルプが必要ですか?

                                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.