Skip to content

Doubtfire API

API: tii_actions

tii_actions : Operations about tii_actions This markdown document provides detailed documentation for the “tii_actions” API endpoints, including their URLs, methods, parameters (if any), responses, and example requests using curl.

This “tii_actipns” API has the following operations.

  • PUT /api/tii_actions/{id}
  • GET /api/tii_actions

GET: Retrieve Outstanding Turnitin Actions

GET /api/tii_actions

  • URL: /api/tii_actions

  • Method: GET

  • Parameters:

    ParameterDescriptionParameter TypeData TypeMandatoryDefault
    unit_idThe ID of the unit to filter byqueryintegerNonil
    limitThe maximum number of actions to returnqueryintegerNo50
    offsetThe offset to start fromqueryintegerNo0
    show_completeInclude complete actions?querybooleanNofalse
    UsernameUser usernameheaderstringYes
    Auth_TokenAuthentication tokenheaderstringYes
  • Response: 200 OK

  • Example Request:

    Terminal window
    curl -X GET --header 'Accept: application/json' --header 'Username: admin' --header 'Auth_Token: rrK8BdRfxof9RrJGuk5n'
    'http://localhost:3000/api/tii_actions?unit_id=1&limit=10&offset=0&show_complete=false'
  • Response Body:

    [
    {
    "id": 1,
    "unit_id": 1,
    "action": "Turnitin action details",
    "complete": false,
    "updated_at": "2023-07-14T10:00:00Z"
    },
    {
    "id": 2,
    "unit_id": 1,
    "action": "Another Turnitin action details",
    "complete": false,
    "updated_at": "2023-07-14T09:00:00Z"
    }
    ]

PUT: Trigger an Action on a Turnitin Group Attachment

PUT /api/tii_actions/{id}

  • URL: /api/tii_actions/{id}

  • Method: PUT

  • Parameters:

    ParameterDescriptionParameter TypeData TypeMandatoryDefault
    idThe ID of the Turnitin actionpathintegerYes
    actionThe action to perform: retrybodystringYes
    unit_idThe ID of the unit to filter bybodyintegerNonil
    UsernameUser usernameheaderstringYes
    Auth_TokenAuthentication tokenheaderstringYes
  • Response: 200 OK

  • Example Request:

    Terminal window
    curl -X PUT --header 'Content-Type: application/json' --header 'Username: admin' --header 'Auth_Token: rrK8BdRfxof9RrJGuk5n'
    -d '{"action": "retry", "unit_id": 1}' 'http://localhost:3000/api/tii_actions/1'
  • Response Body:

    {
    "message": "Retry action triggered successfully"
    }