Querying the Details About an Instance
Function
You can use the API to query detailed information about a specified instance.
URI
GET /v1/{project_id}/service/{instance_name}
Name |
Mandatory |
Type |
Description |
---|---|---|---|
instance_name |
Yes |
String |
Instance name |
project_id |
Yes |
String |
Project ID. See Obtaining a Project ID and Name. |
Request Message
Name |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token Used to obtain the permission to call APIs. For details about how to obtain the token, see Authentication. The value of X-Subject-Token in the response header is the token. |
Response Parameters
Status code: 200
Name |
Type |
Description |
---|---|---|
domain |
String |
Model name or domain name |
desc |
String |
Description |
registerDate |
Long |
Registration time |
expiredDate |
Long |
Expiration time. The value -1 indicates that the instance will never expire. |
level |
Integer |
Specifications, that is, the image quantity of an instance. The default value is 30000000. |
tags |
Array of strings |
Custom image tag |
status |
String |
Instance status. Available enumeration values are as follows:
|
instanceName |
String |
Instance name |
Status code: 400
Name |
Type |
Description |
---|---|---|
error_code |
String |
Error code of a failed API call. For details, see Error Codes. This parameter is not included when the API is successfully called. |
error_msg |
String |
Error message when the API call fails. This parameter is not included when the API is successfully called. |
Example Request
Query detailed information about a specified instance.
GET https://{endpoint}/v1/{project_id}/service/{instance_name}
Example Response
Status code: 200
Example of a successful response
{ "instanceName" : "test-instance", "level" : 30000000, "expiredDate" : 1530848365207, "domain" : "model description", "desc" : "register service for instance test.", "registerDate" : 1529377136279, "tags" : [ "tag1", "tag2" ], "status" : "NORMAL" }
Status code: 400
Example of a failed response
{ "error_code" : "IS.0004", "error_msg" : "The authentication token is abnormal." }
Status Code
Status Code |
Description |
---|---|
200 |
Successful response |
400 |
Failed response |
Error Code
For details, 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