This API is used to query the instance list.
Function
This API is used to query the list of IoTDA instances.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
GET /v5/iot/{project_id}/iotda-instances
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Parameter description: project ID. For details, see Obtaining a Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
No |
Integer |
Parameter description: If offset is set to N, the query starts from the N+1 record after the last record in the previous query. The value is an integer ranging from 0 to 500. The default value is 0. If offset is set to 0, the output starts from the first record after the last record in the previous query. - To ensure API performance, you can use this parameter together with marker to turn pages. For example, if there are 50 records on each page, you can directly specify offset to jump to the specified page within page 1 and 11. If you want to view records displayed on pages 12 to 22, you need to use the marker value returned on page 11 as the marker value for the next query. Value: an integer ranging from 0 to 500. The default value is 0. Minimum: 0 Maximum: 500 Default: 0 |
limit |
No |
Integer |
Parameter description: number of records to display on each page. Value: an integer ranging from 1 to 500. The default value is 500. Minimum: 1 Maximum: 500 Default: 500 |
marker |
No |
String |
ID of the last record in the previous query. The value is returned by the platform during the previous query. Records are queried in descending order of record IDs (the marker value). A newer record will have a larger ID. If marker is specified, only the records whose IDs are smaller than marker are queried. If marker is not specified, the query starts from the record with the largest ID, that is, the latest record. If all data needs to be queried in sequence, this parameter must be filled with the value of marker returned in the last query response each time. Default: ffffffffffffffffff |
name |
No |
String |
Parameter description: IoTDA instance name. The fuzzy match is used. Value: Enter 1 to 64 characters, including letters, digits, underscores (_), and hyphens (-). |
instance_type |
No |
String |
Parameter description: instance type. Options:
|
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
No |
String |
Parameter description: user token. You can obtain the token by calling the IAM API Obtaining a User Token Through Password Authentication. In the returned response header, X-Subject-Token is the desired user token. For details about how to obtain the token, see Token Authentication. Minimum: 0 Maximum: 1024000 |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
count |
Integer |
Total number of IoTDA instances. Minimum: 1 Maximum: 10000 |
marker |
String |
ID of the last record in this query, which can be used in the next query. Minimum: 0 Maximum: 20 |
instances |
Array of QueryInstanceSimplify objects |
Details list of IoTDA instances. Array Length: 0 - 10000 |
Parameter |
Type |
Description |
---|---|---|
instance_type |
String |
Parameter description: instance type. Options:
|
instance_id |
String |
Parameter description: instance ID. Value: Enter up to 36 characters, including lowercase letters (a-f), digits, and hyphens (-). |
name |
String |
Parameter description: instance name. Value: Enter 1 to 64 characters, including letters, digits, underscores (_), and hyphens (-). |
charge_mode |
String |
Parameter description: payment mode of the instance. Options:
|
flavor |
Flavor object |
Parameter description: specifications of an IoTDA instance. |
status |
String |
Parameter description: instance status. Options:
Minimum: 0 Maximum: 64 |
create_time |
String |
Parameter description: time when the instance is created. Example: 2023-01-28T06:57:52Z. Minimum: 0 Maximum: 64 |
update_time |
String |
Parameter description: last update time of the instance. Example: 2023-01-28T06:57:52Z. Minimum: 0 Maximum: 64 |
enterprise_project_id |
String |
Parameter description: enterprise project ID. |
Parameter |
Type |
Description |
---|---|---|
type |
String |
Parameter description: specification name of the IoTDA instance to create. For details, see Specifications. |
size |
Integer |
Parameter description: unit number of the standard IoTDA instances to create. For details, see Specifications. This parameter is mandatory when instance_type is set to standard. Minimum: 1 Maximum: 200 |
Example Requests
This API is used to query all instances in a list.
GET https://{endpoint}/v5/iot/{project_id}/iotda-instances
Example Responses
Status code: 200
OK
{ "count" : 1, "marker" : 1805431584415871305, "instances" : [ { "instance_type" : "standard", "instance_id" : "8561675c-d8a3-4956-9884-9cf9cbdd3134", "name" : "iotda_instance", "flavor" : { "type" : "iotda.standard.s1", "size" : 1 }, "status" : "ACTIVE", "create_time" : "2023-01-28T06:57:52Z", "update_time" : "2023-01-28T06:57:52Z", "enterprise_project_id" : "d22e47e9-cfad-4254-8a29-d2a56a07681d" } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
401 |
Unauthorized |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot