ZStack Cloud Platform
Single Server, Free Trial for One Year
PUT zstack/v1/gc-jobs/{uuid}/actionsAuthorization: OAuth the-session-uuid{ "triggerGCJob": {}, "systemTags": [], "userTags": [] }
Note: In the above example, the systemTags and userTags fields are optional. They are listed to indicate that the body can contain these two fields.curl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \ -X PUT -d '{"triggerGCJob":{}}' \ http://localhost:8080/zstack/v1/gc-jobs/1450275537b53cfeba9e6ac79ebadb16/actions| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | The UUID of the resource. Uniquely identifies the resource | 0.6 | |
| systemTags (Optional) | List | body | 0.6 | ||
| userTags (Optional) | List | body | 0.6 |
{ "error": { "code": "SYS.1001", "description": "A message or a operation timeout", "details": "Create VM on KVM timeout after 300s" } }TriggerGCJobAction action = new TriggerGCJobAction(); action.uuid = "ff4eb99f62364bcab4cbcebe4dea7de7"; action.sessionId = "7a51dbf52d5d41b0a877491143b6937a"; TriggerGCJobAction.Result res = action.call();TriggerGCJobAction action = TriggerGCJobAction() action.uuid = "a1d1ab14128e4f7398924591915ac65c" action.sessionId = "6dcc50cb3dc5401b8ce03540a225f623" TriggerGCJobAction.Result res = action.call()DELETE zstack/v1/gc-jobs/{uuid}Authorization: OAuth the-session-uuidcurl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth ea06449412a24699955ea802430000f3" \ -X DELETE http://localhost:8080/zstack/v1/gc-jobs/3a5d968dd8d743c280888a4973ea71d5| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| uuid | String | url | The UUID of the resource. Uniquely identifies the resource | 0.6 | |
| systemTags (Optional) | List | body | 0.6 | ||
| userTags (Optional) | List | body | 0.6 |
{ "error": { "code": "SYS.1001", "description": "A message or a operation timeout", "details": "Create VM on KVM timeout after 300s" } }DeleteGCJobAction action = new DeleteGCJobAction(); action.uuid = "6bac0ebceac44a198609b0019c40a8eb"; action.sessionId = "78e46c7bfe0249fe9613223642222085"; DeleteGCJobAction.Result res = action.call();DeleteGCJobAction action = DeleteGCJobAction() action.uuid = "42db77385ebf4768bf105011ec8e6aaf" action.sessionId = "331167c4de264088862128e5043c5a93" DeleteGCJobAction.Result res = action.call()GET zstack/v1/gc-jobs GET zstack/v1/gc-jobs/{uuid}Authorization: OAuth the-session-uuidcurl -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=Enabledcurl -H "Content-Type: application/json;charset=UTF-8" \ -H "Authorization: OAuth 68ab95870cb4460fb9c82360f9ed64b2" \ -X GET http://localhost:8080/zstack/v1/gc-jobs/b41ea820e0bd47d5a028ddb3eb10bb98Queryable 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.
{ "inventories": [ { "uuid": "c7606f2ed20b4212aa3d1ce4e00acc1c", "name": "TestGC", "type": "TimeBased", "createDate": "Jun 7, 2017 9:21:16 PM", "lastOpDate": "Jun 7, 2017 9:21:16 PM" } ] }| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | The error code. If not null, the operation failed. This field is null when the operation succeeds. See error for details | 0.6 |
| inventories | List | See inventories for details | 0.6 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | The error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.1001 | 0.6 |
| description | String | A brief description of the error | 0.6 |
| details | String | The detailed error information | 0.6 |
| elaboration | String | Reserved field. Default is null | 0.6 |
| opaque | LinkedHashMap | Reserved field. Default is null | 0.6 |
| cause | ErrorCode | The root error that caused the current error. If no root error exists, this field is null | 0.6 |
| Name | Type | Description | Starting Version |
|---|---|---|---|
| uuid | String | The UUID of the resource. Uniquely identifies the resource | 0.6 |
| name | String | Resource name | 0.6 |
| runnerClass | String | 0.6 | |
| context | String | 0.6 | |
| status | String | 0.6 | |
| managementNodeUuid | String | 0.6 | |
| type | String | 0.6 | |
| createDate | Timestamp | Creation time | 0.6 |
| lastOpDate | Timestamp | Last modification time | 0.6 |
QueryGCJobAction action = new QueryGCJobAction(); action.conditions = asList("name=gc","state=Enabled"); action.sessionId = "3b403b588a96471cbee74a19d4a846aa"; QueryGCJobAction.Result res = action.call();QueryGCJobAction action = QueryGCJobAction() action.conditions = ["name=gc","state=Enabled"] action.sessionId = "76af9b84c87f4dcf9aa8f9042a982a6b" QueryGCJobAction.Result res = action.call()