List objects
Returns a paginated list of objects from a collection with all or a subset of object property values. To encrypt object property values, set export to true. Values are encrypted using the key specified in the PVAULT_KMS_EXPORT_URI or PVAULT_KMS_EXPORT_SEED environment variables.
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
- stringExtra parameter to pass on to the transformers.
X-Tenant-Id
- array of stringsList of tenant IDs to enforce on the request.
Path parameters
collection
- string required*The name of a collection.
Query parameters
adhoc_reason
- stringAn ad-hoc reason for accessing the Vault data. Required when
reason
is set toOther
.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
- stringCustom audit information to be included in the audit log.
reload_cache
- booleanReloads the cache before the action.
page_size
- integerThe maximum number of items to return in this request. If not specified, the default value is used. The default value is specified in the
PVAULT_SERVICE_DEFAULT_PAGE_SIZE
environment variable. Must not exceed the value specified in thePVAULT_SERVICE_MAX_PAGE_SIZE
environment variable.cursor
- stringThe cursor represents the state of consecutive queries for the same request parameters. In the first call, the cursor may be omitted or specified as an empty string. In consecutive calls, it should be set to the value of the cursor field of the objectFieldsPage returned by the previous call. Note: when the
id
is specified, paging is not supported. In this case, if the number ofid
values specified exceeds the maximum page size, the method returns 400 (BAD REQUEST).export
- booleanWhether to encrypt the property values for export.
ids
- array of stringsA comma-separated list of object IDs
Each string:options
- array of stringsOptions 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 withunsafe
.unsafe
– fetch all the properties, cannot be specified withprops
.
props
- array of stringsThe list of property names and transformations. To include multiple names and transformations, provide a comma-separated list. For example,
Each string:props=first_name,last_name,email.mask
.The name of a property or a transformation in the format
<property-name>.<transformer-name>
.
Possible responses
- 200
- 400
- 401
- 403
- 404
- 405
- 409
- 410
- 500
- 503
The request is successful.
- application/json
results
- array of objects required*A page of objects.
Each object: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"
}paging
- object required*Pagination information.
size
- integer required*Number of results in the current page.
remaining_count
- integer required*The remaining number of objects that can be read in ensuing calls to this method.
cursor
- string required*An opaque string you should provide to get the next page.
{
"results": [
{
"date_of_birth": "1993-02-22",
"email": "patfar@example.com",
"first_name": "Pat",
"last_name": "Far",
"phone_number": "+11011010101"
}
],
"paging": {
"size": 0,
"remaining_count": 0,
"cursor": "string"
}
}
The request is invalid.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV1001",
"message": "The access reason is missing.",
"context": {
"reason": null
}
}
Authentication credentials are incorrect or missing.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV1005",
"message": "The request is unauthorized.",
"context": {}
}
The caller doesn't have the required access rights.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV1007",
"message": "The operation is forbidden due to missing capabilities.",
"context": {
"username": "WebServer"
}
}
The collection, properties, or object is not found.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"context": {
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
},
"error_code": "PVxxxx",
"message": "The object is not found.",
"error_url": "https://docs.piiano.com/api/error-codes#PV1005"
}
The operation is not allowed.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV1026",
"message": "The operation is not allowed in in-memory mode.",
"context": {}
}
A conflict occurs.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV3218",
"message": "Concurrent conflicting updates to the same object.",
"context": {}
}
Access to a resource that is no longer available occurs.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV1033",
"message": "The resource is gone.",
"context": {}
}
An error occurs on the server.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV1000",
"message": "Something went wrong",
"context": {}
}
The service is unavailable.
- application/json
context
- object required*The error context.
Values of additional properties are stringsExample{
"objectid": "b56dd6aa-35f0-11ed-a261-0242ac120002"
}error_code
- string required*The error code.
message
- string required*The error message.
error_url
- stringThe URL to the error documentation.
{
"error_code": "PV1009",
"message": "The operation timed out on the server.",
"context": {}
}
Path parameters
Query parameters
Headers
Code examples