Skip to main content

Get object

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

Returns an object from a collection with all or a subset of object property values.

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

  • The CapDataReader capability.
  • At least one allowing policy and no denying policies for the read operation for each of the properties and the collection requested 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.

Warning: Use of the unsafe option, to include all object property values, may expose more private information than is required, use with caution.

Request

Header parameters

  • X-Trans-Param - string

    Extra parameter to pass on to the transformers.

  • 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.

  • reload_cache - boolean

    Reloads the cache before the action.

  • options - array of strings

    Options for the operation. Options include:

    • archived – whether to list only archived objects. If not specified, list only active objects.
    • show_builtins – show built-in properties, can only be specified with unsafe.
    • unsafe – fetch all the properties, cannot be specified with props.
    Each string:
  • props - array of strings

    The list of property names and transformations. To include multiple names and transformations, provide a comma-separated list. For example, props=first_name,last_name,email.mask.

    Each string:

    The name of a property or a transformation in the format <property-name>.<transformer-name>.

Possible responses

The request is successful.

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"
}

Try the API

Authorization

Path parameters

Query parameters

Headers

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

Code examples

Example