Doubtfire API
List of Doubtfire
API: Units - Tutorial Streams
Units : Operations about Units
This markdown document provides detailed documentation for the “Tutorial Streams” API endpoints, including their URLs, methods, parameters (if any), responses, and example requests using curl.
This “units” API page has the following operations.
- DELETE /api/units/{unit_id}/tutorial_streams/{tutorial_stream_abbr}
- PUT /api/units/{unit_id}/tutorial_streams/{tutorial_stream_abbr}
- POST /api/units/{unit_id}/tutorial_streams
DELETE: Remove Tutorial stream from the Unit
DELETE /api/units/{unit_id}/tutorial_streams/{tutorial_stream_abbr}
-
URL:
/api/units/{unit_id}/tutorial_streams/{tutorial_stream_abbr}
-
Method:
DELETE
-
Parameter:
Parameter Description Parameter Type Data Type Mandatory Username Username header string Yes Auth_Token Authentication token header string Yes unit_id The unit id path integer Yes abbreviation abbreviation for the tutorial stream path string Yes -
Response:
200 OK
-
Example Request:
Terminal window curl -X DELETE --header 'Accept: application/json' --header 'Username: aadmin' --header 'Auth_Token: Say13yA497H8wSFFXZxh' 'http://localhost:3000/api/units/1/tutorial_streams/TS_1' -
Response Body:
True
PUT: Update a tutorial stream in the unit
PUT /api/units/{unit_id}/tutorial_streams/{tutorial_stream_abbr}
-
URL:
/api/units/{unit_id}/tutorial_streams/{tutorial_stream_abbr}
-
Method:
PUT
-
Parameter:
Parameter Description Parameter Type Data Type Mandatory Username Username header string Yes Auth_Token Authentication token header string Yes unit_id The unit id path integer Yes abbreviation abbreviation for the tutorial stream path string No name name of the tutorial stream body string No activity_type_abbr abbreviation for activity type body string No -
Response:
200
-
Example Request:
Terminal window curl -X PUT \--header 'Auth_Token: Say13yA497H8wSFFXZxh' \ -d '{"name":"Test","abbreviation":"TSAB","activity_type":"Test1"}' 'http://localhost:3000/api/units/1/tutorial_streams/TS1' -
Response Body:
{"tutorial_stream": {"name": "Test","abbreviation": "TSAB","activity_type": "Test1"}}
POST: Add a tutorial stream to the unit
POST /api/units/{unit_id}/tutorial_streams
-
URL:
/api/units/{unit_id}/tutorial_streams
-
Method:
POST
-
Parameter:
Parameter Description Parameter Type Data Type Mandatory Username Username header string Yes Auth_Token Authentication token header string Yes unit_id The unit id path integer Yes activity_type_abbr abbreviation for activity type body string Yes -
Response:
201
-
Example Request:
Terminal window curl -X POST \--header 'Auth_Token: Say13yA497H8wSFFXZxh' \ -d '{"activity_type_abbr":"Test1"}' 'http://localhost:3000/api/units/1/tutorial_streams' -
Response Body:
{"tutorial_stream": {"name": "Test","abbreviation": "TSAB","activity_type": "Test1"}}