Update GROUP

Updates GROUP identified by uid_based_id.

The uid_based_id can take only a form of an HIER_OBJECT_ID identifier taken from VERSIONED_OBJECT.uid.value (i.e. a versioned_object_uid).

If the request body already contains a GROUP.uid.value, it must match the uid_based_id in the URL.

The existing latest version_uid of GROUP resource (i.e. the preceding_version_uid) must be specified in the If-Match header.

Path Parameters
  • uid_based_id
    Type: string Format: uuid
    required

    An identifier in a form of a HIER_OBJECT_ID identifier taken from VERSIONED_OBJECT.uid.value (i.e. a versioned_object_uid).

Headers
  • If-Match
    Type: string
    required

    Header to make the request conditional. Together with ETag request tag, it helps to prevent simultaneous updates of a resource from overwriting each other ("mid-air collisions"). The format is always an version_uid identifier enclosed by double quotes. The operation will be performed only if the existing latest version_uid of the resource (i.e. the preceding_version_uid) matches this header's value.

  • Prefer
    Type: string

    RFC 7240 preference header. Multiple tokens may be sent in a single header as a comma-separated list (e.g. Prefer: return=representation, include_item_tags) or as repeated headers. Cadasto recognises the following tokens:

    Token Where it applies Effect
    return=representation write endpoints Return the full updated resource in the response body.
    return=identifier write endpoints Return only the resource identifier (e.g. the uid).
    return=minimal (default on writes) write endpoints Empty response body.
    include_item_tags (Cadasto extension) read endpoints, and write endpoints when the request does not already carry an openehr-item-tag header Emit the openehr-item-tag response header with the current tags. On writes that ship openehr-item-tag in the request, the token is implied — the response always echoes the tags. Omitted by default on reads. See the ITEM_TAG guide for details.

    The Preference-Applied response header echoes the tokens the server actually honoured (return=, plus include_item_tags / resolve_refs when applied).

  • openehr-item-tag
    Type: array object[] ·

    The list of ITEM_TAG resources to associate with the current versioned object, committed in the same transaction as the create/update.

    Two interchangeable formats are accepted:

    • JSON (recommended) — same shape as the /tags endpoint body
    • Spec semicolon formatkey="...",value="..."; key="...",value="...",target_path="..."

    Cadasto exception: the openehr-version-item-tag request header — used by upstream openEHR to scope tags to a single VERSION — is not supported by Cadasto and will be rejected with 400 Bad Request. Tags are always scoped to the versioned object. See the ITEM_TAG guide for details and error formats.

    • key
      Type: string
      required

      Tag key (identifier). Stored case-insensitively.

    • target_path
      Type: string
      max length:  
      500

      Optional pointer into the target resource (AQL path). Maximum length 500 characters.

    • value
      Type: string

      Optional tag value.

Body·
required
application/json

The new GROUP.

  • archetype_node_id
    Type: string
    required
  • identities
    Type: array object[] ·
    required
  • name
    Type: object ·
    required

    Polymorphic DV_TEXT wrapper. See concrete leaf schemas:

    • UMDvText
    • UMDvCodedText
  • _type
    enum
    const:  
    GROUP
    values
    • GROUP
  • archetype_details
    Type: object ·
  • contacts
    Type: array object[] ·
  • details
    Type: object ·

    Polymorphic ITEM_STRUCTURE wrapper. See concrete leaf schemas:

    • ItemSingle
    • ItemList
    • ItemTable
    • ItemTree
  • feeder_audit
    Type: object ·
  • languages
    Type: array object[] ·
    Empty object
  • Type: array object[] ·
  • relationships
    Type: array object[] ·
  • roles
    Type: array object[] ·

    Identifier for parties in a demographic or identity service.

Responses
  • application/json
  • application/json
  • 404

    404 Not Found is returned when, based on the request parameters, the server did not find a current representation of a target resource, or is not willing to disclose that one exists.

  • 422

    422 Unprocessable Entity is returned when the content type and syntax is correct, could be converted to a resource, but there are semantic validation errors, such as the underlying template is not known or is not validating the supplied resource.

Request Example for put/demographic/group/{uid_based_id}
curl https://cataniamc.prod.cadasto.com/v1/demographic/group/123e4567-e89b-12d3-a456-426614174000 \
--request PUT \
--header 'If-Match: ' \
--header 'Content-Type: application/json' \
--data '{
"_type": "GROUP",
"name": {},
"archetype_node_id": "",
"uid": {
"_type": "HIER_OBJECT_ID",
{
"_type": "GROUP",
"name": {},
"archetype_node_id": "string",
"uid": {
"_type": "HIER_OBJECT_ID",
"value": "123e4567-e89b-12d3-a456-426614174000"
},
"links": [
{