upsert_feature_set
Upsert (create or update) a feature set.
Input fields
feature_set (
FeatureSetImport!)
FeatureSetImport object to upsert.
owner (
FeatureSetOwnerInput!)
The owner to which the feature set should be upserted.
Return fields
failed (
[UpsertError!]!)
Detailed error information for UpsertItems that failed to upsert.
succeeded (
[UpsertItem!]!)
UpsertItems that have been successfully upserted.
Examples
Create Feature Set for a Survey
Creates a feature set for a survey.
Try this example in GraphiQLmutation CreateFeatureSetForSurvey {
upsert_feature_set(
owner: {
owner_type: SURVEY
sentera_id: "vsu84v8_CO_ym2vAcme_CV_deve_214256873_220321_101644"
}
feature_set: {
name: "Example Feature Set"
type: UNKNOWN
geometry: {
type: "FeatureCollection",
features: [
{
type: "Feature",
geometry: {
type: "GeometryCollection",
geometries: [
{
type: "Polygon",
coordinates: [
[
[-93.0, 45.0],
[-93.1, 45.1],
[-93.2, 45.2],
[-93.3, 45.3],
[-93.0, 45.0]
]
]
}
]
},
properties: {}
}
]
}
}
) {
succeeded {
... on FeatureSet {
sentera_id
name
type
status
released
}
}
}
}
{
"data": {
"upsert_feature_set": {
"succeeded": [
{
"sentera_id": "iabp4rp_FS_ym2vAcme_CV_deve_b5a36ce76_220401_151858",
"name": "Example Feature Set",
"type": "UNKNOWN",
"status": "SUCCESS",
"released": true
}
]
}
}
}
Create Feature Set for a Field
Creates a feature set for a field.
Try this example in GraphiQLmutation CreateFeatureSetForField {
upsert_feature_set(
owner: {
owner_type: FIELD
sentera_id: "vsu84v8_CO_ym2vAcme_CV_deve_214256873_220321_101644"
}
feature_set: {
name: "Example Feature Set"
type: UNKNOWN
geometry: {
type: "FeatureCollection",
features: [
{
type: "Feature",
geometry: {
type: "GeometryCollection",
geometries: [
{
type: "Polygon",
coordinates: [
[
[-93.0, 45.0],
[-93.1, 45.1],
[-93.2, 45.2],
[-93.3, 45.3],
[-93.0, 45.0]
]
]
}
]
},
properties: {}
}
]
}
}
) {
succeeded {
... on FeatureSet {
sentera_id
name
type
status
}
}
}
}
{
"data": {
"upsert_feature_set": {
"succeeded": [
{
"sentera_id": "iabp4rp_FS_ym2vAcme_CV_deve_b5a36ce76_220401_151858",
"name": "Example Feature Set",
"type": "UNKNOWN",
"status": "SUCCESS"
}
]
}
}
}
Update Feature Set Name
Updates the name of a feature set.
Try this example in GraphiQLmutation UpdateFeatureSetName {
upsert_feature_set(
owner: {
owner_type: SURVEY
sentera_id: "vsu84v8_CO_ym2vAcme_CV_deve_214256873_220321_101644"
}
feature_set: {
sentera_id: "v5tc7af_FS_t48cAcmeGrand_CV_deve_5bfe28a7f_220419_093433"
name: "New Name"
}
) {
succeeded {
action
sentera_id
... on FeatureSet {
name
}
}
failed {
attributes {
key
details
attribute
}
}
}
}
{
"data": {
"upsert_feature_set": {
"succeeded": [
{
"action": "UPDATE",
"sentera_id": "v5tc7af_FS_t48cAcmeGrand_CV_deve_5bfe28a7f_220419_093433",
"name": "New Name"
}
],
"failed": []
}
}
}
Update Feature Set with documents and annotations
Updates a feature set to attach documents and annotations.
Try this example in GraphiQLmutation UpdateFeatureSetWithDocumentsAndAnnotations {
upsert_feature_set(
owner: {
owner_type: SURVEY
sentera_id: "vsu84v8_CO_ym2vAcme_CV_deve_214256873_220321_101644"
}
feature_set: {
sentera_id: "v5tc7af_FS_t48cAcmeGrand_CV_deve_5bfe28a7f_220419_093433"
document_file_keys: [
"eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBFdz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--6aaf77a9bcbdef36272a161ab872f839289dc83a",
"eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBGQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--ede207ef5b7f60188d4529ca08ea1cd0454320ef"
]
annotation_file_keys: [
"eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBGUT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--498001a02e1a8c1ba9dfbcf2e1e83a6fa443b246",
"eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBGZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--31422849875fbf5936914d4122514d1bfe23cb29"
]
}
) {
succeeded {
action
sentera_id
... on FeatureSet {
name
status
files {
sentera_id
filename
}
}
}
failed {
attributes {
key
details
attribute
}
}
}
}
{
"data": {
"upsert_feature_set": {
"succeeded": [
{
"action": "UPDATE",
"sentera_id": "v5tc7af_FS_t48cAcmeGrand_CV_deve_5bfe28a7f_220419_093433",
"name": "Example",
"status": "SUCCESS",
"files": [
{
"sentera_id": "1t8cvd5_FI_3p7lAcme_CV_deve_739b4ebf1_220422_160109",
"filename": "test.geojson"
},
{
"sentera_id": "6b3s6ey_FI_3p7lAcme_CV_deve_739b4ebf1_220422_160109",
"filename": "test2.geojson"
},
{
"sentera_id": "arjeuo9_FI_3p7lAcme_CV_deve_739b4ebf1_220422_160109",
"filename": "test3.geojson"
},
{
"sentera_id": "8jv6g62_FI_3p7lAcme_CV_deve_739b4ebf1_220422_160109",
"filename": "test4.geojson"
}
]
}
],
"failed": []
}
}
}