Trigger GC Job (TriggerGCJob)

API Request

URLs
PUT zstack/v1/gc-jobs/{uuid}/actions
Headers
Authorization: OAuth the-session-uuid
Body
{   "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 Example
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
Parameter List
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

API Response

When the API succeeds, it returns an empty JSON structure {}. When an error occurs, the returned JSON structure contains an error field, for example:
{     "error": {         "code": "SYS.1001",         "description": "A message or a operation timeout",         "details": "Create VM on KVM timeout after 300s"     } }

SDK Examples

Java SDK
TriggerGCJobAction action = new TriggerGCJobAction(); action.uuid = "ff4eb99f62364bcab4cbcebe4dea7de7"; action.sessionId = "7a51dbf52d5d41b0a877491143b6937a"; TriggerGCJobAction.Result res = action.call();
Python SDK
TriggerGCJobAction action = TriggerGCJobAction() action.uuid = "a1d1ab14128e4f7398924591915ac65c" action.sessionId = "6dcc50cb3dc5401b8ce03540a225f623" TriggerGCJobAction.Result res = action.call()

Delete GC Job (DeleteGCJob)

API Request

URLs
DELETE 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 ea06449412a24699955ea802430000f3" \ -X DELETE http://localhost:8080/zstack/v1/gc-jobs/3a5d968dd8d743c280888a4973ea71d5
Parameter List
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

API Response

When the API succeeds, it returns an empty JSON structure {}. When an error occurs, the returned JSON structure contains an error field, for example:
{     "error": {         "code": "SYS.1001",         "description": "A message or a operation timeout",         "details": "Create VM on KVM timeout after 300s"     } }

SDK Examples

Java SDK
DeleteGCJobAction action = new DeleteGCJobAction(); action.uuid = "6bac0ebceac44a198609b0019c40a8eb"; action.sessionId = "78e46c7bfe0249fe9613223642222085"; DeleteGCJobAction.Result res = action.call();
Python SDK
DeleteGCJobAction action = DeleteGCJobAction() action.uuid = "42db77385ebf4768bf105011ec8e6aaf" action.sessionId = "331167c4de264088862128e5043c5a93" DeleteGCJobAction.Result res = action.call()

Query GC Job (QueryGCJob)

API Request

URLs
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"     }   ] }
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
#error
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
#inventories
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

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()

Archives

Download Document Archives

Download

Already filled the basic info?Click here.

Enter at least 2 characters.
Cannot be empty.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

An email with a verification code will be sent to you. Make sure the address you provided is valid and correct.

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Download

Not filled the basic info yet? Click here.

Invalid email address or mobile number.
同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
ZStack Training and Certification
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
Request Trial
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder. After receiving the email, click the URL to download the documentation.

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder.
Or click on the URL below. (For Internet Explorer, right-click the URL and save it.)

Thank you for using ZStack products and services.

Submit successfully.

We'll connect soon.

Thank you for using ZStack products and services.