Reviewed-by: Drobnak, David <david.drobnak@t-systems.com> Co-authored-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-committed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
32 KiB
Obtaining Information About a Task with a Specified ID
Function
This API is used to obtain task information from the task center. Before calling this API:
- Learn how to authorize and authenticate it.
- Obtain the required region and endpoint.
URI
- URI format
- Example
GET https://gaussdb-mysql.eu-de.otc.t-systems.com/mysql/v3/0483b6b16e954cb88930a360d2c4e663/jobs?id=a9767ede-fe0f-4888-9003-e843a4c90514
- Parameter description
Table 1 Parameter description Name
Mandatory
Description
project_id
Yes
Project ID of a tenant in a region.
To obtain this value, see Obtaining a Project ID.
id
Yes
Task ID.
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. |
X-Language |
No |
String |
Language. |
Content-Type |
Yes |
String |
MIME type of the request body. You are advised to use the default value application/json. For APIs used to upload objects or images, the value can vary depending on the flow type. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
job |
GetJobInfoDetail object |
Task information. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Task ID. |
name |
String |
Task name. |
status |
String |
Task execution status. Valid value:
|
created |
String |
Creation time in the "yyyy-mm-ddThh:mm:ssZ" format. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. The value is empty unless the instance creation is complete. |
ended |
String |
End time in the "yyyy-mm-ddThh:mm:ssZ" format. T is the separator between the calendar and the hourly notation of time. Z indicates the time zone offset. The value is empty unless the instance creation is complete. |
process |
String |
Task execution progress. The execution progress (such as 60%) is displayed only when the task is being executed. Otherwise, "" is returned. |
instance |
GetJobInstanceInfoDetail object |
Instance information of the task with the specified ID. |
entities |
Table 6 object |
Displayed information varies depending on tasks. |
fail_reason |
String |
Task failure information. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
DB instance ID. |
name |
String |
DB instance name. |
Name |
Type |
Description |
---|---|---|
instance |
Object |
DB instance queried in the task. For details, see Table 7. |
resource_ids |
List<String> |
Resource ID involved in a task. |
Name |
Type |
Description |
---|---|---|
endpoint |
String |
DB instance connection address. |
type |
String |
DB instance type. |
datastore |
Object |
DB information. For details, see Table 8. |
Name |
Type |
Description |
---|---|---|
type |
String |
DB engine. |
version |
String |
DB version. |
Name |
Type |
Description |
---|---|---|
public_ip |
String |
EIP bound to the instance. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Request
GET https://gaussdb-mysql.eu-de.otc.t-systems.com/mysql/v3/0483b6b16e954cb88930a360d2c4e663/jobs?id=a9767ede-fe0f-4888-9003-e843a4c90514
Example Response
Status code: 200
Success.
{ "job": { "id": "31b8ae23-c687-4d80-b7b4-42a66c9bb886", "name": " RestartGaussDBInstance", "status": "Completed", "created": "2018-08-06T10:41:14+0000", "ended": "2018-08-06T16:41:14+0000", "process": "", "instance": { "id": "a48e43ff268f4c0e879652d65e63d0fbin01", "name": "DO-NOT-TOUCH-mgr2-gaussdb" }, "entities": {} } }
Status Code
For details, see Status Codes.
Error Code
For details, see Error Codes.