Query System Tags

GET/zstack/v1/system-tags
GET/zstack/v1/system-tags/{uuid}

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 67bf58bea6854e568556b0e9f4bc84f6" \
-X GET http://localhost:8080/zstack/v1/system-tags?q=inherent=true&q=resourceType=HostVO
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth c798e7031aaa430386636f9ff8d6bb17" \
-X GET http://localhost:8080/zstack/v1/system-tags/7c8162efed2840c08a43e0afdcebf01b

Queryable Fields

Run the CLI command line tool, type QuerySystemTag and press the Tab key to view all queryable fields and cross-table queryable resource names.

API Response

Response Example

{
  "inventories": [
    {
      "inherent": false,
      "uuid": "0bba7cb618314646aea4e70b9be3bfea",
      "resourceType": "HostVO",
      "tag": "reservedMemory::1G",
      "type": "System",
      "createDate": "May 11, 2017 1:22:40 PM",
      "lastOpDate": "May 11, 2017 1:22:40 PM"
    }
  ]
}
NameTypeDescriptionStarting Version
errorErrorCodeThe error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error0.6
inventoriesListFor details, see inventories0.6

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.1001.0.6
descriptionStringA brief description of the error0.6
detailsStringDetailed information about the error0.6
elaborationStringReserved field. Default is null.0.6
opaqueLinkedHashMapReserved field. Default is null.0.6
causeErrorCodeThe root error. The source error that caused the current error. If there is no root error, this field is null.0.6

inventories

NameTypeDescriptionStarting Version
inherentBooleanInternal system tag0.6
uuidStringThe UUID of the resource. Uniquely identifies the resource.0.6
resourceUuidStringUser-specified resource UUID. If specified, the system will not randomly assign a UUID to the resource.0.6
resourceTypeStringWhen creating a tag, the user must specify the resource type associated with the tag.0.6
tagStringTag string0.6
typeStringReserved field. Do not use.0.6
createDateTimestampCreation time0.6
lastOpDateTimestampLast modification time0.6

SDK Examples

Java SDK

QuerySystemTagAction action = new QuerySystemTagAction();
action.conditions = asList("inherent=true","resourceType=HostVO");
action.sessionId = "05c74fc02e574e678a407f0ccef8ae5f";
QuerySystemTagAction.Result res = action.call();

Python SDK

QuerySystemTagAction action = QuerySystemTagAction()
action.conditions = ["inherent=true","resourceType=HostVO"]
action.sessionId = "a1d2f95577514d0a918ce1502dc27e33"
QuerySystemTagAction.Result res = action.call()