Create one or more sequences.
Sequence to be stored.
required | Array of objects (PostSequenceDTO) [ 1 .. 1000 ] items |
Response with the created sequence.
The response for a failed request.
from cognite.client.data_classes import SequenceWrite, SequenceColumnWrite column_def = [ SequenceColumnWrite(value_type="String", external_id="user", description="some description"), SequenceColumnWrite(value_type="Double", external_id="amount") ] seq = client.sequences.create(SequenceWrite(external_id="my_sequence", columns=column_def)) seq2 = client.sequences.create(SequenceWrite(external_id="my_copied_sequence", columns=column_def))
{- "items": [
- {
- "id": 1,
- "name": "Any relevant name",
- "description": "Optional description",
- "assetId": 1221123111,
- "externalId": "my.known.id",
- "metadata": {
- "extracted-by": "cognite"
}, - "columns": [
- {
- "name": "depth",
- "externalId": "DPS1",
- "description": "Optional description",
- "valueType": "STRING",
- "metadata": {
- "extracted-by": "cognite"
}, - "createdTime": 100000000000,
- "lastUpdatedTime": 100000000000
}
], - "createdTime": 100000000000,
- "lastUpdatedTime": 100000000000,
- "dataSetId": 2718281828459
}
]
}