Skip to main content
POST
/
timeseries
/
search
JavaScript SDK
const timeseries = await client.timeseries.search({
  filter: {
    isString: false,
  },
  search: {
    query: 'Temperature'
  }
});
res = client.time_series.search(name="some name")

res = client.time_series.search(filter={"asset_ids":[123]})
curl --request POST \
--url https://{cluster}.cognitedata.com/api/v1/projects/{project}/timeseries/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filter": {
"name": "<string>",
"unit": "<string>",
"unitExternalId": "<string>",
"unitQuantity": "<string>",
"isString": true,
"isStep": true,
"metadata": {},
"assetIds": [
363848954441724,
793045462540095,
1261042166839739
],
"assetExternalIds": [
"my.known.id"
],
"rootAssetIds": [
343099548723932,
88483999203217
],
"assetSubtreeIds": [
{
"id": 4503599627370496
}
],
"dataSetIds": [
{
"id": 4503599627370496
}
],
"externalIdPrefix": "my.known.prefix",
"createdTime": {
"max": 1,
"min": 1
},
"lastUpdatedTime": {
"max": 1,
"min": 1
}
},
"search": {
"name": "<string>",
"description": "<string>",
"query": "some other"
},
"limit": 100
}
'
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://{cluster}.cognitedata.com/api/v1/projects/{project}/timeseries/search",
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' => [
'name' => '<string>',
'unit' => '<string>',
'unitExternalId' => '<string>',
'unitQuantity' => '<string>',
'isString' => true,
'isStep' => true,
'metadata' => [

],
'assetIds' => [
363848954441724,
793045462540095,
1261042166839739
],
'assetExternalIds' => [
'my.known.id'
],
'rootAssetIds' => [
343099548723932,
88483999203217
],
'assetSubtreeIds' => [
[
'id' => 4503599627370496
]
],
'dataSetIds' => [
[
'id' => 4503599627370496
]
],
'externalIdPrefix' => 'my.known.prefix',
'createdTime' => [
'max' => 1,
'min' => 1
],
'lastUpdatedTime' => [
'max' => 1,
'min' => 1
]
],
'search' => [
'name' => '<string>',
'description' => '<string>',
'query' => 'some other'
],
'limit' => 100
]),
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}/timeseries/search"

payload := strings.NewReader("{\n \"filter\": {\n \"name\": \"<string>\",\n \"unit\": \"<string>\",\n \"unitExternalId\": \"<string>\",\n \"unitQuantity\": \"<string>\",\n \"isString\": true,\n \"isStep\": true,\n \"metadata\": {},\n \"assetIds\": [\n 363848954441724,\n 793045462540095,\n 1261042166839739\n ],\n \"assetExternalIds\": [\n \"my.known.id\"\n ],\n \"rootAssetIds\": [\n 343099548723932,\n 88483999203217\n ],\n \"assetSubtreeIds\": [\n {\n \"id\": 4503599627370496\n }\n ],\n \"dataSetIds\": [\n {\n \"id\": 4503599627370496\n }\n ],\n \"externalIdPrefix\": \"my.known.prefix\",\n \"createdTime\": {\n \"max\": 1,\n \"min\": 1\n },\n \"lastUpdatedTime\": {\n \"max\": 1,\n \"min\": 1\n }\n },\n \"search\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"query\": \"some other\"\n },\n \"limit\": 100\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}/timeseries/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filter\": {\n \"name\": \"<string>\",\n \"unit\": \"<string>\",\n \"unitExternalId\": \"<string>\",\n \"unitQuantity\": \"<string>\",\n \"isString\": true,\n \"isStep\": true,\n \"metadata\": {},\n \"assetIds\": [\n 363848954441724,\n 793045462540095,\n 1261042166839739\n ],\n \"assetExternalIds\": [\n \"my.known.id\"\n ],\n \"rootAssetIds\": [\n 343099548723932,\n 88483999203217\n ],\n \"assetSubtreeIds\": [\n {\n \"id\": 4503599627370496\n }\n ],\n \"dataSetIds\": [\n {\n \"id\": 4503599627370496\n }\n ],\n \"externalIdPrefix\": \"my.known.prefix\",\n \"createdTime\": {\n \"max\": 1,\n \"min\": 1\n },\n \"lastUpdatedTime\": {\n \"max\": 1,\n \"min\": 1\n }\n },\n \"search\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"query\": \"some other\"\n },\n \"limit\": 100\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{cluster}.cognitedata.com/api/v1/projects/{project}/timeseries/search")

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 \"name\": \"<string>\",\n \"unit\": \"<string>\",\n \"unitExternalId\": \"<string>\",\n \"unitQuantity\": \"<string>\",\n \"isString\": true,\n \"isStep\": true,\n \"metadata\": {},\n \"assetIds\": [\n 363848954441724,\n 793045462540095,\n 1261042166839739\n ],\n \"assetExternalIds\": [\n \"my.known.id\"\n ],\n \"rootAssetIds\": [\n 343099548723932,\n 88483999203217\n ],\n \"assetSubtreeIds\": [\n {\n \"id\": 4503599627370496\n }\n ],\n \"dataSetIds\": [\n {\n \"id\": 4503599627370496\n }\n ],\n \"externalIdPrefix\": \"my.known.prefix\",\n \"createdTime\": {\n \"max\": 1,\n \"min\": 1\n },\n \"lastUpdatedTime\": {\n \"max\": 1,\n \"min\": 1\n }\n },\n \"search\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"query\": \"some other\"\n },\n \"limit\": 100\n}"

response = http.request(request)
puts response.read_body
{
  "items": [
    {
      "id": 4503599627370496,
      "isString": true,
      "type": "<string>",
      "isStep": true,
      "createdTime": 1730204346000,
      "lastUpdatedTime": 1730204346000,
      "externalId": "<string>",
      "instanceId": {
        "space": "<string>",
        "externalId": "<string>"
      },
      "name": "<string>",
      "metadata": {},
      "unit": "<string>",
      "unitExternalId": "<string>",
      "assetId": 4503599627370496,
      "description": "<string>",
      "securityCategories": [
        123
      ],
      "dataSetId": 4503599627370496
    }
  ]
}

Authorizations

Authorization
string
header
required

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

application/json
filter
object
limit
integer<int32>
default:100

Return up to this many results.

Required range: 1 <= x <= 1000

Response

200 - application/json

List of search results.

List of responses. The order matches the requests order.

items
object[]
required
Last modified on July 10, 2026