Generate Text
curl --request POST \
--url https://{subdomain}.logicgate.com/api/v1/fields/ai \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "The email body text of a concise and kind business notification to a recipient to fill out a cyber risk evaluation. No subject.",
"maxOutputTokens": 100,
"temperature": 1
}
'import requests
url = "https://{subdomain}.logicgate.com/api/v1/fields/ai"
payload = {
"message": "The email body text of a concise and kind business notification to a recipient to fill out a cyber risk evaluation. No subject.",
"maxOutputTokens": 100,
"temperature": 1
}
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({
message: 'The email body text of a concise and kind business notification to a recipient to fill out a cyber risk evaluation. No subject.',
maxOutputTokens: 100,
temperature: 1
})
};
fetch('https://{subdomain}.logicgate.com/api/v1/fields/ai', 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/v1/fields/ai",
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([
'message' => 'The email body text of a concise and kind business notification to a recipient to fill out a cyber risk evaluation. No subject.',
'maxOutputTokens' => 100,
'temperature' => 1
]),
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/v1/fields/ai"
payload := strings.NewReader("{\n \"message\": \"The email body text of a concise and kind business notification to a recipient to fill out a cyber risk evaluation. No subject.\",\n \"maxOutputTokens\": 100,\n \"temperature\": 1\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/v1/fields/ai")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"The email body text of a concise and kind business notification to a recipient to fill out a cyber risk evaluation. No subject.\",\n \"maxOutputTokens\": 100,\n \"temperature\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.logicgate.com/api/v1/fields/ai")
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 \"message\": \"The email body text of a concise and kind business notification to a recipient to fill out a cyber risk evaluation. No subject.\",\n \"maxOutputTokens\": 100,\n \"temperature\": 1\n}"
response = http.request(request)
puts response.read_body{
"id": "a1b2c3d4",
"name": "Risk Severity",
"application": {
"id": "a1b2c3d4",
"name": "Cyber Risk Management Application",
"type": "CONTROLS_COMPLIANCE",
"object": "application"
},
"workflow": {
"id": "a1b2c3d4",
"name": "Risk Assessments",
"recordPrefix": "Assessment",
"object": "workflow"
},
"label": "Enter the Risk Severity based on your assessment",
"global": false,
"required": false,
"tooltip": "Select the Risk Severity",
"helpText": "Determine the Risk Severity from your assessment",
"type": "SELECT",
"valueType": "OPTION",
"optionValues": [
{
"id": "a1b2c3d4",
"type": "OPTION",
"textValue": "Medium Risk",
"numericValue": 2,
"object": "value"
}
],
"defaultValues": [
{
"id": "a1b2c3d4",
"type": "OPTION",
"textValue": "Medium Risk",
"numericValue": 2,
"object": "value"
}
],
"pattern": "[0-9]{3}-[0-9]{3}-[0-9]{4}$",
"message": "<string>",
"expression": "%f + %f",
"nullStrategy": "Available options are: null, 0, 1, N/A, a blank space, and an empty String.",
"logicalHandling": "Some examples are: EQUALS, NOT_EQUALS, GREATER_THAN, GREATER_THAN_EQUALS, etc.",
"labelsEnabled": true,
"fieldInputs": [
{
"id": "<string>",
"crossflowReducer": "NEWEST",
"calcSpecificToStep": true,
"calcStep": {
"id": "a1b2c3d4",
"name": "Identify Risk",
"description": "This is a description of the step",
"xpos": 20,
"ypos": 20,
"type": "ORIGIN",
"enableComments": false,
"assignableUserType": "APP_USERS",
"externalUserMfaRequired": false,
"autofillEnabled": false,
"workflow": {
"id": "a1b2c3d4",
"name": "Risk Assessments",
"recordPrefix": "Assessment",
"object": "workflow"
},
"object": "step"
},
"systemField": "NAME",
"fieldWorkflow": {
"id": "a1b2c3d4",
"name": "Risk Assessments",
"recordPrefix": "Assessment",
"object": "workflow"
},
"fieldWorkflowId": "<string>",
"customField": {
"id": "a1b2c3d4",
"name": "Risk Severity",
"label": "Enter the Risk Severity based on your assessment",
"global": false,
"required": false,
"tooltip": "Select the Risk Severity",
"helpText": "Determine the Risk Severity from your assessment",
"type": "SELECT",
"valueType": "OPTION",
"pattern": "[0-9]{3}-[0-9]{3}-[0-9]{4}$",
"message": "<string>",
"expression": "%f + %f",
"nullStrategy": "Available options are: null, 0, 1, N/A, a blank space, and an empty String.",
"logicalHandling": "Some examples are: EQUALS, NOT_EQUALS, GREATER_THAN, GREATER_THAN_EQUALS, etc.",
"labelsEnabled": true,
"linkDepth": 123,
"object": "field"
},
"customFieldId": "<string>",
"priority": 123
}
],
"linkDepth": 123,
"object": "field"
}Field
Generate text
An ease of use endpoint with a straightforward input and output to provide an off-the-shelf means for low configuration generative AI text.
POST
/
api
/
v1
/
fields
/
ai
Generate Text
curl --request POST \
--url https://{subdomain}.logicgate.com/api/v1/fields/ai \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": "The email body text of a concise and kind business notification to a recipient to fill out a cyber risk evaluation. No subject.",
"maxOutputTokens": 100,
"temperature": 1
}
'import requests
url = "https://{subdomain}.logicgate.com/api/v1/fields/ai"
payload = {
"message": "The email body text of a concise and kind business notification to a recipient to fill out a cyber risk evaluation. No subject.",
"maxOutputTokens": 100,
"temperature": 1
}
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({
message: 'The email body text of a concise and kind business notification to a recipient to fill out a cyber risk evaluation. No subject.',
maxOutputTokens: 100,
temperature: 1
})
};
fetch('https://{subdomain}.logicgate.com/api/v1/fields/ai', 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/v1/fields/ai",
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([
'message' => 'The email body text of a concise and kind business notification to a recipient to fill out a cyber risk evaluation. No subject.',
'maxOutputTokens' => 100,
'temperature' => 1
]),
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/v1/fields/ai"
payload := strings.NewReader("{\n \"message\": \"The email body text of a concise and kind business notification to a recipient to fill out a cyber risk evaluation. No subject.\",\n \"maxOutputTokens\": 100,\n \"temperature\": 1\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/v1/fields/ai")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"The email body text of a concise and kind business notification to a recipient to fill out a cyber risk evaluation. No subject.\",\n \"maxOutputTokens\": 100,\n \"temperature\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.logicgate.com/api/v1/fields/ai")
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 \"message\": \"The email body text of a concise and kind business notification to a recipient to fill out a cyber risk evaluation. No subject.\",\n \"maxOutputTokens\": 100,\n \"temperature\": 1\n}"
response = http.request(request)
puts response.read_body{
"id": "a1b2c3d4",
"name": "Risk Severity",
"application": {
"id": "a1b2c3d4",
"name": "Cyber Risk Management Application",
"type": "CONTROLS_COMPLIANCE",
"object": "application"
},
"workflow": {
"id": "a1b2c3d4",
"name": "Risk Assessments",
"recordPrefix": "Assessment",
"object": "workflow"
},
"label": "Enter the Risk Severity based on your assessment",
"global": false,
"required": false,
"tooltip": "Select the Risk Severity",
"helpText": "Determine the Risk Severity from your assessment",
"type": "SELECT",
"valueType": "OPTION",
"optionValues": [
{
"id": "a1b2c3d4",
"type": "OPTION",
"textValue": "Medium Risk",
"numericValue": 2,
"object": "value"
}
],
"defaultValues": [
{
"id": "a1b2c3d4",
"type": "OPTION",
"textValue": "Medium Risk",
"numericValue": 2,
"object": "value"
}
],
"pattern": "[0-9]{3}-[0-9]{3}-[0-9]{4}$",
"message": "<string>",
"expression": "%f + %f",
"nullStrategy": "Available options are: null, 0, 1, N/A, a blank space, and an empty String.",
"logicalHandling": "Some examples are: EQUALS, NOT_EQUALS, GREATER_THAN, GREATER_THAN_EQUALS, etc.",
"labelsEnabled": true,
"fieldInputs": [
{
"id": "<string>",
"crossflowReducer": "NEWEST",
"calcSpecificToStep": true,
"calcStep": {
"id": "a1b2c3d4",
"name": "Identify Risk",
"description": "This is a description of the step",
"xpos": 20,
"ypos": 20,
"type": "ORIGIN",
"enableComments": false,
"assignableUserType": "APP_USERS",
"externalUserMfaRequired": false,
"autofillEnabled": false,
"workflow": {
"id": "a1b2c3d4",
"name": "Risk Assessments",
"recordPrefix": "Assessment",
"object": "workflow"
},
"object": "step"
},
"systemField": "NAME",
"fieldWorkflow": {
"id": "a1b2c3d4",
"name": "Risk Assessments",
"recordPrefix": "Assessment",
"object": "workflow"
},
"fieldWorkflowId": "<string>",
"customField": {
"id": "a1b2c3d4",
"name": "Risk Severity",
"label": "Enter the Risk Severity based on your assessment",
"global": false,
"required": false,
"tooltip": "Select the Risk Severity",
"helpText": "Determine the Risk Severity from your assessment",
"type": "SELECT",
"valueType": "OPTION",
"pattern": "[0-9]{3}-[0-9]{3}-[0-9]{4}$",
"message": "<string>",
"expression": "%f + %f",
"nullStrategy": "Available options are: null, 0, 1, N/A, a blank space, and an empty String.",
"logicalHandling": "Some examples are: EQUALS, NOT_EQUALS, GREATER_THAN, GREATER_THAN_EQUALS, etc.",
"labelsEnabled": true,
"linkDepth": 123,
"object": "field"
},
"customFieldId": "<string>",
"priority": 123
}
],
"linkDepth": 123,
"object": "field"
}Authorizations
ApiTokenbasic
Headers
A bearer authorization header containing a Risk Cloud API access token in the format Authorization: Bearer {TOKEN}.
To obtain a Risk Cloud API access token, refer to Obtain an API Access Token in the LogicGate Help Center.
Body
application/json
Response
200 - application/json
OK
The comparison operator used to define label range boundaries for a calculation field. Determines whether ranges are created for values greater than or less than the baseline number.
Available options:
EQUALS, NOT_EQUALS, IS, IS_NOT, GREATER_THAN, GREATER_THAN_EQUALS, LESS_THAN, LESS_THAN_EQUALS, CONTAINS, DOES_NOT_CONTAIN, NULL, NOT_NULL, DATE_RANGE, NUMERIC_RANGE Example:
"Some examples are: EQUALS, NOT_EQUALS, GREATER_THAN, GREATER_THAN_EQUALS, etc."

