OpenAPI response structure

更新时间:
复制 MD 格式

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

FieldTypeDescription
requestIdStringThe request ID. Include this ID when contacting support to help trace the call.
resultArray or ObjectThe 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

FieldTypeDescription
requestIdStringThe request ID. Include this ID when contacting support to help trace the call.
httpCodeIntegerThe HTTP status code.
codeStringA dot-separated error code that identifies the error category and type, such as App.NotFound. Use this field for programmatic error handling.
messageStringA human-readable description of the error. Use this field for debugging and logging.

For a full list of error codes, see Error codes.