curl --request POST \
--url https://aodocs.altirnao.com/api/library/v1beta1/{libId}/customScripts:compile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"async": true,
"code": {},
"createdTime": "2023-11-07T05:31:56Z",
"id": "<string>",
"imports": [
"<string>"
],
"kind": "<string>",
"lastModifiedTime": "2023-11-07T05:31:56Z",
"libraryId": "<string>",
"name": "<string>",
"parameters": [
{
"defaultValue": "<string>",
"description": "<string>",
"forcedValueForExistingBindings": "<string>",
"name": "<string>"
}
],
"predefined": true
}
'import requests
url = "https://aodocs.altirnao.com/api/library/v1beta1/{libId}/customScripts:compile"
payload = {
"async": True,
"code": {},
"createdTime": "2023-11-07T05:31:56Z",
"id": "<string>",
"imports": ["<string>"],
"kind": "<string>",
"lastModifiedTime": "2023-11-07T05:31:56Z",
"libraryId": "<string>",
"name": "<string>",
"parameters": [
{
"defaultValue": "<string>",
"description": "<string>",
"forcedValueForExistingBindings": "<string>",
"name": "<string>"
}
],
"predefined": True
}
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({
async: true,
code: {},
createdTime: '2023-11-07T05:31:56Z',
id: '<string>',
imports: ['<string>'],
kind: '<string>',
lastModifiedTime: '2023-11-07T05:31:56Z',
libraryId: '<string>',
name: '<string>',
parameters: [
{
defaultValue: '<string>',
description: '<string>',
forcedValueForExistingBindings: '<string>',
name: '<string>'
}
],
predefined: true
})
};
fetch('https://aodocs.altirnao.com/api/library/v1beta1/{libId}/customScripts:compile', 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://aodocs.altirnao.com/api/library/v1beta1/{libId}/customScripts:compile",
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([
'async' => true,
'code' => [
],
'createdTime' => '2023-11-07T05:31:56Z',
'id' => '<string>',
'imports' => [
'<string>'
],
'kind' => '<string>',
'lastModifiedTime' => '2023-11-07T05:31:56Z',
'libraryId' => '<string>',
'name' => '<string>',
'parameters' => [
[
'defaultValue' => '<string>',
'description' => '<string>',
'forcedValueForExistingBindings' => '<string>',
'name' => '<string>'
]
],
'predefined' => true
]),
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://aodocs.altirnao.com/api/library/v1beta1/{libId}/customScripts:compile"
payload := strings.NewReader("{\n \"async\": true,\n \"code\": {},\n \"createdTime\": \"2023-11-07T05:31:56Z\",\n \"id\": \"<string>\",\n \"imports\": [\n \"<string>\"\n ],\n \"kind\": \"<string>\",\n \"lastModifiedTime\": \"2023-11-07T05:31:56Z\",\n \"libraryId\": \"<string>\",\n \"name\": \"<string>\",\n \"parameters\": [\n {\n \"defaultValue\": \"<string>\",\n \"description\": \"<string>\",\n \"forcedValueForExistingBindings\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"predefined\": true\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://aodocs.altirnao.com/api/library/v1beta1/{libId}/customScripts:compile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"async\": true,\n \"code\": {},\n \"createdTime\": \"2023-11-07T05:31:56Z\",\n \"id\": \"<string>\",\n \"imports\": [\n \"<string>\"\n ],\n \"kind\": \"<string>\",\n \"lastModifiedTime\": \"2023-11-07T05:31:56Z\",\n \"libraryId\": \"<string>\",\n \"name\": \"<string>\",\n \"parameters\": [\n {\n \"defaultValue\": \"<string>\",\n \"description\": \"<string>\",\n \"forcedValueForExistingBindings\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"predefined\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://aodocs.altirnao.com/api/library/v1beta1/{libId}/customScripts:compile")
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 \"async\": true,\n \"code\": {},\n \"createdTime\": \"2023-11-07T05:31:56Z\",\n \"id\": \"<string>\",\n \"imports\": [\n \"<string>\"\n ],\n \"kind\": \"<string>\",\n \"lastModifiedTime\": \"2023-11-07T05:31:56Z\",\n \"libraryId\": \"<string>\",\n \"name\": \"<string>\",\n \"parameters\": [\n {\n \"defaultValue\": \"<string>\",\n \"description\": \"<string>\",\n \"forcedValueForExistingBindings\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"predefined\": true\n}"
response = http.request(request)
puts response.read_body{
"errorMessage": "<string>",
"kind": "<string>"
}Post libraryv1beta1 customscripts:compile
Compiles a custom script and returns with its outcome.
curl --request POST \
--url https://aodocs.altirnao.com/api/library/v1beta1/{libId}/customScripts:compile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"async": true,
"code": {},
"createdTime": "2023-11-07T05:31:56Z",
"id": "<string>",
"imports": [
"<string>"
],
"kind": "<string>",
"lastModifiedTime": "2023-11-07T05:31:56Z",
"libraryId": "<string>",
"name": "<string>",
"parameters": [
{
"defaultValue": "<string>",
"description": "<string>",
"forcedValueForExistingBindings": "<string>",
"name": "<string>"
}
],
"predefined": true
}
'import requests
url = "https://aodocs.altirnao.com/api/library/v1beta1/{libId}/customScripts:compile"
payload = {
"async": True,
"code": {},
"createdTime": "2023-11-07T05:31:56Z",
"id": "<string>",
"imports": ["<string>"],
"kind": "<string>",
"lastModifiedTime": "2023-11-07T05:31:56Z",
"libraryId": "<string>",
"name": "<string>",
"parameters": [
{
"defaultValue": "<string>",
"description": "<string>",
"forcedValueForExistingBindings": "<string>",
"name": "<string>"
}
],
"predefined": True
}
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({
async: true,
code: {},
createdTime: '2023-11-07T05:31:56Z',
id: '<string>',
imports: ['<string>'],
kind: '<string>',
lastModifiedTime: '2023-11-07T05:31:56Z',
libraryId: '<string>',
name: '<string>',
parameters: [
{
defaultValue: '<string>',
description: '<string>',
forcedValueForExistingBindings: '<string>',
name: '<string>'
}
],
predefined: true
})
};
fetch('https://aodocs.altirnao.com/api/library/v1beta1/{libId}/customScripts:compile', 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://aodocs.altirnao.com/api/library/v1beta1/{libId}/customScripts:compile",
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([
'async' => true,
'code' => [
],
'createdTime' => '2023-11-07T05:31:56Z',
'id' => '<string>',
'imports' => [
'<string>'
],
'kind' => '<string>',
'lastModifiedTime' => '2023-11-07T05:31:56Z',
'libraryId' => '<string>',
'name' => '<string>',
'parameters' => [
[
'defaultValue' => '<string>',
'description' => '<string>',
'forcedValueForExistingBindings' => '<string>',
'name' => '<string>'
]
],
'predefined' => true
]),
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://aodocs.altirnao.com/api/library/v1beta1/{libId}/customScripts:compile"
payload := strings.NewReader("{\n \"async\": true,\n \"code\": {},\n \"createdTime\": \"2023-11-07T05:31:56Z\",\n \"id\": \"<string>\",\n \"imports\": [\n \"<string>\"\n ],\n \"kind\": \"<string>\",\n \"lastModifiedTime\": \"2023-11-07T05:31:56Z\",\n \"libraryId\": \"<string>\",\n \"name\": \"<string>\",\n \"parameters\": [\n {\n \"defaultValue\": \"<string>\",\n \"description\": \"<string>\",\n \"forcedValueForExistingBindings\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"predefined\": true\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://aodocs.altirnao.com/api/library/v1beta1/{libId}/customScripts:compile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"async\": true,\n \"code\": {},\n \"createdTime\": \"2023-11-07T05:31:56Z\",\n \"id\": \"<string>\",\n \"imports\": [\n \"<string>\"\n ],\n \"kind\": \"<string>\",\n \"lastModifiedTime\": \"2023-11-07T05:31:56Z\",\n \"libraryId\": \"<string>\",\n \"name\": \"<string>\",\n \"parameters\": [\n {\n \"defaultValue\": \"<string>\",\n \"description\": \"<string>\",\n \"forcedValueForExistingBindings\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"predefined\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://aodocs.altirnao.com/api/library/v1beta1/{libId}/customScripts:compile")
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 \"async\": true,\n \"code\": {},\n \"createdTime\": \"2023-11-07T05:31:56Z\",\n \"id\": \"<string>\",\n \"imports\": [\n \"<string>\"\n ],\n \"kind\": \"<string>\",\n \"lastModifiedTime\": \"2023-11-07T05:31:56Z\",\n \"libraryId\": \"<string>\",\n \"name\": \"<string>\",\n \"parameters\": [\n {\n \"defaultValue\": \"<string>\",\n \"description\": \"<string>\",\n \"forcedValueForExistingBindings\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"predefined\": true\n}"
response = http.request(request)
puts response.read_body{
"errorMessage": "<string>",
"kind": "<string>"
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
The ID of the library
Body
Whether the script will be executed as an asynchronous task (JAVA only - Default: false)
The script code by method/function identifier
Show child attributes
Show child attributes
The time at which the custom script was created (read-only field)
The ID of the custom script (read-only field)
The full list of imports used in the script (JAVA only)
The language of the script which depends on the type (read-only field)
JAVA, JAVASCRIPT The last time the custom script was modified by anyone (read-only field)
The ID of the library (read-only field)
The name of the custom script
The list of arbitrary parameters that can be used in the script code
Show child attributes
Show child attributes
Whether the script is a predefined read-only script - (read-only field)
The permission context in which the script will be executed (JAVA only - Possible values: RUN_AS_SYSTEM, RUN_AS_USER - Default: RUN_AS_USER)
RUN_AS_SYSTEM, RUN_AS_USER The type of the script, set during creation (Possible values: RELATION_FILTER, RELATION_RENDER, UPDATE, VIEWER, WORKFLOW_TRANSITION, REMINDER_CONDITION). Affects available methods.
RELATION_FILTER, RELATION_RENDER, UPDATE, VIEWER, WORKFLOW_TRANSITION, REMINDER_CONDITION