Action Tracker
API Reference
Post Action

Post Action

HTTP request

Replace the URL prefix for Action Tracker depending on environment following the guideline.

HTTP
POST http://localhost:7071/api/actions
Content-Type: application/json
Authorization: Bearer {{TOKEN}}

Request headers

HeaderValue
AuthorizationBearer {token}. Required.

Request body

In the request body, supply a JSON representation of actions object.

Response

If successful, this method returns a 201 Created response code and an actions object with action.id attribute in the response body.

HTTP/1.1 201 Created
Content-Type: application/json
Date: Mon, 26 Aug 2024 04:42:12 GMT
Server: Kestrel
Transfer-Encoding: chunked

Example

Reqeust

Here is an example of the request.

HTTP
POST http://localhost:7071/api/actions
Content-Type: application/json
Authorization: Bearer {{TOKEN}}
 
{
  "title": "Machine spindle is broken again",
  "description": "The machine spindle is broken and needs to be replaced.",
  "actionProducer": { "name": "ShiftStart", "url": "https://wikipedia.org" },
  "location": {
    "businessUnit": "RTAZ",
    "site": "Marandoo",
    "department": "Site management",
    "workGroup": "Maintenance",
    "productiveUnit": "OFKYNSUDZOZKJAKB7J",
    "team": "Maintenance",
    "crew": "Maintenance"
  },
  "allowAnonymousEdits": true,
  "dueAt": "2024-11-26T02:34:47Z",
  "priority": "2",
  "status": "1",
  "attachments": []
}

Response

HTTP
{
  "id": "66cc07a5105708bb3c80e6da"
}

Experimental

An action can only be edited by an action owner or action assignee only. If failed, this method returns a 403 Forbidden response code.

⚠️

action object accepts allowAnonymousEdits parameter during creation which allows the above authorization to be ignored. This allows teams with special requirements such as Shift Start and SPM to allow anyone to edit the action even if they're not an action owner or an action assignee.

Here is an example of the request.

HTTP
POST http://localhost:7071/api/actions
Content-Type: application/json
Authorization: Bearer {{TOKEN}}
 
{
  "title": "Anyone is allowed to edit this action",
  "allowAnonymousEdits": true,
}

The request object shown above is truncated for brevity. All other required properties have to be passed in an actual call.