NAV Navbar
Shell HTTP JavaScript Node.JS Ruby Python Java Go
  • Cognite API v0.5
  • Authentication
  • 3D
  • Access Token
  • ApiKeys
  • Assets
  • Built-in ML
  • Events
  • Extraction
  • Files
  • Groups
  • Login
  • Logout
  • Pipelines
  • Projects
  • Raw
  • Security categories
  • Similarity Search
  • Tag Matching
  • Time series
  • Users
  • Schemas
  • Cognite API v0.5

    Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

    This is the reference documentation for the Cognite API. Here you can see an overview of all methods available through the API. We also offer an API guide, which is more useful as a first introduction.

    Base URLs:

    Authentication

    3D

    Endpoints for our 3d platform to grab model JSON and ctm files. This endpoint is experimental and not indented for production use.

    getModels

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/3d/models \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/3d/models HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/3d/models',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/3d/models',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/3d/models',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/3d/models', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/3d/models")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/3d/models", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/3d/models

    Returns all of the models for a project.

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    limit query integer(int32) false Number of models to get. N/A
    cursor query string false Cursor to use for paging through results. N/A
    sortBy query array[string] false The models to sort the order by. Use a - in front of the field to order by descending. N/A

    Enumerated Values

    Parameter Value
    sortBy id
    sortBy createdTime
    sortBy name
    sortBy urlName
    sortBy -id
    sortBy -createdTime
    sortBy -name
    sortBy -urlName

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "id": 0,
            "name": "string",
            "urlName": "string",
            "createdTime": 0
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK A list of models. Default length of 1000. ModelResponse

    postNewModel

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/3d/models \
      -H 'Content-Type: */*' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/3d/models HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: */*
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'*/*',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/3d/models',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "id": 0,
      "name": "string",
      "urlName": "string",
      "createdTime": 0
    }';
    const headers = {
      'Content-Type':'*/*',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/3d/models',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => '*/*',
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/3d/models',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': '*/*',
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/3d/models', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "*/*")
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/3d/models")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"*/*"},
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/3d/models", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/3d/models

    Creates a new model and returns it.

    Body parameter

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body ThreeDModel true New model to create. N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "id": 0,
            "name": "string",
            "urlName": "string",
            "createdTime": 0
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK A new mode for the given project. ModelResponse

    getRevisions

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/3d/models/{modelId}/revisions

    Returns all of the revisions for a model.

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    modelId path string true The model id or urlName. N/A
    limit query integer(int32) false Number of revisions to get. N/A
    cursor query string false Cursor to use for paging through results. N/A
    sortBy query array[string] false No description N/A

    Enumerated Values

    Parameter Value
    sortBy id
    sortBy createdTime
    sortBy -id
    sortBy -createdTime

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "id": 0,
            "InputSourceDTO": {
              "fileId": 0
            },
            "createdTime": 0,
            "metadata": {},
            "SubrevisionMetadataDTO": {
              "numPolygon": 0,
              "numVertices": 0,
              "version": 0
            },
            "statuses": [
              null
            ]
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK List of revisions. Default length of 1000. RevisionResponse

    postNewRevisionJob

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions \
      -H 'Content-Type: */*' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: */*
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'*/*',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "fileId": 0
    }';
    const headers = {
      'Content-Type':'*/*',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => '*/*',
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': '*/*',
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "*/*")
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"*/*"},
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/3d/models/{modelId}/revisions

    Returns the new revision started for the given fileId (in the body).

    Body parameter

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    modelId path string true The model id or urlName. N/A
    body body ThreeDFileIdBody true File id for source file. N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "id": 0,
            "InputSourceDTO": {
              "fileId": 0
            },
            "createdTime": 0,
            "metadata": {},
            "SubrevisionMetadataDTO": {
              "numPolygon": 0,
              "numVertices": 0,
              "version": 0
            },
            "statuses": [
              null
            ]
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK A revision for the given processing job. RevisionResponse

    getGeometryFile

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/files/{fileId} \
      -H 'Accept: application/octet-stream' \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/files/{fileId} HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/octet-stream
    api-key: API_KEY
    
    
    var headers = {
      'Accept':'application/octet-stream',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/files/{fileId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/octet-stream',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/files/{fileId}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/octet-stream',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/files/{fileId}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/octet-stream',
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/files/{fileId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/octet-stream")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/files/{fileId}")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/octet-stream"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/files/{fileId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/files/{fileId}

    Returns the raw file of the geometry.

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    modelId path string true The model id or urlName . N/A
    revisionId path integer(int64) true The revision id. N/A
    fileId path integer(int64) true The file to get. N/A

    Example responses

    Responses

    Status Meaning Description Schema
    default Default default response None

    Response Schema

    Status Code default

    Name Type Required Description

    getRevisionNodes

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes

    Returns the node of the given revision and sub-nodes of the given id. Note rootId of 0 means root. The endpoint is paginated.

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    modelId path string true The model id or urlName. N/A
    revisionId path integer(int64) true The revision id. N/A
    limit query integer(int32) false Number of nodes to get. N/A
    cursor query string false Cursor to use for paging through results. N/A
    rootId query integer(int64) false The ID of the node and its subtree id to get, by default it is 0. N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "id": 0,
            "name": "string",
            "parent": 0,
            "assetId": 0,
            "path": "string",
            "metadata": {},
            "ThreeDGeometry": {
              "id": 0,
              "type": "string",
              "GeometryFilesDTO": {},
              "GeometryMetadataDTO": {},
              "primitiveInfo": {}
            }
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK A node list for the revision. Default length of 1000. NodeResponse

    insertNodeAssetMapping

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/assets \
      -H 'Content-Type: */*' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/assets HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: */*
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'*/*',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/assets',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "mappings": {}
    }';
    const headers = {
      'Content-Type':'*/*',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/assets',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => '*/*',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/assets',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': '*/*',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/assets', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "*/*")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/assets")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"*/*"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/assets", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/assets

    Returns the number of mappings added.

    Body parameter

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    modelId path string true The model id or urlName. N/A
    revisionId path integer(int64) true The revision id. N/A
    body body ThreeDAssetMappingBody true The node asset mappings, in the format of node-identifier -> tag id. N/A

    Responses

    Status Meaning Description Schema
    200 OK Indicates that the insertion was successful. None

    getRevisionById

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId} \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId} HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}

    Gets a revision from the model based on the id.

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    modelId path string true The model id or urlName. N/A
    revisionId path integer(int64) true The revision id. N/A

    Example responses

    200 Response

    {
      "id": 0,
      "InputSourceDTO": {
        "fileId": 0
      },
      "createdTime": 0,
      "metadata": {},
      "SubrevisionMetadataDTO": {
        "numPolygon": 0,
        "numVertices": 0,
        "version": 0
      },
      "statuses": [
        null
      ]
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Returns the revision matching the given id. ThreeDRevision

    getNodesFromAssetId

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/assets/{assetId} \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/assets/{assetId} HTTP/1.1
    Host: api.cognitedata.com
    api-key: API_KEY
    
    
    var headers = {
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/assets/{assetId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/assets/{assetId}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/assets/{assetId}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/assets/{assetId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/assets/{assetId}")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/assets/{assetId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/assets/{assetId}

    Returns node ids for asset.

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    modelId path string true The model id or urlName. N/A
    revisionId path integer(int64) true The revision id. N/A
    assetId path integer(int64) true The asset id. N/A
    limit query integer(int32) false Number of results to get. N/A
    cursor query string false Cursor to use for paging through results. N/A

    Responses

    Status Meaning Description Schema
    200 OK Indicates that the request was successful. None

    getRevisionNodeById

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes/{nodeId} \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes/{nodeId} HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes/{nodeId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes/{nodeId}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes/{nodeId}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes/{nodeId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes/{nodeId}")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes/{nodeId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes/{nodeId}

    Returns the node of the given revision and sub-nodes of the given id. Note rootId of 0 means root. The endpoint is paginated.

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    modelId path string true The model id or urlName. N/A
    revisionId path integer(int64) true The revision id. N/A
    nodeId path integer(int64) true The node id. N/A
    limit query integer(int32) false Number of nodes to get. N/A
    cursor query string false Cursor to use for paging through results. N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "id": 0,
            "name": "string",
            "parent": 0,
            "assetId": 0,
            "path": "string",
            "metadata": {},
            "ThreeDGeometry": {
              "id": 0,
              "type": "string",
              "GeometryFilesDTO": {},
              "GeometryMetadataDTO": {},
              "primitiveInfo": {}
            }
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The specified node and its mapping information. NodeResponse

    getModelById

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId} \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId} HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/3d/models/{modelId}

    Gets the model based on the id.

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    modelId path string true The model id or urlName. N/A

    Example responses

    200 Response

    {
      "id": 0,
      "name": "string",
      "urlName": "string",
      "createdTime": 0
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Returns the model matching the given id. ThreeDModel

    getRevisionNodeAssetsInfo

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes/{nodeId}/assets \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes/{nodeId}/assets HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes/{nodeId}/assets',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes/{nodeId}/assets',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes/{nodeId}/assets',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes/{nodeId}/assets', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes/{nodeId}/assets")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes/{nodeId}/assets", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes/{nodeId}/assets

    Returns the node of the given revision and sub-nodes of the given id. Note rootId of 0 means root. The endpoint is paginated.

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    modelId path string true The model id or urlName. N/A
    revisionId path integer(int64) true The revision id. N/A
    nodeId path integer(int64) true The node id. N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "id": 0,
            "name": "string",
            "parent": 0,
            "assetId": 0,
            "path": "string",
            "metadata": {},
            "ThreeDGeometry": {
              "id": 0,
              "type": "string",
              "GeometryFilesDTO": {},
              "GeometryMetadataDTO": {},
              "primitiveInfo": {}
            }
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The specified node and its mapping information. NodeResponse

    Access Token

    Endpoint for creating access tokens for service accounts.

    createToken

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/token \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/token HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/token',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "grant_type": "string",
      "assertion": "string"
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/token',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/token',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/token', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/token")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/token", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/token

    Create new access token. grant_type should be "urn:ietf:params:oauth:grant-type:jwt-bearer"
    Other grant types will be added in the future.
    'assertion' is "[jwttype].[jwtdata].[signature]"
    where jwttype = base64({"alg":"RS256", "typ":"JWT"})
    jwtdata = base64(json{iss, aud, exp, iat})
    'iss' (issuer) is the account name. This is not defined in the API yet, ask Cognite.
    'aud' (audience) is an url to the token service. Use "api.cognitedata.com/api/0.3/token"
    'exp' (expiry) is when this request should time out in seconds after epoch. Set 5-3600 s in the future.
    'iat' (issued at): Send current time in seconds after epoch.

    'signature' is "[jwttype].[jwtdata]" signed with your private key. Contact Cognite if you have not received it.

    Body parameter

    {
      "grant_type": "string",
      "assertion": "string"
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body TokenRequest true Request for token. N/A

    Example responses

    200 Response

    {
      "TokenGrant": {
        "access_token": "string",
        "token_type": "string",
        "expires_in": 0
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Access token, token type, and expiration time. TokenGrantDataResponse

    ApiKeys

    Manage api keys for a specific project.

    getApiKeys

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/apikeys \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/apikeys HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/apikeys',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/apikeys',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/apikeys',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/apikeys', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/apikeys")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/apikeys", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/apikeys

    Get a list of api keys.

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    all query boolean false Whether to get api keys for all users, only available to admin users. N/A
    userId query integer(int64) false Get api keys for a specific user, only available to admin users. N/A
    includeDeleted query boolean false Whether to include deleted api keys N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          null
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK A list of api keys. ApiKeyResponse

    createApiKeys

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/apikeys \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/apikeys HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/apikeys',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "items": [
        {
          "userId": 0
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/apikeys',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/apikeys',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/apikeys', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/apikeys")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/apikeys", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/apikeys

    Create new api keys.

    Body parameter

    {
      "items": [
        {
          "userId": 0
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body DataApiKeyRequest true List of api keys to create. N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          null
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK A list of the created api keys. NewApiKeyResponse

    deleteApiKeys

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/apikeys/delete \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/apikeys/delete HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/apikeys/delete',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "items": [
        0
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/apikeys/delete',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/apikeys/delete',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/apikeys/delete', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/apikeys/delete")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/apikeys/delete", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/apikeys/delete

    Delete api keys.

    Body parameter

    {
      "items": [
        0
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body DataLong true List of ids of api keys to delete. N/A

    Example responses

    200 Response

    {}
    

    Responses

    Status Meaning Description Schema
    200 OK Empty response. EmptyResponse

    Assets

    CDP organizes digital information about the physical world. Assets are digital representations of physical objects or groups of objects, and assets are organized into an asset hierarchy. For example, an asset can represent a water pump which is part of a subsystem on an oil platform.

    Assets are used to connect related data together, even if the data comes from different sources; Time series of data points, events and files are all connected to one or more assets. The pump asset can be connected to a time series measuring pressure within the pump, as well as events recording maintenance operations, and a file with a 3D diagram of the pump.

    At the top of an asset hierarchy is a root asset (e.g., the oil platform). Each project can have multiple root assets. All assets have a name and a parent asset. No assets with the same parent can have the same name.

    List all assets

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/assets \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/assets HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/assets',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/assets',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/assets',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/assets', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/assets")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/assets", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/assets

    Retrieve a list of all assets in the given project. The list is sorted alphabetically by name. This operation supports pagination.

    You can retrieve a subset of assets by supplying additional fields; Only assets satisfying all criterias will be returned. Names and descriptions are fuzzy searched using edit distance. The fuzziness parameter controls the maximum edit distance when considering matches for the name and description fields.

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    name query string false The name of the asset(s) to get. N/A
    fuzziness query integer(int32) false The degree of fuzziness in the name matching N/A
    path query string false The path of the subtree to search in. N/A
    depth query integer(int32) false Get sub assets up to this many levels below the specified path. N/A
    metadata query string false The metadata values used to filter the results N/A
    description query string false Only return assets that contain this description N/A
    source query string false The source of the assets used to filter the results N/A
    cursor query string false Cursor to use for paging through results N/A
    limit query integer(int32) false The maximum number of assets to be returned. N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "name": "string",
            "parentId": 0,
            "description": "string",
            "source": "string",
            "sourceId": "string",
            "id": 0,
            "path": [
              0
            ]
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK A list of assets in lexicographic order. AssetDataWithCursorResponse

    Overwrite multiple assets

    Code samples

    # You can also use wget
    curl -X PUT https://api.cognitedata.com/api/0.5/projects/{project}/assets \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    PUT https://api.cognitedata.com/api/0.5/projects/{project}/assets HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/assets',
      method: 'put',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "items": [
        {
          "name": "string",
          "parentId": 0,
          "description": "string",
          "source": "string",
          "sourceId": "string",
          "id": 0,
          "path": [
            0
          ]
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/assets',
    {
      method: 'PUT',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.put 'https://api.cognitedata.com/api/0.5/projects/{project}/assets',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.put('https://api.cognitedata.com/api/0.5/projects/{project}/assets', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/assets")
      .put(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("PUT", "https://api.cognitedata.com/api/0.5/projects/{project}/assets", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    PUT /api/0.5/projects/{project}/assets

    This operation does not support partial updates e.g. updating just the name of the asset without specifying values for other fields.

    Body parameter

    {
      "items": [
        {
          "name": "string",
          "parentId": 0,
          "description": "string",
          "source": "string",
          "sourceId": "string",
          "id": 0,
          "path": [
            0
          ]
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body DataGetAssetDTO true List of assets to update N/A

    Example responses

    200 Response

    {}
    

    Responses

    Status Meaning Description Schema
    200 OK Empty response. EmptyResponse
    400 Bad Request Ids duplicated. ErrorResponse

    Create assets

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/assets \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/assets HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/assets',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "items": [
        {
          "name": "string",
          "parentId": 0,
          "description": "string",
          "metadata": {},
          "source": "string",
          "sourceId": "string",
          "refId": "string",
          "parentName": "string",
          "parentRefId": "string"
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/assets',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/assets',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/assets', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/assets")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/assets", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/assets

    Creates new assets in the given project.

    Body parameter

    {
      "items": [
        {
          "name": "string",
          "parentId": 0,
          "description": "string",
          "metadata": {},
          "source": "string",
          "sourceId": "string",
          "refId": "string",
          "parentName": "string",
          "parentRefId": "string"
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body DataPostAssetDTO true List of assets to create N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "name": "string",
            "parentId": 0,
            "description": "string",
            "source": "string",
            "sourceId": "string",
            "id": 0,
            "path": [
              0
            ]
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK A list of the posted assets. AssetDataResponse

    Update multiple assets

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/assets/update \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/assets/update HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/assets/update',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "items": [
        {
          "id": 0,
          "name": {
            "set": "string",
            "setNull": true
          },
          "description": {
            "set": "string",
            "setNull": true
          },
          "metadata": {
            "set": {},
            "setNull": true
          },
          "source": {
            "set": "string",
            "setNull": true
          },
          "sourceId": {
            "set": "string",
            "setNull": true
          }
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/assets/update',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/assets/update',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/assets/update', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/assets/update")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/assets/update", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/assets/update

    Updates multiple assets within the same project. Updating assets does not replace the existing asset hierarchy. This operation supports partial updates, meaning that fields omitted from the requests are not changed.

    Under DataAssetChange -> SinglePathString, you can use 'set': 'value' to update value; use 'setNull': true to set that field to null.

    Body parameter

    {
      "items": [
        {
          "id": 0,
          "name": {
            "set": "string",
            "setNull": true
          },
          "description": {
            "set": "string",
            "setNull": true
          },
          "metadata": {
            "set": {},
            "setNull": true
          },
          "source": {
            "set": "string",
            "setNull": true
          },
          "sourceId": {
            "set": "string",
            "setNull": true
          }
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body DataAssetChange true List of changes. N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "name": "string",
            "parentId": 0,
            "description": "string",
            "source": "string",
            "sourceId": "string",
            "id": 0,
            "path": [
              0
            ]
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Corresponding assets after applying the updates. AssetDataResponse

    Update an asset

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/assets/{id}/update \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/assets/{id}/update HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/assets/{id}/update',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "id": 0,
      "name": {
        "set": "string",
        "setNull": true
      },
      "description": {
        "set": "string",
        "setNull": true
      },
      "metadata": {
        "set": {},
        "setNull": true
      },
      "source": {
        "set": "string",
        "setNull": true
      },
      "sourceId": {
        "set": "string",
        "setNull": true
      }
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/assets/{id}/update',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/assets/{id}/update',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/assets/{id}/update', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/assets/{id}/update")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/assets/{id}/update", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/assets/{id}/update

    Updates an asset object. Supports partial updates i.e. updating only some fields but leaving the rest unchanged.

    Under DataAssetChange -> SinglePathString, you can use 'set': 'value' to update value; use 'setNull': true to set that field to null.

    Body parameter

    {
      "id": 0,
      "name": {
        "set": "string",
        "setNull": true
      },
      "description": {
        "set": "string",
        "setNull": true
      },
      "metadata": {
        "set": {},
        "setNull": true
      },
      "source": {
        "set": "string",
        "setNull": true
      },
      "sourceId": {
        "set": "string",
        "setNull": true
      }
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    id path integer(int64) true Id of the asset N/A
    body body AssetChange false Content of changes N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "name": "string",
            "parentId": 0,
            "description": "string",
            "source": "string",
            "sourceId": "string",
            "id": 0,
            "path": [
              0
            ]
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Corresponding asset after applying the update. AssetDataResponse

    Delete assets

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/assets/delete \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/assets/delete HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/assets/delete',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "items": [
        0
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/assets/delete',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/assets/delete',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/assets/delete', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/assets/delete")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/assets/delete", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/assets/delete

    Deletes multiple assets in the same project, along with all their descendants in the asset hierarchy.

    Body parameter

    {
      "items": [
        0
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body DataLong true List of IDs of assets to delete N/A

    Example responses

    200 Response

    {}
    

    Responses

    Status Meaning Description Schema
    200 OK Empty response. EmptyResponse
    400 Bad Request Ids duplicated. ErrorResponse

    Retrieve multiple assets

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/assets/byids \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/assets/byids HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/assets/byids',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "items": [
        0
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/assets/byids',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/assets/byids',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/assets/byids', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/assets/byids")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/assets/byids", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/assets/byids

    Retrieves information about multiple assets in the same project.

    Body parameter

    {
      "items": [
        0
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body DataLong true List of IDs of assets to retrieve N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "name": "string",
            "parentId": 0,
            "description": "string",
            "source": "string",
            "sourceId": "string",
            "id": 0,
            "path": [
              0
            ]
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK A list of assets matching the ids. AssetDataResponse
    400 Bad Request Ids duplicated. ErrorResponse

    List descendants of an asset

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/assets/{assetId}/subtree \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/assets/{assetId}/subtree HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/assets/{assetId}/subtree',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/assets/{assetId}/subtree',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/assets/{assetId}/subtree',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/assets/{assetId}/subtree', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/assets/{assetId}/subtree")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/assets/{assetId}/subtree", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/assets/{assetId}/subtree

    Retrieves a list of assets descending from the given asset. The asset hierarchy is traversed breadth first, meaning that assets with the same parent will appear next to each other in the reply. This operation supports pagination.

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    assetId path integer(int64) true No description N/A
    depth query integer(int32) false Get sub assets up to this many levels below the specified asset. N/A
    cursor query string false Cursor to use for paging through results N/A
    limit query integer(int32) false The maximum number of assets to be returned. N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "name": "string",
            "parentId": 0,
            "description": "string",
            "source": "string",
            "sourceId": "string",
            "id": 0,
            "path": [
              0
            ]
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK A list of assets in breadth first order. AssetDataWithCursorResponse

    Search for assets

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/assets/search \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/assets/search HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/assets/search',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/assets/search',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/assets/search',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/assets/search', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/assets/search")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/assets/search", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/assets/search

    Retrieves a list of assets matching the given criteria. This operation does not support pagination.

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    name query string false Prefix and fuzzy search on name. N/A
    description query string false Prefix and fuzzy search on description. N/A
    query query string false Search on name and description using wildcard search on each of the words (separated by spaces). Retrieves results where at least one word must match. Example: 'some other' N/A
    metadata query string false Filter out assets that do not match these metadata fields and values (case-sensitive). Format is {"key1":"value1","key2":"value2"}. N/A
    assetSubtrees query string false Filter out assets that are not in the subtree rooted at these assets. Format is [12,345,6,7890]. N/A
    limit query integer(int32) false Return up to this many results. Maximum is 1000. Default is 25. Max: 1000
    offset query integer(int32) false Offset from the first result. Sum of limit and offset must not exceed 1000. Default is 0. N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "name": "string",
            "parentId": 0,
            "description": "string",
            "source": "string",
            "sourceId": "string",
            "id": 0,
            "path": [
              0
            ]
          }
        ]
      }
    }
    
    Status Meaning Description Schema
    200 OK Experimental endpoint. Search on assets. AssetDataResponse

    Retrieve an asset

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/assets/{assetId} \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/assets/{assetId} HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/assets/{assetId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/assets/{assetId}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/assets/{assetId}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/assets/{assetId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/assets/{assetId}")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/assets/{assetId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/assets/{assetId}

    Retrieves information about an asset in a certain project given an asset id.

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    assetId path integer(int64) true No description N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "name": "string",
            "parentId": 0,
            "description": "string",
            "source": "string",
            "sourceId": "string",
            "id": 0,
            "path": [
              0
            ]
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Asset matching the id. AssetDataResponse

    Built-in ML

    Endpoints for interacting with built-in ML services.

    getPatternSearchResult

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/builtinml/patternsearch/{jobId} \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/builtinml/patternsearch/{jobId} HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/builtinml/patternsearch/{jobId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/builtinml/patternsearch/{jobId}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/builtinml/patternsearch/{jobId}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/builtinml/patternsearch/{jobId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/builtinml/patternsearch/{jobId}")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/builtinml/patternsearch/{jobId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/builtinml/patternsearch/{jobId}

    Get the result of a pattern search job

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    jobId path integer(int64) true The jobId returned from using patternSearch N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "from": 0,
            "to": 0,
            "score": 0
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK A pattern search response object PatternSearchResponse

    patternSearch

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/builtinml/patternsearch/search \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Api-Key: string' \
      -H 'Accept: string' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/builtinml/patternsearch/search HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    Api-Key: string
    Accept: string
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Api-Key':'string',
      'Accept':'string',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/builtinml/patternsearch/search',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "timeSeriesDataSpec": [
        {
          "timeSeries": [
            {
              "name": "string",
              "aggregates": [],
              "missingDataStrategy": "ffill"
            }
          ],
          "aggregates": [
            "string"
          ],
          "granularity": "string",
          "missingDataStrategy": "ffill",
          "start": "string",
          "end": "string",
          "label": "string"
        }
      ],
      "description": "string",
      "algorithm": "DTW",
      "arguments": {
        "limit": 5,
        "minRange": "string",
        "maxRange": "string"
      }
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Api-Key':'string',
      'Accept':'string',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/builtinml/patternsearch/search',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Api-Key' => 'string',
      'Accept' => 'string',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/builtinml/patternsearch/search',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Api-Key': 'string',
      'Accept': 'string',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/builtinml/patternsearch/search', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .header("Api-Key", "string")
      .header("Accept", "string")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/builtinml/patternsearch/search")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "Api-Key": []string{"string"},
            "Accept": []string{"string"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/builtinml/patternsearch/search", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/builtinml/patternsearch/search

    Search for patterns across groups of timeseries

    Body parameter

    {
      "timeSeriesDataSpec": [
        {
          "timeSeries": [
            {
              "name": "string",
              "aggregates": [],
              "missingDataStrategy": "ffill"
            }
          ],
          "aggregates": [
            "string"
          ],
          "granularity": "string",
          "missingDataStrategy": "ffill",
          "start": "string",
          "end": "string",
          "label": "string"
        }
      ],
      "description": "string",
      "algorithm": "DTW",
      "arguments": {
        "limit": 5,
        "minRange": "string",
        "maxRange": "string"
      }
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    Api-Key header string false No description N/A
    Accept header string false No description N/A
    body body PatternSearchInput false Input data to search on N/A

    Example responses

    200 Response

    {
      "jobId": 0
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Job Id JobIdResponseDTO

    getJobInfo

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/builtinml/jobs/{jobId} \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/builtinml/jobs/{jobId} HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/builtinml/jobs/{jobId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/builtinml/jobs/{jobId}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/builtinml/jobs/{jobId}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/builtinml/jobs/{jobId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/builtinml/jobs/{jobId}")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/builtinml/jobs/{jobId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/builtinml/jobs/{jobId}

    Get information of a job

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    jobId path integer(int64) true JobId to get information from. N/A

    Example responses

    200 Response

    {
      "createdTime": 0,
      "completedTime": 0,
      "description": "string",
      "id": 0,
      "project": "string",
      "service": "string",
      "status": "DONE"
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Job information DataJobInfo

    Events

    Event objects store complex information about multiple assets over a time period. For example, an event can describe two hours of maintenance on a water pump and some associated pipes, or a future time window where the pump is scheduled for inspection. This is in contrast with data points in time series that store single pieces of information about one asset at specific points in time (e.g., temperature measurements).

    An event’s time period is defined by a start time and end time, both millisecond timestamps since the UNIX epoch. The timestamps can be in the future. Events can also be categorized by a type (e.g, “fault”) and a subtype (e.g., “electrical”), both arbitrary strings defined when creating the event. In addition, events can have a text description as well as arbitrary metadata and properties.

    Retrieve multiple events

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/events/byids \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/events/byids HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/events/byids',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "items": [
        0
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/events/byids',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/events/byids',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/events/byids', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/events/byids")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/events/byids", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/events/byids

    Retrieves information about multiple events in the same project. Events are returned in the same order as the ids listed in the query.

    Body parameter

    {
      "items": [
        0
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body DataLong true List of IDs of events to retrieve N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "id": 0,
            "startTime": 0,
            "endTime": 0,
            "description": "string",
            "type": "string",
            "subtype": "string",
            "metadata": {},
            "assetIds": [
              0
            ],
            "source": "string",
            "sourceId": "string",
            "createdTime": 0,
            "lastUpdatedTime": 0
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK List of events matching the ids. EventDataResponse
    400 Bad Request Ids duplicated. ErrorResponse

    Delete events

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/events/delete \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/events/delete HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/events/delete',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "items": [
        0
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/events/delete',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/events/delete',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/events/delete', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/events/delete")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/events/delete", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/events/delete

    Deletes multiple events in the same project.

    Body parameter

    {
      "items": [
        0
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body DataLong true List of event IDs for the events to be deleted. N/A

    Example responses

    200 Response

    {}
    

    Responses

    Status Meaning Description Schema
    200 OK Empty response. EmptyResponse
    400 Bad Request Ids duplicated. ErrorResponse

    Retrieve an event

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/events/{eventId} \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/events/{eventId} HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/events/{eventId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/events/{eventId}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/events/{eventId}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/events/{eventId}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/events/{eventId}")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/events/{eventId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/events/{eventId}

    Retrieves information about an event.

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    eventId path integer(int64) true The event ID. N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "id": 0,
            "startTime": 0,
            "endTime": 0,
            "description": "string",
            "type": "string",
            "subtype": "string",
            "metadata": {},
            "assetIds": [
              0
            ],
            "source": "string",
            "sourceId": "string",
            "createdTime": 0,
            "lastUpdatedTime": 0
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Event matching the id. EventDataResponse

    Search for events

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/events/search \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/events/search HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/events/search',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/events/search',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/events/search',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/events/search', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/events/search")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/events/search", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/events/search

    Retrieves a list of events in the same project matching the given criteria. This operation has limited pagination support with an offset parameter, but does not allow retrieving all events in a project.

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    description query string false Prefix and fuzzy search on description. N/A
    type query string false Filter on type (case-sensitive). N/A
    subtype query string false Filter on subtype (case-sensitive). N/A
    minStartTime query integer(int64) false Filter out events with startTime before this. Format is milliseconds since epoch. N/A
    maxStartTime query integer(int64) false Filter out events with startTime after this. Format is milliseconds since epoch. N/A
    minEndTime query integer(int64) false Filter out events with endTime before this. Format is milliseconds since epoch. N/A
    maxEndTime query integer(int64) false Filter out events with endTime after this. Format is milliseconds since epoch. N/A
    minCreatedTime query integer(int64) false Filter out events with createdTime before this. Format is milliseconds since epoch. N/A
    maxCreatedTime query integer(int64) false Filter out events with createdTime after this. Format is milliseconds since epoch. N/A
    minLastUpdatedTime query integer(int64) false Filter out events with lastUpdatedTime before this. Format is milliseconds since epoch. N/A
    maxLastUpdatedTime query integer(int64) false Filter out events with lastUpdatedTime after this. Format is milliseconds since epoch. N/A
    metadata query string false Filter out events that do not match these metadata fields and values (case-sensitive). Format is {"key1":"value1","key2":"value2"}. N/A
    assetIds query string false Filter out events that are not linked to any of these assets. Format is [12,345,6,7890]. N/A
    assetSubtrees query string false Filter out events that are not linked to assets in the subtree rooted at these assets. Format is [12,345,6,7890]. N/A
    sort query string false Field to be sorted. If not specified, results are sorted by relevance score. startTime,endTime,createdTime,lastUpdatedTime
    dir query string false Sort direction: descending or ascending. Only applicable if sort is specified. Default 'desc'. asc,desc
    limit query integer(int32) false Return up to this many results. Maximum is 1000. Default is 25. Max: 1000
    offset query integer(int32) false Offset from the first result. Sum of limit and offset must not exceed 1000. Default is 0. N/A

    Enumerated Values

    Parameter Value
    sort startTime
    sort endTime
    sort createdTime
    sort lastUpdatedTime
    dir asc
    dir desc

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "id": 0,
            "startTime": 0,
            "endTime": 0,
            "description": "string",
            "type": "string",
            "subtype": "string",
            "metadata": {},
            "assetIds": [
              0
            ],
            "source": "string",
            "sourceId": "string",
            "createdTime": 0,
            "lastUpdatedTime": 0
          }
        ]
      }
    }
    
    Status Meaning Description Schema
    200 OK Experimental endpoint. Search on events. EventDataResponse

    List all events

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/events \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/events HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/events',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/events',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/events',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/events', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/events")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/events", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/events

    Retrieve a list of all events in the same project. This operation supports pagination by cursor. Criteria can be applied to select a subset of events.

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    type query string false Type (class) of event, e.g 'failure'. N/A
    subtype query string false Sub-type of event, e.g 'electrical'. N/A
    assetId query integer(int64) false Return events associated with this assetId. Filtering by assetId disables the parameters 'type', 'subtype', 'hasDescription', 'minStartTime', 'maxStartTime' and 'source'. N/A
    sort query string false Sort descending or ascending. Default 'ASC'. N/A
    cursor query string false Cursor to use for paging through results. N/A
    limit query integer(int32) false Return up to this many results. Maximum is 10000. Default is 25. Max: 10000
    hasDescription query boolean false Return only events that have a textual description. Default null. False gives only those without description. N/A
    minStartTime query integer(int64) false Only return events from after this time. N/A
    maxStartTime query integer(int64) false Only return events from before this time. N/A
    source query string false Returns only events originated from this source. N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "id": 0,
            "startTime": 0,
            "endTime": 0,
            "description": "string",
            "type": "string",
            "subtype": "string",
            "metadata": {},
            "assetIds": [
              0
            ],
            "source": "string",
            "sourceId": "string",
            "createdTime": 0,
            "lastUpdatedTime": 0
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Events matching the query. EventDataWithCursorResponse

    Create events

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/events \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/events HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/events',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "items": [
        {
          "id": 0,
          "startTime": 0,
          "endTime": 0,
          "description": "string",
          "type": "string",
          "subtype": "string",
          "metadata": {},
          "assetIds": [
            0
          ],
          "source": "string",
          "sourceId": "string",
          "createdTime": 0,
          "lastUpdatedTime": 0
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/events',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/events',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/events', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/events")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/events", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/events

    Creates multiple event objects in the same project.

    Body parameter

    {
      "items": [
        {
          "id": 0,
          "startTime": 0,
          "endTime": 0,
          "description": "string",
          "type": "string",
          "subtype": "string",
          "metadata": {},
          "assetIds": [
            0
          ],
          "source": "string",
          "sourceId": "string",
          "createdTime": 0,
          "lastUpdatedTime": 0
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body DataEvent true List of events to be posted. N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "id": 0,
            "startTime": 0,
            "endTime": 0,
            "description": "string",
            "type": "string",
            "subtype": "string",
            "metadata": {},
            "assetIds": [
              0
            ],
            "source": "string",
            "sourceId": "string",
            "createdTime": 0,
            "lastUpdatedTime": 0
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The events that were created. EventDataResponse

    Update events

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/events/update \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/events/update HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/events/update',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "items": [
        {
          "id": 0,
          "startTime": 0,
          "endTime": 0,
          "description": "string",
          "type": "string",
          "subtype": "string",
          "metadata": {},
          "assetIds": [
            0
          ],
          "source": "string",
          "sourceId": "string",
          "createdTime": 0,
          "lastUpdatedTime": 0
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/events/update',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/events/update',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/events/update', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/events/update")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/events/update", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/events/update

    Updates multiple events in the same project. This operation does not support partial updates.

    Body parameter

    {
      "items": [
        {
          "id": 0,
          "startTime": 0,
          "endTime": 0,
          "description": "string",
          "type": "string",
          "subtype": "string",
          "metadata": {},
          "assetIds": [
            0
          ],
          "source": "string",
          "sourceId": "string",
          "createdTime": 0,
          "lastUpdatedTime": 0
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body DataEvent true List of events to be updated. N/A

    Example responses

    200 Response

    {}
    

    Responses

    Status Meaning Description Schema
    200 OK Empty response. EmptyResponse

    Extraction

    Endpoint for managing data extraction. NOTE: This API is experimental and NOT intended for use in production!

    getExtractedRanges

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/extraction/ranges/get \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/extraction/ranges/get HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/extraction/ranges/get',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "items": [
        "string"
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/extraction/ranges/get',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/extraction/ranges/get',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/extraction/ranges/get', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/extraction/ranges/get")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/extraction/ranges/get", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/extraction/ranges/get

    Returns a list of extracted ranges for a list of time series.

    Body parameter

    {
      "items": [
        "string"
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body DataString false The list of tags belonging to the extracted ranges. N/A

    Example responses

    200 Response

    null
    

    Responses

    Status Meaning Description Schema
    200 OK A list of extracted ranges for the time series. RangeResponse

    getTagExtractingRequests

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/extraction/request \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/extraction/request HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/extraction/request',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/extraction/request',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/extraction/request',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/extraction/request', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/extraction/request")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/extraction/request", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/extraction/request

    Query which tags are requested.

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    status query string false Currently not in use. N/A
    limit query integer(int32) false Limit on the number of requests to be returned. N/A
    before query string false Currently not in use. N/A
    after query string false Currently not in use. N/A

    Example responses

    200 Response

    {
      "tagId": "string",
      "status": "string",
      "lastUpdatedMillis": 0
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The requested tags. ExtractionRequest

    requestExtractingTags

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/extraction/request \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/extraction/request HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/extraction/request',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "items": [
        {
          "tagId": "string",
          "status": "string",
          "lastUpdatedMillis": 0
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/extraction/request',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/extraction/request',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/extraction/request', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/extraction/request")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/extraction/request", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/extraction/request

    Request tags to be extracted.

    Body parameter

    {
      "items": [
        {
          "tagId": "string",
          "status": "string",
          "lastUpdatedMillis": 0
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body DataExtractionRequest false List of tags to time series to request extraction from. N/A

    Example responses

    200 Response

    {}
    

    Responses

    Status Meaning Description Schema
    200 OK Empty response. EmptyResponse

    updateExtractedRanges

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/extraction/ranges/update \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/extraction/ranges/update HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/extraction/ranges/update',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "items": [
        {
          "tagId": "string",
          "start": 0,
          "end": 0
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/extraction/ranges/update',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/extraction/ranges/update',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/extraction/ranges/update', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/extraction/ranges/update")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/extraction/ranges/update", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/extraction/ranges/update

    Updates a set of extracted ranges for a list of time series. Throws an exception if there is a gap between the old extracted range for a time series and the range which is added to it.

    Body parameter

    {
      "items": [
        {
          "tagId": "string",
          "start": 0,
          "end": 0
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body DataExtractedRange false Extracted ranges to update the stored extracted ranges. N/A

    Example responses

    200 Response

    {}
    

    Responses

    Status Meaning Description Schema
    200 OK Empty response. EmptyResponse

    Files

    A file stores a sequence of bytes connected to one or more assets. For example, a file can contain a piping and instrumentation diagram (P&IDs) showing how multiple assets are connected.

    Each file is identified by a unique ID that is generated when it is a created, as well as a name and a directory path. File names are limited to 256 bytes, and directory paths to 512. The combination of file name and directory path must be unique within a project.

    Directories in CDP differ from ones in normal file systems; They exist only as string attributes on individual file objects. This means that directories themselves cannot be created, deleted, or moved. There is no particular path separator, and no notion of a directory hierarchy.

    Files are created in two steps; First the metadata is stored in a file object, and then the file contents are uploaded. This means that files can exist in a non-uploaded state.

    Search for files

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/files/search \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/files/search HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/files/search',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/files/search',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/files/search',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/files/search', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/files/search")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/files/search", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/files/search

    Retrieves a list with information about files matching the given criteria. This operation supports limited pagination with the offset parameter, but does not support retrieving all files in a project.

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    name query string false Prefix and fuzzy search on file name. N/A
    directory query string false Filter on directory (case-sensitive). N/A
    type query string false Filter on file type (case-sensitive). N/A
    uploaded query boolean false Filter on upload status. N/A
    minUploadedAt query integer(int64) false Filter out files uploaded before this. Format is milliseconds since epoch. N/A
    maxUploadedAt query integer(int64) false Filter out files uploaded after this. Format is milliseconds since epoch. N/A
    minCreatedTime query integer(int64) false Filter out files with createdTime before this. Format is milliseconds since epoch. N/A
    maxCreatedTime query integer(int64) false Filter out files with createdTime after this. Format is milliseconds since epoch. N/A
    minLastUpdatedTime query integer(int64) false Filter out files with lastUpdatedTime before this. Format is milliseconds since epoch. N/A
    maxLastUpdatedTime query integer(int64) false Filter out files with lastUpdatedTime after this. Format is milliseconds since epoch. N/A
    metadata query string false Filter out files that do not match these metadata fields and values (case-sensitive). Format is {"key1":"value1","key2":"value2"}. N/A
    assetIds query string false Filter out files that are not linked to any of these assets. Format is [12,345,6,7890]. N/A
    assetSubtrees query string false Filter out files that are not linked to assets in the subtree rooted at these assets. Format is [12,345,6,7890]. N/A
    sort query string false Field to be sorted. If not specified, results are sorted by relevance score. createdTime,lastUpdatedTime
    dir query string false Sort direction: descending or ascending. Only applicable if sort is specified. Default 'desc'. asc,desc
    limit query integer(int32) false Return up to this many results. Maximum is 1000. Default is 25. Max: 1000
    offset query integer(int32) false Offset from the first result. Sum of limit and offset must not exceed 1000. Default is 0. N/A

    Enumerated Values

    Parameter Value
    sort createdTime
    sort lastUpdatedTime
    dir asc
    dir desc

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "id": 0,
            "fileName": "string",
            "directory": "string",
            "source": "string",
            "sourceId": "string",
            "fileType": "string",
            "assetIds": [
              0
            ],
            "uploadedAt": 0,
            "createdTime": 0,
            "lastUpdatedTime": 0,
            "isUploaded": true
          }
        ]
      }
    }
    
    Status Meaning Description Schema
    200 OK Experimental endpoint. Search on files. FileResponse

    Update multiple files’ metadata

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/files/update \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/files/update HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/files/update',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "items": [
        {
          "id": 0,
          "fileName": {
            "set": "string",
            "setNull": true
          },
          "directory": {
            "set": "string",
            "setNull": true
          },
          "fileType": {
            "set": "string",
            "setNull": true
          },
          "source": {
            "set": "string",
            "setNull": true
          },
          "sourceId": {
            "set": "string",
            "setNull": true
          },
          "metadata": {
            "set": {},
            "setNull": true
          },
          "assetIds": {
            "add": [
              0
            ],
            "remove": [
              0
            ],
            "set": [
              0
            ]
          }
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/files/update',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/files/update',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/files/update', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/files/update")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/files/update", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/files/update

    Updates information about multiple files in the same project. This operation does not alter file contents, and partial updates are supported.

    For primitive fields (String, Long, Int), use 'set': 'value' to update value; use 'setNull': true to set that field to null.

    For the Json Array field (e.g. assetIds), use 'set': [value1, value2] to update value; use 'add': [v1, v2] to add values to current list of values; use 'remove': [v1, v2] to remove these values from current list of values if exists.

    Body parameter

    {
      "items": [
        {
          "id": 0,
          "fileName": {
            "set": "string",
            "setNull": true
          },
          "directory": {
            "set": "string",
            "setNull": true
          },
          "fileType": {
            "set": "string",
            "setNull": true
          },
          "source": {
            "set": "string",
            "setNull": true
          },
          "sourceId": {
            "set": "string",
            "setNull": true
          },
          "metadata": {
            "set": {},
            "setNull": true
          },
          "assetIds": {
            "add": [
              0
            ],
            "remove": [
              0
            ],
            "set": [
              0
            ]
          }
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body DataFileChange true List of changes. N/A

    Example responses

    200 Response

    {}
    

    Responses

    Status Meaning Description Schema
    200 OK Empty response. EmptyResponse
    400 Bad Request Ids duplicated. ErrorResponse

    Upload a file

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/files/initupload \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'X-Upload-Content-Type: string' \
      -H 'Origin: string' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/files/initupload HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    X-Upload-Content-Type: string
    Origin: string
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'X-Upload-Content-Type':'string',
      'Origin':'string',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/files/initupload',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "id": 0,
      "fileName": "string",
      "directory": "string",
      "source": "string",
      "sourceId": "string",
      "fileType": "string",
      "assetIds": [
        0
      ],
      "uploadedAt": 0,
      "createdTime": 0,
      "lastUpdatedTime": 0,
      "isUploaded": true
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'X-Upload-Content-Type':'string',
      'Origin':'string',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/files/initupload',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'X-Upload-Content-Type' => 'string',
      'Origin' => 'string',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/files/initupload',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'X-Upload-Content-Type': 'string',
      'Origin': 'string',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/files/initupload', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .header("X-Upload-Content-Type", "string")
      .header("Origin", "string")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/files/initupload")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "X-Upload-Content-Type": []string{"string"},
            "Origin": []string{"string"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/files/initupload", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/files/initupload

    Stores the given metadata in a file object and returns an URL for uploading the file contents. Immediately after this operation, the client must issue a PUT request to the returned URL with the contents of the file. The upload link can only be used once and will expire if not used.

    File uploads can be resumable (see https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload). Resumable links (the default) expire after one week. Non-resumable links expire after 30 seconds.

    Body parameter

    {
      "id": 0,
      "fileName": "string",
      "directory": "string",
      "source": "string",
      "sourceId": "string",
      "fileType": "string",
      "assetIds": [
        0
      ],
      "uploadedAt": 0,
      "createdTime": 0,
      "lastUpdatedTime": 0,
      "isUploaded": true
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    X-Upload-Content-Type header string false The content type of the file to be uploaded. N/A
    Origin header string false Origin for Cross Origin Resource Sharing. This field is required in resumable upload if there is a Cross Origin issue N/A
    resumable query boolean false Whether to generate a resumable URL or not. Default is true. N/A
    overwrite query boolean false Whether to overwrite existing data if duplicate or not. Default is false. If true, metadata will be overwritten; actual file will be overwritten after successfully uploading. If there is no successful upload, current file will not change. File-Asset mappings only change if explicitly stated in assetIds field of json body. DO NOT set assetIds if want to keep current file-asset mappings. N/A
    body body FileInfo true Specify the content-type of upload file. In case of non-resumable upload, when setting content-type of file, the client MUST provide HTTP header 'Content-Type' (in upload request) set to the same value. N/A

    Example responses

    200 Response

    {
      "URLData": {
        "fileId": 0,
        "uploadURL": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Upload URL and file ID. URLResponse

    Delete multiple files

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/files/delete \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/files/delete HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/files/delete',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "items": [
        0
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/files/delete',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/files/delete',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/files/delete', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/files/delete")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/files/delete", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/files/delete

    Deletes the files with the given ids.

    Body parameter

    {
      "items": [
        0
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body DataLong true List of IDs of files to delete. N/A

    Example responses

    200 Response

    {
      "data": {
        "property1": [
          0
        ],
        "property2": [
          0
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK The name of the deleted files and the files that failed to delete. DeleteFilesResponse
    400 Bad Request Ids duplicated. ErrorResponse

    List all files

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/files \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/files HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/files',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/files',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/files',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/files', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/files")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/files", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/files

    Retrieves a list with information about all files in a project. Criteria can be supplied to select a subset of files. This operation supports pagination with cursors.

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    assetId query integer(int64) false Returns all files associated with this assetId. N/A
    dir query string false Directory to list files from. N/A
    name query string false List all files with this name. N/A
    type query string false Type of files to list. N/A
    source query string false List files coming from this source. N/A
    isUploaded query boolean false List only uploaded files if true. If false, list only other files. If not set, list all files without considering whether they are uploaded or not. N/A
    limit query integer(int32) false Return up to this many results. Default is 25. N/A
    sort query string false Sort descending or ascending. Default 'DESC' - Show recently uploaded files first. ASC,DESC
    cursor query string false Cursor to use for paging through results. N/A

    Enumerated Values

    Parameter Value
    sort ASC
    sort DESC

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "id": 0,
            "fileName": "string",
            "directory": "string",
            "source": "string",
            "sourceId": "string",
            "fileType": "string",
            "assetIds": [
              0
            ],
            "uploadedAt": 0,
            "createdTime": 0,
            "lastUpdatedTime": 0,
            "isUploaded": true
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK A list of files with file info and cursors. FileWithCursorResponse

    Replace multiple files’ metadata

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/files \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/files HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/files',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "items": [
        {
          "id": 0,
          "fileName": "string",
          "directory": "string",
          "source": "string",
          "sourceId": "string",
          "fileType": "string",
          "assetIds": [
            0
          ],
          "uploadedAt": 0,
          "createdTime": 0,
          "lastUpdatedTime": 0,
          "isUploaded": true
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/files',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/files',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/files', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/files")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/files", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/files

    Updates information about multiple files. This operation does not support partial updates, but replaces all fields in the file object.

    Body parameter

    {
      "items": [
        {
          "id": 0,
          "fileName": "string",
          "directory": "string",
          "source": "string",
          "sourceId": "string",
          "fileType": "string",
          "assetIds": [
            0
          ],
          "uploadedAt": 0,
          "createdTime": 0,
          "lastUpdatedTime": 0,
          "isUploaded": true
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body DataFileInfo false List of file IDs and corresponding meta data and assetIds. N/A

    Example responses

    200 Response

    {}
    

    Responses

    Status Meaning Description Schema
    200 OK Empty response. EmptyResponse
    400 Bad Request Ids duplicated. ErrorResponse

    Retrieve multiple files’ metadata

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/files/byids \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/files/byids HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/files/byids',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "items": [
        0
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/files/byids',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/files/byids',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/files/byids', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/files/byids")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/files/byids", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/files/byids

    Retrieves information about multiple files in the same project. Results are returned in the same order as in the query. This operation does not return file contents.

    Body parameter

    {
      "items": [
        0
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body DataLong true List of IDs of files to retrieve N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "id": 0,
            "fileName": "string",
            "directory": "string",
            "source": "string",
            "sourceId": "string",
            "fileType": "string",
            "assetIds": [
              0
            ],
            "uploadedAt": 0,
            "createdTime": 0,
            "lastUpdatedTime": 0,
            "isUploaded": true
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK List of files matching the ids. FileResponse
    400 Bad Request Ids duplicated. ErrorResponse

    Update a file’s metadata

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/files/{id}/update \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/files/{id}/update HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/files/{id}/update',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "id": 0,
      "fileName": {
        "set": "string",
        "setNull": true
      },
      "directory": {
        "set": "string",
        "setNull": true
      },
      "fileType": {
        "set": "string",
        "setNull": true
      },
      "source": {
        "set": "string",
        "setNull": true
      },
      "sourceId": {
        "set": "string",
        "setNull": true
      },
      "metadata": {
        "set": {},
        "setNull": true
      },
      "assetIds": {
        "add": [
          0
        ],
        "remove": [
          0
        ],
        "set": [
          0
        ]
      }
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/files/{id}/update',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/files/{id}/update',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/files/{id}/update', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/files/{id}/update")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/files/{id}/update", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/files/{id}/update

    Update information about a file. This operation supports partial updates; Fields omitted from the query are left unchanged.

    For primitive fields (String, Long, Int), use 'set': 'value' to update value; use 'setNull': true to set that field to null.

    For the Json Array field (e.g. assetIds), use 'set': [value1, value2] to update value; use 'add': [v1, v2] to add values to current list of values; use 'remove': [v1, v2] to remove these values from current list of values if exists.

    Body parameter

    {
      "id": 0,
      "fileName": {
        "set": "string",
        "setNull": true
      },
      "directory": {
        "set": "string",
        "setNull": true
      },
      "fileType": {
        "set": "string",
        "setNull": true
      },
      "source": {
        "set": "string",
        "setNull": true
      },
      "sourceId": {
        "set": "string",
        "setNull": true
      },
      "metadata": {
        "set": {},
        "setNull": true
      },
      "assetIds": {
        "add": [
          0
        ],
        "remove": [
          0
        ],
        "set": [
          0
        ]
      }
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    id path integer(int64) true Id of the file N/A
    body body FileChange false content of changes N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "id": 0,
            "fileName": "string",
            "directory": "string",
            "source": "string",
            "sourceId": "string",
            "fileType": "string",
            "assetIds": [
              0
            ],
            "uploadedAt": 0,
            "createdTime": 0,
            "lastUpdatedTime": 0,
            "isUploaded": true
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Corresponding file after applying the update. FileResponse
    400 Bad Request Ids duplicated. ErrorResponse
    404 Not Found Ids not found. IdsNotFoundResponse

    Retrieve a file’s metadata

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/files/{id} \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/files/{id} HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/files/{id}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/files/{id}',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/files/{id}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/files/{id}', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/files/{id}")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/files/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/files/{id}

    Retrieves information about a file object. This operation does not return file contents.

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    id path integer(int64) true Id of the file. N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "id": 0,
            "fileName": "string",
            "directory": "string",
            "source": "string",
            "sourceId": "string",
            "fileType": "string",
            "assetIds": [
              0
            ],
            "uploadedAt": 0,
            "createdTime": 0,
            "lastUpdatedTime": 0,
            "isUploaded": true
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Get file information FileResponse

    Download a file’s contents

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/files/{id}/downloadlink \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/files/{id}/downloadlink HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/files/{id}/downloadlink',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/files/{id}/downloadlink',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/files/{id}/downloadlink',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/files/{id}/downloadlink', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/files/{id}/downloadlink")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/files/{id}/downloadlink", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/files/{id}/downloadlink

    Returns a download link for downloading the contents of a file. After getting the download link, the client then has to issue a GET request to the returned URL which will respond with the contents of the file. The link will expire after 30 seconds.

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    id path integer(int64) true Id of the file to download. N/A

    Example responses

    200 Response

    {
      "data": "string"
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Download link. SingleStringResponse

    Groups

    Manage security groups for a specific project.

    getUsersForGroup

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/groups/{groupId}/users \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/groups/{groupId}/users HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/groups/{groupId}/users',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/groups/{groupId}/users',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/groups/{groupId}/users',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/groups/{groupId}/users', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/groups/{groupId}/users")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/groups/{groupId}/users", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/groups/{groupId}/users

    Get a list of users for a security group.

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    groupId path integer(int64) true No description N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "uniqueName": "string",
            "groups": [
              0
            ],
            "id": 0,
            "isDeleted": true,
            "deletedTime": 0
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK A list of users. UserResponse

    addUsersToGroup

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/groups/{groupId}/users \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/groups/{groupId}/users HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/groups/{groupId}/users',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "items": [
        {
          "id": 0
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/groups/{groupId}/users',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/groups/{groupId}/users',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/groups/{groupId}/users', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/groups/{groupId}/users")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/groups/{groupId}/users", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/groups/{groupId}/users

    Add list of users to a security group.

    Body parameter

    {
      "items": [
        {
          "id": 0
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    groupId path integer(int64) true No description N/A
    body body DataUserId true List of users to add N/A

    Example responses

    Responses

    Status Meaning Description Schema
    default Default default response None

    Response Schema

    Status Code default

    Name Type Required Description

    getGroups

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.5/projects/{project}/groups \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    GET https://api.cognitedata.com/api/0.5/projects/{project}/groups HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/groups',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/groups',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.5/projects/{project}/groups',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.5/projects/{project}/groups', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/groups")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.5/projects/{project}/groups", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.5/projects/{project}/groups

    Get a list of security groups.

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    all query boolean false Whether to get all groups, only available to admin users. N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "name": "string",
            "source": "string",
            "sourceId": "string",
            "permissions": {
              "accessTypes": [],
              "assetIds": [],
              "securityCategoryIds": []
            },
            "id": 0,
            "isDeleted": true,
            "deletedTime": 0
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK A list of security groups. GroupResponse

    createGroups

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/groups \
      -H 'Content-Type: application/json' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/groups HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/groups',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "items": [
        {
          "name": "string",
          "source": "string",
          "sourceId": "string",
          "permissions": {
            "accessTypes": [
              "READ"
            ],
            "assetIds": [
              0
            ],
            "securityCategoryIds": [
              0
            ]
          }
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/groups',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/groups',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/groups', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/groups")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/groups", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/groups

    Create new groups.

    Body parameter

    {
      "items": [
        {
          "name": "string",
          "source": "string",
          "sourceId": "string",
          "permissions": {
            "accessTypes": [
              "READ"
            ],
            "assetIds": [
              0
            ],
            "securityCategoryIds": [
              0
            ]
          }
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body DataGroupSpec true List of groups to create. N/A

    Responses

    Status Meaning Description Schema
    200 OK A list of the created groups. None

    deleteGroups

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/groups/delete \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/groups/delete HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/groups/delete',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "items": [
        0
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/groups/delete',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/groups/delete',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/groups/delete', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/groups/delete")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/groups/delete", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/groups/delete

    Delete groups.

    Body parameter

    {
      "items": [
        0
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body DataLong true List of group ids to delete N/A

    Example responses

    200 Response

    {}
    

    Responses

    Status Meaning Description Schema
    200 OK Empty response. EmptyResponse

    removeUsersFromGroup

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.5/projects/{project}/groups/{groupId}/users/remove \
      -H 'Content-Type: application/json' \
      -H 'api-key: API_KEY' \
    
    
    POST https://api.cognitedata.com/api/0.5/projects/{project}/groups/{groupId}/users/remove HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.5/projects/{project}/groups/{groupId}/users/remove',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "items": [
        0
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.5/projects/{project}/groups/{groupId}/users/remove',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.5/projects/{project}/groups/{groupId}/users/remove',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.5/projects/{project}/groups/{groupId}/users/remove', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.5/projects/{project}/groups/{groupId}/users/remove")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.5/projects/{project}/groups/{groupId}/users/remove", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.5/projects/{project}/groups/{groupId}/users/remove

    Remove list of users from a security group.

    Body parameter

    {
      "items": [
        0
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    groupId path integer(int64) true No description N/A
    body body DataLong true List of user ids to remove N/A

    Responses

    Status Meaning Description Schema
    200 OK Empty response. None

    Login

    User / client authentication.

    login

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/login \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
    
    
    POST https://api.cognitedata.com/login HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Accept: application/json
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/login',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    const inputBody = '{
      "apiKey": "string"
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json'
    
    };
    
    fetch('https://api.cognitedata.com/login',
    {
      method: 'POST',
      body: inputBody,
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/login',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json'
    }
    
    r = requests.post('https://api.cognitedata.com/login', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    String json = <body parameter>;
    RequestBody body = RequestBody.create(MediaType.get("application/json; charset=utf-8"), json);
    
    Request request = new Request.Builder()
      .header("Content-Type", "application/json")
      .header("Accept", "application/json")
      .url("https://api.cognitedata.com/login")
      .post(body)
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Content-Type": []string{"application/json"},
            "Accept": []string{"application/json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/login", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /login

    Post credentials to log in.

    Body parameter

    {
      "apiKey": "string"
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    body body LoginRequest false The login request. N/A

    Example responses

    200 Response

    {
      "LoginStatus": {
        "user": "string",
        "loggedIn": true,
        "project": "string",
        "projectId": 0
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Login status. LoginStatusResponse

    status

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/login/status \
      -H 'Accept: application/json' \
    
    
    GET https://api.cognitedata.com/login/status HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/login/status',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json'
    
    };
    
    fetch('https://api.cognitedata.com/login/status',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/login/status',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
    
    r = requests.get('https://api.cognitedata.com/login/status', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .url("https://api.cognitedata.com/login/status")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/login/status", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /login/status

    Check whether you are logged in.

    Example responses

    200 Response

    {
      "LoginStatus": {
        "user": "string",
        "loggedIn": true,
        "project": "string",
        "projectId": 0
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Login status. LoginStatusResponse

    getTokenStatus

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/login/token \
      -H 'Accept: application/json' \
    
    
    GET https://api.cognitedata.com/login/token HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/login/token',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json'
    
    };
    
    fetch('https://api.cognitedata.com/login/token',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/login/token',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
    
    r = requests.get('https://api.cognitedata.com/login/token', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .url("https://api.cognitedata.com/login/token")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/login/token", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /login/token

    Checks whether a JWT is valid.

    Parameters

    Parameter In Type Required Description Restrictions
    token query string false No description N/A

    Example responses

    200 Response

    {
      "TokenStatus": {
        "token": "string",
        "valid": true,
        "expired": true
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Returns information on whether the token is valid. SingleTokenStatusDTOResponse

    url

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/login/url \
      -H 'Accept: application/json' \
    
    
    GET https://api.cognitedata.com/login/url HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/login/url',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json'
    
    };
    
    fetch('https://api.cognitedata.com/login/url',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/login/url',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
    
    r = requests.get('https://api.cognitedata.com/login/url', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .url("https://api.cognitedata.com/login/url")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/login/url", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /login/url

    Get login url of given project.

    Parameters

    Parameter In Type Required Description Restrictions
    project query string false The project to login to. N/A
    redirectUrl query string false The url to send the user to after the login is successful. N/A
    errorRedirectUrl query string false The url to send the user to if the login fails or is aborted. N/A

    Example responses

    200 Response

    {
      "LoginUrl": {
        "url": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Login URL. LoginUrlResponse

    Logout

    User / client session invalidation.

    logout

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/logout \
      -H 'Accept: application/json' \
    
    
    GET https://api.cognitedata.com/logout HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/logout',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const fetch = require('node-fetch');
    
    const headers = {
      'Accept':'application/json'
    
    };
    
    fetch('https://api.cognitedata.com/logout',
    {
      method: 'GET',
    
      headers: headers
    })
    .then(function(res) {
        return res.json();
    }).then(function(body) {
        console.log(body);
    });
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Accept' => 'application/json'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/logout',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
    
    r = requests.get('https://api.cognitedata.com/logout', params={
    
    }, headers = headers)
    
    print r.json()
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .header("Accept", "application/json")
      .url("https://api.cognitedata.com/logout")
      .build();
    
    Response response = client.newCall(request).execute();
    System.out.println(response.body().string());
    
    package main
    
    import (
           "bytes"
           "net/http"
    )
    
    func main() {
    
        headers := map[string][]string{
            "Accept": []string{"application/json"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/logout",