Overview
All HamsterBase APIs start with /public/api/v1
Authorization
Visit
/settings/api
to create a new API token. The format is similar toZT478FS-XCB4CD1-N3XMPJC-ZT2FVNX
When calling the API, assuming the Token is
ZT478FS-XCB4CD1-N3XMPJC-ZT2FVNX
, the following information needs to be appended to the request header.Authorization: Bearer ZT478FS-XCB4CD1-N3XMPJC-ZT2FVNX
Format Overview
The API response format is JSON and a 200 status code is returned for each successful API request.
The JSON response format is as follows.
ts
interface HamsterBaseResponse<T> {
success: boolean;
/**
* Return Results
*/
data: T;
/**
* Error code
*/
errorCode?: string;
/**
* Error message
*/
errorMessage?: string;
}