Create Preview

Create a preview job. Previews will run for up to 10 minutes, and return once they receive any data. Use the /result endpoint to check the status of the preview.

Securityoidc-token or oauth2-client-credentials or oauth2-open-industrial-data or oauth2-auth-code
Request
Request Body schema: application/json
required

Preview to create.

externalId
required
string (CogniteExternalId) <= 255 characters

The external ID provided by the client. Must be unique for the resource type.

sourceId
required
string (Source ID) <= 255 characters

ID of the source this preview job should read from.

required
Job Config (object) or Job Config (object) or Job Config (object) (JobConfig)
object (Format)

Input format parameters.

ProtoBuf (object) or CSV (object) or XML (object) or JSON (object) (CreateInputConfig)
Responses
200

Created preview.

400

The response for a bad request.

422

Validation Error

post/hostedextractors/preview
Request samples
application/json
{
  • "externalId": "my.known.id",
  • "sourceId": "string",
  • "config": {
    • "topicFilter": "string"
    },
  • "format": {
    • "encoding": "utf8",
    • "compression": "gzip"
    },
  • "input": {
    • "type": "protobuf",
    • "messageName": "string",
    • "files": [
      ]
    }
}
Response samples
application/json
{
  • "externalId": "my.known.id",
  • "sourceId": "string",
  • "config": {
    • "topicFilter": "string"
    },
  • "format": {
    • "encoding": "utf8",
    • "compression": "gzip"
    },
  • "input": {
    • "type": "protobuf",
    • "messageName": "string",
    • "files": [
      ]
    },
  • "createdTime": 1730204346000
}