const featureTypes = [
{
externalId: 'ocean_temperature',
properties: { temperature: { type: 'DOUBLE' as const }, location: { type: 'POINT' as const, srid: 4326 } } ,
searchSpec: { location_idx: { properties : ['location'] } }
}
];
const createdFeatureTypes = await client.geospatial.featureType.create(featureTypes);{
"items": [
{
"externalId": "ocean_temperature",
"dataSetId": 1278028,
"createdTime": 1629784673505,
"lastUpdatedTime": 1629784673505,
"properties": {
"temperature": {
"type": "DOUBLE"
},
"location": {
"type": "POINT",
"srid": 4326
},
"createdTime": {
"type": "LONG"
},
"lastUpdatedTime": {
"type": "LONG"
},
"externalId": {
"type": "STRING",
"size": 32
}
},
"searchSpec": {
"location_idx": {
"properties": [
"location"
]
},
"createdTimeIdx": {
"properties": [
"createdTime"
]
},
"lastUpdatedTimeIdx": {
"properties": [
"lastUpdatedTime"
]
},
"externalIdIdx": {
"properties": [
"externalId"
]
}
}
}
]
}Required capabilities:
geospatialAcl:WRITE
Creates feature types. Each tenant can have up to 100 feature types.
const featureTypes = [
{
externalId: 'ocean_temperature',
properties: { temperature: { type: 'DOUBLE' as const }, location: { type: 'POINT' as const, srid: 4326 } } ,
searchSpec: { location_idx: { properties : ['location'] } }
}
];
const createdFeatureTypes = await client.geospatial.featureType.create(featureTypes);{
"items": [
{
"externalId": "ocean_temperature",
"dataSetId": 1278028,
"createdTime": 1629784673505,
"lastUpdatedTime": 1629784673505,
"properties": {
"temperature": {
"type": "DOUBLE"
},
"location": {
"type": "POINT",
"srid": 4326
},
"createdTime": {
"type": "LONG"
},
"lastUpdatedTime": {
"type": "LONG"
},
"externalId": {
"type": "STRING",
"size": 32
}
},
"searchSpec": {
"location_idx": {
"properties": [
"location"
]
},
"createdTimeIdx": {
"properties": [
"createdTime"
]
},
"lastUpdatedTimeIdx": {
"properties": [
"lastUpdatedTime"
]
},
"externalIdIdx": {
"properties": [
"externalId"
]
}
}
}
]
}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.
List of feature types to be created. It is possible to create up to 100 feature types in one request provided the total number of feature types on the tenant will not exceed 100.
1 - 100 elementsShow child attributes
Feature type list response.
100Show child attributes
Was this page helpful?