Project

General

Profile

Default response » History » Version 1

Ryan Supawarapong, 02/17/2026 03:01 AM

1 1 Ryan Supawarapong
# Default response
2
3
This is the default response body for the project. Refer to [jsend](https://github.com/omniti-labs/jsend) for more detail on the standard.
4
5
| Key | Type | Value | Description |
6
| --- | ---- | ----- | ----------- |
7
| status | string | "success", "failed", "error" | status to indicated the response status |
8
| message | string |  "" | only used the status is error |
9
| data | map[string]any | "data":{"test1":"value"} | detail for the response |
10
| xid | string | "061b8631-0caa-4ec0-8b6f-fe9e43703dd0" | xid string for debugging and tracing purpose |
11
12
13
## Status detail
14
15
<table>
16
<tr><th>Type</td><th>Description</th><th>Required Keys</th><th>Optional Keys</td></tr>
17
<tr><td>success</td><td>All went well, and (usually) some data was returned.</td><td>status, data</td><td></td></tr>
18
<tr><td>fail</td><td>There was a problem with the data submitted, or some pre-condition of the API call wasn't satisfied</td><td>status, data</td><td></td></tr>
19
<tr><td>error</td><td>An error occurred in processing the request, i.e. an exception was thrown</td><td>status, message</td><td>code, data</td></tr>
20
</table>