upsert_mosaics

Upsert (create and/or update) one or more mosaics for a survey.

Input fields

mosaics ([MosaicImport!]!)

An array of MosaicImport objects to upsert. The limit is 2000 mosaics.

survey_sentera_id (ID!)

The ID of the Survey into which these Mosaics will be upserted.

Return fields

failed ([UpsertError!]!)

Detailed error information for UpsertItems that failed to upsert.

succeeded ([UpsertItem!]!)

UpsertItems that have been successfully upserted.

Examples

Upsert Mosaics

Upserts an array of Mosaics

Try this example in GraphiQL
mutation UpsertMosaics {
  upsert_mosaics(
  survey_sentera_id: "r317bgx_CO_27upAcme_CV_deve_c8bb2c4d8_211214_162945",
  mosaics: [
    {
      quality: FULL,
      image_status: AVAILABLE,
      area: {
        unit: ACRE,
        value: 100
      },
      message: "This is an example",
      camera_profile: "This is a camera profile",
      spatial_resolution: 1,
      captured_at: "2021-12-16T15:23:53-06:00",
      is_from_sentera_sensor: true,
      name: "Example"
      calculated_index: NDRE,
      color_applied: RED_TO_GREEN,
      bands: {
        name: "B02",
        common_name: "Blue",
        center_wavelength: 490,
        full_width_half_max: 30
      }
    },
    {
      name: "New Mosaic",
      message: "Test"
    }
  ]
  ) {
  succeeded {
    sentera_id
    action
    ... on Mosaic {
      content_hash,
      area {
        value
        unit
      }
      captured_at
      created_by {
        sentera_id
      }
    }
  }
  failed {
    index
    item {
      action
      sentera_id
      ... on Mosaic {
        name
      }
    }
    attributes {
      attribute
      key
      details
      message
    }
  }
  }
}

{
  "data": {
  "upsert_mosaics": {
    "succeeded": [
      {
        "sentera_id": "o5xbjfh_MO_27upAcme_CV_deve_46cd6e8c1_211216_165923",
        "action": "CREATE",
        "content_hash": "xiiYiJpCf0L5mMrd",
        "area": {
          "value": 100,
          "unit": "ACRE"
        },
        "captured_at": "2021-12-16T21:23:53Z",
        "created_by": {
          "sentera_id": "x9gyw21_US_27upAcme_CV_deve_c8bb2c4d8_211214_123456"
        }
      }
    ],
    "failed": [
      {
        "index": 1,
        "item": {
          "action": "CREATE",
          "sentera_id": "jr5koia_MO_27upAcme_CV_deve_46cd6e8c1_211216_165923",
          "name": "New Mosaic"
        },
        "attributes": [
          {
            "attribute": "captured_at",
            "key": "blank",
            "details": {},
            "message": "can't be blank"
          }
        ]
      }
    ]
  }
  }
}