List the segments of a card definition
curl --request GET \
--url https://api.occtoo.com/v1/card-definitions/{cardId}/segments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.occtoo.com/v1/card-definitions/{cardId}/segments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.occtoo.com/v1/card-definitions/{cardId}/segments', 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}/segments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.occtoo.com/v1/card-definitions/{cardId}/segments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.occtoo.com/v1/card-definitions/{cardId}/segments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.occtoo.com/v1/card-definitions/{cardId}/segments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"segmentDefinitionId": "<string>",
"cardId": "<string>",
"type": "Query",
"status": "Initializing",
"name": "<string>",
"description": "<string>",
"language": "<string>",
"image": "<string>",
"tags": [
"<string>"
],
"where": {
"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"
}
},
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"after": "<string>",
"totalCount": 123
}{
"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>"
}Segments
List the segments of a card definition
Lists the segments of a card definition; archived ones are left out. Filters combine with AND; keep them when following after. 404: the card definition doesn’t exist.
GET
/
v1
/
card-definitions
/
{cardId}
/
segments
List the segments of a card definition
curl --request GET \
--url https://api.occtoo.com/v1/card-definitions/{cardId}/segments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.occtoo.com/v1/card-definitions/{cardId}/segments"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.occtoo.com/v1/card-definitions/{cardId}/segments', 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}/segments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.occtoo.com/v1/card-definitions/{cardId}/segments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.occtoo.com/v1/card-definitions/{cardId}/segments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.occtoo.com/v1/card-definitions/{cardId}/segments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"segmentDefinitionId": "<string>",
"cardId": "<string>",
"type": "Query",
"status": "Initializing",
"name": "<string>",
"description": "<string>",
"language": "<string>",
"image": "<string>",
"tags": [
"<string>"
],
"where": {
"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"
}
},
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"after": "<string>",
"totalCount": 123
}{
"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
Query Parameters
Was this page helpful?