Categories are now referred to as Topics in the UI.
A CategoryTag record allows you to tag a Course with a Category.
Description of the CategoryTag Attributes
Attribute Name | Description |
---|---|
id (integer) | unique identifier of the record |
category_id (integer) | id of the tagging Category record - required |
categorizable_id (integer) | id of the tagging Course record - required |
categorizable_type (string) | always "Course" |
code (string) | unique identifier for the record, optional |
List
Resource: /api/v2/category_tags
HTTPS Request Method: GET
Description: The list of CategoryTag
records of the account. This endpoint is paginated and returns 500 results per page.
Required parameter:
api_key (string)
: the account API key
Optional parameters:
page (integer)
: the page you want to request. Every page is 500 records long at most. If not present, page 1 is assumed.- you can filter the results on the following
CategoryTag
attributes:category_id
,code
,categorizable_id
,categorizable_type
Response:
- on success: a 200 HTTP code and an array of the found records in the body
- on failure: a 422 HTTP code and an array of the errors in the body
Example requests:
Get 500 first CategoryTag records of the account:
curl -H "Content-type: application/json" -H "Accept: application/json" https://my-account-subdomain.exceedlms-staging.com/api/v2/category_tags?api_key=my-account-subdomain-api-key-value
Get 500 first CategoryTag records associated to
Category
record withid
10 :curl -H "Content-type: application/json" -H "Accept: application/json" "https://my-account-subdomain.exceedlms-staging.com/api/v2/category_tags?api_key=my-account-subdomain-api-key-value&category_tag\[category_id\]=10"
Create
Resource: /api/v2/category_tag
HTTPS Request Method: POST
Description: create a new CategoryTag record.
Required parameter:
api_key (string)
: the account API key- all the attributes listed in "Description of the CategoryTag attributes", except code
Optional parameters:
code (string)
Note: The following parameters are limited to 255 characters:
categorizable_type
Response:
- on success: a 200 HTTP code and the created record in the body
- on failure: a 422 HTTP code and an array of the errors in the body
Example requests:
- Create a
CategoryTag
betweenCourse
withid
1 andCategory
withid
1:curl -H "Content-type: application/json" -H "Accept: application/json" -X POST -d '{ "category_tag": {"category_id": "1", "categorizable_type": "Course", "categorizable_id": "1" } }' https://my-account-subdomain.exceedlms-staging.com/api/v2/category_tags?api_key=my-account-subdomain-api-key-value
Destroy
Resource: /api/v2/category_tags/
HTTPS Request Method: DELETE
Description: destroy an existing CategoryTag record.
Required parameters:
api_key (string)
: the account API keyid (integer)
: the id of the CategoryTag record to destroy
Optional parameters: none
Response:
- on success: a 200 HTTP code and an empty body
- on failure: a 422 HTTP code and an array of the errors in the body
Example requests:
- Destroy the record with 'id' 20:
curl -H "Content-type: application/json" -H "Accept: application/json" -X DELETE https://my-account-subdomain.exceedlms-staging.com/api/v2/category_tags/20?api_key=my-account-subdomain-api-key-value