2021-09-15 02:50:55 +00:00
|
|
|
{
|
|
|
|
|
"$schema": "https://json-schema.org/",
|
|
|
|
|
"$id": "https://tooljet.io/Restapi.schema.json",
|
|
|
|
|
"title": "Restapi datasource",
|
|
|
|
|
"description": "A schema defining restapi datasource",
|
|
|
|
|
"type": "object",
|
2021-09-22 05:13:12 +00:00
|
|
|
"source": {
|
|
|
|
|
"name": "Rest API",
|
|
|
|
|
"kind": "restapi",
|
|
|
|
|
"options": {
|
|
|
|
|
"url": { "type": "string" },
|
|
|
|
|
"auth_type": { "type": "string" },
|
|
|
|
|
"grant_type": { "type": "string" },
|
|
|
|
|
"add_token_to": { "type": "string" },
|
|
|
|
|
"header_prefix": { "type": "string" },
|
|
|
|
|
"access_token_url": { "type": "string" },
|
|
|
|
|
"client_id": { "type": "string" },
|
|
|
|
|
"client_secret": { "type": "string", "encrypted": true },
|
|
|
|
|
"scopes": { "type": "string" },
|
|
|
|
|
"auth_url": { "type": "string" },
|
|
|
|
|
"client_auth": { "type": "string" },
|
|
|
|
|
"headers": { "type": "array" },
|
|
|
|
|
"custom_auth_params": { "type": "array" }
|
|
|
|
|
},
|
|
|
|
|
"exposedVariables": {
|
|
|
|
|
"isLoading": {},
|
|
|
|
|
"data": {},
|
|
|
|
|
"rawData": {}
|
|
|
|
|
},
|
|
|
|
|
"customTesting": true
|
|
|
|
|
},
|
2021-09-15 02:50:55 +00:00
|
|
|
"properties": {
|
|
|
|
|
"url": {
|
|
|
|
|
"$label": "URL",
|
|
|
|
|
"$key": "url",
|
|
|
|
|
"type": "text",
|
|
|
|
|
"description": "https://api.example.com/v1/"
|
|
|
|
|
},
|
|
|
|
|
"headers": {
|
|
|
|
|
"$label": "Headers",
|
|
|
|
|
"$key": "headers",
|
|
|
|
|
"type": "react-component-headers",
|
|
|
|
|
"description": "key-value pair headers for rest api"
|
|
|
|
|
},
|
|
|
|
|
"auth_type": {
|
|
|
|
|
"$label": "Authentication Type",
|
|
|
|
|
"$key": "auth_type",
|
|
|
|
|
"type": "react-component-oauth-authentication",
|
|
|
|
|
"description": "key-value pair headers for rest api"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"required": ["url"]
|
|
|
|
|
}
|