Help Center/ ModelArts/ API Reference/ Service Management/ Obtaining Inference Service Tags
Updated on 2024-05-30 GMT+08:00

Obtaining Inference Service Tags

Function

This API is used to obtain inference service tags in the current project. Tags in all workspaces are obtained by default. If you do not have the permission, no tag is returned.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

URI

GET /v1/{project_id}/services/tms/tags

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Obtaining a Project ID and Name.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token, which can be obtained by calling the IAM API that is used for obtaining a user token. The value of X-Subject-Token in the response header is the user token.

Content-Type

Yes

String

This field is set to application/json;charset=utf8.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

tags

Array of CombineTmsTags objects

Indicates the convergence structure of tags. Tags with the same key are combined.

Table 4 CombineTmsTags

Parameter

Type

Description

key

String

Tag key.

values

Array of strings

List of combined tag values with the same key.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error codes of ModelArts.

error_msg

String

Error message.

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error codes of ModelArts.

error_msg

String

Error message.

Status code: 403

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error codes of ModelArts.

error_msg

String

Error message.

Example Requests

https://{endpoint}/v1/{project_id}/services/tms/tags

Example Responses

Status code: 200

All service tags of the project are returned.

{
  "tags" : [ {
    "key" : "model_version",
    "values" : [ "0.1", "0.2" ]
  }, {
    "key" : "conda_version",
    "values" : [ "10.2", "11.0" ]
  } ]
}

Status Codes

Status Code

Description

200

All service tags of the project are returned.

400

Invalid parameter

401

Authentication failed.

403

Insufficient permissions

Error Codes

See Error Codes.