Foxpro / Cognite API v1 / Filter transformations
Back to Collection Items
LOCAL loHttp
LOCAL lnSuccess
LOCAL loJson
LOCAL loResp
* This example assumes the Chilkat API to have been previously unlocked.
* See Global Unlock Sample for sample code.
* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.Http')
loHttp = CreateObject('Chilkat.Http')
* Use this online tool to generate code from sample JSON: Generate Code to Create JSON
* The following JSON is sent in the request body.
* {
* "filter": {
* "isPublic": true,
* "nameRegex": "voluptate irure aute",
* "queryRegex": "fugiat dolor",
* "destinationType": "dolore velit irure dolor",
* "conflictMode": "id officia labore nostrud dolor",
* "hasBlockedError": false,
* "cdfProjectName": "in Ut",
* "createdTime": {
* "min": 47433915,
* "max": 13086787
* },
* "lastUpdatedTime": {
* "min": 36390643,
* "max": -75267076
* }
* },
* "limit": -29037401,
* "cursor": "aute magna"
* }
* For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.JsonObject')
loJson = CreateObject('Chilkat.JsonObject')
loJson.UpdateBool("filter.isPublic",1)
loJson.UpdateString("filter.nameRegex","voluptate irure aute")
loJson.UpdateString("filter.queryRegex","fugiat dolor")
loJson.UpdateString("filter.destinationType","dolore velit irure dolor")
loJson.UpdateString("filter.conflictMode","id officia labore nostrud dolor")
loJson.UpdateBool("filter.hasBlockedError",0)
loJson.UpdateString("filter.cdfProjectName","in Ut")
loJson.UpdateInt("filter.createdTime.min",47433915)
loJson.UpdateInt("filter.createdTime.max",13086787)
loJson.UpdateInt("filter.lastUpdatedTime.min",36390643)
loJson.UpdateInt("filter.lastUpdatedTime.max",-75267076)
loJson.UpdateInt("limit",-29037401)
loJson.UpdateString("cursor","aute magna")
loHttp.SetRequestHeader("content-type","application/json")
loHttp.SetRequestHeader("api-key","{{api-key}}")
loResp = loHttp.PostJson3("https://domain.com/api/v1/projects/{{project}}/transformations/filter","application/json",loJson)
IF (loHttp.LastMethodSuccess = 0) THEN
? loHttp.LastErrorText
RELEASE loHttp
RELEASE loJson
CANCEL
ENDIF
? STR(loResp.StatusCode)
? loResp.BodyStr
RELEASE loResp
RELEASE loHttp
RELEASE loJson
Curl Command
curl -X POST
-H "api-key: {{api-key}}"
-H "content-type: application/json"
-d '{
"filter": {
"isPublic": true,
"nameRegex": "voluptate irure aute",
"queryRegex": "fugiat dolor",
"destinationType": "dolore velit irure dolor",
"conflictMode": "id officia labore nostrud dolor",
"hasBlockedError": false,
"cdfProjectName": "in Ut",
"createdTime": {
"min": 47433915,
"max": 13086787
},
"lastUpdatedTime": {
"min": 36390643,
"max": -75267076
}
},
"limit": -29037401,
"cursor": "aute magna"
}'
https://domain.com/api/v1/projects/{{project}}/transformations/filter
Postman Collection Item JSON
{
"id": "filterTransformations",
"name": "Filter transformations",
"request": {
"url": {
"host": "{{baseUrl}}",
"path": [
"api",
"v1",
"projects",
"{{project}}",
"transformations",
"filter"
],
"query": [
],
"variable": [
]
},
"method": "POST",
"header": [
{
"key": "api-key",
"value": "{{api-key}}",
"description": "An admin can create API keys in the Cognite console."
},
{
"key": "content-type",
"value": "application/json"
}
],
"description": "Filter transformations. Use nextCursor to paginate through the results.",
"body": {
"mode": "raw",
"raw": "{\n \"filter\": {\n \"isPublic\": true,\n \"nameRegex\": \"voluptate irure aute\",\n \"queryRegex\": \"fugiat dolor\",\n \"destinationType\": \"dolore velit irure dolor\",\n \"conflictMode\": \"id officia labore nostrud dolor\",\n \"hasBlockedError\": false,\n \"cdfProjectName\": \"in Ut\",\n \"createdTime\": {\n \"min\": 47433915,\n \"max\": 13086787\n },\n \"lastUpdatedTime\": {\n \"min\": 36390643,\n \"max\": -75267076\n }\n },\n \"limit\": -29037401,\n \"cursor\": \"aute magna\"\n}"
}
}
}