curl --request POST \
--url https://{cluster}.cognitedata.com/api/v1/projects/{project}/hostedextractors/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"externalId": "my.known.id",
"sourceId": "<string>",
"config": {
"topicFilter": "<string>"
},
"format": {
"encoding": "utf8",
"compression": "gzip"
},
"input": {
"type": "protobuf",
"messageName": "<string>",
"files": [
{
"fileName": "<string>",
"content": "<string>"
}
]
}
}
'{
"externalId": "my.known.id",
"sourceId": "<string>",
"config": {
"topicFilter": "<string>"
},
"input": {
"type": "protobuf",
"messageName": "<string>",
"files": [
{
"fileName": "<string>"
}
]
},
"createdTime": 1730204346000,
"format": {
"encoding": "utf8",
"compression": "gzip"
}
}Required capabilities:
hostedExtractors:WRITE
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.
curl --request POST \
--url https://{cluster}.cognitedata.com/api/v1/projects/{project}/hostedextractors/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"externalId": "my.known.id",
"sourceId": "<string>",
"config": {
"topicFilter": "<string>"
},
"format": {
"encoding": "utf8",
"compression": "gzip"
},
"input": {
"type": "protobuf",
"messageName": "<string>",
"files": [
{
"fileName": "<string>",
"content": "<string>"
}
]
}
}
'{
"externalId": "my.known.id",
"sourceId": "<string>",
"config": {
"topicFilter": "<string>"
},
"input": {
"type": "protobuf",
"messageName": "<string>",
"files": [
{
"fileName": "<string>"
}
]
},
"createdTime": 1730204346000,
"format": {
"encoding": "utf8",
"compression": "gzip"
}
}Access token issued by the CDF project's configured identity provider. Access token must be an OpenID Connect token, and the project must be configured to accept OpenID Connect tokens. Use a header key of 'Authorization' with a value of 'Bearer $accesstoken'. The token can be obtained through any flow supported by the identity provider.
Preview to create.
Create object for a preview job.
The external ID provided by the client. Must be unique for the resource type.
255"my.known.id"
ID of the source this preview job should read from.
255Source specific job configuration. The type depends on the type of source, and is required for some sources.
Show child attributes
Input format parameters.
Show child attributes
List of protobuf files used to define input to the mapping. This will be compiled to a collection of definitions which will be used to convert the input to JSON.
Show child attributes
Created preview.
Preview create response
The external ID provided by the client. Must be unique for the resource type.
255"my.known.id"
ID of the source this preview job should read from.
255Source specific job configuration. The type depends on the type of source, and is required for some sources.
Show child attributes
List of protobuf files used to define input to the mapping. This will be compiled to a collection of definitions which will be used to convert the input to JSON.
Show child attributes
The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
x >= 01730204346000
Input format parameters.
Show child attributes
Was this page helpful?