Fire an event
curl --request POST \
--url https://api.eka.care/protocol/workflow/events \
--header 'Content-Type: application/json' \
--header 'auth: <auth>' \
--data '
{
"event": "<string>",
"scope": {
"id": "<string>"
},
"meta": {},
"rule_ids": [
"<string>"
]
}
'import requests
url = "https://api.eka.care/protocol/workflow/events"
payload = {
"event": "<string>",
"scope": { "id": "<string>" },
"meta": {},
"rule_ids": ["<string>"]
}
headers = {
"auth": "<auth>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {auth: '<auth>', 'Content-Type': 'application/json'},
body: JSON.stringify({event: '<string>', scope: {id: '<string>'}, meta: {}, rule_ids: ['<string>']})
};
fetch('https://api.eka.care/protocol/workflow/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.eka.care/protocol/workflow/events")
.header("auth", "<auth>")
.header("Content-Type", "application/json")
.body("{\n \"event\": \"<string>\",\n \"scope\": {\n \"id\": \"<string>\"\n },\n \"meta\": {},\n \"rule_ids\": [\n \"<string>\"\n ]\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/protocol/workflow/events");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<auth>");
request.AddJsonBody("{\n \"event\": \"<string>\",\n \"scope\": {\n \"id\": \"<string>\"\n },\n \"meta\": {},\n \"rule_ids\": [\n \"<string>\"\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/protocol/workflow/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["auth"] = '<auth>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"event\": \"<string>\",\n \"scope\": {\n \"id\": \"<string>\"\n },\n \"meta\": {},\n \"rule_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"event_id": "<string>",
"closes_scope": true,
"rules_found": 123,
"runs": [
{
"workflow_name": "<string>",
"version": 123,
"rule_id": "<string>",
"rule_name": "<string>",
"run_id": "<string>",
"error": "<string>"
}
],
"cancelled": [
"<string>"
],
"facts": {},
"facts_missing": [
"<string>"
]
}
}{
"status": "error",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": "error",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": "error",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}Events
Fire an event
Starts one run per active rule on the event, for the given scope.
POST
/
protocol
/
workflow
/
events
Fire an event
curl --request POST \
--url https://api.eka.care/protocol/workflow/events \
--header 'Content-Type: application/json' \
--header 'auth: <auth>' \
--data '
{
"event": "<string>",
"scope": {
"id": "<string>"
},
"meta": {},
"rule_ids": [
"<string>"
]
}
'import requests
url = "https://api.eka.care/protocol/workflow/events"
payload = {
"event": "<string>",
"scope": { "id": "<string>" },
"meta": {},
"rule_ids": ["<string>"]
}
headers = {
"auth": "<auth>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {auth: '<auth>', 'Content-Type': 'application/json'},
body: JSON.stringify({event: '<string>', scope: {id: '<string>'}, meta: {}, rule_ids: ['<string>']})
};
fetch('https://api.eka.care/protocol/workflow/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api.eka.care/protocol/workflow/events")
.header("auth", "<auth>")
.header("Content-Type", "application/json")
.body("{\n \"event\": \"<string>\",\n \"scope\": {\n \"id\": \"<string>\"\n },\n \"meta\": {},\n \"rule_ids\": [\n \"<string>\"\n ]\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.eka.care/protocol/workflow/events");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("auth", "<auth>");
request.AddJsonBody("{\n \"event\": \"<string>\",\n \"scope\": {\n \"id\": \"<string>\"\n },\n \"meta\": {},\n \"rule_ids\": [\n \"<string>\"\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://api.eka.care/protocol/workflow/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["auth"] = '<auth>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"event\": \"<string>\",\n \"scope\": {\n \"id\": \"<string>\"\n },\n \"meta\": {},\n \"rule_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"event_id": "<string>",
"closes_scope": true,
"rules_found": 123,
"runs": [
{
"workflow_name": "<string>",
"version": 123,
"rule_id": "<string>",
"rule_name": "<string>",
"run_id": "<string>",
"error": "<string>"
}
],
"cancelled": [
"<string>"
],
"facts": {},
"facts_missing": [
"<string>"
]
}
}{
"status": "error",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": "error",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": "error",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}Headers
The access token. The gateway verifies it and passes the user and the business on.
Body
application/json
Was this page helpful?

