Skip to main content
Question

CDF ThingWorx via REST API

  • June 2, 2026
  • 1 reply
  • 35 views

Forum|alt.badge.img+1
  • Access a table (likely RAW table / staging table) in Cognite Data Fusion (CDF)
  • Call it from ThingWorx using REST APIs
  • Possibly map the data into ThingWorx properties

In CDF, I have a staging table. How can I access this table’s properties in ThingWorx using a REST API.
How to create Authorization Bearer CDF_ACCESS_TOKE.!--scriptorstartfragment-->


Rest API URL: https://api.cognitedata.com/api/v1/projects/ptec-04/raw/dbs/RK-FTDM-DB/tables/RK-FTDM/rows/list

https://ptec-04-datamosaix.fusion.cognite.com/ptec-04/raw?cluster=westeurope-1.cognitedata.com&workspace=data-fusion

 

1 reply

tmolbach
Practitioner ⭐️⭐️⭐️
Forum|alt.badge.img+1
  • Practitioner ⭐️⭐️⭐️
  • June 16, 2026

Hi Ravindra,

First, since your project is on the westeurope-1 cluster (as shown in your Fusion URL), you should use the cluster-specific base URL rather than api.cognitedata.com:

GET https://westeurope-1.cognitedata.com/api/v1/projects/ptec-04/raw/dbs/RK-FTDM-DB/tables/RK-FTDM/rows/list

Second, you need an OAuth 2.0 access token from your Identity Provider. The token is then passed in the Authorization header of every request.

Key parameters you need (from your CDF/IdP admin):
TENANT_ID – Your Azure AD tenant ID
CLIENT_ID – Your app registration client ID
CLIENT_SECRET – Your app registration client secret
CDF_CLUSTER – westeurope-1
COGNITE_PROJECT – ptec-04
Python example (client credentials flow):
import requests

TENANT_ID = "<your-tenant-id>"

CLIENT_ID = "<your-client-id>"

CLIENT_SECRET = "<your-client-secret>"

CDF_CLUSTER = "westeurope-1"

COGNITE_PROJECT = "ptec-04"

# Step 1: Get access token

token_url = f"https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0/token"

token_payload = {

    "grant_type": "client_credentials",

    "client_id": CLIENT_ID,

    "client_secret": CLIENT_SECRET,

    "scope": f"https://{CDF_CLUSTER}.cognitedata.com/.default"

}

token_response = requests.post(token_url, data=token_payload)

access_token = token_response.json()["access_token"]

# Step 2: Call the RAW rows/list endpoint

url = f"https://{CDF_CLUSTER}.cognitedata.com/api/v1/projects/{COGNITE_PROJECT}/raw/dbs/RK-FTDM-DB/tables/RK-FTDM/rows/list"

headers = {

    "Authorization": "Bearer " + access_token,

    "Accept": "application/json"

}

response = requests.get(url, headers=headers)

print(response.json())


I hope this helps. Feel free to reach out to me in Rockwell Teams to discuss further.