Reporting API Reference
Introduction
The Reporting REST API enables the ability to execute and run previously saved review reports and retrieve their results as JSON data. These APIs can be useful for retrieving review data to populate a preferred reporting or BI tool or to drive automation using popular automation platforms (Zapier, etc.). The API offers the following capabilities:
- Retrieve the list of currently saved reports
- Run and retrieve the data for a report
Calling these API endpoints requires an API Key and API ID. See Getting Started with PerformYard API for details on creating API keys and API Authentication for authentication flow.
Retrieve List of Reports
This API Endpoint will return the list of currently defined reports in PerformYard. You can learn more about Reporting & Analytics here.
HTTP GET
https://api.talent.performyard.com/v1/reports
Query Params | Type | Description | Default | Example |
limit | number | The number of report records to be returned. | 200 | 50 |
offset | number | Skipping into the list of reports can be used to paginate longer results when combined with the limit parameter. | 0 | 5 |
sort | string | The order in which reports are returned. Accepts "asc(FIELD_NAME)" and/or "desc(FIELD_NAME)". | optional | asc(name), desc(type) |
tags | string | Reports can be associated with one or more tags; list can be filtered to return reports with a specific tag | optional | "Finance" |
name | string | The list can be filtered to return reports that match the specified name. | optional | "360/Peer Review Report" |
CURL Example
curl --location 'https://api.talent.performyard.com/v1/reports?limit=200&offset=0' \ --header 'Accept: application/json' \ --header 'x-api-id: {{X-API-ID}}' \ --header 'x-api-key: {{X-API-KEY}}'
Response:
HTTP 200 OK
Body:
{ "reports": [ { "_id": "<string>", "name": "<string>", "type": "<string>", "description": <string>, "created_at": <date string> "created_by": <id of employee>, "last_updated": <date string>, "tags": [<array of strings>] } ] }
Run and Retrieve the Data for a Report
This API Endpoint will return the data for the specified report as a {JSON} array of data. Conceptually, this API offers functionality akin to the end-user-facing CSV Download of a report's data. You can learn more about reporting here.
Please note that the reporting API currently only supports running and retrieving data for reports about Reviews. Retrieving the data for employee reports is not currently supported via the API.
HTTP GET
https://api.talent.performyard.com/v1/reports/:report-id
Query Params | Type | Description | Default | Example |
limit | number | The number of report records to be returned. | 200 | 50 |
offset | number | Skipping into the list of reports can be used to paginate longer results when combined with the limit parameter. | 0 | 5 |
|
CURL Example
curl --location 'https://api.talent.performyard.com/v1/reports/<report-id>?limit=200&offset=0' \ --header 'Accept: application/json' \ --header 'x-api-id: {{X-API-ID}}' \ --header 'x-api-key: {{X-API-KEY}}'
Response:
HTTP 200 OK
Body:
{ "review_report": [ { "<Report-Column1-name>": "value", "<Report-Column2-name>": "value", .... }, { "<Report-Column1-name>": "value", "<Report-Column2-name>": "value", .... }, .... ] }