Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions spec/code_samples/cURL/setup@algorithm/get.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

base_url=${BASE_URL:="https://cenit.io/api/v2"}
path="setup/algorithm"

curl -G "${base_url}/${path}" \
-H "X-Tenant-Access-Key: ${X_TENANT_ACCESS_KEY}" \
-H "X-Tenant-Access-Token: ${X_TENANT_ACCESS_TOKEN}" \
-d limit=5 \
-d page=1 \
-d order=-namespace,name \
-d embedding=snippet
20 changes: 20 additions & 0 deletions spec/code_samples/cURL/setup@algorithm/post.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

base_url=${BASE_URL:="https://cenit.io/api/v2"}
path="setup/algorithm"

read -r -d '' data <<- EOM
{
namespace: "Test",
name: "alg_test_01",
type: "ruby",
code: "return 1 + 1",
}
EOM

curl "${base_url}/${path}" \
-X "POST" \
-H "X-Tenant-Access-Key: ${X_TENANT_ACCESS_KEY}" \
-H "X-Tenant-Access-Token: ${X_TENANT_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d "${data}"
10 changes: 10 additions & 0 deletions spec/code_samples/cURL/setup@algorithm@{id}/delete.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

base_url=${BASE_URL:="https://cenit.io/api/v2"}
path="setup/algorithm"
item_id="61eeeea05a5a2353a401b2c6"

curl "${base_url}/${path}/${item_id}" \
-X "DELETE" \
-H "X-Tenant-Access-Key: ${X_TENANT_ACCESS_KEY}" \
-H "X-Tenant-Access-Token: ${X_TENANT_ACCESS_TOKEN}"
11 changes: 11 additions & 0 deletions spec/code_samples/cURL/setup@algorithm@{id}/get.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

base_url=${BASE_URL:="https://cenit.io/api/v2"}
path="setup/algorithm"
item_id="61eeeea05a5a2353a401b2c6"

curl -G "${base_url}/${path}/${item_id}" \
-H "X-Tenant-Access-Key: ${X_TENANT_ACCESS_KEY}" \
-H "X-Tenant-Access-Token: ${X_TENANT_ACCESS_TOKEN}"\
-d embedding=authorization \
-d ignore=password
18 changes: 18 additions & 0 deletions spec/code_samples/cURL/setup@algorithm@{id}/post.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

base_url=${BASE_URL:="https://cenit.io/api/v2"}
path="setup/algorithm"
item_id="61eeeea05a5a2353a401b2c6"

read -r -d '' data <<- EOM
{
code: `return 1 + ${Date.now()}`,
}
EOM

curl "${base_url}/${path}/${item_id}" \
-X "POST" \
-H "X-Tenant-Access-Key: ${X_TENANT_ACCESS_KEY}" \
-H "X-Tenant-Access-Token: ${X_TENANT_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d "${data}"
12 changes: 12 additions & 0 deletions spec/code_samples/cURL/setup@basic_authorization/get.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

base_url=${BASE_URL:="https://cenit.io/api/v2"}
path="setup/basic_authorization"

curl -G "${base_url}/${path}" \
-H "X-Tenant-Access-Key: ${X_TENANT_ACCESS_KEY}" \
-H "X-Tenant-Access-Token: ${X_TENANT_ACCESS_TOKEN}" \
-d limit=5 \
-d page=1 \
-d order=-namespace,name \
-d ignore=password
20 changes: 20 additions & 0 deletions spec/code_samples/cURL/setup@basic_authorization/post.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

base_url=${BASE_URL:="https://cenit.io/api/v2"}
path="setup/basic_authorization"

read -r -d '' data <<- EOM
{
namespace: "Test2",
name: "auth_basic",
username: "test2_auth_basic",
password: "test2_auth_basic"
}
EOM

curl "${base_url}/${path}" \
-X "POST" \
-H "X-Tenant-Access-Key: ${X_TENANT_ACCESS_KEY}" \
-H "X-Tenant-Access-Token: ${X_TENANT_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d "${data}"
10 changes: 10 additions & 0 deletions spec/code_samples/cURL/setup@basic_authorization@{id}/delete.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

base_url=${BASE_URL:="https://cenit.io/api/v2"}
path="setup/basic_authorization"
item_id="62069b095a5a2330d0038cdc"

curl "${base_url}/${path}/${item_id}" \
-X "DELETE" \
-H "X-Tenant-Access-Key: ${X_TENANT_ACCESS_KEY}" \
-H "X-Tenant-Access-Token: ${X_TENANT_ACCESS_TOKEN}"
11 changes: 11 additions & 0 deletions spec/code_samples/cURL/setup@basic_authorization@{id}/get.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

base_url=${BASE_URL:="https://cenit.io/api/v2"}
path="setup/basic_authorization"
item_id="62069b095a5a2330d0038cdc"

curl -G "${base_url}/${path}/${item_id}" \
-H "X-Tenant-Access-Key: ${X_TENANT_ACCESS_KEY}" \
-H "X-Tenant-Access-Token: ${X_TENANT_ACCESS_TOKEN}"\
-d embedding=authorization \
-d ignore=password
18 changes: 18 additions & 0 deletions spec/code_samples/cURL/setup@basic_authorization@{id}/post.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

base_url=${BASE_URL:="https://cenit.io/api/v2"}
path="setup/basic_authorization"
item_id="62069b095a5a2330d0038cdc"

read -r -d '' data <<- EOM
{
username: "test_auth_basic@api_v2"
}
EOM

curl "${base_url}/${path}/${item_id}" \
-X "POST" \
-H "X-Tenant-Access-Key: ${X_TENANT_ACCESS_KEY}" \
-H "X-Tenant-Access-Token: ${X_TENANT_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d "${data}"
12 changes: 12 additions & 0 deletions spec/code_samples/cURL/setup@connection_role/get.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

base_url=${BASE_URL:="https://cenit.io/api/v2"}
path="setup/connection_role"

curl -G "${base_url}/${path}" \
-H "X-Tenant-Access-Key: ${X_TENANT_ACCESS_KEY}" \
-H "X-Tenant-Access-Token: ${X_TENANT_ACCESS_TOKEN}" \
-d limit=5 \
-d page=1 \
-d order=-namespace,name \
-d embedding:-webhooks,connections \
32 changes: 32 additions & 0 deletions spec/code_samples/cURL/setup@connection_role/post.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

base_url=${BASE_URL:="https://cenit.io/api/v2"}
path="setup/connection_role"

read -r -d '' data <<- EOM
{
namespace: "Test",
name: "connection_role_test_01",
webhooks: [
{
_reference: true,
namespace: "Test",
name: "webhook_test_01"
}
],
connections: [
{
_reference: true,
namespace: "Test",
name: "connection_test_01"
}
],
}
EOM

curl "${base_url}/${path}" \
-X "POST" \
-H "X-Tenant-Access-Key: ${X_TENANT_ACCESS_KEY}" \
-H "X-Tenant-Access-Token: ${X_TENANT_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d "${data}"
10 changes: 10 additions & 0 deletions spec/code_samples/cURL/setup@connection_role@{id}/delete.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

base_url=${BASE_URL:="https://cenit.io/api/v2"}
path="setup/connection_role"
item_id="620951d95a5a233eb9043557"

curl "${base_url}/${path}/${item_id}" \
-X "DELETE" \
-H "X-Tenant-Access-Key: ${X_TENANT_ACCESS_KEY}" \
-H "X-Tenant-Access-Token: ${X_TENANT_ACCESS_TOKEN}"
11 changes: 11 additions & 0 deletions spec/code_samples/cURL/setup@connection_role@{id}/get.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

base_url=${BASE_URL:="https://cenit.io/api/v2"}
path="setup/connection_role"
item_id="620951d95a5a233eb9043557"

curl -G "${base_url}/${path}/${item_id}" \
-H "X-Tenant-Access-Key: ${X_TENANT_ACCESS_KEY}" \
-H "X-Tenant-Access-Token: ${X_TENANT_ACCESS_TOKEN}"\
-d embedding=authorization \
-d ignore=password
31 changes: 31 additions & 0 deletions spec/code_samples/cURL/setup@connection_role@{id}/post.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

base_url=${BASE_URL:="https://cenit.io/api/v2"}
path="setup/connection_role"
item_id="620951d95a5a233eb9043557"

read -r -d '' data <<- EOM
{
webhooks: [
{
_reference: true,
namespace: "Test",
name: "webhook_test_01"
}
],
connections: [
{
_reference: true,
namespace: "Test",
name: "connection_test_01"
}
],
}
EOM

curl "${base_url}/${path}/${item_id}" \
-X "POST" \
-H "X-Tenant-Access-Key: ${X_TENANT_ACCESS_KEY}" \
-H "X-Tenant-Access-Token: ${X_TENANT_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d "${data}"
12 changes: 12 additions & 0 deletions spec/code_samples/cURL/setup@flow/get.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

base_url=${BASE_URL:="https://cenit.io/api/v2"}
path="setup/flow"

curl -G "${base_url}/${path}" \
-H "X-Tenant-Access-Key: ${X_TENANT_ACCESS_KEY}" \
-H "X-Tenant-Access-Token: ${X_TENANT_ACCESS_TOKEN}" \
-d limit=5 \
-d page=1 \
-d order=-namespace,name \
-d embedding=snippet \
10 changes: 10 additions & 0 deletions spec/code_samples/cURL/setup@flow@{id}/delete.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

base_url=${BASE_URL:="https://cenit.io/api/v2"}
path="setup/flow"
item_id="61e083815a5a2353c40082f3"

curl "${base_url}/${path}/${item_id}" \
-X "DELETE" \
-H "X-Tenant-Access-Key: ${X_TENANT_ACCESS_KEY}" \
-H "X-Tenant-Access-Token: ${X_TENANT_ACCESS_TOKEN}"
10 changes: 10 additions & 0 deletions spec/code_samples/cURL/setup@flow@{id}/get.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

base_url=${BASE_URL:="https://cenit.io/api/v2"}
path="setup/flow"
item_id="61e083815a5a2353c40082f3"

curl -G "${base_url}/${path}/${item_id}" \
-H "X-Tenant-Access-Key: ${X_TENANT_ACCESS_KEY}" \
-H "X-Tenant-Access-Token: ${X_TENANT_ACCESS_TOKEN}" \
-d embedding=snippet
18 changes: 18 additions & 0 deletions spec/code_samples/cURL/setup@flow@{id}/post.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

base_url=${BASE_URL:="https://cenit.io/api/v2"}
path="setup/flow"
item_id="620364d55a5a236eda02cfb0"

read -r -d '' data <<- EOM
{
active: true,
}
EOM

curl "${base_url}/${path}/${item_id}" \
-X "POST" \
-H "X-Tenant-Access-Key: ${X_TENANT_ACCESS_KEY}" \
-H "X-Tenant-Access-Token: ${X_TENANT_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d "${data}"
2 changes: 1 addition & 1 deletion spec/code_samples/cURL/setup@json_data_type@{id}/post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ item_id="61e0312b5a5a2353ad004469"
read -r -d '' data <<- EOM
{
"namespace": "Test",
"name": "Person46"
"name": "Person3"
}
EOM

Expand Down
12 changes: 12 additions & 0 deletions spec/code_samples/cURL/setup@plain_webhook/get.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

base_url=${BASE_URL:="https://cenit.io/api/v2"}
path="setup/plain_webhook"

curl -G "${base_url}/${path}" \
-H "X-Tenant-Access-Key: ${X_TENANT_ACCESS_KEY}" \
-H "X-Tenant-Access-Token: ${X_TENANT_ACCESS_TOKEN}" \
-d limit=5 \
-d page=1 \
-d order=-namespace,name \
-d embedding=authorization \
26 changes: 26 additions & 0 deletions spec/code_samples/cURL/setup@plain_webhook/post.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

base_url=${BASE_URL:="https://cenit.io/api/v2"}
path="setup/plain_webhook"

read -r -d '' data <<- EOM
{
namespace: "Test",
name: "webhook_test_01",
method: "get",
path: "api/v2/test_01",
parameters: [
{
key: "limit",
value: "50",
}
],
}
EOM

curl "${base_url}/${path}" \
-X "POST" \
-H "X-Tenant-Access-Key: ${X_TENANT_ACCESS_KEY}" \
-H "X-Tenant-Access-Token: ${X_TENANT_ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d "${data}"
10 changes: 10 additions & 0 deletions spec/code_samples/cURL/setup@plain_webhook@{id}/delete.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

base_url=${BASE_URL:="https://cenit.io/api/v2"}
path="setup/plain_webhook"
item_id="6205b5995a5a233dd9039b8a"

curl "${base_url}/${path}/${item_id}" \
-X "DELETE" \
-H "X-Tenant-Access-Key: ${X_TENANT_ACCESS_KEY}" \
-H "X-Tenant-Access-Token: ${X_TENANT_ACCESS_TOKEN}"
11 changes: 11 additions & 0 deletions spec/code_samples/cURL/setup@plain_webhook@{id}/get.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

base_url=${BASE_URL:="https://cenit.io/api/v2"}
path="setup/plain_webhook"
item_id="6205b5995a5a233dd9039b8a"

curl -G "${base_url}/${path}/${item_id}" \
-H "X-Tenant-Access-Key: ${X_TENANT_ACCESS_KEY}" \
-H "X-Tenant-Access-Token: ${X_TENANT_ACCESS_TOKEN}"\
-d embedding=authorization \
-d ignore=password
Loading