from cognite.client.data_classes.hosted_extractors import MappingWrite, CustomMapping
mapping = MappingWrite(external_id="my_mapping", mapping=CustomMapping("some expression"), published=True, input="json")
res = client.hosted_extractors.mappings.create(mapping){
"items": [
{
"externalId": "my.known.id",
"mapping": {
"expression": "<string>"
},
"input": {
"type": "protobuf",
"messageName": "<string>",
"files": [
{
"fileName": "<string>"
}
]
},
"published": true,
"createdTime": 1730204346000,
"lastUpdatedTime": 1730204346000
}
]
}Required capabilities:
hostedExtractors:WRITE
Create up to 100 mappings.
from cognite.client.data_classes.hosted_extractors import MappingWrite, CustomMapping
mapping = MappingWrite(external_id="my_mapping", mapping=CustomMapping("some expression"), published=True, input="json")
res = client.hosted_extractors.mappings.create(mapping){
"items": [
{
"externalId": "my.known.id",
"mapping": {
"expression": "<string>"
},
"input": {
"type": "protobuf",
"messageName": "<string>",
"files": [
{
"fileName": "<string>"
}
]
},
"published": true,
"createdTime": 1730204346000,
"lastUpdatedTime": 1730204346000
}
]
}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.
Mappings to create.
Show child attributes
List of created mappings
100Show child attributes
Was this page helpful?