All API responses from OpenSearch Industry Algorithm Edition return JSON. A response is either a success or an error.
Success responses
A success response contains two top-level fields: a unique request ID and the query result.
Example
{
"requestId": "D77D0DAF-790D-F5F5-A9C0-133738165014",
"result": (Array|Object)
}Fields
| Field | Type | Description |
|---|---|---|
requestId | String | The request ID. Include this ID when contacting support to help trace the call. |
result | Array or Object | The query result. |
Error responses
An error response includes the HTTP status code, a machine-readable error code, and a human-readable message.
Example
{
"requestId": "BD1EA715-DF6F-06C2-004C-C1FA0D3A9820",
"httpCode": 404,
"code": "App.NotFound",
"message": "App not found"
}Fields
| Field | Type | Description |
|---|---|---|
requestId | String | The request ID. Include this ID when contacting support to help trace the call. |
httpCode | Integer | The HTTP status code. |
code | String | A dot-separated error code that identifies the error category and type, such as App.NotFound. Use this field for programmatic error handling. |
message | String | A human-readable description of the error. Use this field for debugging and logging. |
For a full list of error codes, see Error codes.
该文章对您有帮助吗?