1. Docs
  2. API Reference
  3. Export the people a stored access preview reaches

Export the people a stored access preview reaches

GET/api/v1/access-previews/{previewId}/people.csv

Every person the stored preview reaches, as a CSV file: for a move or a permissions preview one line per key gained or lost (Name, Email, Change, Permission, Through), for a delete preview one line per assignment that goes (Name, Email, Role, Node). Cells are neutralised against spreadsheet formula injection. Read under the same rules as the people route: the preview's maker only, in its Environment, until expires_at (404 otherwise), and 409 once what it read has changed. A reader who may not see the Environment's people gets a file with the header line only.

Authentication

Bearer TokenAuthorization Option A

JWT access token. Never send alongside X-API-Key: a request carrying both is refused.

API KeyX-API-Key Option B

API key for management-tier access. Never send alongside an Authorization header: a request carrying both is refused.

Path Parameters

previewIdstring Required

Responses

text/csv

string (binary)

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*
Request
curl -X GET "https://auth.canopy-io.com/api/v1/access-previews/value/people.csv" \
  -H "X-API-Key: $CANOPY_API_KEY"
Response
Content-Type: text/csv
Related endpoints
GETList the people a stored access preview reaches
Was this page helpful?

Tell us how we can improve this guide.