Skip to main content
Version: 4.0.0

Postman Collection

This page contains importable an postman collection for all Alloy Embedded APIs. This is in JSON format, please copy and save the text in JSON format before importing in Postman.

Postman Variabes

VariableDescriptionExample
API_VERSIONRepresents the version of the Alloy Unified API you intend to make calls to. API versions are dated and new versions are released quarterly (in March, June, September, and December).2023-12
API_KEYYour API key. Never share this with anyone.

Download the Collection

Download the full collection below.

{
"info": {
"_postman_id": "",
"name": "Alloy Embedded API",
"description": "Postman collection for the Alloy Embedded APIs",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "10048813",
"_collection_link": ""
},
"item": [
{
"name": "Embedded API",
"item": [
{
"name": "Create User",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"response is ok\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"json formatted correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.userId).to.not.equal(null);",
"});",
"",
"var jsonData = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"userId\", jsonData.userId);",
"",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"username\": \"{{userId}}\",\r\n \"fullName\": \"Testy McTesterson\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/users",
"host": ["https://embedded.runalloy.com"],
"path": ["{{API_VERSION}}", "users"]
}
},
"response": []
},
{
"name": "Batch Create Users",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"response is ok\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"json formatted correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.userId).to.not.equal(null);",
"});",
"",
"pm.test(\"json includes keys\", function () {",
" pm.expect(pm.response.text()).to.include(\"message\");",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"users\": [{\r\n \"username\": \"123\",\r\n \"fullName\": \"Testy McTesterson\"\r\n },{\r\n \"username\": \"456\",\r\n \"fullName\": \"Testy McTesterson\"\r\n }\r\n ]\r\n}\r\n",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/users/batch",
"host": ["https://embedded.runalloy.com"],
"path": ["{{API_VERSION}}", "users", "batch"]
}
},
"response": []
},
{
"name": "Update User",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"response is ok\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"json formatted correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.userId).to.not.equal(null);",
" pm.expect(jsonData.fullName).to.not.equal(null);",
" pm.expect(jsonData.username).to.equal(\"greggmojica\");",
"});",
"",
"pm.test(\"json includes keys\", function () {",
" pm.expect(pm.response.text()).to.include(\"fullName\");",
" pm.expect(pm.response.text()).to.include(\"userId\");",
" pm.expect(pm.response.text()).to.include(\"userId\");",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
}
]
},
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"fullName\":\"Updated McTesterson\",\r\n \"username\": \"greggmojica\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/users/{{userId}}",
"host": ["https://embedded.runalloy.com"],
"path": ["{{API_VERSION}}", "users", "{{userId}}"]
}
},
"response": []
},
{
"name": "Get Users",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"response is ok\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"pm.test(\"response should be okay to process\", function () {\r",
" pm.response.to.not.be.error;\r",
" pm.response.to.not.have.jsonBody(\"error\");\r",
"});\r",
"\r",
"pm.test(\"json formatted correctly\", function () {\r",
" var jsonData = pm.response.json();\r",
" pm.expect(jsonData.data).to.not.equal(null);\r",
" pm.expect(jsonData.data[0]).to.not.equal(null);\r",
" pm.expect(jsonData.data[0].userId).to.not.equal(null);\r",
" pm.expect(jsonData.data[0].fullName).to.not.equal(null);\r",
"});\r",
"\r",
"pm.test(\"json includes keys\", function () {\r",
" pm.expect(pm.response.text()).to.include(\"userId\");\r",
" pm.expect(pm.response.text()).to.include(\"fullName\");\r",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/users",
"host": ["https://embedded.runalloy.com"],
"path": ["{{API_VERSION}}", "users"]
}
},
"response": []
},
{
"name": "Get Apps",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"response is ok\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"pm.test(\"response should be okay to process\", function () {\r",
" pm.response.to.not.be.error;\r",
" pm.response.to.not.have.jsonBody(\"error\");\r",
"});\r",
"\r",
"pm.test(\"json formatted correctly\", function () {\r",
" var jsonData = pm.response.json();\r",
" pm.expect(jsonData.data).to.not.equal(null);\r",
" pm.expect(jsonData.data[0].icon).to.not.equal(null);\r",
" pm.expect(jsonData.data[0].name).to.not.equal(null);\r",
" pm.expect(jsonData.data[0].type).to.not.equal(null);\r",
" pm.expect(jsonData.data[0].type).to.be.a(\"array\");\r",
" pm.expect(jsonData.data[0].icon).to.be.a(\"string\");\r",
" pm.expect(jsonData.data[0].name).to.be.a(\"string\");\r",
"});\r",
"\r",
"pm.test(\"json includes keys\", function () {\r",
" pm.expect(pm.response.text()).to.include(\"name\");\r",
" pm.expect(pm.response.text()).to.include(\"icon\");\r",
" pm.expect(pm.response.text()).to.include(\"type\");\r",
"});\r",
"\r",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/apps",
"host": ["https://embedded.runalloy.com"],
"path": ["{{API_VERSION}}", "apps"]
}
},
"response": []
},
{
"name": "Get Integrations",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"response is ok\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"pm.test(\"response should be okay to process\", function () {\r",
" pm.response.to.not.be.error;\r",
" pm.response.to.not.have.jsonBody(\"error\");\r",
"});\r",
"\r",
"pm.test(\"json formatted correctly\", function () {\r",
" var jsonData = pm.response.json();\r",
" pm.expect(jsonData.data).to.not.equal(null);\r",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/integrations?userId={{userId}}",
"host": ["https://embedded.runalloy.com"],
"path": ["{{API_VERSION}}", "integrations"],
"query": [
{
"key": "userId",
"value": "{{userId}}"
}
]
}
},
"response": []
},
{
"name": "Get Credentials",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"response is ok\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"pm.test(\"response should be okay to process\", function () {\r",
" pm.response.to.not.be.error;\r",
" pm.response.to.not.have.jsonBody(\"error\");\r",
"});\r",
"\r",
"pm.test(\"json formatted correctly\", function () {\r",
" var jsonData = pm.response.json();\r",
" pm.expect(jsonData.data).to.not.equal(null);\r",
" pm.expect(jsonData.data[0].name).to.not.equal(null);\r",
" pm.expect(jsonData.data[0].icon).to.not.equal(null);\r",
" pm.expect(jsonData.data[0].properties).to.not.equal(null);\r",
"});\r",
"\r",
"pm.test(\"json includes keys\", function () {\r",
" pm.expect(pm.response.text()).to.include(\"name\");\r",
" pm.expect(pm.response.text()).to.include(\"properties\");\r",
" pm.expect(pm.response.text()).to.include(\"icon\");\r",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/credentials",
"host": ["https://embedded.runalloy.com"],
"path": ["{{API_VERSION}}", "credentials"]
}
},
"response": []
},
{
"name": "Get User & User Workflows",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"response is ok\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"json formatted correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.fullName).to.not.equal(null);",
" pm.expect(jsonData.email).to.not.equal(null);",
" pm.expect(jsonData.workflows).to.not.equal(null);",
"});",
"",
"pm.test(\"json includes keys\", function () {",
" pm.expect(pm.response.text()).to.include(\"fullName\");",
" pm.expect(pm.response.text()).to.include(\"username\");",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/users/{{userId}}",
"host": ["https://embedded.runalloy.com"],
"path": ["{{API_VERSION}}", "users", "{{userId}}"]
}
},
"response": []
},
{
"name": "Create User Credential",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"response is ok\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"json formatted correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.success).to.equal(true);",
" pm.expect(jsonData.credentialId).to.not.equal(null);",
"});",
"",
"var jsonData = JSON.parse(responseBody);",
"postman.setEnvironmentVariable(\"credentialId\", jsonData.credentialId);",
"console.log(jsonData);",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"userId\":\"{{userId}}\",\r\n \"credential\":{\r\n \"type\":\"netsuite\",\r\n \"data\":{\r\n \"credField1\":\"some key\",\r\n \"credField2\":\"another key\"\r\n }\r\n }\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/users/{{userId}}/credentials",
"host": ["https://embedded.runalloy.com"],
"path": ["{{API_VERSION}}", "users", "{{userId}}", "credentials"]
}
},
"response": []
},
{
"name": "Get User Credentials",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = pm.response.json();\r",
"pm.collectionVariables.set(\"credentialId\", jsonData.data[0].credentialId);\r",
"\r",
"pm.test(\"response is ok\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"pm.test(\"response should be okay to process\", function () {\r",
" pm.response.to.not.be.error;\r",
" pm.response.to.not.have.jsonBody(\"error\");\r",
"});\r",
"\r",
"pm.test(\"json formatted correctly\", function () {\r",
" var jsonData = pm.response.json();\r",
" pm.expect(jsonData.data).to.not.equal(null);\r",
" pm.expect(jsonData.data[0].credentialId).to.not.equal(null);\r",
" pm.expect(jsonData.data[0].type).to.not.equal(null);\r",
" pm.expect(jsonData.data[0].createdAt).to.not.equal(null);\r",
" pm.expect(jsonData.data[0].updatedAt).to.not.equal(null);\r",
"});\r",
"\r",
"var jsonData = JSON.parse(responseBody);\r",
"console.log(jsonData);\r",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/users/{{userId}}/credentials",
"host": ["https://embedded.runalloy.com"],
"path": ["{{API_VERSION}}", "users", "{{userId}}", "credentials"]
}
},
"response": []
},
{
"name": "Get Credentials Metadata",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = pm.response.json();\r",
"pm.collectionVariables.set(\"credentialId\", jsonData.data[0].credentialId);\r",
"\r",
"pm.test(\"response is ok\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"pm.test(\"response should be okay to process\", function () {\r",
" pm.response.to.not.be.error;\r",
" pm.response.to.not.have.jsonBody(\"error\");\r",
"});\r",
"\r",
"pm.test(\"json formatted correctly\", function () {\r",
" var jsonData = pm.response.json();\r",
" pm.expect(jsonData.data).to.not.equal(null);\r",
" pm.expect(jsonData.data[0].credentialId).to.not.equal(null);\r",
" pm.expect(jsonData.data[0].type).to.not.equal(null);\r",
" pm.expect(jsonData.data[0].createdAt).to.not.equal(null);\r",
" pm.expect(jsonData.data[0].updatedAt).to.not.equal(null);\r",
"});\r",
"\r",
"pm.test(\"json includes keys\", function () {\r",
" pm.expect(pm.response.text()).to.include(\"name\");\r",
" pm.expect(pm.response.text()).to.include(\"icon\");\r",
" pm.expect(pm.response.text()).to.include(\"properties\");\r",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/credentials",
"host": ["https://embedded.runalloy.com"],
"path": ["{{API_VERSION}}", "credentials"]
}
},
"response": []
},
{
"name": "Deactivate User Workflows",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"response is ok\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"json formatted correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.message).to.not.equal(null);",
" pm.expect(jsonData.message).to.equal(\"Success\");",
"});",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
}
]
},
"method": "PUT",
"header": [],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/users/{{userId}}/deactivate-workflows",
"host": ["https://embedded.runalloy.com"],
"path": [
"{{API_VERSION}}",
"users",
"{{userId}}",
"deactivate-workflows"
]
}
},
"response": []
},
{
"name": "Get User Token",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"response is ok\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"json formatted correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.token).to.not.equal(null);",
" pm.expect(jsonData.token).to.be.a(\"string\");",
"});",
"",
"pm.test(\"json includes keys\", function () {",
" pm.expect(pm.response.text()).to.include(\"token\");",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/users/{{userId}}/token",
"host": ["https://embedded.runalloy.com"],
"path": ["{{API_VERSION}}", "users", "{{userId}}", "token"]
}
},
"response": []
},
{
"name": "Get Embedded link install URL",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"response is ok\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"json formatted correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.url).to.not.equal(null);",
" pm.expect(jsonData.url).to.be.a(\"string\");",
"});",
"",
"pm.test(\"json includes keys\", function () {",
" pm.expect(pm.response.text()).to.include(\"url\");",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
},
{
"key": "undefined",
"type": "any"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/users/{{userId}}/integrations/{{integrationId}}/install-url",
"host": ["https://embedded.runalloy.com"],
"path": [
"{{API_VERSION}}",
"users",
"{{userId}}",
"integrations",
"{{integrationId}}",
"install-url"
]
}
},
"response": []
},
{
"name": "Get Authentication link URL",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"response is ok\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"json formatted correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.url).to.not.equal(null);",
" pm.expect(jsonData.url).to.be.a(\"string\");",
"});",
"",
"pm.test(\"json includes keys\", function () {",
" pm.expect(pm.response.text()).to.include(\"url\");",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
},
{
"key": "undefined",
"type": "any"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/users/{{userId}}/credentialName/shopify/authentication-url",
"host": ["https://embedded.runalloy.com"],
"path": [
"{{API_VERSION}}",
"users",
"{{userId}}",
"credentialName",
"shopify",
"authentication-url"
]
}
},
"response": []
},
{
"name": "Get All Workflows",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"response is ok\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"json formatted correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.data).to.not.equal(null);",
" pm.expect(jsonData.data).to.be.a(\"array\");",
" pm.expect(jsonData.data[0].workflowId).to.not.equal(null);",
" pm.expect(jsonData.data[0].name).to.not.equal(null);",
" pm.expect(jsonData.data[0].createdAt).to.not.equal(null);",
" pm.expect(jsonData.data[0].updatedAt).to.not.equal(null);",
" pm.expect(jsonData.data[0].version).to.not.equal(null);",
" pm.expect(jsonData.data[0].version).to.be.a(\"number\");",
" pm.expect(jsonData.data[0].blocks).to.not.equal(null);",
" pm.expect(jsonData.data[0].blocks).to.be.a(\"array\");",
"});",
"",
"var jsonData = pm.response.json();",
"pm.collectionVariables.set(\"workflowId\", jsonData.data[0].workflowId);",
"postman.setEnvironmentVariable(\"workflowName\", jsonData.data[0].name);",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/workflows?userId={{childUserId}}",
"host": ["https://embedded.runalloy.com"],
"path": ["{{API_VERSION}}", "workflows"],
"query": [
{
"key": "userId",
"value": "{{childUserId}}"
}
]
}
},
"response": []
},
{
"name": "Get Workflow Logs",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"response is ok\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"json formatted correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.data).to.not.equal(null);",
" pm.expect(jsonData.data).to.be.a(\"array\");",
"});",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/workflows/{{forgeWorkflowId}}/logs?userId={{childUserId}}",
"host": ["https://embedded.runalloy.com"],
"path": [
"{{API_VERSION}}",
"workflows",
"{{forgeWorkflowId}}",
"logs"
],
"query": [
{
"key": "userId",
"value": "{{childUserId}}"
}
]
}
},
"response": []
},
{
"name": "Get Workflow Errors",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"response is ok\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"json formatted correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.data).to.not.equal(null);",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/workflows/{{forgeWorkflowId}}/errors",
"host": ["https://embedded.runalloy.com"],
"path": [
"{{API_VERSION}}",
"workflows",
"{{forgeWorkflowId}}",
"errors"
]
}
},
"response": []
},
{
"name": "Get Workflow Analytics",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"response is ok\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"json formatted correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.data).to.not.equal(null);",
"});",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/workflows/{{forgeWorkflowId}}/analytics",
"host": ["https://embedded.runalloy.com"],
"path": [
"{{API_VERSION}}",
"workflows",
"{{forgeWorkflowId}}",
"analytics"
]
}
},
"response": []
},
{
"name": "Activate Workflow By Name",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"response is ok\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"json formatted correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.activated).to.equal(true);",
"});",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
}
]
},
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"workflowName\":\"{{workflowName}}\",\r\n \"userId\":\"{{forge_user_id}}\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/workflows/activate/",
"host": ["https://embedded.runalloy.com"],
"path": ["{{API_VERSION}}", "workflows", "activate", ""]
}
},
"response": []
},
{
"name": "Deactivate Workflow by Name",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"response is ok\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"json formatted correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.activated).to.equal(false);",
"});",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
}
]
},
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"workflowName\":\"{{workflowName}}\",\r\n \"userId\":\"{{forge_user_id}}\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/workflows/deactivate",
"host": ["https://embedded.runalloy.com"],
"path": ["{{API_VERSION}}", "workflows", "deactivate"]
}
},
"response": []
},
{
"name": "Run Workflow by Id",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"response is ok\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"json formatted correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.message).to.equal(\"success\");",
"});",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"workflowId\":\"{{workflowId}}\",\r\n \"userId\":\"{{childUserId}}\",\r\n \"data\":{\r\n \"exampleValue\":\"Hello world\"\r\n }\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/run/workflow",
"host": ["https://embedded.runalloy.com"],
"path": ["{{API_VERSION}}", "run", "workflow"]
}
},
"response": []
},
{
"name": "Run Workflow by Name",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"response is ok\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"json formatted correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.message).to.equal(\"success\");",
"});",
""
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"workflowName\":\"{{workflowName}}\",\r\n \"userId\":\"{{childUserId}}\",\r\n \"data\":{\r\n \"exampleValue\":\"Test\"\r\n }\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/run/workflow",
"host": ["https://embedded.runalloy.com"],
"path": ["{{API_VERSION}}", "run", "workflow"]
}
},
"response": []
},
{
"name": "List Events",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"response is ok\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"json formatted correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.data).to.not.equal(null);",
" pm.expect(jsonData.data).to.be.a(\"array\");",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/events",
"host": ["https://embedded.runalloy.com"],
"path": ["{{API_VERSION}}", "events"]
}
},
"response": []
},
{
"name": "Delete User Credential",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"response is ok\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"json formatted correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.success).to.equal(true);",
"});",
"",
"var jsonData = JSON.parse(responseBody);",
"console.log(jsonData);"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
}
]
},
"method": "DELETE",
"header": [],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/users/{{userId}}/credentials/{{credentialId}}",
"host": ["https://embedded.runalloy.com"],
"path": [
"{{API_VERSION}}",
"users",
"{{userId}}",
"credentials",
"{{credentialId}}"
]
}
},
"response": []
},
{
"name": "Delete User Logs",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"response is ok\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"json formatted correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.message).to.equal(\"Success\");",
"});",
"",
"pm.test(\"json includes keys\", function () {",
" pm.expect(pm.response.text()).to.include(\"message\");",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
}
]
},
"method": "DELETE",
"header": [],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/users/{{userId}}/logs",
"host": ["https://embedded.runalloy.com"],
"path": ["{{API_VERSION}}", "users", "{{userId}}", "logs"]
}
},
"response": []
},
{
"name": "Delete User",
"event": [
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"response is ok\", function () {",
" pm.response.to.have.status(200);",
"});",
"",
"pm.test(\"response should be okay to process\", function () {",
" pm.response.to.not.be.error;",
" pm.response.to.not.have.jsonBody(\"error\");",
"});",
"",
"pm.test(\"json formatted correctly\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.success).to.not.equal(null);",
"});",
"",
"pm.test(\"json includes keys\", function () {",
" pm.expect(pm.response.text()).to.include(\"success\");",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{API_KEY}}",
"type": "string"
}
]
},
"method": "DELETE",
"header": [],
"url": {
"raw": "https://embedded.runalloy.com/{{API_VERSION}}/users/{{childUserId}}",
"host": ["https://embedded.runalloy.com"],
"path": ["{{API_VERSION}}", "users", "{{childUserId}}"]
}
},
"response": []
}
]
}
],
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [""]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [""]
}
}
],
"variable": [
{
"key": "api_base_url",
"value": "http://localhost:4040"
},
{
"key": "embedded_api_base_url",
"value": "https://embedded.runalloy.com"
}
]
}