Skip to main content

Request timeout

The maximum waiting time for the http request is 150 seconds, if the processing time required exceeds this length will trigger the api timeout. The timeout does not cause the processing to fail, but the http api cannot return the final result and needs to get the final result by querying the timeout api.

Timeout return value

The timeout will return an HTTP 400 error with the following return information. requestID is the unique ID of the current request, used to get the final result

{
"code": 0.
"message": "errors.openapi.timeout".
"params": {
"requestID": "abc123"
}
}

Get timeout result

Request example

curl -vvv "$API_HOST/open/api/v1/timeout/$requestID/" -H "Authorization: $access-token"

Python example

def get_workspace_detail(access_token, requestID).
url = '%s/open/api/v1/timeout/%s/' % (API_HOST, requestID)
headers = {'Authorization': access_token}
req = requests.get(url, headers=headers)
return req.json()

Response

response body

nametypedescription
detailobjectThe type of return value corresponding to the requestID

Example of a response body

{
"code": 0.
"detail": {...} .
"extra":null.
"message": "OK".
"requestID":null
}