Academic Programs
Manage academic programs within your university system via the uniR API.
An Academic Program represents a structured set of courses and requirements offered by the institution that leads to a specific qualification or credential (such as a degree, diploma, or certificate).
Base Path: api/academics/programs
List Academic Programs
Section titled “List Academic Programs”GET /api/academics/programs
Returns a paginated list of academic programs.
Query Parameters
Name | Type | Description |
---|---|---|
page | int | Page Number (optional) |
size | int | Number of items per page |
Example Request
curl -H x-api-key: Bearer YOUR_API_KEY \ https://api.unir.com/v1/api/academics/programs?page=1&size=10
fetch('https://api.unir.com/v1/api/academics/programs?page=1&size=10', { headers: { 'x-api-key': 'Bearer YOUR_API_KEY' }}).then(response => response.json()).then(data => console.log(data)).catch(console.error);
import axios from 'axios';
axios.get('https://api.unir.com/v1/api/academics/programs', { params: { page: 1, size: 10 }, headers: { 'x-api-key': 'Bearer YOUR_API_KEY' }}).then(response => console.log(response.data)).catch(console.error);
or
import axios from 'axios';
axios.defaults.headers.common['x-api-key'] = 'Bearer YOUR_API_KEY';
axios.get('https://api.unir.com/v1/api/academics/programs', { params: { page: 1, size: 10 }}).then(response => console.log(response.data)).catch(console.error);
Responses
{ "items": [ { "id": 0, "name": "string", "duration": "string" } ], "pageNumber": 0, "pageSize": 0, "totalPages": 0, "count": 0, "hasPreviousPage": true, "hasNextPage": true}
- Missing or invalid API KEY.
- User is not authenticated.
User doesnt have permission to access this resource.
Create Academic Programs
Section titled “Create Academic Programs”POST /api/academics/programs
Creates a new academic program.
Request Bodyx
{ "name": "string", "duration": "string"}
Example Request
curl -X POST \ -H x-api-key: Bearer YOUR_API_KEY \ -H "Content-Type: application/json" \ -d '{"name":"Computer Science","code":"CS101"}' \ https://api.unir.com/v1/api/academics/programs
Responses
{ "id": 0, "name": "string", "duration": "string"}
{ "message": "string", "errors": { "additionalProp1": [ "string" ], "additionalProp2": [ "string" ], "additionalProp3": [ "string" ] }}
- Missing or invalid API KEY.
- User is not authenticated.
User doesnt have permission to access this resource.
Retrieve Academic Program by ID
Section titled “Retrieve Academic Program by ID”GET /api/academics/programs/{id}
Retrieves details for a specific academic program by ID.
Path Parameters
Name | Type | Description |
---|---|---|
id | unsigned int | Unique program identifier |
Example Request
curl -H x-api-key: Bearer YOUR_API_KEY \ https://api.unir.com/v1/api/academics/programs/321
fetch('https://api.unir.com/v1/api/academics/programs/321', { headers: { 'x-api-key': 'Bearer YOUR_API_KEY' }}).then(response => response.json()).then(data => console.log(data)).catch(console.error);
import axios from 'axios';
axios.get('https://api.unir.com/v1/api/academics/programs/321', { headers: { 'x-api-key': 'Bearer YOUR_API_KEY' }}).then(response => console.log(response.data)).catch(console.error);
or
import axios from 'axios';
// in your main fileaxios.defaults.headers.common['x-api-key'] = 'Bearer YOUR_API_KEY';
// then elsewhereaxios.get('https://api.unir.com/v1/api/academics/programs/321').then(response => console.log(response.data)).catch(console.error);
using System;using System.Net.Http;using System.Net.Http.Headers;using System.Threading.Tasks;
class Program{ static async Task Main() { using var client = new HttpClient(); client.DefaultRequestHeaders.Add("x-api-key", "Bearer YOUR_API_KEY");
var response = await client.GetAsync("https://api.unir.com/v1/api/academics/programs/321"); response.EnsureSuccessStatusCode();
var content = await response.Content.ReadAsStringAsync(); Console.WriteLine(content); }}
Responses
{ "id": 0, "name": "string", "duration": "string", "branches": [ { "id": 0, "name": "string", "description": "string" } ]}
Academic program does not or no longer exists
- Missing or invalid API KEY.
- User is not authenticated.
User doesnt have permission to access this resource.