curl --request POST \
--url https://{subdomain}.logicgate.com/api/v2/workflows \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Risk Assessments",
"recordPrefix": "Assessment",
"applicationId": "a1b2c3d4",
"description": "Risk Assessment Description Text",
"xpos": 20,
"ypos": 20
}
'import requests
url = "https://{subdomain}.logicgate.com/api/v2/workflows"
payload = {
"name": "Risk Assessments",
"recordPrefix": "Assessment",
"applicationId": "a1b2c3d4",
"description": "Risk Assessment Description Text",
"xpos": 20,
"ypos": 20
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Risk Assessments',
recordPrefix: 'Assessment',
applicationId: 'a1b2c3d4',
description: 'Risk Assessment Description Text',
xpos: 20,
ypos: 20
})
};
fetch('https://{subdomain}.logicgate.com/api/v2/workflows', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{subdomain}.logicgate.com/api/v2/workflows",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Risk Assessments',
'recordPrefix' => 'Assessment',
'applicationId' => 'a1b2c3d4',
'description' => 'Risk Assessment Description Text',
'xpos' => 20,
'ypos' => 20
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.logicgate.com/api/v2/workflows"
payload := strings.NewReader("{\n \"name\": \"Risk Assessments\",\n \"recordPrefix\": \"Assessment\",\n \"applicationId\": \"a1b2c3d4\",\n \"description\": \"Risk Assessment Description Text\",\n \"xpos\": 20,\n \"ypos\": 20\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{subdomain}.logicgate.com/api/v2/workflows")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Risk Assessments\",\n \"recordPrefix\": \"Assessment\",\n \"applicationId\": \"a1b2c3d4\",\n \"description\": \"Risk Assessment Description Text\",\n \"xpos\": 20,\n \"ypos\": 20\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.logicgate.com/api/v2/workflows")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Risk Assessments\",\n \"recordPrefix\": \"Assessment\",\n \"applicationId\": \"a1b2c3d4\",\n \"description\": \"Risk Assessment Description Text\",\n \"xpos\": 20,\n \"ypos\": 20\n}"
response = http.request(request)
puts response.read_body{
"id": "a1b2c3d4",
"name": "Risk Assessments",
"description": "Risk Assessment Description Text",
"recordPrefix": "Assessment",
"applicationId": "a1b2c3d4",
"xpos": 20,
"ypos": 20,
"type": "WORKFLOW",
"object": "workflow"
}{
"property": "<string>",
"value": "<string>",
"message": "<string>"
}{
"property": "<string>",
"value": "<string>",
"message": "<string>"
}Create a workflow
Permissions: Build Access to parent application
Create a workflow from a JSON request body. The workflow will contain a Default Origin step and a Default End step.
curl --request POST \
--url https://{subdomain}.logicgate.com/api/v2/workflows \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Risk Assessments",
"recordPrefix": "Assessment",
"applicationId": "a1b2c3d4",
"description": "Risk Assessment Description Text",
"xpos": 20,
"ypos": 20
}
'import requests
url = "https://{subdomain}.logicgate.com/api/v2/workflows"
payload = {
"name": "Risk Assessments",
"recordPrefix": "Assessment",
"applicationId": "a1b2c3d4",
"description": "Risk Assessment Description Text",
"xpos": 20,
"ypos": 20
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Risk Assessments',
recordPrefix: 'Assessment',
applicationId: 'a1b2c3d4',
description: 'Risk Assessment Description Text',
xpos: 20,
ypos: 20
})
};
fetch('https://{subdomain}.logicgate.com/api/v2/workflows', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{subdomain}.logicgate.com/api/v2/workflows",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Risk Assessments',
'recordPrefix' => 'Assessment',
'applicationId' => 'a1b2c3d4',
'description' => 'Risk Assessment Description Text',
'xpos' => 20,
'ypos' => 20
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{subdomain}.logicgate.com/api/v2/workflows"
payload := strings.NewReader("{\n \"name\": \"Risk Assessments\",\n \"recordPrefix\": \"Assessment\",\n \"applicationId\": \"a1b2c3d4\",\n \"description\": \"Risk Assessment Description Text\",\n \"xpos\": 20,\n \"ypos\": 20\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{subdomain}.logicgate.com/api/v2/workflows")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Risk Assessments\",\n \"recordPrefix\": \"Assessment\",\n \"applicationId\": \"a1b2c3d4\",\n \"description\": \"Risk Assessment Description Text\",\n \"xpos\": 20,\n \"ypos\": 20\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.logicgate.com/api/v2/workflows")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Risk Assessments\",\n \"recordPrefix\": \"Assessment\",\n \"applicationId\": \"a1b2c3d4\",\n \"description\": \"Risk Assessment Description Text\",\n \"xpos\": 20,\n \"ypos\": 20\n}"
response = http.request(request)
puts response.read_body{
"id": "a1b2c3d4",
"name": "Risk Assessments",
"description": "Risk Assessment Description Text",
"recordPrefix": "Assessment",
"applicationId": "a1b2c3d4",
"xpos": 20,
"ypos": 20,
"type": "WORKFLOW",
"object": "workflow"
}{
"property": "<string>",
"value": "<string>",
"message": "<string>"
}{
"property": "<string>",
"value": "<string>",
"message": "<string>"
}Authorizations
Bearer token issued via the Authentication endpoints.
Headers
A bearer authorization header containing a Risk Cloud API access token in the format Authorization: Bearer TOKEN — replace TOKEN with your actual access token.
To obtain a Risk Cloud API access token, refer to Obtain an API Access Token in the LogicGate Help Center.
Body
Workflow (Create)
The name of the workflow
1"Risk Assessments"
The prefix to be used in the name of every record created from this workflow
1"Assessment"
The unique ID of the parent application of the workflow
1"a1b2c3d4"
The description of the workflow
"Risk Assessment Description Text"
The x-coordinate of the workflow in the application builder (must not be less than 0, defaults to 0)
x >= 020
The y-coordinate of the workflow in the application builder (must not be less than 0, defaults to 0)
x >= 020
Response
Success
The unique ID of this Risk Cloud resource
"a1b2c3d4"
The name of the workflow
"Risk Assessments"
The description of the workflow
"Risk Assessment Description Text"
The prefix to be used in the name of every record created from this workflow
"Assessment"
The unique ID of the parent application of the workflow
"a1b2c3d4"
The x-coordinate of the workflow in the application builder
20
The y-coordinate of the workflow in the application builder
20
The type of workflow
WORKFLOW, JIRA_WORKFLOW, CONTROL_WORKFLOW, ANALYSIS_WORKFLOW "WORKFLOW"
Identifies the type of object this data represents
"workflow"