List Parent Programs
An overview of the List Parent Programs endpoint.
Endpoint Description
The List Parent Programs endpoint provides the list of programs associated for a specific company setup within R1 Discover. This information is used for user and administrator alignments, this is important for reporting, setting permissions, and aligning curriculum.
HTTP Method
GET /api/v2/programs/parent
Request
Headers:
Content-Type:
application/json
- Specifies that the request body format is JSON.Accept:
application/json
- Indicates that the client expects a JSON response.Authorization:
Bearer {token}
- A valid Bearer token must be provided to authenticate the request.
Query Parameters:
page (Integer, Required): Specifies the page number in the pagination sequence to retrieve a specific set of results.
limit (Integer, Required): Specifies the number of records to retrieve per page, controlling the volume of data returned.
sortby (Integer, Required): Specifies the order the companies should be returned in:
1 - Sort by Oldest parent program ID
2 - Sort by Newest parent program ID
3 - Sort Alphabetically by parent program name
4 - Sort Reverse Alphabetically by parent program name
Request Examples
curl --request GET \
--get "https://api.r1learning.com/api/v2/programs/parent?page=1&limit=50&sortBy=1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer {token}"
Response
Meta:
Each List endpoint will contain a meta element which will describe the returned package. In this endpoint, the meta will provide the following information:
total_items (Integer): The number of parent programs returned
total pages (integer): The number of pages returned in the call to the endpoint. (Total Items / per_page limit)
current_page (integer): Indicates the current page number of the results
per_page (integer): Indicates the number of results (topics) that will be listed on a single page. The default is 50, the limit is 100.
Data Dictionary:
id (integer): Unique identifier for the parent program.
name (string): Name of the parent program.
status (string): The status of the program (published, pending, draft)
Response Examples
{
"meta": {
"total_items": 3,
"total_pages": 1,
"current_page": 1,
"per_page": 50
},
"parent_program_list": [
{
"id": 1,
"name": "ASAM Level .5 – Early Intervention",
"status": "published"
},
{
"id": 2,
"name": "ASAM Level 1 – Outpatient",
"status": "published"
},
{
"id": 3,
"name": "ASAM Level 2.1 – Intensive Outpatient",
"status": "published"
}
]
}
Postman Link
Notes
Authorization Required: Ensure the provided Bearer token is valid and has sufficient privileges to access the endpoint.
Response Handling: Implement pagination to manage data effectively, especially when dealing with large datasets.
Last updated