Query GC Job

GET/zstack/v1/gc-jobs
GET/zstack/v1/gc-jobs/{uuid}

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 8a590138fd064e5b8747e9fa75dd6c63" \
-X GET http://localhost:8080/zstack/v1/gc-jobs?q=name=gc&q=state=Enabled
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 68ab95870cb4460fb9c82360f9ed64b2" \
-X GET http://localhost:8080/zstack/v1/gc-jobs/b41ea820e0bd47d5a028ddb3eb10bb98

Queryable Fields

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

API Response

Response Example

{
  "inventories": [
    {
      "uuid": "c7606f2ed20b4212aa3d1ce4e00acc1c",
      "name": "TestGC",
      "type": "TimeBased",
      "createDate": "Jun 7, 2017 9:21:16 PM",
      "lastOpDate": "Jun 7, 2017 9:21:16 PM"
    }
  ]
}
NameTypeDescriptionStarting Version
errorErrorCodeThe error code. If not null, the operation failed. This field is null when the operation succeeds. See error for details0.6
inventoriesListSee inventories for details0.6

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.10010.6
descriptionStringA brief description of the error0.6
detailsStringThe detailed error information0.6
elaborationStringReserved field. Default is null0.6
opaqueLinkedHashMapReserved field. Default is null0.6
causeErrorCodeThe root error that caused the current error. If no root error exists, this field is null0.6

inventories

NameTypeDescriptionStarting Version
uuidStringThe UUID of the resource. Uniquely identifies the resource0.6
nameStringResource name0.6
runnerClassString 0.6
contextString 0.6
statusString 0.6
managementNodeUuidString 0.6
typeString 0.6
createDateTimestampCreation time0.6
lastOpDateTimestampLast modification time0.6

SDK Examples

Java SDK

QueryGCJobAction action = new QueryGCJobAction();
action.conditions = asList("name=gc","state=Enabled");
action.sessionId = "3b403b588a96471cbee74a19d4a846aa";
QueryGCJobAction.Result res = action.call();

Python SDK

QueryGCJobAction action = QueryGCJobAction()
action.conditions = ["name=gc","state=Enabled"]
action.sessionId = "76af9b84c87f4dcf9aa8f9042a982a6b"
QueryGCJobAction.Result res = action.call()