Save a lifecycle draft
curl --request POST \
--url https://api.occtoo.com/v1/card-definitions/{cardId}/lifecycles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"definition": {
"name": "<string>",
"steps": [
{
"slug": "<string>",
"name": "<string>",
"rules": [
{
"slug": "<string>",
"message": "<string>",
"assertion": {
"and": "<array>",
"or": "<array>",
"not": "<unknown>",
"text": {
"property": "<string>",
"eq": "<string>",
"neq": "<string>",
"in": [
"<string>"
],
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": false,
"languages": "<array>",
"regex": "<string>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"integer": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [
123
],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"decimal": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [
123
],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"timestamp": {
"property": "<string>",
"eq": "2023-11-07T05:31:56Z",
"neq": "2023-11-07T05:31:56Z",
"in": [
"2023-11-07T05:31:56Z"
],
"lt": "2023-11-07T05:31:56Z",
"lte": "2023-11-07T05:31:56Z",
"gt": "2023-11-07T05:31:56Z",
"gte": "2023-11-07T05:31:56Z"
},
"boolean": {
"property": "<string>",
"eq": true,
"neq": true,
"in": [
true
]
},
"list": {
"property": "<string>",
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": false,
"languages": "<array>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
},
"only": [
"<string>"
]
},
"hasValue": {
"property": "<string>",
"languages": "<array>"
},
"segment": {
"definitionId": "<string>",
"id": "<string>"
},
"relation": {
"id": "<string>",
"where": "<unknown>",
"count": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"lifecycle": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"firstIncompleteStepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"precondition": {
"and": "<array>",
"or": "<array>",
"not": "<unknown>",
"text": {
"property": "<string>",
"eq": "<string>",
"neq": "<string>",
"in": [
"<string>"
],
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": false,
"languages": "<array>",
"regex": "<string>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"integer": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [
123
],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"decimal": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [
123
],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"timestamp": {
"property": "<string>",
"eq": "2023-11-07T05:31:56Z",
"neq": "2023-11-07T05:31:56Z",
"in": [
"2023-11-07T05:31:56Z"
],
"lt": "2023-11-07T05:31:56Z",
"lte": "2023-11-07T05:31:56Z",
"gt": "2023-11-07T05:31:56Z",
"gte": "2023-11-07T05:31:56Z"
},
"boolean": {
"property": "<string>",
"eq": true,
"neq": true,
"in": [
true
]
},
"list": {
"property": "<string>",
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": false,
"languages": "<array>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
},
"only": [
"<string>"
]
},
"hasValue": {
"property": "<string>",
"languages": "<array>"
},
"segment": {
"definitionId": "<string>",
"id": "<string>"
},
"relation": {
"id": "<string>",
"where": "<unknown>",
"count": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"lifecycle": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"firstIncompleteStepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}
],
"briefing": "<string>"
}
],
"briefing": "<string>",
"applicability": {
"and": "<array>",
"or": "<array>",
"not": "<unknown>",
"text": {
"property": "<string>",
"eq": "<string>",
"neq": "<string>",
"in": [
"<string>"
],
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": false,
"languages": "<array>",
"regex": "<string>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"integer": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [
123
],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"decimal": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [
123
],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"timestamp": {
"property": "<string>",
"eq": "2023-11-07T05:31:56Z",
"neq": "2023-11-07T05:31:56Z",
"in": [
"2023-11-07T05:31:56Z"
],
"lt": "2023-11-07T05:31:56Z",
"lte": "2023-11-07T05:31:56Z",
"gt": "2023-11-07T05:31:56Z",
"gte": "2023-11-07T05:31:56Z"
},
"boolean": {
"property": "<string>",
"eq": true,
"neq": true,
"in": [
true
]
},
"list": {
"property": "<string>",
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": false,
"languages": "<array>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
},
"only": [
"<string>"
]
},
"hasValue": {
"property": "<string>",
"languages": "<array>"
},
"segment": {
"definitionId": "<string>",
"id": "<string>"
},
"relation": {
"id": "<string>",
"where": "<unknown>",
"count": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"lifecycle": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"firstIncompleteStepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}
}
'import requests
url = "https://api.occtoo.com/v1/card-definitions/{cardId}/lifecycles"
payload = { "definition": {
"name": "<string>",
"steps": [
{
"slug": "<string>",
"name": "<string>",
"rules": [
{
"slug": "<string>",
"message": "<string>",
"assertion": {
"and": "<array>",
"or": "<array>",
"not": "<unknown>",
"text": {
"property": "<string>",
"eq": "<string>",
"neq": "<string>",
"in": ["<string>"],
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": False,
"languages": "<array>",
"regex": "<string>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"integer": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [123],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"decimal": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [123],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"timestamp": {
"property": "<string>",
"eq": "2023-11-07T05:31:56Z",
"neq": "2023-11-07T05:31:56Z",
"in": ["2023-11-07T05:31:56Z"],
"lt": "2023-11-07T05:31:56Z",
"lte": "2023-11-07T05:31:56Z",
"gt": "2023-11-07T05:31:56Z",
"gte": "2023-11-07T05:31:56Z"
},
"boolean": {
"property": "<string>",
"eq": True,
"neq": True,
"in": [True]
},
"list": {
"property": "<string>",
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": False,
"languages": "<array>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
},
"only": ["<string>"]
},
"hasValue": {
"property": "<string>",
"languages": "<array>"
},
"segment": {
"definitionId": "<string>",
"id": "<string>"
},
"relation": {
"id": "<string>",
"where": "<unknown>",
"count": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"lifecycle": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step": { "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" },
"firstIncompleteStepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"precondition": {
"and": "<array>",
"or": "<array>",
"not": "<unknown>",
"text": {
"property": "<string>",
"eq": "<string>",
"neq": "<string>",
"in": ["<string>"],
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": False,
"languages": "<array>",
"regex": "<string>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"integer": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [123],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"decimal": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [123],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"timestamp": {
"property": "<string>",
"eq": "2023-11-07T05:31:56Z",
"neq": "2023-11-07T05:31:56Z",
"in": ["2023-11-07T05:31:56Z"],
"lt": "2023-11-07T05:31:56Z",
"lte": "2023-11-07T05:31:56Z",
"gt": "2023-11-07T05:31:56Z",
"gte": "2023-11-07T05:31:56Z"
},
"boolean": {
"property": "<string>",
"eq": True,
"neq": True,
"in": [True]
},
"list": {
"property": "<string>",
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": False,
"languages": "<array>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
},
"only": ["<string>"]
},
"hasValue": {
"property": "<string>",
"languages": "<array>"
},
"segment": {
"definitionId": "<string>",
"id": "<string>"
},
"relation": {
"id": "<string>",
"where": "<unknown>",
"count": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"lifecycle": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step": { "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" },
"firstIncompleteStepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}
],
"briefing": "<string>"
}
],
"briefing": "<string>",
"applicability": {
"and": "<array>",
"or": "<array>",
"not": "<unknown>",
"text": {
"property": "<string>",
"eq": "<string>",
"neq": "<string>",
"in": ["<string>"],
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": False,
"languages": "<array>",
"regex": "<string>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"integer": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [123],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"decimal": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [123],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"timestamp": {
"property": "<string>",
"eq": "2023-11-07T05:31:56Z",
"neq": "2023-11-07T05:31:56Z",
"in": ["2023-11-07T05:31:56Z"],
"lt": "2023-11-07T05:31:56Z",
"lte": "2023-11-07T05:31:56Z",
"gt": "2023-11-07T05:31:56Z",
"gte": "2023-11-07T05:31:56Z"
},
"boolean": {
"property": "<string>",
"eq": True,
"neq": True,
"in": [True]
},
"list": {
"property": "<string>",
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": False,
"languages": "<array>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
},
"only": ["<string>"]
},
"hasValue": {
"property": "<string>",
"languages": "<array>"
},
"segment": {
"definitionId": "<string>",
"id": "<string>"
},
"relation": {
"id": "<string>",
"where": "<unknown>",
"count": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"lifecycle": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step": { "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" },
"firstIncompleteStepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
} }
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({
definition: {
name: '<string>',
steps: [
{
slug: '<string>',
name: '<string>',
rules: [
{
slug: '<string>',
message: '<string>',
assertion: {
and: '<array>',
or: '<array>',
not: '<unknown>',
text: {
property: '<string>',
eq: '<string>',
neq: '<string>',
in: ['<string>'],
contains: '<string>',
pattern: '<string>',
ignoreCase: false,
languages: '<array>',
regex: '<string>',
length: {eq: 123, gt: 123, gte: 123, lt: 123, lte: 123}
},
integer: {
property: '<string>',
eq: 123,
neq: 123,
in: [123],
lt: 123,
lte: 123,
gt: 123,
gte: 123
},
decimal: {
property: '<string>',
eq: 123,
neq: 123,
in: [123],
lt: 123,
lte: 123,
gt: 123,
gte: 123
},
timestamp: {
property: '<string>',
eq: '2023-11-07T05:31:56Z',
neq: '2023-11-07T05:31:56Z',
in: ['2023-11-07T05:31:56Z'],
lt: '2023-11-07T05:31:56Z',
lte: '2023-11-07T05:31:56Z',
gt: '2023-11-07T05:31:56Z',
gte: '2023-11-07T05:31:56Z'
},
boolean: {property: '<string>', eq: true, neq: true, in: [true]},
list: {
property: '<string>',
contains: '<string>',
pattern: '<string>',
ignoreCase: false,
languages: '<array>',
length: {eq: 123, gt: 123, gte: 123, lt: 123, lte: 123},
only: ['<string>']
},
hasValue: {property: '<string>', languages: '<array>'},
segment: {definitionId: '<string>', id: '<string>'},
relation: {
id: '<string>',
where: '<unknown>',
count: {eq: 123, gt: 123, gte: 123, lt: 123, lte: 123}
},
lifecycle: {
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
step: {id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
firstIncompleteStepId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
},
precondition: {
and: '<array>',
or: '<array>',
not: '<unknown>',
text: {
property: '<string>',
eq: '<string>',
neq: '<string>',
in: ['<string>'],
contains: '<string>',
pattern: '<string>',
ignoreCase: false,
languages: '<array>',
regex: '<string>',
length: {eq: 123, gt: 123, gte: 123, lt: 123, lte: 123}
},
integer: {
property: '<string>',
eq: 123,
neq: 123,
in: [123],
lt: 123,
lte: 123,
gt: 123,
gte: 123
},
decimal: {
property: '<string>',
eq: 123,
neq: 123,
in: [123],
lt: 123,
lte: 123,
gt: 123,
gte: 123
},
timestamp: {
property: '<string>',
eq: '2023-11-07T05:31:56Z',
neq: '2023-11-07T05:31:56Z',
in: ['2023-11-07T05:31:56Z'],
lt: '2023-11-07T05:31:56Z',
lte: '2023-11-07T05:31:56Z',
gt: '2023-11-07T05:31:56Z',
gte: '2023-11-07T05:31:56Z'
},
boolean: {property: '<string>', eq: true, neq: true, in: [true]},
list: {
property: '<string>',
contains: '<string>',
pattern: '<string>',
ignoreCase: false,
languages: '<array>',
length: {eq: 123, gt: 123, gte: 123, lt: 123, lte: 123},
only: ['<string>']
},
hasValue: {property: '<string>', languages: '<array>'},
segment: {definitionId: '<string>', id: '<string>'},
relation: {
id: '<string>',
where: '<unknown>',
count: {eq: 123, gt: 123, gte: 123, lt: 123, lte: 123}
},
lifecycle: {
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
step: {id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
firstIncompleteStepId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
}
}
],
briefing: '<string>'
}
],
briefing: '<string>',
applicability: {
and: '<array>',
or: '<array>',
not: '<unknown>',
text: {
property: '<string>',
eq: '<string>',
neq: '<string>',
in: ['<string>'],
contains: '<string>',
pattern: '<string>',
ignoreCase: false,
languages: '<array>',
regex: '<string>',
length: {eq: 123, gt: 123, gte: 123, lt: 123, lte: 123}
},
integer: {
property: '<string>',
eq: 123,
neq: 123,
in: [123],
lt: 123,
lte: 123,
gt: 123,
gte: 123
},
decimal: {
property: '<string>',
eq: 123,
neq: 123,
in: [123],
lt: 123,
lte: 123,
gt: 123,
gte: 123
},
timestamp: {
property: '<string>',
eq: '2023-11-07T05:31:56Z',
neq: '2023-11-07T05:31:56Z',
in: ['2023-11-07T05:31:56Z'],
lt: '2023-11-07T05:31:56Z',
lte: '2023-11-07T05:31:56Z',
gt: '2023-11-07T05:31:56Z',
gte: '2023-11-07T05:31:56Z'
},
boolean: {property: '<string>', eq: true, neq: true, in: [true]},
list: {
property: '<string>',
contains: '<string>',
pattern: '<string>',
ignoreCase: false,
languages: '<array>',
length: {eq: 123, gt: 123, gte: 123, lt: 123, lte: 123},
only: ['<string>']
},
hasValue: {property: '<string>', languages: '<array>'},
segment: {definitionId: '<string>', id: '<string>'},
relation: {
id: '<string>',
where: '<unknown>',
count: {eq: 123, gt: 123, gte: 123, lt: 123, lte: 123}
},
lifecycle: {
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
step: {id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
firstIncompleteStepId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
}
}
})
};
fetch('https://api.occtoo.com/v1/card-definitions/{cardId}/lifecycles', 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://api.occtoo.com/v1/card-definitions/{cardId}/lifecycles",
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([
'definition' => [
'name' => '<string>',
'steps' => [
[
'slug' => '<string>',
'name' => '<string>',
'rules' => [
[
'slug' => '<string>',
'message' => '<string>',
'assertion' => [
'and' => '<array>',
'or' => '<array>',
'not' => '<unknown>',
'text' => [
'property' => '<string>',
'eq' => '<string>',
'neq' => '<string>',
'in' => [
'<string>'
],
'contains' => '<string>',
'pattern' => '<string>',
'ignoreCase' => false,
'languages' => '<array>',
'regex' => '<string>',
'length' => [
'eq' => 123,
'gt' => 123,
'gte' => 123,
'lt' => 123,
'lte' => 123
]
],
'integer' => [
'property' => '<string>',
'eq' => 123,
'neq' => 123,
'in' => [
123
],
'lt' => 123,
'lte' => 123,
'gt' => 123,
'gte' => 123
],
'decimal' => [
'property' => '<string>',
'eq' => 123,
'neq' => 123,
'in' => [
123
],
'lt' => 123,
'lte' => 123,
'gt' => 123,
'gte' => 123
],
'timestamp' => [
'property' => '<string>',
'eq' => '2023-11-07T05:31:56Z',
'neq' => '2023-11-07T05:31:56Z',
'in' => [
'2023-11-07T05:31:56Z'
],
'lt' => '2023-11-07T05:31:56Z',
'lte' => '2023-11-07T05:31:56Z',
'gt' => '2023-11-07T05:31:56Z',
'gte' => '2023-11-07T05:31:56Z'
],
'boolean' => [
'property' => '<string>',
'eq' => true,
'neq' => true,
'in' => [
true
]
],
'list' => [
'property' => '<string>',
'contains' => '<string>',
'pattern' => '<string>',
'ignoreCase' => false,
'languages' => '<array>',
'length' => [
'eq' => 123,
'gt' => 123,
'gte' => 123,
'lt' => 123,
'lte' => 123
],
'only' => [
'<string>'
]
],
'hasValue' => [
'property' => '<string>',
'languages' => '<array>'
],
'segment' => [
'definitionId' => '<string>',
'id' => '<string>'
],
'relation' => [
'id' => '<string>',
'where' => '<unknown>',
'count' => [
'eq' => 123,
'gt' => 123,
'gte' => 123,
'lt' => 123,
'lte' => 123
]
],
'lifecycle' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'step' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'firstIncompleteStepId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'precondition' => [
'and' => '<array>',
'or' => '<array>',
'not' => '<unknown>',
'text' => [
'property' => '<string>',
'eq' => '<string>',
'neq' => '<string>',
'in' => [
'<string>'
],
'contains' => '<string>',
'pattern' => '<string>',
'ignoreCase' => false,
'languages' => '<array>',
'regex' => '<string>',
'length' => [
'eq' => 123,
'gt' => 123,
'gte' => 123,
'lt' => 123,
'lte' => 123
]
],
'integer' => [
'property' => '<string>',
'eq' => 123,
'neq' => 123,
'in' => [
123
],
'lt' => 123,
'lte' => 123,
'gt' => 123,
'gte' => 123
],
'decimal' => [
'property' => '<string>',
'eq' => 123,
'neq' => 123,
'in' => [
123
],
'lt' => 123,
'lte' => 123,
'gt' => 123,
'gte' => 123
],
'timestamp' => [
'property' => '<string>',
'eq' => '2023-11-07T05:31:56Z',
'neq' => '2023-11-07T05:31:56Z',
'in' => [
'2023-11-07T05:31:56Z'
],
'lt' => '2023-11-07T05:31:56Z',
'lte' => '2023-11-07T05:31:56Z',
'gt' => '2023-11-07T05:31:56Z',
'gte' => '2023-11-07T05:31:56Z'
],
'boolean' => [
'property' => '<string>',
'eq' => true,
'neq' => true,
'in' => [
true
]
],
'list' => [
'property' => '<string>',
'contains' => '<string>',
'pattern' => '<string>',
'ignoreCase' => false,
'languages' => '<array>',
'length' => [
'eq' => 123,
'gt' => 123,
'gte' => 123,
'lt' => 123,
'lte' => 123
],
'only' => [
'<string>'
]
],
'hasValue' => [
'property' => '<string>',
'languages' => '<array>'
],
'segment' => [
'definitionId' => '<string>',
'id' => '<string>'
],
'relation' => [
'id' => '<string>',
'where' => '<unknown>',
'count' => [
'eq' => 123,
'gt' => 123,
'gte' => 123,
'lt' => 123,
'lte' => 123
]
],
'lifecycle' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'step' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'firstIncompleteStepId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]
],
'briefing' => '<string>'
]
],
'briefing' => '<string>',
'applicability' => [
'and' => '<array>',
'or' => '<array>',
'not' => '<unknown>',
'text' => [
'property' => '<string>',
'eq' => '<string>',
'neq' => '<string>',
'in' => [
'<string>'
],
'contains' => '<string>',
'pattern' => '<string>',
'ignoreCase' => false,
'languages' => '<array>',
'regex' => '<string>',
'length' => [
'eq' => 123,
'gt' => 123,
'gte' => 123,
'lt' => 123,
'lte' => 123
]
],
'integer' => [
'property' => '<string>',
'eq' => 123,
'neq' => 123,
'in' => [
123
],
'lt' => 123,
'lte' => 123,
'gt' => 123,
'gte' => 123
],
'decimal' => [
'property' => '<string>',
'eq' => 123,
'neq' => 123,
'in' => [
123
],
'lt' => 123,
'lte' => 123,
'gt' => 123,
'gte' => 123
],
'timestamp' => [
'property' => '<string>',
'eq' => '2023-11-07T05:31:56Z',
'neq' => '2023-11-07T05:31:56Z',
'in' => [
'2023-11-07T05:31:56Z'
],
'lt' => '2023-11-07T05:31:56Z',
'lte' => '2023-11-07T05:31:56Z',
'gt' => '2023-11-07T05:31:56Z',
'gte' => '2023-11-07T05:31:56Z'
],
'boolean' => [
'property' => '<string>',
'eq' => true,
'neq' => true,
'in' => [
true
]
],
'list' => [
'property' => '<string>',
'contains' => '<string>',
'pattern' => '<string>',
'ignoreCase' => false,
'languages' => '<array>',
'length' => [
'eq' => 123,
'gt' => 123,
'gte' => 123,
'lt' => 123,
'lte' => 123
],
'only' => [
'<string>'
]
],
'hasValue' => [
'property' => '<string>',
'languages' => '<array>'
],
'segment' => [
'definitionId' => '<string>',
'id' => '<string>'
],
'relation' => [
'id' => '<string>',
'where' => '<unknown>',
'count' => [
'eq' => 123,
'gt' => 123,
'gte' => 123,
'lt' => 123,
'lte' => 123
]
],
'lifecycle' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'step' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'firstIncompleteStepId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]
]),
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://api.occtoo.com/v1/card-definitions/{cardId}/lifecycles"
payload := strings.NewReader("{\n \"definition\": {\n \"name\": \"<string>\",\n \"steps\": [\n {\n \"slug\": \"<string>\",\n \"name\": \"<string>\",\n \"rules\": [\n {\n \"slug\": \"<string>\",\n \"message\": \"<string>\",\n \"assertion\": {\n \"and\": \"<array>\",\n \"or\": \"<array>\",\n \"not\": \"<unknown>\",\n \"text\": {\n \"property\": \"<string>\",\n \"eq\": \"<string>\",\n \"neq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ],\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"regex\": \"<string>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"integer\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"decimal\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"timestamp\": {\n \"property\": \"<string>\",\n \"eq\": \"2023-11-07T05:31:56Z\",\n \"neq\": \"2023-11-07T05:31:56Z\",\n \"in\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"lt\": \"2023-11-07T05:31:56Z\",\n \"lte\": \"2023-11-07T05:31:56Z\",\n \"gt\": \"2023-11-07T05:31:56Z\",\n \"gte\": \"2023-11-07T05:31:56Z\"\n },\n \"boolean\": {\n \"property\": \"<string>\",\n \"eq\": true,\n \"neq\": true,\n \"in\": [\n true\n ]\n },\n \"list\": {\n \"property\": \"<string>\",\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n },\n \"only\": [\n \"<string>\"\n ]\n },\n \"hasValue\": {\n \"property\": \"<string>\",\n \"languages\": \"<array>\"\n },\n \"segment\": {\n \"definitionId\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"relation\": {\n \"id\": \"<string>\",\n \"where\": \"<unknown>\",\n \"count\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"lifecycle\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"step\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"firstIncompleteStepId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"precondition\": {\n \"and\": \"<array>\",\n \"or\": \"<array>\",\n \"not\": \"<unknown>\",\n \"text\": {\n \"property\": \"<string>\",\n \"eq\": \"<string>\",\n \"neq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ],\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"regex\": \"<string>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"integer\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"decimal\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"timestamp\": {\n \"property\": \"<string>\",\n \"eq\": \"2023-11-07T05:31:56Z\",\n \"neq\": \"2023-11-07T05:31:56Z\",\n \"in\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"lt\": \"2023-11-07T05:31:56Z\",\n \"lte\": \"2023-11-07T05:31:56Z\",\n \"gt\": \"2023-11-07T05:31:56Z\",\n \"gte\": \"2023-11-07T05:31:56Z\"\n },\n \"boolean\": {\n \"property\": \"<string>\",\n \"eq\": true,\n \"neq\": true,\n \"in\": [\n true\n ]\n },\n \"list\": {\n \"property\": \"<string>\",\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n },\n \"only\": [\n \"<string>\"\n ]\n },\n \"hasValue\": {\n \"property\": \"<string>\",\n \"languages\": \"<array>\"\n },\n \"segment\": {\n \"definitionId\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"relation\": {\n \"id\": \"<string>\",\n \"where\": \"<unknown>\",\n \"count\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"lifecycle\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"step\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"firstIncompleteStepId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n }\n ],\n \"briefing\": \"<string>\"\n }\n ],\n \"briefing\": \"<string>\",\n \"applicability\": {\n \"and\": \"<array>\",\n \"or\": \"<array>\",\n \"not\": \"<unknown>\",\n \"text\": {\n \"property\": \"<string>\",\n \"eq\": \"<string>\",\n \"neq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ],\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"regex\": \"<string>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"integer\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"decimal\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"timestamp\": {\n \"property\": \"<string>\",\n \"eq\": \"2023-11-07T05:31:56Z\",\n \"neq\": \"2023-11-07T05:31:56Z\",\n \"in\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"lt\": \"2023-11-07T05:31:56Z\",\n \"lte\": \"2023-11-07T05:31:56Z\",\n \"gt\": \"2023-11-07T05:31:56Z\",\n \"gte\": \"2023-11-07T05:31:56Z\"\n },\n \"boolean\": {\n \"property\": \"<string>\",\n \"eq\": true,\n \"neq\": true,\n \"in\": [\n true\n ]\n },\n \"list\": {\n \"property\": \"<string>\",\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n },\n \"only\": [\n \"<string>\"\n ]\n },\n \"hasValue\": {\n \"property\": \"<string>\",\n \"languages\": \"<array>\"\n },\n \"segment\": {\n \"definitionId\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"relation\": {\n \"id\": \"<string>\",\n \"where\": \"<unknown>\",\n \"count\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"lifecycle\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"step\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"firstIncompleteStepId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n }\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://api.occtoo.com/v1/card-definitions/{cardId}/lifecycles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"definition\": {\n \"name\": \"<string>\",\n \"steps\": [\n {\n \"slug\": \"<string>\",\n \"name\": \"<string>\",\n \"rules\": [\n {\n \"slug\": \"<string>\",\n \"message\": \"<string>\",\n \"assertion\": {\n \"and\": \"<array>\",\n \"or\": \"<array>\",\n \"not\": \"<unknown>\",\n \"text\": {\n \"property\": \"<string>\",\n \"eq\": \"<string>\",\n \"neq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ],\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"regex\": \"<string>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"integer\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"decimal\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"timestamp\": {\n \"property\": \"<string>\",\n \"eq\": \"2023-11-07T05:31:56Z\",\n \"neq\": \"2023-11-07T05:31:56Z\",\n \"in\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"lt\": \"2023-11-07T05:31:56Z\",\n \"lte\": \"2023-11-07T05:31:56Z\",\n \"gt\": \"2023-11-07T05:31:56Z\",\n \"gte\": \"2023-11-07T05:31:56Z\"\n },\n \"boolean\": {\n \"property\": \"<string>\",\n \"eq\": true,\n \"neq\": true,\n \"in\": [\n true\n ]\n },\n \"list\": {\n \"property\": \"<string>\",\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n },\n \"only\": [\n \"<string>\"\n ]\n },\n \"hasValue\": {\n \"property\": \"<string>\",\n \"languages\": \"<array>\"\n },\n \"segment\": {\n \"definitionId\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"relation\": {\n \"id\": \"<string>\",\n \"where\": \"<unknown>\",\n \"count\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"lifecycle\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"step\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"firstIncompleteStepId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"precondition\": {\n \"and\": \"<array>\",\n \"or\": \"<array>\",\n \"not\": \"<unknown>\",\n \"text\": {\n \"property\": \"<string>\",\n \"eq\": \"<string>\",\n \"neq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ],\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"regex\": \"<string>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"integer\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"decimal\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"timestamp\": {\n \"property\": \"<string>\",\n \"eq\": \"2023-11-07T05:31:56Z\",\n \"neq\": \"2023-11-07T05:31:56Z\",\n \"in\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"lt\": \"2023-11-07T05:31:56Z\",\n \"lte\": \"2023-11-07T05:31:56Z\",\n \"gt\": \"2023-11-07T05:31:56Z\",\n \"gte\": \"2023-11-07T05:31:56Z\"\n },\n \"boolean\": {\n \"property\": \"<string>\",\n \"eq\": true,\n \"neq\": true,\n \"in\": [\n true\n ]\n },\n \"list\": {\n \"property\": \"<string>\",\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n },\n \"only\": [\n \"<string>\"\n ]\n },\n \"hasValue\": {\n \"property\": \"<string>\",\n \"languages\": \"<array>\"\n },\n \"segment\": {\n \"definitionId\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"relation\": {\n \"id\": \"<string>\",\n \"where\": \"<unknown>\",\n \"count\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"lifecycle\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"step\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"firstIncompleteStepId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n }\n ],\n \"briefing\": \"<string>\"\n }\n ],\n \"briefing\": \"<string>\",\n \"applicability\": {\n \"and\": \"<array>\",\n \"or\": \"<array>\",\n \"not\": \"<unknown>\",\n \"text\": {\n \"property\": \"<string>\",\n \"eq\": \"<string>\",\n \"neq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ],\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"regex\": \"<string>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"integer\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"decimal\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"timestamp\": {\n \"property\": \"<string>\",\n \"eq\": \"2023-11-07T05:31:56Z\",\n \"neq\": \"2023-11-07T05:31:56Z\",\n \"in\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"lt\": \"2023-11-07T05:31:56Z\",\n \"lte\": \"2023-11-07T05:31:56Z\",\n \"gt\": \"2023-11-07T05:31:56Z\",\n \"gte\": \"2023-11-07T05:31:56Z\"\n },\n \"boolean\": {\n \"property\": \"<string>\",\n \"eq\": true,\n \"neq\": true,\n \"in\": [\n true\n ]\n },\n \"list\": {\n \"property\": \"<string>\",\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n },\n \"only\": [\n \"<string>\"\n ]\n },\n \"hasValue\": {\n \"property\": \"<string>\",\n \"languages\": \"<array>\"\n },\n \"segment\": {\n \"definitionId\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"relation\": {\n \"id\": \"<string>\",\n \"where\": \"<unknown>\",\n \"count\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"lifecycle\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"step\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"firstIncompleteStepId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.occtoo.com/v1/card-definitions/{cardId}/lifecycles")
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 \"definition\": {\n \"name\": \"<string>\",\n \"steps\": [\n {\n \"slug\": \"<string>\",\n \"name\": \"<string>\",\n \"rules\": [\n {\n \"slug\": \"<string>\",\n \"message\": \"<string>\",\n \"assertion\": {\n \"and\": \"<array>\",\n \"or\": \"<array>\",\n \"not\": \"<unknown>\",\n \"text\": {\n \"property\": \"<string>\",\n \"eq\": \"<string>\",\n \"neq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ],\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"regex\": \"<string>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"integer\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"decimal\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"timestamp\": {\n \"property\": \"<string>\",\n \"eq\": \"2023-11-07T05:31:56Z\",\n \"neq\": \"2023-11-07T05:31:56Z\",\n \"in\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"lt\": \"2023-11-07T05:31:56Z\",\n \"lte\": \"2023-11-07T05:31:56Z\",\n \"gt\": \"2023-11-07T05:31:56Z\",\n \"gte\": \"2023-11-07T05:31:56Z\"\n },\n \"boolean\": {\n \"property\": \"<string>\",\n \"eq\": true,\n \"neq\": true,\n \"in\": [\n true\n ]\n },\n \"list\": {\n \"property\": \"<string>\",\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n },\n \"only\": [\n \"<string>\"\n ]\n },\n \"hasValue\": {\n \"property\": \"<string>\",\n \"languages\": \"<array>\"\n },\n \"segment\": {\n \"definitionId\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"relation\": {\n \"id\": \"<string>\",\n \"where\": \"<unknown>\",\n \"count\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"lifecycle\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"step\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"firstIncompleteStepId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"precondition\": {\n \"and\": \"<array>\",\n \"or\": \"<array>\",\n \"not\": \"<unknown>\",\n \"text\": {\n \"property\": \"<string>\",\n \"eq\": \"<string>\",\n \"neq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ],\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"regex\": \"<string>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"integer\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"decimal\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"timestamp\": {\n \"property\": \"<string>\",\n \"eq\": \"2023-11-07T05:31:56Z\",\n \"neq\": \"2023-11-07T05:31:56Z\",\n \"in\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"lt\": \"2023-11-07T05:31:56Z\",\n \"lte\": \"2023-11-07T05:31:56Z\",\n \"gt\": \"2023-11-07T05:31:56Z\",\n \"gte\": \"2023-11-07T05:31:56Z\"\n },\n \"boolean\": {\n \"property\": \"<string>\",\n \"eq\": true,\n \"neq\": true,\n \"in\": [\n true\n ]\n },\n \"list\": {\n \"property\": \"<string>\",\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n },\n \"only\": [\n \"<string>\"\n ]\n },\n \"hasValue\": {\n \"property\": \"<string>\",\n \"languages\": \"<array>\"\n },\n \"segment\": {\n \"definitionId\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"relation\": {\n \"id\": \"<string>\",\n \"where\": \"<unknown>\",\n \"count\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"lifecycle\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"step\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"firstIncompleteStepId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n }\n ],\n \"briefing\": \"<string>\"\n }\n ],\n \"briefing\": \"<string>\",\n \"applicability\": {\n \"and\": \"<array>\",\n \"or\": \"<array>\",\n \"not\": \"<unknown>\",\n \"text\": {\n \"property\": \"<string>\",\n \"eq\": \"<string>\",\n \"neq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ],\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"regex\": \"<string>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"integer\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"decimal\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"timestamp\": {\n \"property\": \"<string>\",\n \"eq\": \"2023-11-07T05:31:56Z\",\n \"neq\": \"2023-11-07T05:31:56Z\",\n \"in\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"lt\": \"2023-11-07T05:31:56Z\",\n \"lte\": \"2023-11-07T05:31:56Z\",\n \"gt\": \"2023-11-07T05:31:56Z\",\n \"gte\": \"2023-11-07T05:31:56Z\"\n },\n \"boolean\": {\n \"property\": \"<string>\",\n \"eq\": true,\n \"neq\": true,\n \"in\": [\n true\n ]\n },\n \"list\": {\n \"property\": \"<string>\",\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n },\n \"only\": [\n \"<string>\"\n ]\n },\n \"hasValue\": {\n \"property\": \"<string>\",\n \"languages\": \"<array>\"\n },\n \"segment\": {\n \"definitionId\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"relation\": {\n \"id\": \"<string>\",\n \"where\": \"<unknown>\",\n \"count\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"lifecycle\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"step\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"firstIncompleteStepId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cardDefinitionId": "<string>",
"etag": 123,
"state": "Draft",
"activeRevision": 123,
"pendingDefinition": {
"name": "<string>",
"steps": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"name": "<string>",
"rules": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"severity": "Error",
"message": "<string>",
"assertion": {
"and": "<array>",
"or": "<array>",
"not": "<unknown>",
"text": {
"property": "<string>",
"eq": "<string>",
"neq": "<string>",
"in": [
"<string>"
],
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": false,
"languages": "<array>",
"regex": "<string>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"integer": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [
123
],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"decimal": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [
123
],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"timestamp": {
"property": "<string>",
"eq": "2023-11-07T05:31:56Z",
"neq": "2023-11-07T05:31:56Z",
"in": [
"2023-11-07T05:31:56Z"
],
"lt": "2023-11-07T05:31:56Z",
"lte": "2023-11-07T05:31:56Z",
"gt": "2023-11-07T05:31:56Z",
"gte": "2023-11-07T05:31:56Z"
},
"boolean": {
"property": "<string>",
"eq": true,
"neq": true,
"in": [
true
]
},
"list": {
"property": "<string>",
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": false,
"languages": "<array>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
},
"only": [
"<string>"
]
},
"hasValue": {
"property": "<string>",
"languages": "<array>"
},
"segment": {
"definitionId": "<string>",
"id": "<string>"
},
"relation": {
"id": "<string>",
"where": "<unknown>",
"count": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"lifecycle": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "Complete",
"step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requirements": "Satisfied",
"completion": "Complete"
},
"firstIncompleteStepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"precondition": {
"and": "<array>",
"or": "<array>",
"not": "<unknown>",
"text": {
"property": "<string>",
"eq": "<string>",
"neq": "<string>",
"in": [
"<string>"
],
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": false,
"languages": "<array>",
"regex": "<string>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"integer": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [
123
],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"decimal": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [
123
],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"timestamp": {
"property": "<string>",
"eq": "2023-11-07T05:31:56Z",
"neq": "2023-11-07T05:31:56Z",
"in": [
"2023-11-07T05:31:56Z"
],
"lt": "2023-11-07T05:31:56Z",
"lte": "2023-11-07T05:31:56Z",
"gt": "2023-11-07T05:31:56Z",
"gte": "2023-11-07T05:31:56Z"
},
"boolean": {
"property": "<string>",
"eq": true,
"neq": true,
"in": [
true
]
},
"list": {
"property": "<string>",
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": false,
"languages": "<array>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
},
"only": [
"<string>"
]
},
"hasValue": {
"property": "<string>",
"languages": "<array>"
},
"segment": {
"definitionId": "<string>",
"id": "<string>"
},
"relation": {
"id": "<string>",
"where": "<unknown>",
"count": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"lifecycle": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "Complete",
"step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requirements": "Satisfied",
"completion": "Complete"
},
"firstIncompleteStepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}
],
"briefing": "<string>"
}
],
"briefing": "<string>",
"applicability": {
"and": "<array>",
"or": "<array>",
"not": "<unknown>",
"text": {
"property": "<string>",
"eq": "<string>",
"neq": "<string>",
"in": [
"<string>"
],
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": false,
"languages": "<array>",
"regex": "<string>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"integer": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [
123
],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"decimal": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [
123
],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"timestamp": {
"property": "<string>",
"eq": "2023-11-07T05:31:56Z",
"neq": "2023-11-07T05:31:56Z",
"in": [
"2023-11-07T05:31:56Z"
],
"lt": "2023-11-07T05:31:56Z",
"lte": "2023-11-07T05:31:56Z",
"gt": "2023-11-07T05:31:56Z",
"gte": "2023-11-07T05:31:56Z"
},
"boolean": {
"property": "<string>",
"eq": true,
"neq": true,
"in": [
true
]
},
"list": {
"property": "<string>",
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": false,
"languages": "<array>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
},
"only": [
"<string>"
]
},
"hasValue": {
"property": "<string>",
"languages": "<array>"
},
"segment": {
"definitionId": "<string>",
"id": "<string>"
},
"relation": {
"id": "<string>",
"where": "<unknown>",
"count": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"lifecycle": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "Complete",
"step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requirements": "Satisfied",
"completion": "Complete"
},
"firstIncompleteStepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Lifecycles
Save a lifecycle draft
Creates a lifecycle in Draft with the definition as its pending changes. Nothing is activated. The ETag response header holds the version to send in If-Match.
POST
/
v1
/
card-definitions
/
{cardId}
/
lifecycles
Save a lifecycle draft
curl --request POST \
--url https://api.occtoo.com/v1/card-definitions/{cardId}/lifecycles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"definition": {
"name": "<string>",
"steps": [
{
"slug": "<string>",
"name": "<string>",
"rules": [
{
"slug": "<string>",
"message": "<string>",
"assertion": {
"and": "<array>",
"or": "<array>",
"not": "<unknown>",
"text": {
"property": "<string>",
"eq": "<string>",
"neq": "<string>",
"in": [
"<string>"
],
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": false,
"languages": "<array>",
"regex": "<string>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"integer": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [
123
],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"decimal": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [
123
],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"timestamp": {
"property": "<string>",
"eq": "2023-11-07T05:31:56Z",
"neq": "2023-11-07T05:31:56Z",
"in": [
"2023-11-07T05:31:56Z"
],
"lt": "2023-11-07T05:31:56Z",
"lte": "2023-11-07T05:31:56Z",
"gt": "2023-11-07T05:31:56Z",
"gte": "2023-11-07T05:31:56Z"
},
"boolean": {
"property": "<string>",
"eq": true,
"neq": true,
"in": [
true
]
},
"list": {
"property": "<string>",
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": false,
"languages": "<array>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
},
"only": [
"<string>"
]
},
"hasValue": {
"property": "<string>",
"languages": "<array>"
},
"segment": {
"definitionId": "<string>",
"id": "<string>"
},
"relation": {
"id": "<string>",
"where": "<unknown>",
"count": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"lifecycle": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"firstIncompleteStepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"precondition": {
"and": "<array>",
"or": "<array>",
"not": "<unknown>",
"text": {
"property": "<string>",
"eq": "<string>",
"neq": "<string>",
"in": [
"<string>"
],
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": false,
"languages": "<array>",
"regex": "<string>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"integer": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [
123
],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"decimal": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [
123
],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"timestamp": {
"property": "<string>",
"eq": "2023-11-07T05:31:56Z",
"neq": "2023-11-07T05:31:56Z",
"in": [
"2023-11-07T05:31:56Z"
],
"lt": "2023-11-07T05:31:56Z",
"lte": "2023-11-07T05:31:56Z",
"gt": "2023-11-07T05:31:56Z",
"gte": "2023-11-07T05:31:56Z"
},
"boolean": {
"property": "<string>",
"eq": true,
"neq": true,
"in": [
true
]
},
"list": {
"property": "<string>",
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": false,
"languages": "<array>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
},
"only": [
"<string>"
]
},
"hasValue": {
"property": "<string>",
"languages": "<array>"
},
"segment": {
"definitionId": "<string>",
"id": "<string>"
},
"relation": {
"id": "<string>",
"where": "<unknown>",
"count": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"lifecycle": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"firstIncompleteStepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}
],
"briefing": "<string>"
}
],
"briefing": "<string>",
"applicability": {
"and": "<array>",
"or": "<array>",
"not": "<unknown>",
"text": {
"property": "<string>",
"eq": "<string>",
"neq": "<string>",
"in": [
"<string>"
],
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": false,
"languages": "<array>",
"regex": "<string>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"integer": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [
123
],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"decimal": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [
123
],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"timestamp": {
"property": "<string>",
"eq": "2023-11-07T05:31:56Z",
"neq": "2023-11-07T05:31:56Z",
"in": [
"2023-11-07T05:31:56Z"
],
"lt": "2023-11-07T05:31:56Z",
"lte": "2023-11-07T05:31:56Z",
"gt": "2023-11-07T05:31:56Z",
"gte": "2023-11-07T05:31:56Z"
},
"boolean": {
"property": "<string>",
"eq": true,
"neq": true,
"in": [
true
]
},
"list": {
"property": "<string>",
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": false,
"languages": "<array>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
},
"only": [
"<string>"
]
},
"hasValue": {
"property": "<string>",
"languages": "<array>"
},
"segment": {
"definitionId": "<string>",
"id": "<string>"
},
"relation": {
"id": "<string>",
"where": "<unknown>",
"count": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"lifecycle": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"firstIncompleteStepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}
}
'import requests
url = "https://api.occtoo.com/v1/card-definitions/{cardId}/lifecycles"
payload = { "definition": {
"name": "<string>",
"steps": [
{
"slug": "<string>",
"name": "<string>",
"rules": [
{
"slug": "<string>",
"message": "<string>",
"assertion": {
"and": "<array>",
"or": "<array>",
"not": "<unknown>",
"text": {
"property": "<string>",
"eq": "<string>",
"neq": "<string>",
"in": ["<string>"],
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": False,
"languages": "<array>",
"regex": "<string>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"integer": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [123],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"decimal": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [123],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"timestamp": {
"property": "<string>",
"eq": "2023-11-07T05:31:56Z",
"neq": "2023-11-07T05:31:56Z",
"in": ["2023-11-07T05:31:56Z"],
"lt": "2023-11-07T05:31:56Z",
"lte": "2023-11-07T05:31:56Z",
"gt": "2023-11-07T05:31:56Z",
"gte": "2023-11-07T05:31:56Z"
},
"boolean": {
"property": "<string>",
"eq": True,
"neq": True,
"in": [True]
},
"list": {
"property": "<string>",
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": False,
"languages": "<array>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
},
"only": ["<string>"]
},
"hasValue": {
"property": "<string>",
"languages": "<array>"
},
"segment": {
"definitionId": "<string>",
"id": "<string>"
},
"relation": {
"id": "<string>",
"where": "<unknown>",
"count": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"lifecycle": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step": { "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" },
"firstIncompleteStepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"precondition": {
"and": "<array>",
"or": "<array>",
"not": "<unknown>",
"text": {
"property": "<string>",
"eq": "<string>",
"neq": "<string>",
"in": ["<string>"],
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": False,
"languages": "<array>",
"regex": "<string>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"integer": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [123],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"decimal": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [123],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"timestamp": {
"property": "<string>",
"eq": "2023-11-07T05:31:56Z",
"neq": "2023-11-07T05:31:56Z",
"in": ["2023-11-07T05:31:56Z"],
"lt": "2023-11-07T05:31:56Z",
"lte": "2023-11-07T05:31:56Z",
"gt": "2023-11-07T05:31:56Z",
"gte": "2023-11-07T05:31:56Z"
},
"boolean": {
"property": "<string>",
"eq": True,
"neq": True,
"in": [True]
},
"list": {
"property": "<string>",
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": False,
"languages": "<array>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
},
"only": ["<string>"]
},
"hasValue": {
"property": "<string>",
"languages": "<array>"
},
"segment": {
"definitionId": "<string>",
"id": "<string>"
},
"relation": {
"id": "<string>",
"where": "<unknown>",
"count": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"lifecycle": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step": { "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" },
"firstIncompleteStepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}
],
"briefing": "<string>"
}
],
"briefing": "<string>",
"applicability": {
"and": "<array>",
"or": "<array>",
"not": "<unknown>",
"text": {
"property": "<string>",
"eq": "<string>",
"neq": "<string>",
"in": ["<string>"],
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": False,
"languages": "<array>",
"regex": "<string>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"integer": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [123],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"decimal": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [123],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"timestamp": {
"property": "<string>",
"eq": "2023-11-07T05:31:56Z",
"neq": "2023-11-07T05:31:56Z",
"in": ["2023-11-07T05:31:56Z"],
"lt": "2023-11-07T05:31:56Z",
"lte": "2023-11-07T05:31:56Z",
"gt": "2023-11-07T05:31:56Z",
"gte": "2023-11-07T05:31:56Z"
},
"boolean": {
"property": "<string>",
"eq": True,
"neq": True,
"in": [True]
},
"list": {
"property": "<string>",
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": False,
"languages": "<array>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
},
"only": ["<string>"]
},
"hasValue": {
"property": "<string>",
"languages": "<array>"
},
"segment": {
"definitionId": "<string>",
"id": "<string>"
},
"relation": {
"id": "<string>",
"where": "<unknown>",
"count": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"lifecycle": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step": { "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" },
"firstIncompleteStepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
} }
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({
definition: {
name: '<string>',
steps: [
{
slug: '<string>',
name: '<string>',
rules: [
{
slug: '<string>',
message: '<string>',
assertion: {
and: '<array>',
or: '<array>',
not: '<unknown>',
text: {
property: '<string>',
eq: '<string>',
neq: '<string>',
in: ['<string>'],
contains: '<string>',
pattern: '<string>',
ignoreCase: false,
languages: '<array>',
regex: '<string>',
length: {eq: 123, gt: 123, gte: 123, lt: 123, lte: 123}
},
integer: {
property: '<string>',
eq: 123,
neq: 123,
in: [123],
lt: 123,
lte: 123,
gt: 123,
gte: 123
},
decimal: {
property: '<string>',
eq: 123,
neq: 123,
in: [123],
lt: 123,
lte: 123,
gt: 123,
gte: 123
},
timestamp: {
property: '<string>',
eq: '2023-11-07T05:31:56Z',
neq: '2023-11-07T05:31:56Z',
in: ['2023-11-07T05:31:56Z'],
lt: '2023-11-07T05:31:56Z',
lte: '2023-11-07T05:31:56Z',
gt: '2023-11-07T05:31:56Z',
gte: '2023-11-07T05:31:56Z'
},
boolean: {property: '<string>', eq: true, neq: true, in: [true]},
list: {
property: '<string>',
contains: '<string>',
pattern: '<string>',
ignoreCase: false,
languages: '<array>',
length: {eq: 123, gt: 123, gte: 123, lt: 123, lte: 123},
only: ['<string>']
},
hasValue: {property: '<string>', languages: '<array>'},
segment: {definitionId: '<string>', id: '<string>'},
relation: {
id: '<string>',
where: '<unknown>',
count: {eq: 123, gt: 123, gte: 123, lt: 123, lte: 123}
},
lifecycle: {
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
step: {id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
firstIncompleteStepId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
},
precondition: {
and: '<array>',
or: '<array>',
not: '<unknown>',
text: {
property: '<string>',
eq: '<string>',
neq: '<string>',
in: ['<string>'],
contains: '<string>',
pattern: '<string>',
ignoreCase: false,
languages: '<array>',
regex: '<string>',
length: {eq: 123, gt: 123, gte: 123, lt: 123, lte: 123}
},
integer: {
property: '<string>',
eq: 123,
neq: 123,
in: [123],
lt: 123,
lte: 123,
gt: 123,
gte: 123
},
decimal: {
property: '<string>',
eq: 123,
neq: 123,
in: [123],
lt: 123,
lte: 123,
gt: 123,
gte: 123
},
timestamp: {
property: '<string>',
eq: '2023-11-07T05:31:56Z',
neq: '2023-11-07T05:31:56Z',
in: ['2023-11-07T05:31:56Z'],
lt: '2023-11-07T05:31:56Z',
lte: '2023-11-07T05:31:56Z',
gt: '2023-11-07T05:31:56Z',
gte: '2023-11-07T05:31:56Z'
},
boolean: {property: '<string>', eq: true, neq: true, in: [true]},
list: {
property: '<string>',
contains: '<string>',
pattern: '<string>',
ignoreCase: false,
languages: '<array>',
length: {eq: 123, gt: 123, gte: 123, lt: 123, lte: 123},
only: ['<string>']
},
hasValue: {property: '<string>', languages: '<array>'},
segment: {definitionId: '<string>', id: '<string>'},
relation: {
id: '<string>',
where: '<unknown>',
count: {eq: 123, gt: 123, gte: 123, lt: 123, lte: 123}
},
lifecycle: {
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
step: {id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
firstIncompleteStepId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
}
}
],
briefing: '<string>'
}
],
briefing: '<string>',
applicability: {
and: '<array>',
or: '<array>',
not: '<unknown>',
text: {
property: '<string>',
eq: '<string>',
neq: '<string>',
in: ['<string>'],
contains: '<string>',
pattern: '<string>',
ignoreCase: false,
languages: '<array>',
regex: '<string>',
length: {eq: 123, gt: 123, gte: 123, lt: 123, lte: 123}
},
integer: {
property: '<string>',
eq: 123,
neq: 123,
in: [123],
lt: 123,
lte: 123,
gt: 123,
gte: 123
},
decimal: {
property: '<string>',
eq: 123,
neq: 123,
in: [123],
lt: 123,
lte: 123,
gt: 123,
gte: 123
},
timestamp: {
property: '<string>',
eq: '2023-11-07T05:31:56Z',
neq: '2023-11-07T05:31:56Z',
in: ['2023-11-07T05:31:56Z'],
lt: '2023-11-07T05:31:56Z',
lte: '2023-11-07T05:31:56Z',
gt: '2023-11-07T05:31:56Z',
gte: '2023-11-07T05:31:56Z'
},
boolean: {property: '<string>', eq: true, neq: true, in: [true]},
list: {
property: '<string>',
contains: '<string>',
pattern: '<string>',
ignoreCase: false,
languages: '<array>',
length: {eq: 123, gt: 123, gte: 123, lt: 123, lte: 123},
only: ['<string>']
},
hasValue: {property: '<string>', languages: '<array>'},
segment: {definitionId: '<string>', id: '<string>'},
relation: {
id: '<string>',
where: '<unknown>',
count: {eq: 123, gt: 123, gte: 123, lt: 123, lte: 123}
},
lifecycle: {
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
step: {id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'},
firstIncompleteStepId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
}
}
})
};
fetch('https://api.occtoo.com/v1/card-definitions/{cardId}/lifecycles', 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://api.occtoo.com/v1/card-definitions/{cardId}/lifecycles",
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([
'definition' => [
'name' => '<string>',
'steps' => [
[
'slug' => '<string>',
'name' => '<string>',
'rules' => [
[
'slug' => '<string>',
'message' => '<string>',
'assertion' => [
'and' => '<array>',
'or' => '<array>',
'not' => '<unknown>',
'text' => [
'property' => '<string>',
'eq' => '<string>',
'neq' => '<string>',
'in' => [
'<string>'
],
'contains' => '<string>',
'pattern' => '<string>',
'ignoreCase' => false,
'languages' => '<array>',
'regex' => '<string>',
'length' => [
'eq' => 123,
'gt' => 123,
'gte' => 123,
'lt' => 123,
'lte' => 123
]
],
'integer' => [
'property' => '<string>',
'eq' => 123,
'neq' => 123,
'in' => [
123
],
'lt' => 123,
'lte' => 123,
'gt' => 123,
'gte' => 123
],
'decimal' => [
'property' => '<string>',
'eq' => 123,
'neq' => 123,
'in' => [
123
],
'lt' => 123,
'lte' => 123,
'gt' => 123,
'gte' => 123
],
'timestamp' => [
'property' => '<string>',
'eq' => '2023-11-07T05:31:56Z',
'neq' => '2023-11-07T05:31:56Z',
'in' => [
'2023-11-07T05:31:56Z'
],
'lt' => '2023-11-07T05:31:56Z',
'lte' => '2023-11-07T05:31:56Z',
'gt' => '2023-11-07T05:31:56Z',
'gte' => '2023-11-07T05:31:56Z'
],
'boolean' => [
'property' => '<string>',
'eq' => true,
'neq' => true,
'in' => [
true
]
],
'list' => [
'property' => '<string>',
'contains' => '<string>',
'pattern' => '<string>',
'ignoreCase' => false,
'languages' => '<array>',
'length' => [
'eq' => 123,
'gt' => 123,
'gte' => 123,
'lt' => 123,
'lte' => 123
],
'only' => [
'<string>'
]
],
'hasValue' => [
'property' => '<string>',
'languages' => '<array>'
],
'segment' => [
'definitionId' => '<string>',
'id' => '<string>'
],
'relation' => [
'id' => '<string>',
'where' => '<unknown>',
'count' => [
'eq' => 123,
'gt' => 123,
'gte' => 123,
'lt' => 123,
'lte' => 123
]
],
'lifecycle' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'step' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'firstIncompleteStepId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'precondition' => [
'and' => '<array>',
'or' => '<array>',
'not' => '<unknown>',
'text' => [
'property' => '<string>',
'eq' => '<string>',
'neq' => '<string>',
'in' => [
'<string>'
],
'contains' => '<string>',
'pattern' => '<string>',
'ignoreCase' => false,
'languages' => '<array>',
'regex' => '<string>',
'length' => [
'eq' => 123,
'gt' => 123,
'gte' => 123,
'lt' => 123,
'lte' => 123
]
],
'integer' => [
'property' => '<string>',
'eq' => 123,
'neq' => 123,
'in' => [
123
],
'lt' => 123,
'lte' => 123,
'gt' => 123,
'gte' => 123
],
'decimal' => [
'property' => '<string>',
'eq' => 123,
'neq' => 123,
'in' => [
123
],
'lt' => 123,
'lte' => 123,
'gt' => 123,
'gte' => 123
],
'timestamp' => [
'property' => '<string>',
'eq' => '2023-11-07T05:31:56Z',
'neq' => '2023-11-07T05:31:56Z',
'in' => [
'2023-11-07T05:31:56Z'
],
'lt' => '2023-11-07T05:31:56Z',
'lte' => '2023-11-07T05:31:56Z',
'gt' => '2023-11-07T05:31:56Z',
'gte' => '2023-11-07T05:31:56Z'
],
'boolean' => [
'property' => '<string>',
'eq' => true,
'neq' => true,
'in' => [
true
]
],
'list' => [
'property' => '<string>',
'contains' => '<string>',
'pattern' => '<string>',
'ignoreCase' => false,
'languages' => '<array>',
'length' => [
'eq' => 123,
'gt' => 123,
'gte' => 123,
'lt' => 123,
'lte' => 123
],
'only' => [
'<string>'
]
],
'hasValue' => [
'property' => '<string>',
'languages' => '<array>'
],
'segment' => [
'definitionId' => '<string>',
'id' => '<string>'
],
'relation' => [
'id' => '<string>',
'where' => '<unknown>',
'count' => [
'eq' => 123,
'gt' => 123,
'gte' => 123,
'lt' => 123,
'lte' => 123
]
],
'lifecycle' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'step' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'firstIncompleteStepId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]
],
'briefing' => '<string>'
]
],
'briefing' => '<string>',
'applicability' => [
'and' => '<array>',
'or' => '<array>',
'not' => '<unknown>',
'text' => [
'property' => '<string>',
'eq' => '<string>',
'neq' => '<string>',
'in' => [
'<string>'
],
'contains' => '<string>',
'pattern' => '<string>',
'ignoreCase' => false,
'languages' => '<array>',
'regex' => '<string>',
'length' => [
'eq' => 123,
'gt' => 123,
'gte' => 123,
'lt' => 123,
'lte' => 123
]
],
'integer' => [
'property' => '<string>',
'eq' => 123,
'neq' => 123,
'in' => [
123
],
'lt' => 123,
'lte' => 123,
'gt' => 123,
'gte' => 123
],
'decimal' => [
'property' => '<string>',
'eq' => 123,
'neq' => 123,
'in' => [
123
],
'lt' => 123,
'lte' => 123,
'gt' => 123,
'gte' => 123
],
'timestamp' => [
'property' => '<string>',
'eq' => '2023-11-07T05:31:56Z',
'neq' => '2023-11-07T05:31:56Z',
'in' => [
'2023-11-07T05:31:56Z'
],
'lt' => '2023-11-07T05:31:56Z',
'lte' => '2023-11-07T05:31:56Z',
'gt' => '2023-11-07T05:31:56Z',
'gte' => '2023-11-07T05:31:56Z'
],
'boolean' => [
'property' => '<string>',
'eq' => true,
'neq' => true,
'in' => [
true
]
],
'list' => [
'property' => '<string>',
'contains' => '<string>',
'pattern' => '<string>',
'ignoreCase' => false,
'languages' => '<array>',
'length' => [
'eq' => 123,
'gt' => 123,
'gte' => 123,
'lt' => 123,
'lte' => 123
],
'only' => [
'<string>'
]
],
'hasValue' => [
'property' => '<string>',
'languages' => '<array>'
],
'segment' => [
'definitionId' => '<string>',
'id' => '<string>'
],
'relation' => [
'id' => '<string>',
'where' => '<unknown>',
'count' => [
'eq' => 123,
'gt' => 123,
'gte' => 123,
'lt' => 123,
'lte' => 123
]
],
'lifecycle' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'step' => [
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'firstIncompleteStepId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]
]),
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://api.occtoo.com/v1/card-definitions/{cardId}/lifecycles"
payload := strings.NewReader("{\n \"definition\": {\n \"name\": \"<string>\",\n \"steps\": [\n {\n \"slug\": \"<string>\",\n \"name\": \"<string>\",\n \"rules\": [\n {\n \"slug\": \"<string>\",\n \"message\": \"<string>\",\n \"assertion\": {\n \"and\": \"<array>\",\n \"or\": \"<array>\",\n \"not\": \"<unknown>\",\n \"text\": {\n \"property\": \"<string>\",\n \"eq\": \"<string>\",\n \"neq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ],\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"regex\": \"<string>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"integer\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"decimal\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"timestamp\": {\n \"property\": \"<string>\",\n \"eq\": \"2023-11-07T05:31:56Z\",\n \"neq\": \"2023-11-07T05:31:56Z\",\n \"in\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"lt\": \"2023-11-07T05:31:56Z\",\n \"lte\": \"2023-11-07T05:31:56Z\",\n \"gt\": \"2023-11-07T05:31:56Z\",\n \"gte\": \"2023-11-07T05:31:56Z\"\n },\n \"boolean\": {\n \"property\": \"<string>\",\n \"eq\": true,\n \"neq\": true,\n \"in\": [\n true\n ]\n },\n \"list\": {\n \"property\": \"<string>\",\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n },\n \"only\": [\n \"<string>\"\n ]\n },\n \"hasValue\": {\n \"property\": \"<string>\",\n \"languages\": \"<array>\"\n },\n \"segment\": {\n \"definitionId\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"relation\": {\n \"id\": \"<string>\",\n \"where\": \"<unknown>\",\n \"count\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"lifecycle\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"step\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"firstIncompleteStepId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"precondition\": {\n \"and\": \"<array>\",\n \"or\": \"<array>\",\n \"not\": \"<unknown>\",\n \"text\": {\n \"property\": \"<string>\",\n \"eq\": \"<string>\",\n \"neq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ],\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"regex\": \"<string>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"integer\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"decimal\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"timestamp\": {\n \"property\": \"<string>\",\n \"eq\": \"2023-11-07T05:31:56Z\",\n \"neq\": \"2023-11-07T05:31:56Z\",\n \"in\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"lt\": \"2023-11-07T05:31:56Z\",\n \"lte\": \"2023-11-07T05:31:56Z\",\n \"gt\": \"2023-11-07T05:31:56Z\",\n \"gte\": \"2023-11-07T05:31:56Z\"\n },\n \"boolean\": {\n \"property\": \"<string>\",\n \"eq\": true,\n \"neq\": true,\n \"in\": [\n true\n ]\n },\n \"list\": {\n \"property\": \"<string>\",\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n },\n \"only\": [\n \"<string>\"\n ]\n },\n \"hasValue\": {\n \"property\": \"<string>\",\n \"languages\": \"<array>\"\n },\n \"segment\": {\n \"definitionId\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"relation\": {\n \"id\": \"<string>\",\n \"where\": \"<unknown>\",\n \"count\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"lifecycle\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"step\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"firstIncompleteStepId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n }\n ],\n \"briefing\": \"<string>\"\n }\n ],\n \"briefing\": \"<string>\",\n \"applicability\": {\n \"and\": \"<array>\",\n \"or\": \"<array>\",\n \"not\": \"<unknown>\",\n \"text\": {\n \"property\": \"<string>\",\n \"eq\": \"<string>\",\n \"neq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ],\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"regex\": \"<string>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"integer\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"decimal\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"timestamp\": {\n \"property\": \"<string>\",\n \"eq\": \"2023-11-07T05:31:56Z\",\n \"neq\": \"2023-11-07T05:31:56Z\",\n \"in\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"lt\": \"2023-11-07T05:31:56Z\",\n \"lte\": \"2023-11-07T05:31:56Z\",\n \"gt\": \"2023-11-07T05:31:56Z\",\n \"gte\": \"2023-11-07T05:31:56Z\"\n },\n \"boolean\": {\n \"property\": \"<string>\",\n \"eq\": true,\n \"neq\": true,\n \"in\": [\n true\n ]\n },\n \"list\": {\n \"property\": \"<string>\",\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n },\n \"only\": [\n \"<string>\"\n ]\n },\n \"hasValue\": {\n \"property\": \"<string>\",\n \"languages\": \"<array>\"\n },\n \"segment\": {\n \"definitionId\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"relation\": {\n \"id\": \"<string>\",\n \"where\": \"<unknown>\",\n \"count\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"lifecycle\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"step\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"firstIncompleteStepId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n }\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://api.occtoo.com/v1/card-definitions/{cardId}/lifecycles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"definition\": {\n \"name\": \"<string>\",\n \"steps\": [\n {\n \"slug\": \"<string>\",\n \"name\": \"<string>\",\n \"rules\": [\n {\n \"slug\": \"<string>\",\n \"message\": \"<string>\",\n \"assertion\": {\n \"and\": \"<array>\",\n \"or\": \"<array>\",\n \"not\": \"<unknown>\",\n \"text\": {\n \"property\": \"<string>\",\n \"eq\": \"<string>\",\n \"neq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ],\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"regex\": \"<string>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"integer\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"decimal\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"timestamp\": {\n \"property\": \"<string>\",\n \"eq\": \"2023-11-07T05:31:56Z\",\n \"neq\": \"2023-11-07T05:31:56Z\",\n \"in\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"lt\": \"2023-11-07T05:31:56Z\",\n \"lte\": \"2023-11-07T05:31:56Z\",\n \"gt\": \"2023-11-07T05:31:56Z\",\n \"gte\": \"2023-11-07T05:31:56Z\"\n },\n \"boolean\": {\n \"property\": \"<string>\",\n \"eq\": true,\n \"neq\": true,\n \"in\": [\n true\n ]\n },\n \"list\": {\n \"property\": \"<string>\",\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n },\n \"only\": [\n \"<string>\"\n ]\n },\n \"hasValue\": {\n \"property\": \"<string>\",\n \"languages\": \"<array>\"\n },\n \"segment\": {\n \"definitionId\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"relation\": {\n \"id\": \"<string>\",\n \"where\": \"<unknown>\",\n \"count\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"lifecycle\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"step\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"firstIncompleteStepId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"precondition\": {\n \"and\": \"<array>\",\n \"or\": \"<array>\",\n \"not\": \"<unknown>\",\n \"text\": {\n \"property\": \"<string>\",\n \"eq\": \"<string>\",\n \"neq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ],\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"regex\": \"<string>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"integer\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"decimal\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"timestamp\": {\n \"property\": \"<string>\",\n \"eq\": \"2023-11-07T05:31:56Z\",\n \"neq\": \"2023-11-07T05:31:56Z\",\n \"in\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"lt\": \"2023-11-07T05:31:56Z\",\n \"lte\": \"2023-11-07T05:31:56Z\",\n \"gt\": \"2023-11-07T05:31:56Z\",\n \"gte\": \"2023-11-07T05:31:56Z\"\n },\n \"boolean\": {\n \"property\": \"<string>\",\n \"eq\": true,\n \"neq\": true,\n \"in\": [\n true\n ]\n },\n \"list\": {\n \"property\": \"<string>\",\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n },\n \"only\": [\n \"<string>\"\n ]\n },\n \"hasValue\": {\n \"property\": \"<string>\",\n \"languages\": \"<array>\"\n },\n \"segment\": {\n \"definitionId\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"relation\": {\n \"id\": \"<string>\",\n \"where\": \"<unknown>\",\n \"count\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"lifecycle\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"step\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"firstIncompleteStepId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n }\n ],\n \"briefing\": \"<string>\"\n }\n ],\n \"briefing\": \"<string>\",\n \"applicability\": {\n \"and\": \"<array>\",\n \"or\": \"<array>\",\n \"not\": \"<unknown>\",\n \"text\": {\n \"property\": \"<string>\",\n \"eq\": \"<string>\",\n \"neq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ],\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"regex\": \"<string>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"integer\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"decimal\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"timestamp\": {\n \"property\": \"<string>\",\n \"eq\": \"2023-11-07T05:31:56Z\",\n \"neq\": \"2023-11-07T05:31:56Z\",\n \"in\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"lt\": \"2023-11-07T05:31:56Z\",\n \"lte\": \"2023-11-07T05:31:56Z\",\n \"gt\": \"2023-11-07T05:31:56Z\",\n \"gte\": \"2023-11-07T05:31:56Z\"\n },\n \"boolean\": {\n \"property\": \"<string>\",\n \"eq\": true,\n \"neq\": true,\n \"in\": [\n true\n ]\n },\n \"list\": {\n \"property\": \"<string>\",\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n },\n \"only\": [\n \"<string>\"\n ]\n },\n \"hasValue\": {\n \"property\": \"<string>\",\n \"languages\": \"<array>\"\n },\n \"segment\": {\n \"definitionId\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"relation\": {\n \"id\": \"<string>\",\n \"where\": \"<unknown>\",\n \"count\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"lifecycle\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"step\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"firstIncompleteStepId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.occtoo.com/v1/card-definitions/{cardId}/lifecycles")
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 \"definition\": {\n \"name\": \"<string>\",\n \"steps\": [\n {\n \"slug\": \"<string>\",\n \"name\": \"<string>\",\n \"rules\": [\n {\n \"slug\": \"<string>\",\n \"message\": \"<string>\",\n \"assertion\": {\n \"and\": \"<array>\",\n \"or\": \"<array>\",\n \"not\": \"<unknown>\",\n \"text\": {\n \"property\": \"<string>\",\n \"eq\": \"<string>\",\n \"neq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ],\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"regex\": \"<string>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"integer\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"decimal\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"timestamp\": {\n \"property\": \"<string>\",\n \"eq\": \"2023-11-07T05:31:56Z\",\n \"neq\": \"2023-11-07T05:31:56Z\",\n \"in\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"lt\": \"2023-11-07T05:31:56Z\",\n \"lte\": \"2023-11-07T05:31:56Z\",\n \"gt\": \"2023-11-07T05:31:56Z\",\n \"gte\": \"2023-11-07T05:31:56Z\"\n },\n \"boolean\": {\n \"property\": \"<string>\",\n \"eq\": true,\n \"neq\": true,\n \"in\": [\n true\n ]\n },\n \"list\": {\n \"property\": \"<string>\",\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n },\n \"only\": [\n \"<string>\"\n ]\n },\n \"hasValue\": {\n \"property\": \"<string>\",\n \"languages\": \"<array>\"\n },\n \"segment\": {\n \"definitionId\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"relation\": {\n \"id\": \"<string>\",\n \"where\": \"<unknown>\",\n \"count\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"lifecycle\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"step\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"firstIncompleteStepId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n },\n \"precondition\": {\n \"and\": \"<array>\",\n \"or\": \"<array>\",\n \"not\": \"<unknown>\",\n \"text\": {\n \"property\": \"<string>\",\n \"eq\": \"<string>\",\n \"neq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ],\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"regex\": \"<string>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"integer\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"decimal\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"timestamp\": {\n \"property\": \"<string>\",\n \"eq\": \"2023-11-07T05:31:56Z\",\n \"neq\": \"2023-11-07T05:31:56Z\",\n \"in\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"lt\": \"2023-11-07T05:31:56Z\",\n \"lte\": \"2023-11-07T05:31:56Z\",\n \"gt\": \"2023-11-07T05:31:56Z\",\n \"gte\": \"2023-11-07T05:31:56Z\"\n },\n \"boolean\": {\n \"property\": \"<string>\",\n \"eq\": true,\n \"neq\": true,\n \"in\": [\n true\n ]\n },\n \"list\": {\n \"property\": \"<string>\",\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n },\n \"only\": [\n \"<string>\"\n ]\n },\n \"hasValue\": {\n \"property\": \"<string>\",\n \"languages\": \"<array>\"\n },\n \"segment\": {\n \"definitionId\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"relation\": {\n \"id\": \"<string>\",\n \"where\": \"<unknown>\",\n \"count\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"lifecycle\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"step\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"firstIncompleteStepId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n }\n ],\n \"briefing\": \"<string>\"\n }\n ],\n \"briefing\": \"<string>\",\n \"applicability\": {\n \"and\": \"<array>\",\n \"or\": \"<array>\",\n \"not\": \"<unknown>\",\n \"text\": {\n \"property\": \"<string>\",\n \"eq\": \"<string>\",\n \"neq\": \"<string>\",\n \"in\": [\n \"<string>\"\n ],\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"regex\": \"<string>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"integer\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"decimal\": {\n \"property\": \"<string>\",\n \"eq\": 123,\n \"neq\": 123,\n \"in\": [\n 123\n ],\n \"lt\": 123,\n \"lte\": 123,\n \"gt\": 123,\n \"gte\": 123\n },\n \"timestamp\": {\n \"property\": \"<string>\",\n \"eq\": \"2023-11-07T05:31:56Z\",\n \"neq\": \"2023-11-07T05:31:56Z\",\n \"in\": [\n \"2023-11-07T05:31:56Z\"\n ],\n \"lt\": \"2023-11-07T05:31:56Z\",\n \"lte\": \"2023-11-07T05:31:56Z\",\n \"gt\": \"2023-11-07T05:31:56Z\",\n \"gte\": \"2023-11-07T05:31:56Z\"\n },\n \"boolean\": {\n \"property\": \"<string>\",\n \"eq\": true,\n \"neq\": true,\n \"in\": [\n true\n ]\n },\n \"list\": {\n \"property\": \"<string>\",\n \"contains\": \"<string>\",\n \"pattern\": \"<string>\",\n \"ignoreCase\": false,\n \"languages\": \"<array>\",\n \"length\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n },\n \"only\": [\n \"<string>\"\n ]\n },\n \"hasValue\": {\n \"property\": \"<string>\",\n \"languages\": \"<array>\"\n },\n \"segment\": {\n \"definitionId\": \"<string>\",\n \"id\": \"<string>\"\n },\n \"relation\": {\n \"id\": \"<string>\",\n \"where\": \"<unknown>\",\n \"count\": {\n \"eq\": 123,\n \"gt\": 123,\n \"gte\": 123,\n \"lt\": 123,\n \"lte\": 123\n }\n },\n \"lifecycle\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"step\": {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"firstIncompleteStepId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cardDefinitionId": "<string>",
"etag": 123,
"state": "Draft",
"activeRevision": 123,
"pendingDefinition": {
"name": "<string>",
"steps": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"name": "<string>",
"rules": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"severity": "Error",
"message": "<string>",
"assertion": {
"and": "<array>",
"or": "<array>",
"not": "<unknown>",
"text": {
"property": "<string>",
"eq": "<string>",
"neq": "<string>",
"in": [
"<string>"
],
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": false,
"languages": "<array>",
"regex": "<string>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"integer": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [
123
],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"decimal": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [
123
],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"timestamp": {
"property": "<string>",
"eq": "2023-11-07T05:31:56Z",
"neq": "2023-11-07T05:31:56Z",
"in": [
"2023-11-07T05:31:56Z"
],
"lt": "2023-11-07T05:31:56Z",
"lte": "2023-11-07T05:31:56Z",
"gt": "2023-11-07T05:31:56Z",
"gte": "2023-11-07T05:31:56Z"
},
"boolean": {
"property": "<string>",
"eq": true,
"neq": true,
"in": [
true
]
},
"list": {
"property": "<string>",
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": false,
"languages": "<array>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
},
"only": [
"<string>"
]
},
"hasValue": {
"property": "<string>",
"languages": "<array>"
},
"segment": {
"definitionId": "<string>",
"id": "<string>"
},
"relation": {
"id": "<string>",
"where": "<unknown>",
"count": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"lifecycle": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "Complete",
"step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requirements": "Satisfied",
"completion": "Complete"
},
"firstIncompleteStepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"precondition": {
"and": "<array>",
"or": "<array>",
"not": "<unknown>",
"text": {
"property": "<string>",
"eq": "<string>",
"neq": "<string>",
"in": [
"<string>"
],
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": false,
"languages": "<array>",
"regex": "<string>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"integer": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [
123
],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"decimal": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [
123
],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"timestamp": {
"property": "<string>",
"eq": "2023-11-07T05:31:56Z",
"neq": "2023-11-07T05:31:56Z",
"in": [
"2023-11-07T05:31:56Z"
],
"lt": "2023-11-07T05:31:56Z",
"lte": "2023-11-07T05:31:56Z",
"gt": "2023-11-07T05:31:56Z",
"gte": "2023-11-07T05:31:56Z"
},
"boolean": {
"property": "<string>",
"eq": true,
"neq": true,
"in": [
true
]
},
"list": {
"property": "<string>",
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": false,
"languages": "<array>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
},
"only": [
"<string>"
]
},
"hasValue": {
"property": "<string>",
"languages": "<array>"
},
"segment": {
"definitionId": "<string>",
"id": "<string>"
},
"relation": {
"id": "<string>",
"where": "<unknown>",
"count": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"lifecycle": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "Complete",
"step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requirements": "Satisfied",
"completion": "Complete"
},
"firstIncompleteStepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
}
],
"briefing": "<string>"
}
],
"briefing": "<string>",
"applicability": {
"and": "<array>",
"or": "<array>",
"not": "<unknown>",
"text": {
"property": "<string>",
"eq": "<string>",
"neq": "<string>",
"in": [
"<string>"
],
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": false,
"languages": "<array>",
"regex": "<string>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"integer": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [
123
],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"decimal": {
"property": "<string>",
"eq": 123,
"neq": 123,
"in": [
123
],
"lt": 123,
"lte": 123,
"gt": 123,
"gte": 123
},
"timestamp": {
"property": "<string>",
"eq": "2023-11-07T05:31:56Z",
"neq": "2023-11-07T05:31:56Z",
"in": [
"2023-11-07T05:31:56Z"
],
"lt": "2023-11-07T05:31:56Z",
"lte": "2023-11-07T05:31:56Z",
"gt": "2023-11-07T05:31:56Z",
"gte": "2023-11-07T05:31:56Z"
},
"boolean": {
"property": "<string>",
"eq": true,
"neq": true,
"in": [
true
]
},
"list": {
"property": "<string>",
"contains": "<string>",
"pattern": "<string>",
"ignoreCase": false,
"languages": "<array>",
"length": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
},
"only": [
"<string>"
]
},
"hasValue": {
"property": "<string>",
"languages": "<array>"
},
"segment": {
"definitionId": "<string>",
"id": "<string>"
},
"relation": {
"id": "<string>",
"where": "<unknown>",
"count": {
"eq": 123,
"gt": 123,
"gte": 123,
"lt": 123,
"lte": 123
}
},
"lifecycle": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "Complete",
"step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requirements": "Satisfied",
"completion": "Complete"
},
"firstIncompleteStepId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"errors": {}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Authorizations
kindeOAuthbearerAuthapiKey
Body
application/json
Response
Created
Describes an independent readiness workflow on a card definition.
Was this page helpful?