curl --request POST \
--url https://{cluster}.cognitedata.com/api/v1/projects/{project}/simulators/routines/revisions/list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filter": {
"routineExternalIds": [
"<string>"
],
"allVersions": false,
"modelExternalIds": [
"<string>"
],
"simulatorIntegrationExternalIds": [
"<string>"
],
"simulatorExternalIds": [
"<string>"
],
"createdTime": {
"max": 1,
"min": 1
},
"kind": "long"
},
"limit": 10,
"cursor": "<string>",
"sort": [
{
"order": "asc",
"property": "createdTime"
}
],
"includeAllFields": false
}
'import requests
url = "https://{cluster}.cognitedata.com/api/v1/projects/{project}/simulators/routines/revisions/list"
payload = {
"filter": {
"routineExternalIds": ["<string>"],
"allVersions": False,
"modelExternalIds": ["<string>"],
"simulatorIntegrationExternalIds": ["<string>"],
"simulatorExternalIds": ["<string>"],
"createdTime": {
"max": 1,
"min": 1
},
"kind": "long"
},
"limit": 10,
"cursor": "<string>",
"sort": [
{
"order": "asc",
"property": "createdTime"
}
],
"includeAllFields": False
}
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({
filter: {
routineExternalIds: ['<string>'],
allVersions: false,
modelExternalIds: ['<string>'],
simulatorIntegrationExternalIds: ['<string>'],
simulatorExternalIds: ['<string>'],
createdTime: {max: 1, min: 1},
kind: 'long'
},
limit: 10,
cursor: '<string>',
sort: [{order: 'asc', property: 'createdTime'}],
includeAllFields: false
})
};
fetch('https://{cluster}.cognitedata.com/api/v1/projects/{project}/simulators/routines/revisions/list', 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://{cluster}.cognitedata.com/api/v1/projects/{project}/simulators/routines/revisions/list",
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([
'filter' => [
'routineExternalIds' => [
'<string>'
],
'allVersions' => false,
'modelExternalIds' => [
'<string>'
],
'simulatorIntegrationExternalIds' => [
'<string>'
],
'simulatorExternalIds' => [
'<string>'
],
'createdTime' => [
'max' => 1,
'min' => 1
],
'kind' => 'long'
],
'limit' => 10,
'cursor' => '<string>',
'sort' => [
[
'order' => 'asc',
'property' => 'createdTime'
]
],
'includeAllFields' => false
]),
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://{cluster}.cognitedata.com/api/v1/projects/{project}/simulators/routines/revisions/list"
payload := strings.NewReader("{\n \"filter\": {\n \"routineExternalIds\": [\n \"<string>\"\n ],\n \"allVersions\": false,\n \"modelExternalIds\": [\n \"<string>\"\n ],\n \"simulatorIntegrationExternalIds\": [\n \"<string>\"\n ],\n \"simulatorExternalIds\": [\n \"<string>\"\n ],\n \"createdTime\": {\n \"max\": 1,\n \"min\": 1\n },\n \"kind\": \"long\"\n },\n \"limit\": 10,\n \"cursor\": \"<string>\",\n \"sort\": [\n {\n \"order\": \"asc\",\n \"property\": \"createdTime\"\n }\n ],\n \"includeAllFields\": false\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://{cluster}.cognitedata.com/api/v1/projects/{project}/simulators/routines/revisions/list")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filter\": {\n \"routineExternalIds\": [\n \"<string>\"\n ],\n \"allVersions\": false,\n \"modelExternalIds\": [\n \"<string>\"\n ],\n \"simulatorIntegrationExternalIds\": [\n \"<string>\"\n ],\n \"simulatorExternalIds\": [\n \"<string>\"\n ],\n \"createdTime\": {\n \"max\": 1,\n \"min\": 1\n },\n \"kind\": \"long\"\n },\n \"limit\": 10,\n \"cursor\": \"<string>\",\n \"sort\": [\n {\n \"order\": \"asc\",\n \"property\": \"createdTime\"\n }\n ],\n \"includeAllFields\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{cluster}.cognitedata.com/api/v1/projects/{project}/simulators/routines/revisions/list")
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 \"filter\": {\n \"routineExternalIds\": [\n \"<string>\"\n ],\n \"allVersions\": false,\n \"modelExternalIds\": [\n \"<string>\"\n ],\n \"simulatorIntegrationExternalIds\": [\n \"<string>\"\n ],\n \"simulatorExternalIds\": [\n \"<string>\"\n ],\n \"createdTime\": {\n \"max\": 1,\n \"min\": 1\n },\n \"kind\": \"long\"\n },\n \"limit\": 10,\n \"cursor\": \"<string>\",\n \"sort\": [\n {\n \"order\": \"asc\",\n \"property\": \"createdTime\"\n }\n ],\n \"includeAllFields\": false\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"dataSetId": 123,
"id": 123,
"externalId": "<string>",
"simulatorExternalId": "<string>",
"routineExternalId": "<string>",
"modelExternalId": "<string>",
"createdByUserId": "<string>",
"versionNumber": 123,
"createdTime": 123,
"configuration": {
"schedule": {
"enabled": false
},
"dataSampling": {
"enabled": false
},
"logicalCheck": [
{
"enabled": true,
"timeseriesExternalId": "<string>",
"value": 123
}
],
"steadyStateDetection": [
{
"enabled": true,
"minSectionSize": 123,
"varThreshold": 123,
"slopeThreshold": 123,
"timeseriesExternalId": "<string>"
}
],
"inputs": [],
"outputs": []
},
"script": [
{
"order": 5,
"steps": [
{
"order": 5000,
"stepType": "Get",
"arguments": {
"referenceId": "<string>"
},
"description": "<string>"
}
],
"description": "<string>"
}
],
"simulatorIntegrationExternalId": "<string>",
"kind": "long"
}
],
"nextCursor": "<string>"
}{
"error": {
"message": "<string>",
"code": 123
}
}{
"error": {
"message": "<string>",
"code": 123
}
}{
"error": {
"message": "<string>",
"code": 123
}
}Filter Simulator Routine Revisions
Retrieves a list of simulator routine revisions that match the given criteria.
curl --request POST \
--url https://{cluster}.cognitedata.com/api/v1/projects/{project}/simulators/routines/revisions/list \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filter": {
"routineExternalIds": [
"<string>"
],
"allVersions": false,
"modelExternalIds": [
"<string>"
],
"simulatorIntegrationExternalIds": [
"<string>"
],
"simulatorExternalIds": [
"<string>"
],
"createdTime": {
"max": 1,
"min": 1
},
"kind": "long"
},
"limit": 10,
"cursor": "<string>",
"sort": [
{
"order": "asc",
"property": "createdTime"
}
],
"includeAllFields": false
}
'import requests
url = "https://{cluster}.cognitedata.com/api/v1/projects/{project}/simulators/routines/revisions/list"
payload = {
"filter": {
"routineExternalIds": ["<string>"],
"allVersions": False,
"modelExternalIds": ["<string>"],
"simulatorIntegrationExternalIds": ["<string>"],
"simulatorExternalIds": ["<string>"],
"createdTime": {
"max": 1,
"min": 1
},
"kind": "long"
},
"limit": 10,
"cursor": "<string>",
"sort": [
{
"order": "asc",
"property": "createdTime"
}
],
"includeAllFields": False
}
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({
filter: {
routineExternalIds: ['<string>'],
allVersions: false,
modelExternalIds: ['<string>'],
simulatorIntegrationExternalIds: ['<string>'],
simulatorExternalIds: ['<string>'],
createdTime: {max: 1, min: 1},
kind: 'long'
},
limit: 10,
cursor: '<string>',
sort: [{order: 'asc', property: 'createdTime'}],
includeAllFields: false
})
};
fetch('https://{cluster}.cognitedata.com/api/v1/projects/{project}/simulators/routines/revisions/list', 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://{cluster}.cognitedata.com/api/v1/projects/{project}/simulators/routines/revisions/list",
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([
'filter' => [
'routineExternalIds' => [
'<string>'
],
'allVersions' => false,
'modelExternalIds' => [
'<string>'
],
'simulatorIntegrationExternalIds' => [
'<string>'
],
'simulatorExternalIds' => [
'<string>'
],
'createdTime' => [
'max' => 1,
'min' => 1
],
'kind' => 'long'
],
'limit' => 10,
'cursor' => '<string>',
'sort' => [
[
'order' => 'asc',
'property' => 'createdTime'
]
],
'includeAllFields' => false
]),
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://{cluster}.cognitedata.com/api/v1/projects/{project}/simulators/routines/revisions/list"
payload := strings.NewReader("{\n \"filter\": {\n \"routineExternalIds\": [\n \"<string>\"\n ],\n \"allVersions\": false,\n \"modelExternalIds\": [\n \"<string>\"\n ],\n \"simulatorIntegrationExternalIds\": [\n \"<string>\"\n ],\n \"simulatorExternalIds\": [\n \"<string>\"\n ],\n \"createdTime\": {\n \"max\": 1,\n \"min\": 1\n },\n \"kind\": \"long\"\n },\n \"limit\": 10,\n \"cursor\": \"<string>\",\n \"sort\": [\n {\n \"order\": \"asc\",\n \"property\": \"createdTime\"\n }\n ],\n \"includeAllFields\": false\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://{cluster}.cognitedata.com/api/v1/projects/{project}/simulators/routines/revisions/list")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filter\": {\n \"routineExternalIds\": [\n \"<string>\"\n ],\n \"allVersions\": false,\n \"modelExternalIds\": [\n \"<string>\"\n ],\n \"simulatorIntegrationExternalIds\": [\n \"<string>\"\n ],\n \"simulatorExternalIds\": [\n \"<string>\"\n ],\n \"createdTime\": {\n \"max\": 1,\n \"min\": 1\n },\n \"kind\": \"long\"\n },\n \"limit\": 10,\n \"cursor\": \"<string>\",\n \"sort\": [\n {\n \"order\": \"asc\",\n \"property\": \"createdTime\"\n }\n ],\n \"includeAllFields\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{cluster}.cognitedata.com/api/v1/projects/{project}/simulators/routines/revisions/list")
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 \"filter\": {\n \"routineExternalIds\": [\n \"<string>\"\n ],\n \"allVersions\": false,\n \"modelExternalIds\": [\n \"<string>\"\n ],\n \"simulatorIntegrationExternalIds\": [\n \"<string>\"\n ],\n \"simulatorExternalIds\": [\n \"<string>\"\n ],\n \"createdTime\": {\n \"max\": 1,\n \"min\": 1\n },\n \"kind\": \"long\"\n },\n \"limit\": 10,\n \"cursor\": \"<string>\",\n \"sort\": [\n {\n \"order\": \"asc\",\n \"property\": \"createdTime\"\n }\n ],\n \"includeAllFields\": false\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"dataSetId": 123,
"id": 123,
"externalId": "<string>",
"simulatorExternalId": "<string>",
"routineExternalId": "<string>",
"modelExternalId": "<string>",
"createdByUserId": "<string>",
"versionNumber": 123,
"createdTime": 123,
"configuration": {
"schedule": {
"enabled": false
},
"dataSampling": {
"enabled": false
},
"logicalCheck": [
{
"enabled": true,
"timeseriesExternalId": "<string>",
"value": 123
}
],
"steadyStateDetection": [
{
"enabled": true,
"minSectionSize": 123,
"varThreshold": 123,
"slopeThreshold": 123,
"timeseriesExternalId": "<string>"
}
],
"inputs": [],
"outputs": []
},
"script": [
{
"order": 5,
"steps": [
{
"order": 5000,
"stepType": "Get",
"arguments": {
"referenceId": "<string>"
},
"description": "<string>"
}
],
"description": "<string>"
}
],
"simulatorIntegrationExternalId": "<string>",
"kind": "long"
}
],
"nextCursor": "<string>"
}{
"error": {
"message": "<string>",
"code": 123
}
}{
"error": {
"message": "<string>",
"code": 123
}
}{
"error": {
"message": "<string>",
"code": 123
}
}Authorizations
Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.
Body
Show child attributes
Show child attributes
1 <= x <= 20Cursor for pagination
Only supports sorting by one property at a time
Show child attributes
Show child attributes
If all fields should be included in the response. Defaults to false which does not include script, configuration.inputs and configuration.outputs in the response. If true - all fields are returned, but routines with kind 'long' will be excluded from the results.
Was this page helpful?