Coach Reporting
The core functionality of the Showpad Coach Reporting API service grants admin access to Showpad Coach resources and reporting information for an authorized Showpad account. The responses are JSON-formatted and provide all of the statistics shown on the Showpad Coach Reports page and more. There are several ways to leverage the Showpad Coach Reporting API service, including integration with other service providers, offering alternative presentations of Coach data, and automating procedures.
You can view definitions of all available reporting objects here.
Requests
Base Endpoint
The base endpoint is:
https://{{subdomain}}.showpad.biz/api/learn/reporting/v3/json
Every request needs to be prefixed with the base endpoint.
You can make the following requests with the base endpoint:
HTTP Request | Description |
---|---|
GET /objects | List all possible objects. |
GET /objects/{objectId}/describe | Describe fields and data types within an object. |
GET /objects/{objectId} | Receive paginated object results from a query. |
Object
Do not supply request parameters with this method.
To retrieve a list of all possible objects, you can make this request:
GET https://{{subdomain}}.showpad.biz/api/learn/reporting/v3/json/objects
A successful request will return a status 200 OK
and an Object response in the response body.
{
"objects": [
{
"id": "string",
"displayName": "string",
"urls": {
"describe": "string",
"object": "string"
}
}
]
}
Property Name | Value | Description |
---|---|---|
objects | list | List of available report types. |
objects[].id | string | The API identifier of the object. |
objects[].displayName | string | The display name of the object. |
objects[].urls.describe | string | The path of the URL to describe the object's fields. |
Describe
Do not supply request parameters with this method.
To retrieve the field descriptions and data types within an object, you can use the following request:
GET https://{{subdomain}}.showpad.biz/api/learn/reporting/v3/json/objects/{objectID}/describe
A successful request will return a status 200 OK
and a Describe response in the response body.
{
"fields": [
{
"id": "string",
"displayName": "string",
"type": "string",
"options": ["string"]
}
]
}
Property Name | Value | Description |
---|---|---|
fields | list | List of available fields for the chosen object. See Report Definitions for details about all objects and their available fields. |
fields[].id | string | The API identifier of the field. |
fields[].displayName | string | The display name of the field. |
fields[].type | string | They type of value that is stored in the field. Possible values are: int, picklist, string, float, percent, and date . |
fields[].options | list | The options that are available for picklists. |
Result
GET https://{{subdomain}}.showpad.biz/api/learn/reporting/v3/json/objects/{objectId}
Request Parameters
Parameter Name | Value | Description |
---|---|---|
parameters | string | Base64 encoded JSON representing requesting parameters. |
{
"totalResults": int,
"pageResults": int,
"timeStamp": date,
"parameters": {
"page": int,
"resultsPerPage": int,
"filters": [
{
"fields": ["string"],
"sort": {
"field": "string",
"direction": "string"
}
}
],
"records": [
{
"field": fieldType,
...
}
]
}
}
Property Name | Value | Description |
---|---|---|
totalResults | int | The total number of results based on the parameters of the query. |
pageResults | int | The number of results on the current page. |
timeStamp | date | The timestamp when the data was most recently calculated. |
parameters.page | int | The requested page. |
parameters.resultspPerPage | int | The total number of results per page. |
parameters.filters[].field | string | The field being used for a filter. |
parameters.filters[].operator | string | The user-defined operator for a filter. *Possible values for operators will vary based on the field type. |
parameters.filters[].values | string | The list of values used to filter a field. The fieldType is variable based on the field. |
parameters.fields | list | The list of fields to be included in the result. |
parameters.sort.field | string | The chosen field for the sort. |
parameters.sort.direction | string | The direction of the sort. Possible values are: asc or desc. |
records[].field | fieldType | An individual record for the requested data. The fieldType is variable based on the field. |
Parameter creation for results request
{
"page": int,
"resultsPerPage": int,
"filters": [
{
"field": "string",
"operator": "string",
"values": [fieldType]
}
],
"fields": ["string"],
"sort": {
"field": "string",
"direction": "string"
}
}
Property Name | Value | Description |
---|---|---|
page | int | The requested page. |
resultsPerPage | int | Set the total number of results per page. *Must be between 1 and 1000. |
filters[].field | string | The field being used for a filter. |
filters[].operator | string | The user-defined operator for a filter. Possible values for operators will vary based on the field type. |
filters[].values | list | The list of values used to filter a field. The fieldType variable is based on the field. |
fields | list | The list of fields to be included in the result. |
sort.field | string | The chosen field for the sort. |
sort.direction | string | The direction of the sort. Possible values are asc or desc. |
Any requests made without specific parameters will be set to the default values. Once the parameters are set, encode the
JSON to base64 and pass it as the value for parameters
in the request query string.
Operators
Operator | Description | Available Field Types | # of Values. |
---|---|---|---|
eq | Equal to | string, int, float, percent, date | 1. |
ne | Not equal to | string, int, float, percent, date | 1. |
co | Contains | string | 1. |
bw | Begins with | string | 1. |
nc | Not contains | string | 1. |
in | In | picklist | At least 1. |
lt | Less than | int, float, percent, date | 1. |
le | Less than or equal to | int, float, percent, date | 1. |
gt | Greater than | int, float, percent, date | 1. |
ge | Greater than or equal to | int, float, percent, date | 1. |
be | Between | int, float, percent, date | 2. |
nb | Not between | int, float, percent, date | 2. |
Example Request
The parameters below will return the first 100 curriculums with the title "Example Curriculum", sorted by Curriculum Title ascending.
{
"page": 1,
"resultsPerPage": 100,
"filters": [
{
"field": "curriculumTitle",
"operator": "eq",
"values": ["Example Curriculum"]
}
],
"fields": [
"curriculumTitle",
"courseCount",
"userCount",
"startCount",
"startPercentage",
"testAverage",
"pitchAverage"
],
"sort": {
"field": "curriculumTitle",
"direction": "asc"
}
}
Compressed and encoded to base64, the above JSON gives the following result:
ewogInBhZ2UiOiAxLAogInJlc3VsdHNQZXJQYWdlIjogMTAwLAogImZpbHRlcnMiOiBbCiB7CiAgICJmaWVsZCIgOiAgImN1cnJpY3VsdW1UaXRsZSIsCiAgICJvcGVyYXRvciIgOiAiZXEiLAogICAidmFsdWVzIjogWwogICAiRXhhbXBsZSBDdXJyaWN1bHVtIgogICBdCiAgfQogXSwKICJmaWVsZHMiOiBbCiAiY3VycmljdWx1bVRpdGxlIiwKICJjb3Vyc2VDb3VudCIsCiAidXNlckNvdW50IiwKICJzdGFydENvdW50IiwKICJzdGFydFBlcmNlbnRhZ2UiLAogInRlc3RBdmVyYWdlIiwKICJwaXRjaEF2ZXJhZ2UiCiAgXSwKICAic29ydCI6IHsKICAiZmllbGQiOiAiY3VycmljdWx1bVRpdGxlIiwKICAiZGlyZWN0aW9uIjogImFzYyIKICB9CiB9
Adding this base64 encoded JSON as the value for parameters
, the configuration will be sent to the server. See the
full example below.
Example cURL Request
curl -H "Authorization: Bearer xxxxxxxxxxxxxxxxxxx" https://{{subdomain}}.showpad.biz/api/learn/reporting/v3/json/objects/Curriculum?parameters=ewogInBhZ2UiOiAxLAogInJlc3VsdHNQZXJQYWdlIjogMTAwLAogImZpbHRlcnMiOiBbCiB7CiAgICJmaWVsZCIgOiAgImN1cnJpY3VsdW1UaXRsZSIsCiAgICJvcGVyYXRvciIgOiAiZXEiLAogICAidmFsdWVzIjogWwogICAiRXhhbXBsZSBDdXJyaWN1bHVtIgogICBdCiAgfQogXSwKICJmaWVsZHMiOiBbCiAiY3VycmljdWx1bVRpdGxlIiwKICJjb3Vyc2VDb3VudCIsCiAidXNlckNvdW50IiwKICJzdGFydENvdW50IiwKICJzdGFydFBlcmNlbnRhZ2UiLAogInRlc3RBdmVyYWdlIiwKICJwaXRjaEF2ZXJhZ2UiCiAgXSwKICAic29ydCI6IHsKICAiZmllbGQiOiAiY3VycmljdWx1bVRpdGxlIiwKICAiZGlyZWN0aW9uIjogImFzYyIKICB9CiB9