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

    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.4/projects/{project}/3d/models \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    GET https://api.cognitedata.com/api/0.4/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.4/projects/{project}/3d/models',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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.4/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.4/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.4/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.4/projects/{project}/3d/models", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

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

    Returns all of the model 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.4/projects/{project}/3d/models \
      -H 'Content-Type: */*' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/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.4/projects/{project}/3d/models',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = 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.4/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.4/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.4/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.4/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.4/projects/{project}/3d/models", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.4/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.4/projects/{project}/3d/models/{modelId}/revisions \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    GET https://api.cognitedata.com/api/0.4/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.4/projects/{project}/3d/models/{modelId}/revisions',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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.4/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.4/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.4/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.4/projects/{project}/3d/models/{modelId}/revisions", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.4/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,
            "inputSource": {
              "fileId": 0
            },
            "createdTime": 0,
            "metadata": {},
            "extendedMetadata": {
              "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.4/projects/{project}/3d/models/{modelId}/revisions \
      -H 'Content-Type: */*' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/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.4/projects/{project}/3d/models/{modelId}/revisions',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = 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.4/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.4/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.4/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.4/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.4/projects/{project}/3d/models/{modelId}/revisions", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.4/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,
            "inputSource": {
              "fileId": 0
            },
            "createdTime": 0,
            "metadata": {},
            "extendedMetadata": {
              "numPolygon": 0,
              "numVertices": 0,
              "version": 0
            },
            "statuses": [
              null
            ]
          }
        ]
      }
    }
    

    Responses

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

    getRevisionNodes

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.4/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    GET https://api.cognitedata.com/api/0.4/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.4/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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.4/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.4/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.4/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.4/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.4/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": {},
            "geometry": {
              "id": 0,
              "type": "string",
              "files": {},
              "metadata": {},
              "primitiveInfo": {}
            }
          }
        ]
      }
    }
    

    Responses

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

    getRevisionNodeById

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.4/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes/{nodeId} \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    GET https://api.cognitedata.com/api/0.4/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.4/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes/{nodeId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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.4/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.4/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.4/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.4/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes/{nodeId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.4/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": {},
            "geometry": {
              "id": 0,
              "type": "string",
              "files": {},
              "metadata": {},
              "primitiveInfo": {}
            }
          }
        ]
      }
    }
    

    Responses

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

    getRevisionNodeAssetsInfo

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.4/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes/{nodeId}/assets \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    GET https://api.cognitedata.com/api/0.4/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.4/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/nodes/{nodeId}/assets',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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.4/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.4/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.4/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.4/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.4/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": {},
            "geometry": {
              "id": 0,
              "type": "string",
              "files": {},
              "metadata": {},
              "primitiveInfo": {}
            }
          }
        ]
      }
    }
    

    Responses

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

    getGeometryFile

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.4/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/files/{fileId} \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    GET https://api.cognitedata.com/api/0.4/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/files/{fileId} 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.4/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/files/{fileId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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 = {
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.4/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/files/{fileId}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.4/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("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.4/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{
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.4/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/files/{fileId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.4/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

    Responses

    Status Meaning Description Schema
    default Default default response None

    insertNodeAssetMapping

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.4/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/assets \
      -H 'Content-Type: */*' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/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.4/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/assets',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "mappings": {
        "property1": "string",
        "property2": "string"
      }
    }';
    const headers = {
      'Content-Type':'*/*',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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.4/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.4/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.4/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.4/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/assets", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.4/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

    getNodesFromAssetId

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.4/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/assets/{assetId} \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    GET https://api.cognitedata.com/api/0.4/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.4/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/assets/{assetId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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.4/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.4/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.4/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.4/projects/{project}/3d/models/{modelId}/revisions/{revisionId}/assets/{assetId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.4/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

    getModelById

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.4/projects/{project}/3d/models/{modelId} \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    GET https://api.cognitedata.com/api/0.4/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.4/projects/{project}/3d/models/{modelId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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.4/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.4/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.4/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.4/projects/{project}/3d/models/{modelId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.4/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

    getRevisionById

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.4/projects/{project}/3d/models/{modelId}/revisions/{revisionId} \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    GET https://api.cognitedata.com/api/0.4/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.4/projects/{project}/3d/models/{modelId}/revisions/{revisionId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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.4/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.4/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.4/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.4/projects/{project}/3d/models/{modelId}/revisions/{revisionId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.4/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,
      "inputSource": {
        "fileId": 0
      },
      "createdTime": 0,
      "metadata": {},
      "extendedMetadata": {
        "numPolygon": 0,
        "numVertices": 0,
        "version": 0
      },
      "statuses": [
        null
      ]
    }
    

    Responses

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

    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.4/projects/{project}/token \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/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.4/projects/{project}/token',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = 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.4/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.4/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.4/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.4/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.4/projects/{project}/token", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.4/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

    {
      "data": {
        "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.4/projects/{project}/apikeys \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    GET https://api.cognitedata.com/api/0.4/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.4/projects/{project}/apikeys',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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.4/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.4/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.4/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.4/projects/{project}/apikeys", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

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

    Get 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.4/projects/{project}/apikeys \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/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.4/projects/{project}/apikeys',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = 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.4/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.4/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.4/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.4/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.4/projects/{project}/apikeys", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.4/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.4/projects/{project}/apikeys/delete \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/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.4/projects/{project}/apikeys/delete',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = 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.4/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.4/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.4/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.4/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.4/projects/{project}/apikeys/delete", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.4/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

    Endpoint for managing assets

    getAssetSubtree

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.4/projects/{project}/assets/{assetId} \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    GET https://api.cognitedata.com/api/0.4/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.4/projects/{project}/assets/{assetId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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.4/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.4/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.4/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.4/projects/{project}/assets/{assetId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

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

    Returns a list of assets in breadth first order

    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",
            "metadata": {},
            "source": "string",
            "sourceId": "string",
            "id": 0,
            "path": [
              0
            ]
          }
        ]
      }
    }
    

    Responses

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

    getAssets

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.4/projects/{project}/assets \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    GET https://api.cognitedata.com/api/0.4/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.4/projects/{project}/assets',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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.4/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.4/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.4/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.4/projects/{project}/assets", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

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

    Returns a list of assets in lexicographic order

    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",
            "metadata": {},
            "source": "string",
            "sourceId": "string",
            "id": 0,
            "path": [
              0
            ]
          }
        ]
      }
    }
    

    Responses

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

    putAssets

    Code samples

    # You can also use wget
    curl -X PUT https://api.cognitedata.com/api/0.4/projects/{project}/assets \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    PUT https://api.cognitedata.com/api/0.4/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.4/projects/{project}/assets',
      method: 'put',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "items": [
        {
          "name": "string",
          "parentId": 0,
          "description": "string",
          "metadata": {},
          "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.4/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.4/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.4/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.4/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.4/projects/{project}/assets", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

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

    Update a list of assets

    Body parameter

    {
      "items": [
        {
          "name": "string",
          "parentId": 0,
          "description": "string",
          "metadata": {},
          "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 false 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
    404 Not Found Ids not found. IdsNotFoundResponse

    postAssets

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.4/projects/{project}/assets \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/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.4/projects/{project}/assets',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = 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.4/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.4/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.4/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.4/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.4/projects/{project}/assets", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

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

    Create new assets

    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 false List of assets to create N/A

    Example responses

    200 Response

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

    Responses

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

    deleteAssets

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.4/projects/{project}/assets/delete \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/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.4/projects/{project}/assets/delete',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = 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.4/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.4/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.4/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.4/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.4/projects/{project}/assets/delete", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

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

    Delete sub-trees of assets identified by root node ID

    Body parameter

    {
      "items": [
        0
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body DataLong false 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
    404 Not Found Ids not found. IdsNotFoundResponse

    Built-in ML

    Endpoints for interacting with built-in ML services.

    getJobInfo

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.4/projects/{project}/builtinml/jobs/{jobId} \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    GET https://api.cognitedata.com/api/0.4/projects/{project}/builtinml/jobs/{jobId} 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.4/projects/{project}/builtinml/jobs/{jobId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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 = {
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.4/projects/{project}/builtinml/jobs/{jobId}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.4/projects/{project}/builtinml/jobs/{jobId}', 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.4/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{
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.4/projects/{project}/builtinml/jobs/{jobId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.4/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 No description N/A

    Responses

    Status Meaning Description Schema
    default Default default response None

    patternSearch

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.4/projects/{project}/builtinml/patternsearch/search \
      -H 'Content-Type: application/json' \
      -H 'Api-Key: string' \
      -H 'Accept: string' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/projects/{project}/builtinml/patternsearch/search HTTP/1.1
    Host: api.cognitedata.com
    Content-Type: application/json
    Api-Key: string
    Accept: string
    api-key: API_KEY
    
    
    var headers = {
      'Content-Type':'application/json',
      'Api-Key':'string',
      'Accept':'string',
      'api-key':'API_KEY'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/api/0.4/projects/{project}/builtinml/patternsearch/search',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = 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": "SAX",
      "arguments": {
        "limit": 5,
        "modes": "pattern",
        "minRange": "string",
        "maxRange": "string"
      }
    }';
    const headers = {
      'Content-Type':'application/json',
      'Api-Key':'string',
      'Accept':'string',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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',
      'Api-Key' => 'string',
      'Accept' => 'string',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.4/projects/{project}/builtinml/patternsearch/search',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Content-Type': 'application/json',
      'Api-Key': 'string',
      'Accept': 'string',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.4/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("Api-Key", "string")
      .header("Accept", "string")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.4/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"},
            "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.4/projects/{project}/builtinml/patternsearch/search", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.4/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": "SAX",
      "arguments": {
        "limit": 5,
        "modes": "pattern",
        "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

    Responses

    Status Meaning Description Schema
    default Default default response None

    getPatternSearchResult

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.4/projects/{project}/builtinml/patternsearch/{jobId} \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    GET https://api.cognitedata.com/api/0.4/projects/{project}/builtinml/patternsearch/{jobId} 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.4/projects/{project}/builtinml/patternsearch/{jobId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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 = {
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.get 'https://api.cognitedata.com/api/0.4/projects/{project}/builtinml/patternsearch/{jobId}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'api-key': 'API_KEY'
    }
    
    r = requests.get('https://api.cognitedata.com/api/0.4/projects/{project}/builtinml/patternsearch/{jobId}', 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.4/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{
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("GET", "https://api.cognitedata.com/api/0.4/projects/{project}/builtinml/patternsearch/{jobId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.4/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 No description N/A

    Responses

    Status Meaning Description Schema
    default Default default response None

    Cloud Storage

    Endpoint for managing files.

    deleteFiles

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.4/projects/{project}/storage/delete \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/projects/{project}/storage/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.4/projects/{project}/storage/delete',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = 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.4/projects/{project}/storage/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.4/projects/{project}/storage/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.4/projects/{project}/storage/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.4/projects/{project}/storage/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.4/projects/{project}/storage/delete", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.4/projects/{project}/storage/delete

    Delete a list of files by providing file 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

    getFileInfo

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.4/projects/{project}/storage/{id}/info \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    GET https://api.cognitedata.com/api/0.4/projects/{project}/storage/{id}/info 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.4/projects/{project}/storage/{id}/info',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/projects/{project}/storage/{id}/info',
    {
      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.4/projects/{project}/storage/{id}/info',
      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.4/projects/{project}/storage/{id}/info', 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.4/projects/{project}/storage/{id}/info")
      .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.4/projects/{project}/storage/{id}/info", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.4/projects/{project}/storage/{id}/info

    Get information of a file.

    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": {
        "id": 0,
        "fileName": "string",
        "directory": "string",
        "source": "string",
        "fileType": "string",
        "metadata": {
          "property1": "string",
          "property2": "string"
        },
        "tagIds": [
          "string"
        ],
        "uploaded": true,
        "uploadedAt": 0
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Get file information FileInfoResponse

    getFileInfos

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.4/projects/{project}/storage \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    GET https://api.cognitedata.com/api/0.4/projects/{project}/storage 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.4/projects/{project}/storage',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/projects/{project}/storage',
    {
      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.4/projects/{project}/storage',
      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.4/projects/{project}/storage', 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.4/projects/{project}/storage")
      .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.4/projects/{project}/storage", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.4/projects/{project}/storage

    Get list of files matching query.

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    tagId query string false Returns all files associated with this tagId. 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",
            "fileType": "string",
            "metadata": {
              "property1": "string",
              "property2": "string"
            },
            "tagIds": [
              "string"
            ],
            "uploaded": true,
            "uploadedAt": 0
          }
        ]
      }
    }
    

    Responses

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

    updateTags

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.4/projects/{project}/storage \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/projects/{project}/storage 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.4/projects/{project}/storage',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "items": [
        {
          "id": 0,
          "fileName": "string",
          "directory": "string",
          "source": "string",
          "fileType": "string",
          "metadata": {
            "property1": "string",
            "property2": "string"
          },
          "tagIds": [
            "string"
          ],
          "uploaded": true,
          "uploadedAt": 0
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/projects/{project}/storage',
    {
      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.4/projects/{project}/storage',
      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.4/projects/{project}/storage', 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.4/projects/{project}/storage")
      .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.4/projects/{project}/storage", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.4/projects/{project}/storage

    Update tags associated with files.

    Body parameter

    {
      "items": [
        {
          "id": 0,
          "fileName": "string",
          "directory": "string",
          "source": "string",
          "fileType": "string",
          "metadata": {
            "property1": "string",
            "property2": "string"
          },
          "tagIds": [
            "string"
          ],
          "uploaded": true,
          "uploadedAt": 0
        }
      ]
    }
    

    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 tags. N/A

    Example responses

    200 Response

    {}
    

    Responses

    Status Meaning Description Schema
    200 OK Empty response. EmptyResponse

    initiateUploadSession

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.4/projects/{project}/storage/metadata \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'X-Upload-Content-Type: string' \
      -H 'Origin: string' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/projects/{project}/storage/metadata 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.4/projects/{project}/storage/metadata',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "id": 0,
      "fileName": "string",
      "directory": "string",
      "source": "string",
      "fileType": "string",
      "metadata": {
        "property1": "string",
        "property2": "string"
      },
      "tagIds": [
        "string"
      ],
      "uploaded": true,
      "uploadedAt": 0
    }';
    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.4/projects/{project}/storage/metadata',
    {
      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.4/projects/{project}/storage/metadata',
      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.4/projects/{project}/storage/metadata', 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.4/projects/{project}/storage/metadata")
      .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.4/projects/{project}/storage/metadata", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.4/projects/{project}/storage/metadata

    Upload metadata about a file and get an upload link. The link will expire after 30 seconds if not resumable. A resumable upload link is default. Such a link is one-time use and expires after one week. For more information, check this link: https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload.Use PUT request to upload file with the link returned.

    Body parameter

    {
      "id": 0,
      "fileName": "string",
      "directory": "string",
      "source": "string",
      "fileType": "string",
      "metadata": {
        "property1": "string",
        "property2": "string"
      },
      "tagIds": [
        "string"
      ],
      "uploaded": true,
      "uploadedAt": 0
    }
    

    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-tag mappings only change if explicitly stated in tagIds field of json body. DO NOT set tagIds if want to keep current file-tag mappings. N/A
    body body FileInfo false 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

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

    Responses

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

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.4/projects/{project}/storage/{id} \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    GET https://api.cognitedata.com/api/0.4/projects/{project}/storage/{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.4/projects/{project}/storage/{id}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/projects/{project}/storage/{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.4/projects/{project}/storage/{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.4/projects/{project}/storage/{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.4/projects/{project}/storage/{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.4/projects/{project}/storage/{id}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.4/projects/{project}/storage/{id}

    Get download link for a file. The link will expire after 30 seconds.

    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"
    }
    
    Status Meaning Description Schema
    200 OK Download link. SingleStringResponse

    Event Transformer

    Manage event transformers for a specific project. An event transformer is a representative for a process, a pipeline or an entity that generates events from raw data.

    putEventTransformer

    Code samples

    # You can also use wget
    curl -X PUT https://api.cognitedata.com/api/0.4/projects/{project}/eventtransformers/{transformerId} \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    PUT https://api.cognitedata.com/api/0.4/projects/{project}/eventtransformers/{transformerId} 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.4/projects/{project}/eventtransformers/{transformerId}',
      method: 'put',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "id": 0,
      "name": "string",
      "description": "string"
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/projects/{project}/eventtransformers/{transformerId}',
    {
      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.4/projects/{project}/eventtransformers/{transformerId}',
      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.4/projects/{project}/eventtransformers/{transformerId}', 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.4/projects/{project}/eventtransformers/{transformerId}")
      .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.4/projects/{project}/eventtransformers/{transformerId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    PUT /api/0.4/projects/{project}/eventtransformers/{transformerId}

    Update an event transformer.

    Body parameter

    {
      "id": 0,
      "name": "string",
      "description": "string"
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    transformerId path integer(int64) true The ID of the transformer to be updated. N/A
    body body EventTransformer true The updated event transformer. N/A

    Example responses

    200 Response

    {}
    

    Responses

    Status Meaning Description Schema
    200 OK Empty response. EmptyResponse

    getEventTransformers

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.4/projects/{project}/eventtransformers \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    GET https://api.cognitedata.com/api/0.4/projects/{project}/eventtransformers 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.4/projects/{project}/eventtransformers',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/projects/{project}/eventtransformers',
    {
      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.4/projects/{project}/eventtransformers',
      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.4/projects/{project}/eventtransformers', 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.4/projects/{project}/eventtransformers")
      .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.4/projects/{project}/eventtransformers", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.4/projects/{project}/eventtransformers

    Get list of all the event transformer in current project.

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A

    Example responses

    200 Response

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

    Responses

    Status Meaning Description Schema
    200 OK A list of all event transformers in the current project. EventTransformerResponse

    postTransformers

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.4/projects/{project}/eventtransformers \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/projects/{project}/eventtransformers 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.4/projects/{project}/eventtransformers',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "items": [
        {
          "id": 0,
          "name": "string",
          "description": "string"
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/projects/{project}/eventtransformers',
    {
      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.4/projects/{project}/eventtransformers',
      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.4/projects/{project}/eventtransformers', 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.4/projects/{project}/eventtransformers")
      .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.4/projects/{project}/eventtransformers", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.4/projects/{project}/eventtransformers

    Create new event transformers.

    Body parameter

    {
      "items": [
        {
          "id": 0,
          "name": "string",
          "description": "string"
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body DataEventTransformer true List of the event transformers to create. N/A

    Example responses

    200 Response

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

    Responses

    Status Meaning Description Schema
    200 OK The event transformers that were created. EventTransformerResponse

    deleteEventTransformers

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.4/projects/{project}/eventtransformers/delete \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/projects/{project}/eventtransformers/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.4/projects/{project}/eventtransformers/delete',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = 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.4/projects/{project}/eventtransformers/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.4/projects/{project}/eventtransformers/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.4/projects/{project}/eventtransformers/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.4/projects/{project}/eventtransformers/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.4/projects/{project}/eventtransformers/delete", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.4/projects/{project}/eventtransformers/delete

    Delete event transformers.

    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 the transformers to delete. N/A

    Example responses

    200 Response

    {}
    

    Responses

    Status Meaning Description Schema
    200 OK Empty response. EmptyResponse

    Events

    Manage events. An event can contain multiple semantic phrases. The maximum number of phrases supported for each event is 5000.

    getEvents

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.4/projects/{project}/events \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    GET https://api.cognitedata.com/api/0.4/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.4/projects/{project}/events',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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.4/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.4/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.4/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.4/projects/{project}/events", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

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

    Get list of events matching the query.

    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
    tagId query string false Return events associated with this tagId. When filtering by tagId the following parameters will have no effect: type, subtype, hasDescription, minStartTime, maxStartTime and transformId. 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
    withPhrases query boolean false Also return semantic phrases. Default false. N/A
    withAllPhrases query boolean false Also return semantic phrases, including ones confirmed as false positives. Default false. N/A
    hasDescription query boolean false Return only events that have a textual description. Default null. False gives only those without description. N/A
    minStartTime query string false Only return events from after this time. N/A
    maxStartTime query string false Only return events from before this time. N/A
    transformerId query string false Returns only events generated by this transformerId. N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "id": 0,
            "startTime": 0,
            "endTime": 0,
            "description": "string",
            "type": "string",
            "subtype": "string",
            "additionalData": {
              "property1": "string",
              "property2": "string"
            },
            "tagIds": [
              "string"
            ],
            "semanticPhrases": [
              {}
            ],
            "eventTransformerId": 0,
            "eventReferenceKey": "string"
          }
        ]
      }
    }
    

    Responses

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

    postEvents

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.4/projects/{project}/events \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/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.4/projects/{project}/events',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "items": [
        {
          "id": 0,
          "startTime": 0,
          "endTime": 0,
          "description": "string",
          "type": "string",
          "subtype": "string",
          "additionalData": {
            "property1": "string",
            "property2": "string"
          },
          "tagIds": [
            "string"
          ],
          "semanticPhrases": [
            {
              "id": 0,
              "startIndex": 0,
              "endIndex": 0,
              "semanticTypeId": 0,
              "sourceType": "MANUALLY_GENERATED"
            }
          ],
          "eventTransformerId": 0,
          "eventReferenceKey": "string"
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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.4/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.4/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.4/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.4/projects/{project}/events", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

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

    Create new events.

    Body parameter

    {
      "items": [
        {
          "id": 0,
          "startTime": 0,
          "endTime": 0,
          "description": "string",
          "type": "string",
          "subtype": "string",
          "additionalData": {
            "property1": "string",
            "property2": "string"
          },
          "tagIds": [
            "string"
          ],
          "semanticPhrases": [
            {
              "id": 0,
              "startIndex": 0,
              "endIndex": 0,
              "semanticTypeId": 0,
              "sourceType": "MANUALLY_GENERATED"
            }
          ],
          "eventTransformerId": 0,
          "eventReferenceKey": "string"
        }
      ]
    }
    

    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",
            "additionalData": {
              "property1": "string",
              "property2": "string"
            },
            "tagIds": [
              "string"
            ],
            "semanticPhrases": [
              {}
            ],
            "eventTransformerId": 0,
            "eventReferenceKey": "string"
          }
        ]
      }
    }
    

    Responses

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

    deleteEventsByTransformer

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.4/projects/{project}/events/deletebytransformer \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/projects/{project}/events/deletebytransformer 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.4/projects/{project}/events/deletebytransformer',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = 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.4/projects/{project}/events/deletebytransformer',
    {
      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.4/projects/{project}/events/deletebytransformer',
      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.4/projects/{project}/events/deletebytransformer', 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.4/projects/{project}/events/deletebytransformer")
      .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.4/projects/{project}/events/deletebytransformer", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.4/projects/{project}/events/deletebytransformer

    Deletes all events generated by these transformer.

    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 transformers' IDs to delete on. N/A

    Example responses

    200 Response

    {}
    

    Responses

    Status Meaning Description Schema
    200 OK Empty response. EmptyResponse

    postSemanticPhrases

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.4/projects/{project}/events/semanticphrases \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/projects/{project}/events/semanticphrases 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.4/projects/{project}/events/semanticphrases',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "items": [
        {
          "id": 0,
          "startTime": 0,
          "endTime": 0,
          "description": "string",
          "type": "string",
          "subtype": "string",
          "additionalData": {
            "property1": "string",
            "property2": "string"
          },
          "tagIds": [
            "string"
          ],
          "semanticPhrases": [
            {
              "id": 0,
              "startIndex": 0,
              "endIndex": 0,
              "semanticTypeId": 0,
              "sourceType": "MANUALLY_GENERATED"
            }
          ],
          "eventTransformerId": 0,
          "eventReferenceKey": "string"
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/projects/{project}/events/semanticphrases',
    {
      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.4/projects/{project}/events/semanticphrases',
      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.4/projects/{project}/events/semanticphrases', 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.4/projects/{project}/events/semanticphrases")
      .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.4/projects/{project}/events/semanticphrases", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.4/projects/{project}/events/semanticphrases

    Create new semantic phrases. Maximum number of phrases allowed per event is 5000.

    Body parameter

    {
      "items": [
        {
          "id": 0,
          "startTime": 0,
          "endTime": 0,
          "description": "string",
          "type": "string",
          "subtype": "string",
          "additionalData": {
            "property1": "string",
            "property2": "string"
          },
          "tagIds": [
            "string"
          ],
          "semanticPhrases": [
            {
              "id": 0,
              "startIndex": 0,
              "endIndex": 0,
              "semanticTypeId": 0,
              "sourceType": "MANUALLY_GENERATED"
            }
          ],
          "eventTransformerId": 0,
          "eventReferenceKey": "string"
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body DataEvent true The semantic phrases to be created. N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "id": 0,
            "startTime": 0,
            "endTime": 0,
            "description": "string",
            "type": "string",
            "subtype": "string",
            "additionalData": {
              "property1": "string",
              "property2": "string"
            },
            "tagIds": [
              "string"
            ],
            "semanticPhrases": [
              {}
            ],
            "eventTransformerId": 0,
            "eventReferenceKey": "string"
          }
        ]
      }
    }
    

    Responses

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

    putSemanticPhrase

    Code samples

    # You can also use wget
    curl -X PUT https://api.cognitedata.com/api/0.4/projects/{project}/events/{eventId}/semanticphrases/{semanticPhraseId} \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    PUT https://api.cognitedata.com/api/0.4/projects/{project}/events/{eventId}/semanticphrases/{semanticPhraseId} 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.4/projects/{project}/events/{eventId}/semanticphrases/{semanticPhraseId}',
      method: 'put',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "id": 0,
      "startIndex": 0,
      "endIndex": 0,
      "semanticTypeId": 0,
      "sourceType": "MANUALLY_GENERATED"
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/projects/{project}/events/{eventId}/semanticphrases/{semanticPhraseId}',
    {
      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.4/projects/{project}/events/{eventId}/semanticphrases/{semanticPhraseId}',
      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.4/projects/{project}/events/{eventId}/semanticphrases/{semanticPhraseId}', 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.4/projects/{project}/events/{eventId}/semanticphrases/{semanticPhraseId}")
      .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.4/projects/{project}/events/{eventId}/semanticphrases/{semanticPhraseId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    PUT /api/0.4/projects/{project}/events/{eventId}/semanticphrases/{semanticPhraseId}

    Update a semantic phrase.

    Body parameter

    {
      "id": 0,
      "startIndex": 0,
      "endIndex": 0,
      "semanticTypeId": 0,
      "sourceType": "MANUALLY_GENERATED"
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    eventId path integer(int64) true The event ID for the phrase to be updated. N/A
    semanticPhraseId path integer(int64) true The ID of the semantic phrase to be updated. N/A
    body body SemanticPhrase true The semantic phrase to be updated. N/A

    Example responses

    200 Response

    {}
    

    Responses

    Status Meaning Description Schema
    200 OK Empty response. EmptyResponse

    deleteSemanticPhrase

    Code samples

    # You can also use wget
    curl -X DELETE https://api.cognitedata.com/api/0.4/projects/{project}/events/{eventId}/semanticphrases/{semanticPhraseId} \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    DELETE https://api.cognitedata.com/api/0.4/projects/{project}/events/{eventId}/semanticphrases/{semanticPhraseId} 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.4/projects/{project}/events/{eventId}/semanticphrases/{semanticPhraseId}',
      method: 'delete',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/projects/{project}/events/{eventId}/semanticphrases/{semanticPhraseId}',
    {
      method: 'DELETE',
    
      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.delete 'https://api.cognitedata.com/api/0.4/projects/{project}/events/{eventId}/semanticphrases/{semanticPhraseId}',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.delete('https://api.cognitedata.com/api/0.4/projects/{project}/events/{eventId}/semanticphrases/{semanticPhraseId}', 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("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.4/projects/{project}/events/{eventId}/semanticphrases/{semanticPhraseId}")
      .delete(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{
            "Accept": []string{"application/json"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("DELETE", "https://api.cognitedata.com/api/0.4/projects/{project}/events/{eventId}/semanticphrases/{semanticPhraseId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    DELETE /api/0.4/projects/{project}/events/{eventId}/semanticphrases/{semanticPhraseId}

    Delete a semantic phrase.

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    eventId path integer(int64) true The event ID for the phrase to be deleted. N/A
    semanticPhraseId path integer(int64) true The ID of the semantic phrase to be deleted. N/A

    Example responses

    200 Response

    {}
    

    Responses

    Status Meaning Description Schema
    200 OK Empty response. EmptyResponse

    updateEvents

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.4/projects/{project}/events/update \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/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.4/projects/{project}/events/update',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "items": [
        {
          "id": 0,
          "startTime": 0,
          "endTime": 0,
          "description": "string",
          "type": "string",
          "subtype": "string",
          "additionalData": {
            "property1": "string",
            "property2": "string"
          },
          "tagIds": [
            "string"
          ],
          "semanticPhrases": [
            {
              "id": 0,
              "startIndex": 0,
              "endIndex": 0,
              "semanticTypeId": 0,
              "sourceType": "MANUALLY_GENERATED"
            }
          ],
          "eventTransformerId": 0,
          "eventReferenceKey": "string"
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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.4/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.4/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.4/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.4/projects/{project}/events/update", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

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

    Update events.

    Body parameter

    {
      "items": [
        {
          "id": 0,
          "startTime": 0,
          "endTime": 0,
          "description": "string",
          "type": "string",
          "subtype": "string",
          "additionalData": {
            "property1": "string",
            "property2": "string"
          },
          "tagIds": [
            "string"
          ],
          "semanticPhrases": [
            {
              "id": 0,
              "startIndex": 0,
              "endIndex": 0,
              "semanticTypeId": 0,
              "sourceType": "MANUALLY_GENERATED"
            }
          ],
          "eventTransformerId": 0,
          "eventReferenceKey": "string"
        }
      ]
    }
    

    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

    deleteEvents

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.4/projects/{project}/events/delete \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/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.4/projects/{project}/events/delete',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = 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.4/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.4/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.4/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.4/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.4/projects/{project}/events/delete", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

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

    Deletes a list of events.

    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

    byReference

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.4/projects/{project}/events/byreference \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/projects/{project}/events/byreference 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.4/projects/{project}/events/byreference',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "transformerId": 0,
      "eventReferenceKeys": [
        "string"
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/projects/{project}/events/byreference',
    {
      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.4/projects/{project}/events/byreference',
      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.4/projects/{project}/events/byreference', 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.4/projects/{project}/events/byreference")
      .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.4/projects/{project}/events/byreference", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.4/projects/{project}/events/byreference

    Gets events matching the transformerId and one of the eventReferenceKeys.

    Body parameter

    {
      "transformerId": 0,
      "eventReferenceKeys": [
        "string"
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body TransformerIdAndEventReferenceKeys true Object containing the transformer ID and a list of reference keys. N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "id": 0,
            "startTime": 0,
            "endTime": 0,
            "description": "string",
            "type": "string",
            "subtype": "string",
            "additionalData": {
              "property1": "string",
              "property2": "string"
            },
            "tagIds": [
              "string"
            ],
            "semanticPhrases": [
              {}
            ],
            "eventTransformerId": 0,
            "eventReferenceKey": "string"
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Events matching the transformerId and one of the eventReferenceKeys. EventDataResponse

    getEvent

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.4/projects/{project}/events/{eventId} \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    GET https://api.cognitedata.com/api/0.4/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.4/projects/{project}/events/{eventId}',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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.4/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.4/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.4/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.4/projects/{project}/events/{eventId}", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

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

    Get an event by its id.

    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": {
        "id": 0,
        "startTime": 0,
        "endTime": 0,
        "description": "string",
        "type": "string",
        "subtype": "string",
        "additionalData": {
          "property1": "string",
          "property2": "string"
        },
        "tagIds": [
          "string"
        ],
        "semanticPhrases": [
          {
            "id": 0,
            "startIndex": 0,
            "endIndex": 0,
            "semanticTypeId": 0,
            "sourceType": "MANUALLY_GENERATED"
          }
        ],
        "eventTransformerId": 0,
        "eventReferenceKey": "string"
      }
    }
    

    Responses

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

    Extraction

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

    getTagExtractingRequests

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.4/projects/{project}/extraction/request \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    GET https://api.cognitedata.com/api/0.4/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.4/projects/{project}/extraction/request',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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.4/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.4/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.4/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.4/projects/{project}/extraction/request", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.4/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.4/projects/{project}/extraction/request \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/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.4/projects/{project}/extraction/request',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = 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.4/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.4/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.4/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.4/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.4/projects/{project}/extraction/request", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.4/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

    getExtractedRanges

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.4/projects/{project}/extraction/ranges/get \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/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.4/projects/{project}/extraction/ranges/get',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = 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.4/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.4/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.4/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.4/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.4/projects/{project}/extraction/ranges/get", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.4/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

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

    Responses

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

    updateExtractedRanges

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.4/projects/{project}/extraction/ranges/update \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/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.4/projects/{project}/extraction/ranges/update',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = 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.4/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.4/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.4/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.4/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.4/projects/{project}/extraction/ranges/update", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.4/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

    Groups

    Manage security groups specific project.

    getUsersForGroup

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.4/projects/{project}/groups/{groupId}/users \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    GET https://api.cognitedata.com/api/0.4/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.4/projects/{project}/groups/{groupId}/users',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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.4/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.4/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.4/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.4/projects/{project}/groups/{groupId}/users", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

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

    Get 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,
            "deletedTime": 0,
            "deleted": true
          }
        ]
      }
    }
    

    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.4/projects/{project}/groups/{groupId}/users \
      -H 'Content-Type: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/projects/{project}/groups/{groupId}/users 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.4/projects/{project}/groups/{groupId}/users',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "items": [
        {
          "id": 0
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.4/projects/{project}/groups/{groupId}/users',
      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.4/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("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.4/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"},
            "api-key": []string{"API_KEY"},
    
        }
    
        data := bytes.NewBuffer([]byte{jsonReq})
        req, err := http.NewRequest("POST", "https://api.cognitedata.com/api/0.4/projects/{project}/groups/{groupId}/users", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.4/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

    Responses

    Status Meaning Description Schema
    default Default default response None

    removeUsersFromGroup

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.4/projects/{project}/groups/{groupId}/users/remove \
      -H 'Content-Type: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/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.4/projects/{project}/groups/{groupId}/users/remove',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "items": [
        0
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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.4/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.4/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.4/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.4/projects/{project}/groups/{groupId}/users/remove", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.4/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

    getGroups

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.4/projects/{project}/groups \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    GET https://api.cognitedata.com/api/0.4/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.4/projects/{project}/groups',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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.4/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.4/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.4/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.4/projects/{project}/groups", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

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

    Get 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,
            "deletedTime": 0,
            "deleted": true
          }
        ]
      }
    }
    

    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.4/projects/{project}/groups \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/projects/{project}/groups 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.4/projects/{project}/groups',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = 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',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/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',
      'Accept' => 'application/json',
      'api-key' => 'API_KEY'
    }
    
    result = RestClient.post 'https://api.cognitedata.com/api/0.4/projects/{project}/groups',
      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.4/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("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.4/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"},
            "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.4/projects/{project}/groups", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.4/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

    Example responses

    200 Response

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

    Responses

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

    deleteGroups

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.4/projects/{project}/groups/delete \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/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.4/projects/{project}/groups/delete',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = 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.4/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.4/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.4/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.4/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.4/projects/{project}/groups/delete", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.4/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

    Login

    User / client authentication.

    getTokenStatus

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/login/token \
      -H 'Accept: application/json' \
      -H 'api-key: YOURAPIKEY'
    
    
    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 request = 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

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

    Responses

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

    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' \
      -H 'api-key: YOURAPIKEY'
    
    
    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 request = 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

    {
      "data": {
        "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' \
      -H 'api-key: YOURAPIKEY'
    
    
    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 request = 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

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

    Responses

    Status Meaning Description Schema
    200 OK Login status. LoginStatusResponse

    url

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/login/url \
      -H 'Accept: application/json' \
      -H 'api-key: YOURAPIKEY'
    
    
    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 request = 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

    {
      "data": {
        "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' \
      -H 'api-key: YOURAPIKEY'
    
    
    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 request = 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", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /logout

    Invalidates session.

    Example responses

    200 Response

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

    Responses

    Status Meaning Description Schema
    200 OK Session invalidated. LoginStatusResponse

    logoutUrl

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/logout/url \
      -H 'Accept: application/json' \
      -H 'api-key: YOURAPIKEY'
    
    
    GET https://api.cognitedata.com/logout/url HTTP/1.1
    Host: api.cognitedata.com
    Accept: application/json
    
    
    var headers = {
      'Accept':'application/json'
    
    };
    
    $.ajax({
      url: 'https://api.cognitedata.com/logout/url',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json'
    
    };
    
    fetch('https://api.cognitedata.com/logout/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/logout/url',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json'
    }
    
    r = requests.get('https://api.cognitedata.com/logout/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/logout/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/logout/url", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /logout/url

    Get logout url of the given project.

    Parameters

    Parameter In Type Required Description Restrictions
    redirectUrl query string false The url to send the user to after the logout is successful. N/A

    Example responses

    200 Response

    {
      "data": {
        "url": "string"
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK Logout URL. LoginUrlResponse

    Pipelines

    Manage ingestion pipelines. The pipelines API is currently in experimental alpha

    backfillPipeline

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.4/projects/{project}/pipelines/{pipelineId}/backfill \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/projects/{project}/pipelines/{pipelineId}/backfill 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.4/projects/{project}/pipelines/{pipelineId}/backfill',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/projects/{project}/pipelines/{pipelineId}/backfill',
    {
      method: 'POST',
    
      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.post 'https://api.cognitedata.com/api/0.4/projects/{project}/pipelines/{pipelineId}/backfill',
      params: {
      }, headers: headers
    
    p JSON.parse(result)
    
    
    import requests
    headers = {
      'Accept': 'application/json',
      'api-key': 'API_KEY'
    }
    
    r = requests.post('https://api.cognitedata.com/api/0.4/projects/{project}/pipelines/{pipelineId}/backfill', 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("Accept", "application/json")
      .header("api-key", "API_KEY")
      .url("https://api.cognitedata.com/api/0.4/projects/{project}/pipelines/{pipelineId}/backfill")
      .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{
            "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.4/projects/{project}/pipelines/{pipelineId}/backfill", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.4/projects/{project}/pipelines/{pipelineId}/backfill

    Backfill a pipeline.

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    pipelineId path integer(int64) true The id of the pipeline to backfill. N/A

    Example responses

    200 Response

    {}
    

    Responses

    Status Meaning Description Schema
    200 OK Empty response. EmptyResponse

    getPipelines

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.4/projects/{project}/pipelines \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    GET https://api.cognitedata.com/api/0.4/projects/{project}/pipelines 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.4/projects/{project}/pipelines',
      method: 'get',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    
    const headers = {
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/projects/{project}/pipelines',
    {
      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.4/projects/{project}/pipelines',
      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.4/projects/{project}/pipelines', 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.4/projects/{project}/pipelines")
      .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.4/projects/{project}/pipelines", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    GET /api/0.4/projects/{project}/pipelines

    Get list of pipelines

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    cursor query string false No description N/A
    limit query integer(int32) false Return up to this many results. Maximum is 100. Default is 25. Max: 100

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "name": "string",
            "type": "ASSET",
            "tables": [
              {}
            ],
            "id": 0,
            "status": "PENDING",
            "updatedTime": 0
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK List of Pipeline objects PipelinesResponse

    createPipelines

    Code samples

    # You can also use wget
    curl -X POST https://api.cognitedata.com/api/0.4/projects/{project}/pipelines \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'api-key: API_KEY' \
      -H 'api-key: YOURAPIKEY'
    
    
    POST https://api.cognitedata.com/api/0.4/projects/{project}/pipelines 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.4/projects/{project}/pipelines',
      method: 'post',
    
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    
    const request = require('node-fetch');
    const inputBody = '{
      "items": [
        {
          "name": "string",
          "type": "ASSET",
          "tables": [
            {
              "dbName": "string",
              "tableName": "string"
            }
          ]
        }
      ]
    }';
    const headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'api-key':'API_KEY'
    
    };
    
    fetch('https://api.cognitedata.com/api/0.4/projects/{project}/pipelines',
    {
      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.4/projects/{project}/pipelines',
      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.4/projects/{project}/pipelines', 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.4/projects/{project}/pipelines")
      .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.4/projects/{project}/pipelines", data)
        req.Header = headers
    
        client := &http.Client{}
        resp, err := client.Do(req)
        // ...
    }
    
    

    POST /api/0.4/projects/{project}/pipelines

    Create new pipelines

    Body parameter

    {
      "items": [
        {
          "name": "string",
          "type": "ASSET",
          "tables": [
            {
              "dbName": "string",
              "tableName": "string"
            }
          ]
        }
      ]
    }
    

    Parameters

    Parameter In Type Required Description Restrictions
    project path string true Project name. N/A
    body body DataPipeline true List of pipelines to be created. N/A

    Example responses

    200 Response

    {
      "data": {
        "items": [
          {
            "name": "string",
            "type": "ASSET",
            "tables": [
              {}
            ],
            "id": 0,
            "status": "PENDING",
            "updatedTime": 0
          }
        ]
      }
    }
    

    Responses

    Status Meaning Description Schema
    200 OK List of Pipeline objects created PipelinesResponse

    getPipeline

    Code samples

    # You can also use wget
    curl -X GET https://api.cognitedata.com/api/0.4/projects/{project}/pipelines/{pipelineId} \
      -H 'Accept: application/json'