Skip to main content

Update object

patch
/api/pvlt/1.0/data/collections/{collection}/objects/{id}

Updates properties of an object in a collection.

The role performing this operation must have both of the following:

  • The CapDataWriter or the CapDataUpdater capability.
  • At least one allowing policy and no denying policies for the write operation for each of the collection properties specified in the call.

See identity and access management for more information about how capabilities are used to control access to operations and policies are used to control access to data.

Request

Header parameters

  • X-Tenant-Id - array of strings

    List of tenant IDs to enforce on the request.

Path parameters

  • collection - string required*

    The name of a collection.

  • id - string required*

    The ID of the object.

Query parameters

  • adhoc_reason - string

    An ad-hoc reason for accessing the Vault data. Required when reason is set to Other.

  • reason - string required*

    Details of the reason for requesting the property. The default is set when no access reason is provided and PVAULT_SERVICE_FORCE_ACCESS_REASON is false.

  • custom_audit - string

    Custom audit information to be included in the audit log.

  • reload_cache - boolean

    Reloads the cache before the action.

  • expiration_secs - string

    Object expiration time in seconds. If not set, the expiration will not be changed. See the PVAULT_EXPIRATION_ASSOCIATED_OBJECTS and PVAULT_EXPIRATION_UNASSOCIATED_OBJECTS environment variables. If set to an empty value, the object will be marked to not expire.

  • options - array of strings

    Options for the operation. Options include:

    • archived – whether to update only archived objects. If not specified, update only active objects.
    Each string:
  • import - boolean

    Whether to write built-in property values.

  • export_key - string

    The encrypted copy of the key used to encrypt exported data. The key is encrypted using the export KMS key defined by the PVAULT_KMS_EXPORT_URI or PVAULT_KMS_EXPORT_SEED environment variables. When importing data, the key is decrypted by the KMS, then used to decrypt the data. This parameter is not intended to be used manually, but through the CLI command pvault import.

Request body

The object properties to update.

object required*

A list of maps of object properties and their values.

Example
{
"date_of_birth": "1993-02-22",
"email": "patfar@example.com",
"first_name": "Pat",
"last_name": "Far",
"phone_number": "+11011010101"
}
Example
{
"date_of_birth": "1993-02-22",
"email": "patfar@example.com",
"first_name": "Pat",
"last_name": "Far",
"phone_number": "+11011010101"
}

Possible responses

The request is successful.

Try the API

Authorization

Path parameters

Query parameters

Headers

Request body

Navigate to the docs of your local Vault installation to try the API directly from there.

Code examples

Example