Skip to content

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:

    ParameterDescriptionParameter TypeData TypeMandatory
    UsernameUsernameheaderstringYes
    Auth_TokenAuthentication tokenheaderstringYes
    unit_idThe unit idpathintegerYes
    abbreviationabbreviation for the tutorial streampathstringYes
  • 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:

    ParameterDescriptionParameter TypeData TypeMandatory
    UsernameUsernameheaderstringYes
    Auth_TokenAuthentication tokenheaderstringYes
    unit_idThe unit idpathintegerYes
    abbreviationabbreviation for the tutorial streampathstringNo
    namename of the tutorial streambodystringNo
    activity_type_abbrabbreviation for activity typebodystringNo
  • 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:

    ParameterDescriptionParameter TypeData TypeMandatory
    UsernameUsernameheaderstringYes
    Auth_TokenAuthentication tokenheaderstringYes
    unit_idThe unit idpathintegerYes
    activity_type_abbrabbreviation for activity typebodystringYes
  • 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"
    }
    }