Documentation Index

Fetch the complete documentation index at: https://support.keypro.fi/llms.txt

Use this file to discover all available pages before exploring further.

2025-11-06 14.00 UTC - There are currently no active events. All systems operational.

Create new Task

Prev Next
Post
/tasks/

Operation is used to create new task. Can also create/attach network objects to fault.

Security
API Key: Token
Header parameter nameAuthorization

Token issued for API consumer.

Body parameters

Task to be created

object

Task

category
integer

related Category id

contentType
integer

ContentType id for the network objects included in fault, use /api/v2/object-types/ endpoint to get these

currentState
integer

Id of current task state

id
integer

Primary key

identifier
string

System generated identifer for task.

name
string

Task name

networkObjects
Array of integer

List of primary keys from content type model to be included in fault

integer
subregion
integer

related Subregion id

Responses
201

Created Task data.

{
  "automaticRepeat": 0,
  "closedInfo": "{}",
  "currentState": null,
  "currentStateInfo": {
    "createdBy": "example@keypro.fi",
    "createdTs": "2026-05-19T18:01:12.740Z",
    "state": {
      "description": "Open",
      "groupname": "STATUS",
      "id": 235,
      "list_url": "http://example.keypro.fi/api/v2/sattrs/groupname/STATUS/",
      "name": "STATUS_OPEN_OPEN",
      "numValue": null,
      "orderno": 0,
      "txtValue": null
    }
  },
  "endDate": null,
  "executionCycle": null,
  "id": 1921,
  "inProgressInfo": "{}",
  "name": "new task",
  "network": null,
  "openInfo": {
    "createdBy": "example@keypro.fi",
    "createdTs": "2026-05-19T18:01:12.740Z",
    "state": {
      "description": "Open",
      "groupname": "STATUS",
      "id": 235,
      "list_url": "http://example.keypro.fi/api/v2/sattrs/groupname/STATUS/",
      "name": "STATUS_OPEN_OPEN",
      "numValue": null,
      "orderno": 0,
      "txtValue": null
    }
  },
  "orderInfo": "{}",
  "plan": false,
  "repeatOrderNum": null,
  "repeatParent": null,
  "repeatable": null,
  "startDate": null,
  "subregion": 1,
  "taskCategory": 239,
  "taskIdentifier": "26-1",
  "taskLocation": null
}
object

Task

automaticRepeat
integer

If task is repeatable automatically

currentState
integer

Id of current task state

endDate
string (date)

Task end date

executionCycle
integer

Execution cycle

id
integer

Primary key

name
string

Task name

network
integer

Network SAttribute id

plan
boolean

Is plan

repeatOrderNum
integer

Running number for repeatable tasks

repeatParent
integer

Parent task id

repeatable
integer

Info if task is repeatable

startDate
string (date)

Task start date

subregion
integer

Related Subregion id

taskCategory
integer

Related Category id

taskIdentifier
string

Task identifier

taskLocation
string (ewkt)

Task geographical location

400

There was an error in request. Usually field validation failed.

{
  "name": [
    "This field is required.",
    "This field must be unique."
  ]
}
object

Fields which failed validation

property*
Array of string additionalProperties

List of validation errors for this fieldname

string

Validation error

401

Authentication credentials are missing or invalid

{
  "details": "Authentication credentials were not provided"
}
object

Standard error response payload

details
string

Detailed description of error