2021-09-15 02:50:55 +00:00
|
|
|
{
|
2022-01-27 05:25:16 +00:00
|
|
|
"$schema": "https://raw.githubusercontent.com/ToolJet/ToolJet/develop/plugins/schemas/manifest.schema.json",
|
2021-09-15 02:50:55 +00:00
|
|
|
"title": "Restapi datasource",
|
|
|
|
|
"description": "A schema defining restapi datasource",
|
2022-01-17 07:08:17 +00:00
|
|
|
"type": "api",
|
2021-09-22 05:13:12 +00:00
|
|
|
"source": {
|
|
|
|
|
"name": "Rest API",
|
|
|
|
|
"kind": "restapi",
|
|
|
|
|
"options": {
|
2022-01-27 05:25:16 +00:00
|
|
|
"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
|
|
|
|
|
},
|
2022-04-22 07:31:08 +00:00
|
|
|
"password": {
|
|
|
|
|
"encrypted": true
|
|
|
|
|
},
|
2022-09-19 14:57:37 +00:00
|
|
|
"bearer_token": {
|
2022-04-22 07:31:08 +00:00
|
|
|
"encrypted": true
|
|
|
|
|
},
|
2022-01-27 05:25:16 +00:00
|
|
|
"scopes": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"auth_url": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"client_auth": {
|
|
|
|
|
"type": "string"
|
|
|
|
|
},
|
|
|
|
|
"headers": {
|
|
|
|
|
"type": "array"
|
|
|
|
|
},
|
|
|
|
|
"custom_auth_params": {
|
|
|
|
|
"type": "array"
|
2023-07-26 08:28:29 +00:00
|
|
|
},
|
|
|
|
|
"ca_cert": {
|
|
|
|
|
"encrypted": true
|
|
|
|
|
},
|
|
|
|
|
"client_key": {
|
|
|
|
|
"encrypted": true
|
|
|
|
|
},
|
|
|
|
|
"client_cert": {
|
|
|
|
|
"encrypted": true
|
|
|
|
|
},
|
|
|
|
|
"root_cert": {
|
|
|
|
|
"encrypted": true
|
2022-01-27 05:25:16 +00:00
|
|
|
}
|
2021-09-22 05:13:12 +00:00
|
|
|
},
|
|
|
|
|
"exposedVariables": {
|
2022-02-08 03:14:38 +00:00
|
|
|
"isLoading": false,
|
2021-09-22 05:13:12 +00:00
|
|
|
"data": {},
|
|
|
|
|
"rawData": {}
|
|
|
|
|
},
|
|
|
|
|
"customTesting": true
|
|
|
|
|
},
|
2021-11-22 08:22:32 +00:00
|
|
|
"defaults": {
|
2022-01-27 05:25:16 +00:00
|
|
|
"url": {
|
|
|
|
|
"value": ""
|
|
|
|
|
},
|
|
|
|
|
"auth_type": {
|
|
|
|
|
"value": "none"
|
|
|
|
|
},
|
|
|
|
|
"grant_type": {
|
|
|
|
|
"value": "authorization_code"
|
|
|
|
|
},
|
|
|
|
|
"add_token_to": {
|
|
|
|
|
"value": "header"
|
|
|
|
|
},
|
|
|
|
|
"header_prefix": {
|
|
|
|
|
"value": "Bearer "
|
|
|
|
|
},
|
|
|
|
|
"access_token_url": {
|
|
|
|
|
"value": ""
|
|
|
|
|
},
|
|
|
|
|
"client_id": {
|
|
|
|
|
"value": ""
|
|
|
|
|
},
|
|
|
|
|
"client_secret": {
|
|
|
|
|
"value": ""
|
|
|
|
|
},
|
|
|
|
|
"scopes": {
|
|
|
|
|
"value": "read, write"
|
|
|
|
|
},
|
2022-04-22 07:31:08 +00:00
|
|
|
"username": {
|
|
|
|
|
"value": ""
|
|
|
|
|
},
|
|
|
|
|
"password": {
|
|
|
|
|
"value": ""
|
|
|
|
|
},
|
|
|
|
|
"bearer_token": {
|
|
|
|
|
"value": ""
|
|
|
|
|
},
|
2022-01-27 05:25:16 +00:00
|
|
|
"auth_url": {
|
|
|
|
|
"value": ""
|
|
|
|
|
},
|
|
|
|
|
"client_auth": {
|
|
|
|
|
"value": "header"
|
|
|
|
|
},
|
|
|
|
|
"headers": {
|
2023-07-26 08:28:29 +00:00
|
|
|
"value": [
|
|
|
|
|
[
|
|
|
|
|
"",
|
|
|
|
|
""
|
|
|
|
|
]
|
|
|
|
|
]
|
2022-01-27 05:25:16 +00:00
|
|
|
},
|
2022-03-24 15:51:34 +00:00
|
|
|
"custom_query_params": {
|
2023-07-26 08:28:29 +00:00
|
|
|
"value": [
|
|
|
|
|
[
|
|
|
|
|
"",
|
|
|
|
|
""
|
|
|
|
|
]
|
|
|
|
|
]
|
2022-03-24 15:51:34 +00:00
|
|
|
},
|
2022-01-27 05:25:16 +00:00
|
|
|
"custom_auth_params": {
|
2023-07-26 08:28:29 +00:00
|
|
|
"value": [
|
|
|
|
|
[
|
|
|
|
|
"",
|
|
|
|
|
""
|
|
|
|
|
]
|
|
|
|
|
]
|
2022-05-19 13:12:44 +00:00
|
|
|
},
|
|
|
|
|
"access_token_custom_headers": {
|
2023-07-26 08:28:29 +00:00
|
|
|
"value": [
|
|
|
|
|
[
|
|
|
|
|
"",
|
|
|
|
|
""
|
|
|
|
|
]
|
|
|
|
|
]
|
2022-09-19 14:57:37 +00:00
|
|
|
},
|
|
|
|
|
"multiple_auth_enabled": {
|
|
|
|
|
"value": false
|
2023-07-26 08:28:29 +00:00
|
|
|
},
|
|
|
|
|
"ssl_certificate": {
|
|
|
|
|
"value": "none"
|
2022-01-27 05:25:16 +00:00
|
|
|
}
|
2021-11-22 08:22:32 +00:00
|
|
|
},
|
2021-09-15 02:50:55 +00:00
|
|
|
"properties": {
|
2023-07-26 08:28:29 +00:00
|
|
|
"ssl_certificate": {
|
|
|
|
|
"label": "SSL Certificate",
|
|
|
|
|
"key": "ssl_certificate",
|
|
|
|
|
"type": "dropdown-component-flip",
|
|
|
|
|
"description": "Single select dropdown for choosing certificates",
|
|
|
|
|
"list": [
|
|
|
|
|
{
|
|
|
|
|
"value": "ca_certificate",
|
|
|
|
|
"name": "CA certificate"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"value": "client_certificate",
|
|
|
|
|
"name": "Client certificate"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"value": "none",
|
|
|
|
|
"name": "None"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"commonFields": {
|
|
|
|
|
"url": {
|
|
|
|
|
"label": "Base 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"
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-09-15 02:50:55 +00:00
|
|
|
},
|
2023-07-26 08:28:29 +00:00
|
|
|
"ca_certificate": {
|
|
|
|
|
"ca_cert": {
|
|
|
|
|
"label": "CA Cert",
|
|
|
|
|
"key": "ca_cert",
|
|
|
|
|
"type": "textarea",
|
|
|
|
|
"encrypted": true,
|
|
|
|
|
"description": "Enter ca certificate"
|
|
|
|
|
}
|
2021-09-15 02:50:55 +00:00
|
|
|
},
|
2023-07-26 08:28:29 +00:00
|
|
|
"client_certificate": {
|
|
|
|
|
"client_key": {
|
|
|
|
|
"label": "Client Key",
|
|
|
|
|
"key": "client_key",
|
|
|
|
|
"type": "textarea",
|
|
|
|
|
"encrypted": true,
|
|
|
|
|
"description": "Enter client key"
|
|
|
|
|
},
|
|
|
|
|
"client_cert": {
|
|
|
|
|
"label": "Client Cert",
|
|
|
|
|
"key": "client_cert",
|
|
|
|
|
"type": "textarea",
|
|
|
|
|
"encrypted": true,
|
|
|
|
|
"description": "Enter client certificate"
|
|
|
|
|
},
|
|
|
|
|
"ca_cert": {
|
|
|
|
|
"label": "CA Cert",
|
|
|
|
|
"key": "ca_cert",
|
|
|
|
|
"type": "textarea",
|
|
|
|
|
"encrypted": true,
|
|
|
|
|
"description": "Enter ca certificate"
|
|
|
|
|
}
|
2021-09-15 02:50:55 +00:00
|
|
|
}
|
|
|
|
|
},
|
2023-07-26 08:28:29 +00:00
|
|
|
"required": [
|
|
|
|
|
"url"
|
|
|
|
|
]
|
|
|
|
|
}
|