### Example JSON Response for Get all groups Source: https://documenter.getpostman.com/view/31867199/2sAY548Kou/index_296f4cc1-ed54-4c3a-be1f-722ce32f55f8 An example JSON response when retrieving all groups. It includes a '_data' array with group objects, '_links' for pagination, and '_meta' containing pagination details. ```json { "_data": [ { "id": 1, "name": "sample_group", "description": "A sample, generic group", "key_redemptions": { "max": 11, "used": 0 }, "branch": null, "price": { "amount": 0, "currency": "USD" } } ], "_links": { "self": "http://example.talentlms.com/api/v2/groups?page[number]=1&page[size]=10", "first": "http://example.talentlms.com/api/v2/groups?page[number]=1&page[size]=10", "last": "http://example.talentlms.com/api/v2/groups?page[number]=1&page[size]=10", "prev": "http://example.talentlms.com/api/v2/groups?page[number]=1&page[size]=10", "next": "http://example.talentlms.com/api/v2/groups?page[number]=1&page[size]=10" }, "_meta": { "pagination": { "page": 1, "page_size": 10, "total_items": 1, "total_pages": 1, "total_results": 1 } } } ``` -------------------------------- ### Example JSON Response for Get a group by ID Source: https://documenter.getpostman.com/view/31867199/2sAY548Kou/index_296f4cc1-ed54-4c3a-be1f-722ce32f55f8 An example JSON response when retrieving a single group by its ID. It contains a '_data' object with the specific group's details. ```json { "_data": { "id": 1, "name": "sample_group", "description": "A sample, generic group", "branch": null, "key": "bDLybt16W", "max_key_redemptions": 11, "price": null } } ``` -------------------------------- ### Create Group Request Example (cURL) Source: https://documenter.getpostman.com/view/31867199/2sAY548Kou/index_296f4cc1-ed54-4c3a-be1f-722ce32f55f8 An example of how to make a POST request to create a group using cURL. This command includes the API endpoint, necessary headers, and the JSON payload. Replace placeholders with your actual values. ```curl curl --location -g '{{baseUrl}}/api/v2/groups' \ --header 'X-API-Version: {{apiVersion}}' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --data '{ "name": "example group", "description": "An example group.", "key": "key123", "max_key_redemptions": 28, "price": 12 }' ``` -------------------------------- ### Example JSON Response for Timeline Pagination Source: https://documenter.getpostman.com/view/31867199/2sAY548Kou/index_296f4cc1-ed54-4c3a-be1f-722ce32f55f8 An example JSON response illustrating pagination links for timeline data. It includes 'self', 'first', 'last', 'prev', and 'next' links to navigate through paginated results. ```json { "self": "https://example.talentlms.com/api/v2/timeline?page[number]=1&page[size]=10", "first": "https://example.talentlms.com/api/v2/timeline?page[number]=1&page[size]=10", "last": "https://example.talentlms.com/api/v2/timeline?page[number]=110&page[size]=10", "prev": "https://example.talentlms.com/api/v2/timeline?page[number]=1&page[size]=10", "next": "https://example.talentlms.com/api/v2/timeline?page[number]=2&page[size]=10" } ``` -------------------------------- ### Get Timeline API Request (curl) Source: https://documenter.getpostman.com/view/31867199/2sAY548Kou/index_296f4cc1-ed54-4c3a-be1f-722ce32f55f8 Example of how to make a GET request to the timeline API endpoint using curl. This command includes necessary headers for authentication and versioning. ```curl curl --location -g '{{baseUrl}}/api/v2/timeline' \ --header 'X-API-Version: {{apiVersion}}' \ --header 'X-API-Key: {{apiKey}}' ``` -------------------------------- ### Create Group Response Example (JSON) Source: https://documenter.getpostman.com/view/31867199/2sAY548Kou/index_296f4cc1-ed54-4c3a-be1f-722ce32f55f8 A sample JSON response received after successfully creating a group. It includes the newly created group's details, such as its ID, name, description, and pricing information. The response confirms the creation and provides the group's unique identifier. ```json { "_data": { "id": 9, "name": "example group", "description": "An example group.", "branch": null, "key": "key123", "max_key_redemptions": 28, "price": { "amount": 12, "currency": "USD" } } } ``` -------------------------------- ### GET /api/v2/timeline Source: https://documenter.getpostman.com/view/31867199/2sAY548Kou/index_296f4cc1-ed54-4c3a-be1f-722ce32f55f8 Retrieves a chronological list of key platform events and user activities. The response includes details such as event type, user, timestamp, and related entities, returned as a JSON array. ```APIDOC ## GET /api/v2/timeline ### Description Retrieve a chronological list of key platform events and user activities, including details such as event type, user, timestamp, and related entities, as a JSON array. ### Method GET ### Endpoint /api/v2/timeline ### Parameters #### Query Parameters - **apiKey** (string) - Required - The API key for authentication. - **apiVersion** (string) - Required - The version of the API to use. ### Request Example ```bash curl --location -g '{{baseUrl}}/api/v2/timeline' \ --header 'X-API-Version: {{apiVersion}}' \ --header 'X-API-Key: {{apiKey}}' ``` ### Response #### Success Response (200) - **_data** (array) - An array of timeline event objects. - **id** (string) - The unique identifier for the event. - **user_id** (integer) - The ID of the user associated with the event. - **event_type** (string) - The type of event that occurred. - **created_at** (string) - The timestamp when the event was created (ISO 8601 format). - **occurrences** (integer) - The number of times this event has occurred. - **extra** (object) - Additional details related to the event. - **user** (object) - Information about the user involved. - **id** (integer) - The user's ID. - **name** (string) - The user's first name. - **surname** (string) - The user's last name. - **login** (string) - The user's login name. - **group** (object | null) - Information about the group, if applicable. - **course** (object | null) - Information about the course, if applicable. - **id** (integer) - The course ID. - **name** (string) - The course name. - **code** (string | null) - The course code, if available. - **branch** (object | null) - Information about the branch, if applicable. - **unit** (object | null) - Information about the unit, if applicable. #### Response Example ```json { "_data": [ { "id": "1099", "user_id": 43, "event_type": "user_create_user", "created_at": "2025-07-10T09:23:34+00:00", "occurrences": 1, "extra": { "user": { "id": 43, "name": "John", "surname": "Doe", "login": "johndoe11" }, "group": null, "course": null, "branch": null, "unit": null } } ], "_links": {} } ``` ``` -------------------------------- ### Timeline API Response Example (JSON) Source: https://documenter.getpostman.com/view/31867199/2sAY548Kou/index_296f4cc1-ed54-4c3a-be1f-722ce32f55f8 A sample JSON response from the timeline API, illustrating the structure of the returned data. Each object in the '_data' array represents a distinct event with details like ID, user ID, event type, creation timestamp, and associated extra information. ```json { "_data": [ { "id": "1099", "user_id": 43, "event_type": "user_create_user", "created_at": "2025-07-10T09:23:34+00:00", "occurrences": 1, "extra": { "user": { "id": 43, "name": "John", "surname": "Doe", "login": "johndoe11" }, "group": null, "course": null, "branch": null, "unit": null } }, { "id": "1098", "user_id": 42, "event_type": "user_create_user", "created_at": "2025-07-10T09:21:35+00:00", "occurrences": 1, "extra": { "user": { "id": 42, "name": "Makis", "surname": "Kotz", "login": "makis" }, "group": null, "course": null, "branch": null, "unit": null } } ], "_links": { ... } } ``` -------------------------------- ### GET /api/v2/statistics Source: https://documenter.getpostman.com/view/31867199/2sAY548Kou/index_296f4cc1-ed54-4c3a-be1f-722ce32f55f8 Retrieve platform-wide statistics, such as total users, courses, categories, groups, branches, and configuration details. This endpoint returns a JSON object containing various metrics. ```APIDOC ## GET /api/v2/statistics ### Description Retrieve platform-wide statistics, such as total users, courses, categories, groups, branches, and configuration details, by sending an authenticated GET request to this endpoint and receiving a report as a JSON object. ### Method GET ### Endpoint {{baseUrl}}/api/v2/statistics ### Parameters #### Query Parameters - **page[number]** (integer) - Optional - The page number to retrieve. - **page[size]** (integer) - Optional - The number of items per page (max 100). ### Request Example ```bash curl --location 'sandbox.localhost.talentlms.com/api/v2/statistics' \ --header 'X-API-Version: {{apiVersion}}' \ --header 'X-API-Key: {{apiKey}}' ``` ### Response #### Success Response (200) - **_data** (object) - Contains the statistics data. - **total_users** (integer) - Total number of users. - **total_courses** (integer) - Total number of courses. - **total_categories** (integer) - Total number of categories. - **total_groups** (integer) - Total number of groups. - **total_branches** (integer) - Total number of branches. - **monthly_active_users** (integer) - Number of active users in the last month. - **signup_method** (string) - The method used for signups. - **signup_type** (string) - The type of signup. - **verification** (string) - Verification status or details. - **paypal_email** (string) - PayPal email if configured. - **domain_map** (boolean) - Indicates if domain mapping is enabled. - **date_format** (string) - The date format used in the platform. - **branch_limit** (integer) - The limit for branches. #### Response Example ```json { "_data": { "total_users": 4, "total_courses": 4, "total_categories": 4, "total_groups": 1, "total_branches": 0, "monthly_active_users": 0, "signup_method": "manual", "signup_type": "manual", "verification": null, "paypal_email": null, "domain_map": false, "date_format": "DDMMYYYY", "branch_limit": 0 } } ``` ``` -------------------------------- ### Get all groups (curl) Source: https://documenter.getpostman.com/view/31867199/2sAY548Kou/index_296f4cc1-ed54-4c3a-be1f-722ce32f55f8 Retrieves a paginated list of all groups from the TalentLMS API. Requires an API key for authorization and specifies API version and content type in headers. Returns a JSON object containing group data and pagination metadata. ```curl curl --location -g '{{baseUrl}}/api/v2/groups' \ --header 'X-API-Version: {{apiVersion}}' \ --header 'Accept: application/json' ``` -------------------------------- ### Get Portal Statistics Response (JSON) Source: https://documenter.getpostman.com/view/31867199/2sAY548Kou/index_296f4cc1-ed54-4c3a-be1f-722ce32f55f8 This JSON object represents a successful response from the portal statistics endpoint. It contains various metrics about the platform, including total users, courses, categories, groups, branches, and configuration details. ```json { "_data": { "total_users": 4, "total_courses": 4, "total_categories": 4, "total_groups": 1, "total_branches": 0, "monthly_active_users": 0, "signup_method": "manual", "signup_type": "manual", "verification": null, "paypal_email": null, "domain_map": false, "date_format": "DDMMYYYY", "branch_limit": 0 } } ``` -------------------------------- ### GET /api/v2/groups/:id Source: https://documenter.getpostman.com/view/31867199/2sAY548Kou/index_296f4cc1-ed54-4c3a-be1f-722ce32f55f8 Provide the group ID to fetch details about a specific group. ```APIDOC ## GET /api/v2/groups/:id ### Description Provide the group ID to fetch details about a specific group. ### Method GET ### Endpoint {{baseUrl}}/api/v2/groups/:id ### Parameters #### Path Parameters - **id** (integer) - Required - The unique identifier of the group. ### Request Example ```bash curl --location -g '{{baseUrl}}/api/v2/groups/1' \ --header 'X-API-Version: {{apiVersion}}' \ --header 'Accept: application/json' ``` ### Response #### Success Response (200) - **_data** (object) - The group object. - **id** (integer) - The unique identifier for the group. - **name** (string) - The name of the group. - **description** (string) - A description of the group. - **branch** (object|null) - Information about the branch associated with the group. - **key** (string) - The key associated with the group. - **max_key_redemptions** (integer) - The maximum number of key redemptions allowed. - **price** (object|null) - Pricing information for the group. #### Response Example ```json { "_data": { "id": 1, "name": "sample_group", "description": "A sample, generic group", "branch": null, "key": "bDLybt16W", "max_key_redemptions": 11, "price": null } } ``` ``` -------------------------------- ### GET /api/v2/timeline Source: https://documenter.getpostman.com/view/31867199/2sAY548Kou/index_296f4cc1-ed54-4c3a-be1f-722ce32f55f8 Retrieve timeline data. This endpoint is part of the TalentLMS Public API. ```APIDOC ## GET /api/v2/timeline ### Description Retrieve timeline data. This endpoint is part of the TalentLMS Public API. ### Method GET ### Endpoint {{baseUrl}}/api/v2/timeline ### Parameters #### Query Parameters - **page[number]** (integer) - Optional - The page number to retrieve. - **page[size]** (integer) - Optional - The number of items per page (max 100). ### Request Example (No specific request example provided in the source text for this endpoint, but it would follow the general pattern of authenticated GET requests with potential pagination parameters.) ### Response #### Success Response (200) (The structure of the response for the timeline endpoint is not detailed in the provided text. Typically, it would be a JSON array of timeline events.) #### Response Example (No specific response example provided in the source text for this endpoint.) ``` -------------------------------- ### GET /api/v2/groups Source: https://documenter.getpostman.com/view/31867199/2sAY548Kou/index_296f4cc1-ed54-4c3a-be1f-722ce32f55f8 Retrieve all groups, receiving a paginated list of group objects in a JSON response. ```APIDOC ## GET /api/v2/groups ### Description Retrieve all groups, receiving a paginated list of group objects in a JSON response. ### Method GET ### Endpoint {{baseUrl}}/api/v2/groups ### Parameters #### Query Parameters - **page[number]** (integer) - Optional - The page number to retrieve. - **page[size]** (integer) - Optional - The number of items per page. ### Request Example ```bash curl --location -g '{{baseUrl}}/api/v2/groups' \ --header 'X-API-Version: {{apiVersion}}' \ --header 'Accept: application/json' ``` ### Response #### Success Response (200) - **_data** (array) - A list of group objects. - **id** (integer) - The unique identifier for the group. - **name** (string) - The name of the group. - **description** (string) - A description of the group. - **key_redemptions** (object) - Information about key redemptions. - **max** (integer) - The maximum number of key redemptions allowed. - **used** (integer) - The number of key redemptions used. - **branch** (object|null) - Information about the branch associated with the group. - **price** (object) - Pricing information for the group. - **amount** (number) - The price amount. - **currency** (string) - The currency of the price. - **_links** (object) - Links for pagination. - **self** (string) - URL for the current page. - **first** (string) - URL for the first page. - **last** (string) - URL for the last page. - **prev** (string) - URL for the previous page. - **next** (string) - URL for the next page. - **_meta** (object) - Metadata for pagination. - **pagination** (object) - Pagination details. - **page** (integer) - Current page number. - **page_size** (integer) - Number of items per page. - **total_items** (integer) - Total number of items. - **total_pages** (integer) - Total number of pages. - **total_results** (integer) - Total number of results. #### Response Example ```json { "_data": [ { "id": 1, "name": "sample_group", "description": "A sample, generic group", "key_redemptions": { "max": 11, "used": 0 }, "branch": null, "price": { "amount": 0, "currency": "USD" } } ], "_links": { "self": "http://example.talentlms.com/api/v2/groups?page[number]=1&page[size]=10", "first": "http://example.talentlms.com/api/v2/groups?page[number]=1&page[size]=10", "last": "http://example.talentlms.com/api/v2/groups?page[number]=1&page[size]=10", "prev": "http://example.talentlms.com/api/v2/groups?page[number]=1&page[size]=10", "next": "http://example.talentlms.com/api/v2/groups?page[number]=1&page[size]=10" }, "_meta": { "pagination": { "page": 1, "page_size": 10, "total_items": 1, "total_pages": 1, "total_results": 1 } } } ``` ``` -------------------------------- ### Get Portal Statistics Request (cURL) Source: https://documenter.getpostman.com/view/31867199/2sAY548Kou/index_296f4cc1-ed54-4c3a-be1f-722ce32f55f8 This cURL command demonstrates how to retrieve platform-wide statistics from the TalentLMS API. It requires an API key and specifies the API version in the headers. The request targets the /api/v2/statistics endpoint. ```curl curl --location 'sandbox.localhost.talentlms.com/api/v2/statistics' \ --header 'X-API-Version: {{apiVersion}}' \ --header 'X-API-Key: {{apiKey}}' ``` -------------------------------- ### Get a group by ID (curl) Source: https://documenter.getpostman.com/view/31867199/2sAY548Kou/index_296f4cc1-ed54-4c3a-be1f-722ce32f55f8 Fetches details for a specific group using its ID. The request includes the group ID in the URL path and requires API key authentication. The response is a JSON object containing the group's details. ```curl curl --location -g '{{baseUrl}}/api/v2/groups/1' \ --header 'X-API-Version: {{apiVersion}}' \ --header 'Accept: application/json' ``` -------------------------------- ### Pagination Parameters Source: https://documenter.getpostman.com/view/31867199/2sAY548Kou/index This section details how to use query parameters for pagination to control the size and number of items returned in API responses. ```APIDOC ## GET /api/v2/users ### Description Retrieves a list of users with support for pagination. ### Method GET ### Endpoint /api/v2/users ### Query Parameters - **page[number]** (integer) - Optional - The page number to retrieve. - **page[size]** (integer) - Optional - The number of items per page. Maximum is 100. ### Response #### Success Response (200) - **self** (string) - URL for the current page. - **first** (string) - URL for the first page. - **last** (string) - URL for the last page. - **prev** (string) - URL for the previous page. - **next** (string) - URL for the next page. #### Response Example ```json { "self": "https://example.talentlms.com/api/v2/users?page[number]=1&page[size]=10", "first": "https://example.talentlms.com/api/v2/users?page[number]=1&page[size]=10", "last": "https://example.talentlms.com/api/v2/users?page[number]=4&page[size]=10", "prev": "https://example.talentlms.com/api/v2/users?page[number]=1&page[size]=10", "next": "https://example.talentlms.com/api/v2/users?page[number]=2&page[size]=10" } ``` ``` -------------------------------- ### POST /api/v2/groups Source: https://documenter.getpostman.com/view/31867199/2sAY548Kou/index_296f4cc1-ed54-4c3a-be1f-722ce32f55f8 Create a new group. ```APIDOC ## POST /api/v2/groups ### Description Create a new group. ### Method POST ### Endpoint {{baseUrl}}/api/v2/groups ### Parameters #### Request Body - **name** (string) - Required - The name of the group. - **description** (string) - Optional - A description for the group. - **branch_id** (integer) - Optional - The ID of the branch to associate with the group. - **price** (object) - Optional - Pricing details for the group. - **amount** (number) - Required - The price amount. - **currency** (string) - Required - The currency of the price (e.g., "USD"). ### Request Example ```json { "name": "New Group Name", "description": "This is a newly created group.", "branch_id": 1, "price": { "amount": 100, "currency": "USD" } } ``` ### Response #### Success Response (201 Created) - **_data** (object) - The newly created group object. - **id** (integer) - The unique identifier for the group. - **name** (string) - The name of the group. - **description** (string) - A description of the group. - **branch** (object|null) - Information about the branch associated with the group. - **key_redemptions** (object) - Information about key redemptions. - **max** (integer) - The maximum number of key redemptions allowed. - **used** (integer) - The number of key redemptions used. - **price** (object) - Pricing information for the group. - **amount** (number) - The price amount. - **currency** (string) - The currency of the price. #### Response Example ```json { "_data": { "id": 2, "name": "New Group Name", "description": "This is a newly created group.", "branch": { "id": 1, "name": "Main Branch" }, "key_redemptions": { "max": 0, "used": 0 }, "price": { "amount": 100, "currency": "USD" } } } ``` ``` -------------------------------- ### Create Group Request Body (JSON) Source: https://documenter.getpostman.com/view/31867199/2sAY548Kou/index_296f4cc1-ed54-4c3a-be1f-722ce32f55f8 Defines the structure for the JSON request body to create a new group. It includes fields like name, description, key, maximum key redemptions, and price. Ensure all required fields are correctly formatted. ```json { "name": "", "description": "", "key": "", "max_key_redemptions": "", "price": "" } ``` -------------------------------- ### POST /api/v2/groups Source: https://documenter.getpostman.com/view/31867199/2sAY548Kou/index_296f4cc1-ed54-4c3a-be1f-722ce32f55f8 Creates a new group by supplying the necessary group fields. Returns the new group's ID upon successful creation. ```APIDOC ## POST /api/v2/groups ### Description Supply necessary group fields to create a group and receive the new group’s ID. ### Method POST ### Endpoint /api/v2/groups ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **name** (string) - Required - The name of the group. - **description** (string) - Optional - A description for the group. - **key** (string) - Required - A unique key for the group. - **max_key_redemptions** (integer) - Optional - The maximum number of times the group key can be redeemed. - **price** (float) - Optional - The price associated with the group. ### Request Example ```json { "name": "example group", "description": "An example group.", "key": "key123", "max_key_redemptions": 28, "price": 12 } ``` ### Response #### Success Response (200) - **_data** (object) - Contains the details of the created group. - **id** (integer) - The unique identifier of the created group. - **name** (string) - The name of the group. - **description** (string) - The description of the group. - **branch** (null) - Placeholder for branch information. - **key** (string) - The key of the group. - **max_key_redemptions** (integer) - The maximum number of redemptions for the group key. - **price** (object) - The price details of the group. - **amount** (integer) - The price amount. - **currency** (string) - The currency of the price. #### Response Example ```json { "_data": { "id": 9, "name": "example group", "description": "An example group.", "branch": null, "key": "key123", "max_key_redemptions": 28, "price": { "amount": 12, "currency": "USD" } } } ``` ``` -------------------------------- ### API Pagination Response Structure (JSON) Source: https://documenter.getpostman.com/view/31867199/2sAY548Kou/index This JSON structure represents the pagination links returned by API endpoints that support pagination. It includes links to the current page ('self'), the first page ('first'), the last page ('last'), the previous page ('prev'), and the next page ('next'). The 'page[size]' parameter controls the number of items per page, up to a maximum of 100. ```json { "self": "https://example.talentlms.com/api/v2/users?page[number]=1&page[size]=10", "first": "https://example.talentlms.com/api/v2/users?page[number]=1&page[size]=10", "last": "https://example.talentlms.com/api/v2/users?page[number]=4&page[size]=10", "prev": "https://example.talentlms.com/api/v2/users?page[number]=1&page[size]=10", "next": "https://example.talentlms.com/api/v2/users?page[number]=2&page[size]=10" } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.