Incident REST API (1.0.0)

Download OpenAPI specification:

Handles communication between the MyIT incident system and partner systems.

State values:

  • New: 1
  • In progress: 2
  • On hold: 3
  • Resolved: 6
  • Closed: 7
  • Cancelled: 8

create a new incident

creates a new incident in myIT and returns said incident.

Authorizations:
BasicAuth
Request Body schema: application/json

The values to intially write to the incident.

partnerId
required
string

the id of the partner system, agreed upon with the MyIT team.

partnerIncidentId
required
string

your internal id of the incident, for your reference. Note that this must be unique. Once an incident is closed however - the id is freed up again.

channel
required
string

possible values are 'monitoring' or 'vendor'. If you are an external vendor, please choose 'vendor'. If you are an internal event-monitoring system, please choose 'monitoring'.

description
required
string

the descriptive title of the incident.

short_description
required
string

the description of the incident, describing the situation in detail.

location
string

the name or sys-id of the concerned location. If you don't know what to put here, please ask your swisspost contact.

cmdb_ci
string

the name or sys-id of the concerned configuration item. If you don't know what to put here, please ask your swisspost contact.

causing_ci
string

the name or sys-id of the underlying causing configuration item. If you don't know what to put here, please ask your swisspost contact. This is mandatory only for systems of channel 'monitoring'.

Array of objects

any attachments you'd like to add to the incident. The content must be base64 encoded.

Responses

Request samples

Content type
application/json
{
  • "partnerId": "SystemX",
  • "partnerIncidentId": "1234567890",
  • "channel": "vendor",
  • "description": "Some problem with something",
  • "short_description": "There is a complicated problem with the incident rest api - HELP!",
  • "location": "afeeadcb8776c6103efc00000000",
  • "cmdb_ci": "w010xq",
  • "causing_ci": "w010xq",
  • "attachments": [
    ]
}

Response samples

Content type
application/json
{
  • "metadata": {
    },
  • "message": "Incident 00000000000000000000000000000001 created.",
  • "data": {
    }
}

fetch an existing incident

Requires 'partnerId' AND either 'incidentId' OR 'partnerIncidentId' and returns the corresponding incident.

Authorizations:
BasicAuth
query Parameters
partnerId
required
string
Example: partnerId=SystemX

The id of the partner system, to be agreed upon with the MyIT team.

incidentId
required
string
Example: incidentId=6d101e0487e3ca903ef00000000000

The MyIT-internal id of the incident.

partnerIncidentId
required
string
Example: partnerIncidentId=1234567890

your internal id of the incident, for your reference. Note that this must be unique. Once an incident is closed however - the id is freed up again.

Responses

Response samples

Content type
application/json
{
  • "metadata": {
    },
  • "data": {
    }
}

update an incident

updates an incident that already exists in myIT. 'partnerId' AND 'incidentId' OR 'partnerIncidentId' must either be in the body or the query params.

Authorizations:
BasicAuth
Request Body schema: application/json
partnerId
required
string

the id of the partner system, agreed upon with the MyIT team.

incidentId
required
string

The MyIT-internal id of the incident.

partnerIncidentId
required
string

your internal id of the incident, for your reference. Note that this must be unique. Once an incident is closed however - the id is freed up again.

short_description
string

example field to update

Responses

Request samples

Content type
application/json
{
  • "partnerId": "SystemX",
  • "incidentId": "43c569a98771f5106dc8630000000000",
  • "partnerIncidentId": "1234567890",
  • "short_description": "this is an updated description of the problem"
}

Response samples

Content type
application/json
{
  • "metadata": {
    },
  • "message": "Incident 43c569a98771f5106dc8630000000000 updated.",
  • "data": {
    }
}

add attachments

adds attachments to an incident that already exists in myIT. 'partnerId' AND either 'incidentId' OR 'partnerIncidentId' must either be in the body or the query params. Any attachments must be base64 encoded.

Authorizations:
BasicAuth
Request Body schema: application/json
partnerId
string

the id of the partner system, agreed upon with the MyIT team.

incidentId
string

The MyIT-internal id of the incident.

partnerIncidentId
string

your internal id of the incident, for your reference. Note that this must be unique. Once an incident is closed however - the id is freed up again.

Array of objects

any attachments you'd like to add to the incident. The content must be base64 encoded.

Responses

Request samples

Content type
application/json
{
  • "partnerId": "SystemX",
  • "incidentId": "6d101e0487e3ca903ef00000000000",
  • "partnerIncidentId": "1234567890",
  • "attachments": [
    ]
}

Response samples

Content type
application/json
{
  • "metadata": {
    },
  • "message": "Attachment(s) added to Incident 43c569a98771f5106dc8630000000000.",
  • "data": {
    }
}

add a worknote

adds a worknote to an incident that already exists in myIT. PartnerId AND either IncidentId OR partnerIncidentId must either be in the body or the query params.

Authorizations:
BasicAuth
Request Body schema: application/json
partnerId
string
incidentId
string
partnerIncidentId
string
worknote
string

Responses

Request samples

Content type
application/json
{
  • "partnerId": "string",
  • "incidentId": "string",
  • "partnerIncidentId": "string",
  • "worknote": "string"
}

Response samples

Content type
application/json
{
  • "metadata": {
    },
  • "message": "Worknote added to incident 43c569a98771f5106dc8630000000000.",
  • "data": {
    }
}

add a comment

adds a comment to an incident that already exists in myIT. 'partnerId' AND either 'incidentId' OR 'partnerIncidentId' must either be in the body or the query params.

Authorizations:
BasicAuth
Request Body schema: application/json
partnerId
string
incidentId
string
partnerIncidentId
string
comment
string

Responses

Request samples

Content type
application/json
{
  • "partnerId": "string",
  • "incidentId": "string",
  • "partnerIncidentId": "string",
  • "comment": "string"
}

Response samples

Content type
application/json
{
  • "metadata": {
    },
  • "message": "Comment added to incident 43c569a98771f5106dc8630000000000.",
  • "data": {
    }
}

resolve an incident

resolves an incident in myIT. Requires a worknote. PartnerId AND either IncidentId OR partnerIncidentId must either be in the body or the query params.

Authorizations:
BasicAuth
Request Body schema: application/json
partnerId
required
string
incidentId
required
string
partnerIncidentId
required
string
worknote
required
string

Responses

Request samples

Content type
application/json
{
  • "partnerId": "string",
  • "incidentId": "string",
  • "partnerIncidentId": "string",
  • "worknote": "string"
}

Response samples

Content type
application/json
{
  • "metadata": {
    },
  • "message": "Incident 43c569a98771f5106dc8630000000000 resolved.",
  • "data": {
    }
}

reopen an incident

Reopens an incident in myIT that has status 'resolved'. Requires a worknote. PartnerId AND either IncidentId OR partnerIncidentId must either be in the body or the query params.

Authorizations:
BasicAuth
Request Body schema: application/json
partnerId
required
string
incidentId
required
string
partnerIncidentId
required
string
worknote
required
string

Responses

Request samples

Content type
application/json
{
  • "partnerId": "string",
  • "incidentId": "string",
  • "partnerIncidentId": "string",
  • "worknote": "string"
}

Response samples

Content type
application/json
{
  • "metadata": {
    },
  • "message": "Incident 43c569a98771f5106dc8630000000000 reopened.",
  • "data": {
    }
}

Receive concise info on new or changed incidents.

Sends a POST request to an endpoint provided by the partnersystem containing a callback URL, the partnersystem can use to get the incident data in their own time.

Authorizations:
BasicAuth
Request Body schema: application/json

The incident data sent to the endpoint provided to us by the partnersystem.

incident_id
string

The ID of the incident that changed.

callbackUrl
string

The readymade URL leading to the changed incident.

action
string

value describing what the causing action of the notification incidents. Possible values are 'new', 'update', 'worknote', 'comment', 'attachment', 'cancel'.

Responses

Request samples

Content type
application/json
{}

Receive detailed info on new or changed incidents.

Sends a POST request to an endpoint provided by the partnersystem containing the new or changed incident data.

Authorizations:
BasicAuth
Request Body schema: application/json

The incident data sent to the endpoint provided to us by the partnersystem.

metaData
string
number
string
time_worked
string
short_description
string
opened_at
string
incident_id
string
action
string

value describing what the causing action of the notification incidents. Possible values are 'new', 'update', 'worknote', 'comment', 'attachment', 'cancel'.

Responses

Request samples

Content type
application/json
{
  • "metaData": "The incident has changed. This is the newest state:",
  • "number": "INC0000001",
  • "time_worked": "1970-01-01 01:54:46",
  • "short_description": "update",
  • "opened_at": "2023-11-23T09:16:47Z",
  • "incident_id": "f806607f87a6f9d03efcec0000000000",
  • "action": "new"
}