Templates API
Get All Templates
GET
https://v3.cloras.com/api/templates/get/all
Retrieves all the public templates and also, private templates (associated to the account)
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Bearer {access_token} |
{
"additional_data": null,
"data": [
{
"_id": "6026068415bea94e909c5d6e",
"account_id": "5db04e9e2943b4255fe71d0a",
"author_name": "Sureka Selvam",
"created_at": "Fri, 12 Feb 2021 04:39:32 GMT",
"created_by": "5db04e9e2943b4255fe71d0a",
"detailed_description": "<p>dfd</p>",
"isDeleted": false,
"is_published": true,
"last_published_version": "1.0.2",
"pipe_description": {},
"pipes": [
"5f89ae892943b4000fc54005",
"5facbf252943b4000d4b1a76"
],
"project_id": "5f894b9d2943b4000fc53044",
"published_on": "Sat, 13 Feb 2021 16:53:53 GMT",
"short_description": "sdfdf",
"template_name": "Test_API",
"type": "public",
"updated_at": "Sat, 13 Feb 2021 16:53:55 GMT",
"updated_by": "AnonymousUser",
"version_info": "master"
},
{
"_id": "6026066615bea94e909c5d6b",
"account_id": "5db04e9e2943b4255fe71d0a",
"author_name": "Sureka Selvam",
"created_at": "Fri, 12 Feb 2021 04:39:02 GMT",
"created_by": "5db04e9e2943b4255fe71d0a",
"detailed_description": "<p>dfd</p>",
"isDeleted": false,
"is_published": true,
"last_published_version": "master",
"pipe_description": {},
"pipes": [
"5f89ae892943b4000fc54005",
"5facbf252943b4000d4b1a76"
],
"project_id": "5f894b9d2943b4000fc53044",
"published_on": "Fri, 12 Feb 2021 04:39:02 GMT",
"short_description": "sdfdf",
"template_name": "Test",
"type": "public",
"updated_at": "Fri, 12 Feb 2021 04:39:02 GMT",
"updated_by": "5db04e9e2943b4255fe71d0a",
"version_info": "master"
},
{
"_id": "6026056515bea94e909c5d5b",
"account_id": "5db04e9e2943b4255fe71d0a",
"author_name": "Sureka Selvam",
"created_at": "Fri, 12 Feb 2021 04:34:45 GMT",
"created_by": "5db04e9e2943b4255fe71d0a",
"detailed_description": "<p>dfd</p>",
"isDeleted": false,
"is_published": true,
"last_published_version": "1.0.1",
"pipe_description": {},
"pipes": [
"5f89ae892943b4000fc54005",
"5facbf252943b4000d4b1a76"
],
"project_id": "5f894b9d2943b4000fc53044",
"published_on": "Fri, 12 Feb 2021 04:35:30 GMT",
"short_description": "sdfdf",
"template_name": "Test",
"type": "public",
"updated_at": "Fri, 12 Feb 2021 04:35:30 GMT",
"updated_by": "5db04e9e2943b4255fe71d0a",
"version_info": "master"
}
],
"error_code": "",
"message": "Templates listed successfully",
"next": 0,
"page": 1,
"pages": [],
"prev": 0,
"status": 200,
"success": true,
"total": 1,
"total_records": 3
}
{
"data": null,
"message": "UserWarning('Suspicious login attempt',)",
"response_status": 401,
"status": false,
"status_code": 401
}
Get Template Information
GET
https://v3.cloras.com/api/get/template/:id
Retrieves the template information for the given template id.
Path Parameters
Name | Type | Description |
---|---|---|
id | string | Template ID |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Bearer {access_token} |
{
"additional_data": {},
"data": {
"_id": "6026056515bea94e909c5d5b",
"account_id": "5db04e9e2943b4255fe71d0a",
"author_name": "Sureka Selvam",
"created_at": "Fri, 12 Feb 2021 04:34:45 GMT",
"created_by": "5db04e9e2943b4255fe71d0a",
"detailed_description": "<p>dfd</p>",
"draft": false,
"error": false,
"isDeleted": false,
"is_published": true,
"last_published_version": "1.0.1",
"message": "Draft Copy Saved",
"other_data": {
"api_managers": [],
"credentials": [],
"flows": [],
"pipes": [],
"systems": []
},
"pipe_description": {},
"pipes": [
"5f89ae892943b4000fc54005",
"5facbf252943b4000d4b1a76"
],
"processing": true,
"project_id": "5f894b9d2943b4000fc53044",
"published_on": "Fri, 12 Feb 2021 04:35:30 GMT",
"release_notes": "<p>sdfdf</p>",
"short_description": "sdfdf",
"status": true,
"systems": [],
"template_name": "Test",
"type": "public",
"updated_at": "Fri, 12 Feb 2021 04:35:30 GMT",
"updated_by": "5db04e9e2943b4255fe71d0a",
"version_history": [
"1.0.0",
"1.0.1"
],
"version_ids": {
"1.0.0": "6026056615bea94e909c5d5c",
"1.0.1": "6026059215bea94e909c5d65"
},
"version_info": "master"
},
"error_code": "",
"message": "Success",
"status": 200,
"success": true
}
{
"data": null,
"message": "UserWarning('Suspicious login attempt',)",
"response_status": 401,
"status": false,
"status_code": 401
}
Use Template
POST
https://v3.cloras.com/workspace/:project_id/import/template/:template_id
Creates the pipes, flows, systems & API's in the specified project using the existing template.
Path Parameters
Name | Type | Description |
---|---|---|
project_id* | string | Project ID |
template_id* | string | Template ID |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Bearer {access_token} |
Request Body
Name | Type | Description |
---|---|---|
existing_credentials | object | Existing Credentials |
created_credentials | array | Credentials to be created |
pipes | object | Pipes ID's with configuration, status and selected flag |
global_systems_as_custom* | array | Public System to be created as private system |
{
"additional_data": {},
"data": {
"apimanager": [
"6034a50215bea97a2c6fa6d8",
"6034a50215bea97a2c6fa6d9",
"6034a50215bea97a2c6fa6da",
"6034a50215bea97a2c6fa6db"
],
"credentials": [
"6034a50215bea97a2c6fa6de",
"6034a50215bea97a2c6fa6e0"
],
"flows": [
"6034a50215bea97a2c6fa6e1",
"6034a50215bea97a2c6fa6e2"
],
"pipes": [
"6034a50215bea97a2c6fa6dc",
"6034a50215bea97a2c6fa6dd"
],
"systems": [
"6034a50215bea97a2c6fa6dc",
"6034a50215bea97a2c6fa6dd"
]
},
"error_code": "",
"message": "Exchange Request Accepted",
"status": 200,
"success": true
}
Sample Request Info
{
"existing_credentials": {},
"created_credentials": [
{
"cr_name": "new shopify",
"cr_hostname": "http://0.0.0.0:2020/",
"datapoint": "5e844d312943b47e0bff2a98",
"cr_timezone": "America/Boa_Vista",
"all_keys": "[{\"label\":\"Username\",\"required\":\"true\",\"type\":\"text\",\"@code\":\"username\"},{\"label\":\"Password\",\"required\":\"true\",\"type\":\"text\",\"@code\":\"password\"}]",
"username": "est",
"password": "test"
},
{
"cr_name": "new dell",
"cr_hostname": "http://0.0.0.0:2020/",
"datapoint": "5f894b522943b4000fc5303a",
"cr_timezone": "America/Boa_Vista",
"all_keys": "[]"
}
],
"global_systems_as_custom": [
"5e8edf122943b453ddc13582"
],
"pipes": {
"5f89ae892943b4000fc54005": {
"configs": {},
"pipe_status": true,
"console_status": true,
"selected": true
},
"5facbf252943b4000d4b1a76": {
"configs": {
"statuses_to_be_processed": "None,partial"
}
],
"pipe_status": true,
"console_status": true,
"selected": true
}
}
}
Last updated