Querying a Transaction
Function
This API is used to query a transaction.
URI
GET /v1/{project_id}/templates/{template_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Method of obtaining instructions. |
template_id |
Yes |
Integer |
Transaction ID. |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
code |
String |
Response code. |
message |
String |
Response message. |
temp_info |
TempInfo object |
Transaction details. |
Parameter |
Type |
Description |
---|---|---|
id |
Integer |
Transaction ID. |
project_id |
Integer |
Project ID. |
name |
String |
Transaction name. |
description |
String |
Transaction description. |
variables |
String |
Variable. |
contents |
Array of objects |
Transaction script information. |
temp_type |
Integer |
Transaction type (deprecated). |
for_loop_params |
Array of objects |
Logic controller field of the old edition. This parameter is not used in the current edition. |
logic_controller |
LogicController object |
Logic controller information. |
enable_pre |
Boolean |
Whether to enable the preset transaction. This parameter is not used in the current edition. |
Parameter |
Type |
Description |
---|---|---|
for_loop_params |
String |
Logic controller field of the old edition. This parameter is not used in the current edition. |
condition |
String |
Logic controller condition. |
Status code: 501
Parameter |
Type |
Description |
---|---|---|
- |
String |
response message |
Example Requests
Querying details about the transaction whose ID is 1.
/v1/{project_id}/templates/1 { "code" : "SVCSTG.CPTS.0000000", "message" : "success", "temp_info" : { "id" : 155175, "project_id" : 403931, "name" : "test", "description" : "", "variables" : null, "contents" : [ { "content_id" : 155175, "content" : [ { "content_type" : 2, "content" : { "_adressValue" : "http://1.1.1.1", "body_type" : 0, "bodys" : [ ], "check_end_length" : null, "check_end_str" : null, "check_end_type" : null, "connect_timeout" : 5000, "connect_type" : 1, "headers" : [ { "key" : "Content-Type", "value" : "application/json" } ], "http_version" : "HTTP/1.1", "method" : "GET", "name" : "Msg-8015", "protocol_type" : 1, "return_timeout" : 5000, "return_timeout_param" : null, "url" : "http://1.1.1.1" } } ], "index" : -1, "selected_temp_name" : "", "data" : null, "data_type" : 0, "conditions" : null, "is_disabled" : false, "is_continue" : false } ], "temp_type" : 0, "for_loop_params" : [ ], "logic_controller" : { "for_loop_params" : null, "condition" : null }, "enable_pre" : false } }
Example Responses
Status code: 200
success
{ "code" : "SVCSTG.CPTS.0000000", "message" : "success", "temp_info" : { "id" : 21531, "project_id" : 17543, "name" : "transaction", "description" : "", "variables" : null, "contents" : [ { "content_id" : 21531, "content" : [ { "content_type" : 2, "content" : { "body_type" : 0, "bodys" : [ ], "check_end_length" : null, "check_end_str" : null, "check_end_type" : null, "connect_timeout" : 5000, "connect_type" : 1, "headers" : [ { "key" : "Content-Type", "value" : "application/json" } ], "http_version" : "HTTP/1.1", "method" : "GET", "name" : "Msg-73387", "protocol_type" : 2, "return_timeout" : 5000, "return_timeout_param" : null, "url" : "https://www.domain-example.com" } } ], "index" : -1, "selected_temp_name" : "", "data" : null, "data_type" : 0, "conditions" : null, "is_disabled" : false, "is_continue" : false } ], "temp_type" : 0, "for_loop_params" : [ ], "logic_controller" : { "for_loop_params" : null, "condition" : null }, "enable_pre" : false } }
Status Codes
Status Code |
Description |
---|---|
200 |
success |
501 |
unknown error |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot