Standard Request and Response
General steps for making a request:
Build Request Header Information
Access-Key:Fill in directly.
Content-Type:Fixed to application/json
Build the request parameters according to the API documentation.
Call the relevant interfaces as needed.
1. Build HTTP Request Header Information
First Type: Query type, taking the example of checking import task details
POST /openapi/open/v1/query-task HTTP/1.1
Host: https://api.supametas.ai/
scheme: https
Content-Type: application/json
cache-control: no-cache
Access-Key: {{YOUR_API_KEY}}
Second Type: File processing type, taking the example of importing a text file
POST /openapi/open/v1/file-task HTTP/1.1
Host: https://api.supametas.ai/
scheme: https
Content-Type: multipart/form-data
cache-control: no-cache
Access-Key: {{YOUR_API_KEY}}
2. Request Example
Request Parameter Encryption Step Example:
Taking the webhook interface as an example:
Obtain
Access-Key
:Obtain it from the Supametas.ai platform dataset.Organize Request Data
{ "url": "http://yourdomain.com/api/put"}
Build Request Header and Call the Interface
curl --location 'http://{{BaseUrl}}/set-webhook' \
--header 'Access-Key: 131n3cebse' \
--header 'Content-Type: application/json' \
--data '{
"url": "https://yourdomain.com/api/put"
}'
3. Standard Response
The external structure includes the response status code, message description, and response data.
{
"code": "",
"message": "",
"data": {}
}
Normal Response Message:
The JSON response body contains the data:
code
STRING
Normal response code: "0"
message
STRING
Description of the normal response: null
data
OBJECT
Business data in the response
Last updated