Course Categories

Note: Every endpoint listed in this document is managing JSON objects, so the path structure shown for nested keys is represented in a JSON-style access pattern.

Root Path: /course_categories/

Model

API endpoint for managing course category properties.
Key Type Default Description
name string <colander.required>  
category_type string    
description string    
parent string    
courses []string []  

List

Return a list of this collection’s items, matching the filter parameters if provided.

HTTP Verb: GET

Endpoint: /api/v1/course_categories/

Example Request (cURL):

curl -X GET -H "App-Token: [APP_TOKEN]" -H "Token: [TOKEN]"
     -H "Content-Type: application/json"
     http://<yournamehere>.enfixlp.com/api/v1/course_categories/

Example Response:

[
{
    "courses": [],
    "category_type": "",
    "name": "High School Mathematics",
    "parent": "",
    "description": ""
}
]

Get One

Return the specified collection item.

HTTP Verb: GET

Endpoint: /api/v1/course_categories/[id]

Example Request (cURL):

curl -X GET -H "App-Token: [APP_TOKEN]" -H "Token: [TOKEN]"
     -H "Content-Type: application/json"
     http://<yournamehere>.enfixlp.com/api/v1/course_categories/[id]

Example Response:

{
    "courses": [],
    "category_type": "",
    "name": "High School Mathematics",
    "parent": "",
    "description": ""
}

Create

Store a new instance of the object in the system. All required fields must be specified.

HTTP Verb: POST

Endpoint: /api/v1/course_categories/

Example Request (cURL):

curl -X POST -H "App-Token: [APP_TOKEN]" -H "Token: [TOKEN]"
     -H "Content-Type: application/json"
     -d '{"courses": [], "category_type": "", "name": "High School Mathematics", "parent": "", "description": ""}'
     http://<yournamehere>.enfixlp.com/api/v1/course_categories/

Example Response:

{
    "resource_url": "http://<yournamehere>.enfixlp.com/api/v1/course_categories/51b1e78dbd7a844089b652a9/",
    "_id": "51b1e78dbd7a844089b652a9"
}

Replace

This is a full model replacement of the specified item, every required field must be specified.

HTTP Verb: PUT

Endpoint: /api/v1/course_categories/[id]

Example Request (cURL):

curl -X PUT -H "App-Token: [APP_TOKEN]" -H "Token: [TOKEN]"
     -H "Content-Type: application/json"
     -d '{"courses": [], "category_type": "", "name": "High School Mathematics", "parent": "", "description": ""}'
     http://<yournamehere>.enfixlp.com/api/v1/course_categories/[id]

Example Response:

No body, Status Code 204.

Update

On an update, you may specify only the fields you wish to update. All other fields will be preserved as currently stored.

HTTP Verb: PATCH

Endpoint: /api/v1/course_categories/[id]

Example Request (cURL):

curl -X PUT -H "App-Token: [APP_TOKEN]" -H "Token: [TOKEN]"
     -H "Content-Type: application/json"
     -d '{"courses": []}'
     http://<yournamehere>.enfixlp.com/api/v1/course_categories/[id]

Example Response:

No body, Status Code 204.

Delete

Permanently remove an item from the collection.

HTTP Verb: DELETE

Endpoint: /api/v1/course_categories/[id]

Example Request (cURL):

curl -X DELETE -H "App-Token: [APP_TOKEN]" -H "Token: [TOKEN]"
     -H "Content-Type: application/json"
     http://<yournamehere>.enfixlp.com/api/v1/course_categories/[id]

Example Response:

No body, Status Code 200.