Download OpenAPI specification:Download
The Maintenance API is an open API covering the Operation & Maintenance area in Equinor.
This document describes the current active version of the API. We recommend using the version published at https://equinor.github.io/maintenance-api-docs as it provides the best developer experience.
Information on the next release v0.7.0 planned for February 2021 is available at https://equinor.github.io/maintenance-api-docs/0.7.0.
The API is designed and built according to Equinor's API strategy.
The API is documented in OpenAPI 3.0 format and follows REST principles.
A simple way to test the API is through Postman. Click button below to import the Maintenance API collection for Postman.
The API will use common terminology used across the Oil&Gas industry for the maintenance process. Norsok standard NS-EN 13306 and ISO 14224 are key resource in the naming of resources in the API.
api-version
must be present in all request as part of the query string. Requests without API version will be rejected with a HTTP 404 response code. The latest api-version is v1.
Subscription key must be created from Equinor's API Portal for the consumer application and each request must have the HTTP header Ocp-Apim-Subscription-Key
present with this value.
The Maintenance API will combine information from various business systems in Equinor used in the maintenance area through one common API.
Currently, the majority of endpoints connect to Equinor's ERP system based on SAP.
The API allows you to get mock response for all endpoints if required. This can be useful in special cases. For example if developers from external companies do not have (and should not have) authorization in Equinor's ERP system, they can still interact with the API to see the possibilities.
Add mock-response=true
as a query parmeter to the request and the response will be mock data based on the OpenAPI specification.
Maintenance API is planned to introduce system-to-system support in Q4 2020.
The solution will be based on the OAuth 2.0 client credentials flow.
In the client credentials flow, the client application will be registered in Equinor Azure AD as an app registration with a client secret. The client must securely store the client secret. The client must also generate a self-signed client certificate and upload the public key to Equinor Azure AD.
The Maintenance API team will assist in setting up a system user in Equinor's ERP system and help define a role with only the necessary authorizations based on the client's usage scenario.
The following steps needs to be performed for the initial setup of a consumer application:
We recommend using Postman as a tool for experimenting with the API and provide some example collections and environments to use
The resource will be named according to common terminology used across the Oil&Gas industry (for example Norsok standard NS-EN 13306 and ISO 14224).
Example of resources are /work-orders/preventive-work-orders and /plants/{plant-id}/tags .
Resources keys will indicate the resource type as part of the name.
Example: workCenterId
and priorityId
.
If there is a common "supertype resource", the supertype will determine the naming standard of the key.
Example: FailureReports
and ActivityReports
are both a type of MaintenanceRecord
. Therefore, the key for both is recordId
.
Some resources may have multi-line text describing the resource or the contents of it in more detail. This will always have property name text
.
All date and time information are based on UTC (Universal Time Coordinated) and formatted according to RFC3339
This also applies to durations, such as 1 day or 2 hours, which are encoded as P0Y0M1DT0H0M0S
and P0Y0M0DT2H0M0S
.
These values are easily compatible with time libraries such as moment.js library.
From some resources there will be a need to provide uri links to other endpoints. This can for example to provide the endpoint for download of a binary attachment from a work order resource it belongs to.
The link will be defined in the data model of the resource and be grouped under the property name _links.
The name of the properties for the _links object will taken from Link relations defined through RFC8288 when possible. Typical link relation names are self
and enclosure
.
The uri will not include query parameters required or supported by the endpoint (such as api-version, include-operations etc). Subscription key header (Ocp-Apim-Subscription-Key
) must also present in the subsequent request.
"attachments": [
{
"attachmentId": "H4sIAAAAAAAACqsxMDA1MDVzNDQ3srAwdHVxdDR0dDI1MjB3MjFyMzA0cqsxMgAqMTExq6mpMTQwMDSwNKoBitQ4GRsA6ZqAzOSS0qLU-LTMvJTMvHQFXQXn_IJKBQ1jTb2CvHQAwLV5WV4AAAA",
"fileName": "equipment_location.jpg",
"fileSize": "1636352",
"mimeType": "image/jpg",
"_links": {
"enclosure": "/work-orders/preventive-work-orders/20005446/attachments/H4sIAAAAAAAACqsxMDA1MDVzNDQ3srAwdHVxdDR0dDI1MjB3MjFyMzA0cqsxMgAqMTExq6mpMTQwMDSwNKoBitQ4GRsA6ZqAzOSS0qLU-LTMvJTMvHQFXQXn_IJKBQ1jTb2CvHQAwLV5WV4AAAA"
}
}
Lookup operations return a single instance for the resource based on the key.
The resource may have related data which may or may not be relevant for a client. In order to indicate which related data to include, the lookup operation provides include-...
query string boolean options.
Examples: include-operations
and include-tasks
Clients need to retrieve a subset of all resources for an endpoint. Usually, the criteria are non-trivial and in many case are not direct properties of the resource. REST does not provide a well-defined pattern for these types of requests.
Our approach, is to provide predefined filters with parameters. Each filter is documented in the OpenAPI specification.
Examples: maintenance-records/failure-reports/?api-version=v1&filter=recent-status-activation&status-id=RIDO&max-days-since-activation=1
and /maintenance-orders/preventive-work-order/?api-version=v1&filter=same-maintenance-plan&work-order-id=12345678&max=5
Update operations for resources will utilize a sub-set of the JSON Patch proposed standard. JSON Patch is described in RFC 6902 with a user-friendly version at http://jsonpatch.com/.
Our goals with using JSON Patch is to focus on the intent of the update and avoid common pitfalls for the client. The common pitfalls we avoid with JSON Patch are:
Using JSON Patch is straightforward.
application/json-patch+json
. As part of the OpenAPI documentation, we will provide concrete examples for all update operation. In addition, the schema definiton for the request body defines which resource properties can be updated.
Example of JSON Patch request body which replaces the value of the properties title and text:
[
{
"op": "replace",
"path": "/title",
"value": "Material failure"
},
{
"op": "replace",
"path": "/text",
"value": "OBSERVERT FEILTILSTAND FYLLES UT AV INNMELDER:\nBeskriv feilen så godt som mulig (legg gjerne med bilde):\nMaterial tretthet..\n"
}
]
HTTP response codes will follow established best practice for REST services and will be documented in the OpenAPI specification.
Below is a list of status codes used in the API which the client should handle. Common:
Read - HTTP GET:
Create - HTTP POST:
Create - HTTP PUT
Update - HTTP PATCH:
Delete - HTTP DELETE:
The Maintenance API will use the principles of API evolution instead of introducing a new api-version on every breaking change.
In order to achieve this, endoints, query parameters and resource properties can become deprecated and will be marked so in the OpenAPI specification.
In general, depcrated properties will be removed after 3 months.
If a client uses a deprecated endpoint or query parameter, the Maintenance API will in the response provide a Sunset HTTP header
Sunset: Sat, 15 May 2021 12:59:59 GMT
representing the removal date for the deprecated feature as specified in RFC8594. In addition, a HTTP header Link: <https://equinor.github.io/maintenance-api-docs/#section/Deprecation>; rel="sunset"
will be provided to pointing to relevant documentation.
Clients must monitor these messages and take corrective actions.
In order to align naming of structured locations within a plant across Equinor systems, Maintenance API is renaming areaId
,area-id
and area
to locationId
,location-id
and location
.
This deprecates the following endpoints:
This deprecates query parameters for the following endpoints:
This deprecates HTTP POST request properties for the following endpoints:
This deprecates properties of the response in the following endpoints:
Feature requests are welcomed and can be submitted through:
Subscription key created from https://api.equinor.com
Security Scheme Type | API Key |
---|---|
Header parameter name: | ocp-apim-subscription-key |
Search for Maintenance records regardless of type through predefined filters. Each filter has a defined action and a set of parameters as described below.
The response does not include all details for each Maintenance record. This can be found by subsequent call to lookup for the respective maintenance record resource type
Find open Maintenance records for an id in an external partner system. Note: In theory different external system could have the same external-partner-record-id
but it's very unlikely. Clients are recommended to filter the response based on the plants they are intersted in to avoid any issues.
Parameters:
filter required | string Value: "by-external-partner-record-id" Filter to limit the failure reports by |
external-partner-record-id | string If failure report was initially created in an external system, this represent the unique id of it |
curl --request GET \ --url 'https://api-test.gateway.equinor.com/maintenance-api/maintenance-records?filter=SOME_STRING_VALUE&external-partner-record-id=SOME_STRING_VALUE' \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
{- "failureReports": [
- {
- "_links": {
- "self": "/maintenance-records/failure-reports/45939208"
}, - "recordId": "45894100",
- "tagId": "PX",
- "tagPlantId": "1100",
- "equipmentId": "12410072",
- "title": "Endre skalering på PDT",
- "requiredEndDate": "2019-08-24",
- "failureImpactId": "D",
- "isBreakdown": false,
- "failureModeId": "STC",
- "failureModeGroupId": "PMMO-080",
- "detectionMethodId": "STC",
- "detectionMethodGroupId": "PMDM-005",
- "failureMechanismId": "2.9",
- "failureMechanismGroupId": "PMMC-010",
- "activeStatusIds": "OSNO CRTE",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "correctiveWorkOrderExist": false,
- "correctiveWorkOrderId": "24871954",
- "failureStartDateTime": "2019-08-24T14:15:22Z",
- "failureEndDateTime": "2019-08-24T14:15:22Z"
}
], - "activityReports": [
- {
- "_links": {
- "self": "/maintenance-records/activity-reports/46126319"
}, - "recordId": "45894100",
- "tagId": "PX",
- "tagPlantId": "1100",
- "equipmentId": "12410072",
- "title": "Endre skalering på PDT",
- "activeStatusIds": "OSNO CRTE",
- "createdDateTime": "2019-08-24T14:15:22Z"
}
]
}
Get a list of all activity codes which are in use for maintenance records.
To be used when adding new activities to an existing failure report
curl --request GET \ --url https://api-test.gateway.equinor.com/maintenance-api/maintenance-records/activity-codes \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
[- {
- "activityCodeGroupId": "PM-GENE1",
- "activityCodeGroup": "PM: General Actions (E)",
- "activityCodes": [
- {
- "activityCodeId": "A50",
- "activityCode": "Lubrication"
}
]
}
]
Add operations
work-order-id required | string |
Operations to add to existing Work order
title required | string [ 0 .. 40 ] characters Nullable |
operation required | string Nullable Id of operation user is familiar with |
workCenterId | string Nullable |
workCenterPlantId | string Nullable |
text | string Nullable |
plannedWorkDuration | string Nullable Duration as defined in ISO8601 |
capacityCount | integer <int32> |
schedulingStartConstraintId | string Nullable Enum: "MSO" "SNET" "SNLT" null Constraint: * |
schedulingStartConstraintDateTime | string <date-time> Nullable |
schedulingFinishConstraintId | string Nullable Enum: "MFO" "FNET" "FNLT" null Constraint: * |
schedulingFinishConstraintDateTime | string <date-time> Nullable |
isScheduledExternally | boolean Nullable |
earliestStartDateTime | string <date-time> Nullable |
earliestFinishDateTime | string <date-time> Nullable |
[- {
- "operation": "0010",
- "title": "Bygge stillas",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "plannedWorkDuration": "P0Y0M0DT4H0M0S",
- "capacityCount": 2,
- "text": "Bygge stillas\n3 x 3 x 5 meter",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2020-11-01T00:00:00Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2021-03-01T00:00:00Z"
}, - {
- "operation": "0020",
- "title": "Bytte del",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "plannedWorkDuration": "P0Y0M0DT3H30M0S",
- "capacityCount": 1,
- "text": "",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2020-11-01T00:00:00Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2021-03-01T00:00:00Z"
}
]
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Add time ticket for work performed
Text multi-line property currently doesn't get persisted in SAP. This will be fixed in next release.
work-order-id required | string |
operation required | string Example: 0020 |
Time ticket to add to operation
workHours required | string The work performed for the operation. Duration as defined in ISO8601 |
remainingWorkHours | string New estimate of remaining work for the operation. In Duration format as defined in ISO8601 |
workStartDateTime | string <date-time> Nullable |
workEndDateTime | string <date-time> Nullable |
workCenterId | string Resource which performed the work. Default is based on Work order operation. |
workCenterPlantId | string Resource which performed the work. Default is based on Work order operation. |
title | string <= 40 characters Title for time ticket |
text | string Multi-line description for the time ticket |
{- "workHours": "P0Y0M0DT2H0M0S",
- "remainingWorkHours": "P0Y0M0DT2H0M0S",
- "workStartDateTime": "2020-11-01T00:00:00Z",
- "workEndDateTime": "2020-11-05T00:00:00Z",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "title": "Prep jobb",
- "text": "Multi-line text\nDescribing the work done"
}
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Add operations
work-order-id required | string |
Operations to add to existing Work order
title required | string [ 0 .. 40 ] characters Nullable |
operation required | string Nullable Id of operation user is familiar with |
workCenterId | string Nullable |
workCenterPlantId | string Nullable |
text | string Nullable |
plannedWorkDuration | string Nullable Duration as defined in ISO8601 |
capacityCount | integer <int32> |
schedulingStartConstraintId | string Nullable Enum: "MSO" "SNET" "SNLT" null Constraint: * |
schedulingStartConstraintDateTime | string <date-time> Nullable |
schedulingFinishConstraintId | string Nullable Enum: "MFO" "FNET" "FNLT" null Constraint: * |
schedulingFinishConstraintDateTime | string <date-time> Nullable |
isScheduledExternally | boolean Nullable |
earliestStartDateTime | string <date-time> Nullable |
earliestFinishDateTime | string <date-time> Nullable |
[- {
- "operation": "0010",
- "title": "Bygge stillas",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "plannedWorkDuration": "P0Y0M0DT4H0M0S",
- "capacityCount": 2,
- "text": "Bygge stillas\n3 x 3 x 5 meter",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2020-11-01T00:00:00Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2021-03-01T00:00:00Z"
}, - {
- "operation": "0020",
- "title": "Bytte del",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "plannedWorkDuration": "P0Y0M0DT3H30M0S",
- "capacityCount": 1,
- "text": "",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2020-11-01T00:00:00Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2021-03-01T00:00:00Z"
}
]
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Add time ticket for work performed
Text multi-line property currently doesn't get persisted in SAP. This will be fixed in next release.
work-order-id required | string |
operation required | string Example: 0020 |
Time ticket to add to operation
workHours required | string The work performed for the operation. Duration as defined in ISO8601 |
remainingWorkHours | string New estimate of remaining work for the operation. In Duration format as defined in ISO8601 |
workStartDateTime | string <date-time> Nullable |
workEndDateTime | string <date-time> Nullable |
workCenterId | string Resource which performed the work. Default is based on Work order operation. |
workCenterPlantId | string Resource which performed the work. Default is based on Work order operation. |
title | string <= 40 characters Title for time ticket |
text | string Multi-line description for the time ticket |
{- "workHours": "P0Y0M0DT2H0M0S",
- "remainingWorkHours": "P0Y0M0DT2H0M0S",
- "workStartDateTime": "2020-11-01T00:00:00Z",
- "workEndDateTime": "2020-11-05T00:00:00Z",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "title": "Prep jobb",
- "text": "Multi-line text\nDescribing the work done"
}
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Search for Work orders regardless of type through predefined filters. Each filter has a defined action and a set of parameters as described below.
The response can include most of the details for each work order.
If additional data is needed, it can be retrieved by using the endpoint represented in the _links.self
property.
Find Work orders which have been recently changed for a given plant. Normally, clients will provide parameters changed-since-datetime and plant-id and in this case the endpoint will return any changed work order from changed-since-datetime and to now. It is also possible to add before-datetime query parameter and the endpoint will then return any changed work order between changed-since-datetime and before-datetime. Parameters:
Find open work orders before the basic-end-date Parameters:
filter required | string Enum: "recently-changed" "before-basic-end-date" Filter to limit the work order by |
plant-id | string Plant |
changed-since-datetime | string <date-time> Earliest datetime to returned changed work orders for |
before-datetime | string <date-time> Optional parameter to limit the response to only work orders changed after changed-since-datetime but before this datetime |
include-work-order-text | string The text of the Work order is time-consuming to retrieve. Set to false to avoid returning it |
include-work-order-operation-text | string The text of the Work order operation is time-consuming to retrieve. Set to false to avoid returning it |
include-work-order-types | Array of strings Items Enum: "correctiveWorkOrders" "preventiveWorkOrders" "modificationWorkOrders" "sasChangeWorkOrders" "projectWorkOrders" "subseaWorkOrders" Include which types of work orders. Use comma separated list of entries. |
basic-end-date | string <date> Earliest date to find maintenance plan history for (optional for filter) |
area-id | string Deprecated Deprecated. Use location-id instead |
location-id | string Structured location within the plant. Use /plants/{plant-id}/locations for possible values |
curl --request GET \ --url 'https://api-test.gateway.equinor.com/maintenance-api/work-orders?filter=SOME_STRING_VALUE&plant-id=SOME_STRING_VALUE&changed-since-datetime=SOME_STRING_VALUE&before-datetime=SOME_STRING_VALUE&include-work-order-text=SOME_STRING_VALUE&include-work-order-operation-text=SOME_STRING_VALUE&include-work-order-types=SOME_ARRAY_VALUE&basic-end-date=SOME_STRING_VALUE&area-id=SOME_STRING_VALUE&location-id=SOME_STRING_VALUE' \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
{- "correctiveWorkOrders": [
- {
- "text": "OBSERVERT FEILTILSTAND FYLLES UT AV INNMELDER:\nBeskriv feilen så godt som mulig (legg gjerne med bilde):\nHvor er utstyret fysisk plassert (legg gjerne med bilde)?\n-\n Hvordan påvirker feilen utstyrets funksjon? ...\n",
- "_links": {
- "self": "/work-orders/corrective-work-orders/24983466"
}, - "operations": [
- {
- "operationId": "1005419798-00000001",
- "operation": "0020",
- "title": "Bygge stillas",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "text": "Bygge stillas\\n\r\n3 x 3 x 5 meter",
- "standardTextTemplate": "1100-GS",
- "isCompleted": false,
- "plannedWorkHours": "PT3H",
- "actualWorkHours": "PT2H30M",
- "actualPercentageComplete": 57.14,
- "capacityCount": 1,
- "plannedDuration": "PT2H45M",
- "isScheduledExternally": true,
- "earliestStartDateTime": "2019-08-24T14:15:22Z",
- "earliestFinishDateTime": "2019-08-24T14:15:22Z",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2019-08-24T14:15:22Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2019-08-24T14:15:22Z"
}
], - "workOrderId": "24983466",
- "tagId": "BF",
- "tagPlantId": "1100",
- "tag": "CT5023/24 - POT.WATER PH PROBE.",
- "title": "Modifikasjon av brannmur",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD17OU",
- "areaId": "Deprecated - Use locationId",
- "failureReportId": "45836077",
- "plantId": "1100",
- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "activeStatusIds": "OSNO CRTE",
- "maintenanceTypeId": "002",
- "maintenanceType": "Periodic maintenance",
- "requiredEndDate": "2019-08-24",
- "basicStartDateTime": "2019-08-24T14:15:22Z",
- "basicEndDateTime": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "changedDateTime": "2019-08-24T14:15:22Z",
- "sortField": "PRS10239.WP12",
- "priorityId": "L"
}
], - "preventiveWorkOrders": [
- {
- "text": "OBSERVERT FEILTILSTAND FYLLES UT AV INNMELDER:\nBeskriv feilen så godt som mulig (legg gjerne med bilde):\nHvor er utstyret fysisk plassert (legg gjerne med bilde)?\n-\n Hvordan påvirker feilen utstyrets funksjon? ...\n",
- "_links": {
- "self": "/work-orders/preventive-work-orders/24597659"
}, - "operations": [
- {
- "operationId": "1005419798-00000001",
- "operation": "0020",
- "title": "Bygge stillas",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "text": "Bygge stillas\\n\r\n3 x 3 x 5 meter",
- "standardTextTemplate": "1100-GS",
- "isCompleted": false,
- "plannedWorkHours": "PT3H",
- "actualWorkHours": "PT2H30M",
- "actualPercentageComplete": 57.14,
- "capacityCount": 1,
- "plannedDuration": "PT2H45M",
- "isScheduledExternally": true,
- "earliestStartDateTime": "2019-08-24T14:15:22Z",
- "earliestFinishDateTime": "2019-08-24T14:15:22Z",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2019-08-24T14:15:22Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2019-08-24T14:15:22Z"
}
], - "workOrderId": "24597659",
- "tagId": "BF",
- "tagPlantId": "1100",
- "tag": "CT5023/24 - POT.WATER PH PROBE.",
- "title": "Modifikasjon av brannmur",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD17OU",
- "areaId": "Deprecated - Use locationId",
- "plantId": "1100",
- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "activeStatusIds": "OSNO CRTE",
- "maintenanceTypeId": "002",
- "maintenanceType": "Periodic maintenance",
- "plannedDate": "2019-08-24",
- "basicStartDateTime": "2019-08-24T14:15:22Z",
- "basicEndDateTime": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "changedDateTime": "2019-08-24T14:15:22Z",
- "sortField": "PRS10239.WP12"
}
], - "modificationWorkOrders": [
- {
- "text": "OBSERVERT FEILTILSTAND FYLLES UT AV INNMELDER:\nBeskriv feilen så godt som mulig (legg gjerne med bilde):\nHvor er utstyret fysisk plassert (legg gjerne med bilde)?\n-\n Hvordan påvirker feilen utstyrets funksjon? ...\n",
- "_links": {
- "self": "/work-orders/modification-work-orders/24597659"
}, - "operations": [
- {
- "operationId": "1005419798-00000001",
- "operation": "0020",
- "title": "Bygge stillas",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "text": "Bygge stillas\\n\r\n3 x 3 x 5 meter",
- "standardTextTemplate": "1100-GS",
- "isCompleted": false,
- "plannedWorkHours": "PT3H",
- "actualWorkHours": "PT2H30M",
- "actualPercentageComplete": 57.14,
- "capacityCount": 1,
- "plannedDuration": "PT2H45M",
- "isScheduledExternally": true,
- "earliestStartDateTime": "2019-08-24T14:15:22Z",
- "earliestFinishDateTime": "2019-08-24T14:15:22Z",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2019-08-24T14:15:22Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2019-08-24T14:15:22Z"
}
], - "workOrderId": "24597659",
- "tagId": "BF",
- "tagPlantId": "1100",
- "tag": "CT5023/24 - POT.WATER PH PROBE.",
- "title": "Modifikasjon av brannmur",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD17OU",
- "areaId": "Deprecated - Use locationId",
- "plantId": "1100",
- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "activeStatusIds": "OSNO CRTE",
- "maintenanceTypeId": "002",
- "maintenanceType": "Periodic maintenance",
- "basicStartDateTime": "2019-08-24T14:15:22Z",
- "basicEndDateTime": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "changedDateTime": "2019-08-24T14:15:22Z",
- "sortField": "PRS10239.WP12"
}
], - "sasChangeWorkOrders": [
- {
- "text": "OBSERVERT FEILTILSTAND FYLLES UT AV INNMELDER:\nBeskriv feilen så godt som mulig (legg gjerne med bilde):\nHvor er utstyret fysisk plassert (legg gjerne med bilde)?\n-\n Hvordan påvirker feilen utstyrets funksjon? ...\n",
- "_links": {
- "self": "/work-orders/sas-change-work-orders/24684145"
}, - "operations": [
- {
- "operationId": "1005419798-00000001",
- "operation": "0020",
- "title": "Bygge stillas",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "text": "Bygge stillas\\n\r\n3 x 3 x 5 meter",
- "standardTextTemplate": "1100-GS",
- "isCompleted": false,
- "plannedWorkHours": "PT3H",
- "actualWorkHours": "PT2H30M",
- "actualPercentageComplete": 57.14,
- "capacityCount": 1,
- "plannedDuration": "PT2H45M",
- "isScheduledExternally": true,
- "earliestStartDateTime": "2019-08-24T14:15:22Z",
- "earliestFinishDateTime": "2019-08-24T14:15:22Z",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2019-08-24T14:15:22Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2019-08-24T14:15:22Z"
}
], - "workOrderId": "24684145",
- "tagId": "LZ1012",
- "tagPlantId": "1100",
- "tag": "A10 OIL PRODUCTION WELL",
- "title": "1416/Installerer Flowlinw A10",
- "workCenterId": "PPMAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD17OU",
- "areaId": "Deprecated - Use locationId",
- "plantId": "1100",
- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "activeStatusIds": "OSNO CRTE",
- "maintenanceTypeId": "Z06",
- "maintenanceType": "SAS Change Activity",
- "basicStartDateTime": "2019-08-24T14:15:22Z",
- "basicEndDateTime": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "changedDateTime": "2019-08-24T14:15:22Z",
- "costWBSId": "M.O037C.20.A.0002.A2",
- "projectId": "M.O037C.20.A.0002",
- "costNetworkId": "9045173",
- "costNetworkOperationId": "0010",
- "sortField": "PRS10239.WP12"
}
], - "projectWorkOrders": [
- {
- "text": "OBSERVERT FEILTILSTAND FYLLES UT AV INNMELDER:\nBeskriv feilen så godt som mulig (legg gjerne med bilde):\nHvor er utstyret fysisk plassert (legg gjerne med bilde)?\n-\n Hvordan påvirker feilen utstyrets funksjon? ...\n",
- "_links": {
- "self": "/work-orders/project-work-orders/24684145"
}, - "operations": [
- {
- "operationId": "1005419798-00000001",
- "operation": "0020",
- "title": "Bygge stillas",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "text": "Bygge stillas\\n\r\n3 x 3 x 5 meter",
- "standardTextTemplate": "1100-GS",
- "isCompleted": false,
- "plannedWorkHours": "PT3H",
- "actualWorkHours": "PT2H30M",
- "actualPercentageComplete": 57.14,
- "capacityCount": 1,
- "plannedDuration": "PT2H45M",
- "isScheduledExternally": true,
- "earliestStartDateTime": "2019-08-24T14:15:22Z",
- "earliestFinishDateTime": "2019-08-24T14:15:22Z",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2019-08-24T14:15:22Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2019-08-24T14:15:22Z"
}
], - "workOrderId": "24684145",
- "tagId": "LZ1012",
- "tagPlantId": "1100",
- "tag": "A10 OIL PRODUCTION WELL",
- "title": "1416/Installerer Flowlinw A10",
- "isTimeOnlyWorkOrder": false,
- "workCenterId": "PPMAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD17OU",
- "areaId": "Deprecated - Use locationId",
- "plantId": "1100",
- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "activeStatusIds": "OSNO CRTE",
- "maintenanceTypeId": "015",
- "maintenanceType": "Project work",
- "basicStartDateTime": "2019-08-24T14:15:22Z",
- "basicEndDateTime": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "changedDateTime": "2019-08-24T14:15:22Z",
- "costWBSId": "M.O037C.20.A.0002.A2",
- "projectId": "M.O037C.20.A.0002",
- "costNetworkId": "9045173",
- "costNetworkOperationId": "0010",
- "sortField": "PRS10239.WP12"
}
], - "subseaWorkOrders": [
- {
- "text": "OBSERVERT FEILTILSTAND FYLLES UT AV INNMELDER:\nBeskriv feilen så godt som mulig (legg gjerne med bilde):\nHvor er utstyret fysisk plassert (legg gjerne med bilde)?\n-\n Hvordan påvirker feilen utstyrets funksjon? ...\n",
- "_links": {
- "self": "/work-orders/subsea-work-orders/24597659"
}, - "operations": [
- {
- "operationId": "1005419798-00000001",
- "operation": "0020",
- "title": "Bygge stillas",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "text": "Bygge stillas\\n\r\n3 x 3 x 5 meter",
- "standardTextTemplate": "1100-GS",
- "isCompleted": false,
- "plannedWorkHours": "PT3H",
- "actualWorkHours": "PT2H30M",
- "actualPercentageComplete": 57.14,
- "capacityCount": 1,
- "plannedDuration": "PT2H45M",
- "isScheduledExternally": true,
- "earliestStartDateTime": "2019-08-24T14:15:22Z",
- "earliestFinishDateTime": "2019-08-24T14:15:22Z",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2019-08-24T14:15:22Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2019-08-24T14:15:22Z"
}
], - "workOrderId": "24597659",
- "tagId": "BF",
- "tagPlantId": "1100",
- "tag": "CT5023/24 - POT.WATER PH PROBE.",
- "title": "Modifikasjon av brannmur",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD17OU",
- "areaId": "Deprecated - Use locationId",
- "plantId": "1100",
- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "activeStatusIds": "OSNO CRTE",
- "maintenanceTypeId": "002",
- "maintenanceType": "Periodic maintenance",
- "basicStartDateTime": "2019-08-24T14:15:22Z",
- "basicEndDateTime": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "changedDateTime": "2019-08-24T14:15:22Z",
- "sortField": "PRS10239.WP12"
}
]
}
Update key fields of a failure report.
To avoid accidently overwriting the multi-line text property, the endpoint will reject any request with an empty text property.
record-id required | string The recordId of the failure report. |
Failure report to create
op required | string Value: "replace" JSON Patch operation according to RFC6902 |
path required | string Enum: "/tagId" "/tagPlantId" "/equipmentId" "/failureImpactId" "/failureModeId" "/failureModeGroupId" "/detectionMethodId" "/detectionMethodGroupId" "/failureMechanismId" "/failureMechanismGroupId" "/workCenterId" "/workCenterPlantId" "/locationId" "/title" "/text" "/failureStartDateTime" "/failureEndDateTime" Path indicating the property to be impacted by the operation |
value required | string Value to be assigned to a resource property based on the operation and path. Path specific information:
|
[- {
- "op": "replace",
- "path": "/title",
- "value": "Material failure"
}, - {
- "op": "replace",
- "path": "/text",
- "value": "OBSERVERT FEILTILSTAND FYLLES UT AV INNMELDER:\nBeskriv feilen så godt som mulig (legg gjerne med bilde):\nMaterial tretthet..\n"
}
]
{- "recordId": "45894100",
- "tagId": "PX",
- "tagPlantId": "1100",
- "equipmentId": "12410072",
- "title": "Endre skalering på PDT",
- "text": "Multi-line text based on template",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD2",
- "location": "METERING DECK",
- "areaId": "Deprecated - Use locationId",
- "area": "Deprecated - Use location",
- "failureImpactId": "D",
- "failureImpact": "Unwell (InF)",
- "isBreakdown": false,
- "requiredEndDate": "2019-08-24",
- "failureModeId": "STC",
- "failureMode": "CST Struct. deficiency containment risk",
- "failureModeGroupId": "PMMO-080",
- "failureModeGroup": "ISO Piping",
- "detectionMethodId": "3",
- "detectionMethod": "ISO Inspection",
- "detectionMethodGroupId": "PMDM-005",
- "detectionMethodGroup": "ISO Scheduled activities",
- "failureMechanismId": "2.9",
- "failureMechanism": "CST Corrosion external",
- "failureMechanismGroupId": "PMMC-010",
- "failureMechanismGroup": "ISO Material failure",
- "correctiveWorkOrderExist": false,
- "correctiveWorkOrderId": "24871954",
- "activeStatusIds": "OSNO CRTE",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "failureStartDateTime": "2019-08-24T14:15:22Z",
- "failureEndDateTime": "2019-08-24T14:15:22Z"
}
Add activities for a failure report
record-id required | string id of the failure report |
Activities to add to existing failure report
title required | string |
activityCodeId required | string |
activityCodeGroupId required | string |
text | string |
startDateTime | string <date-time> Nullable |
endDateTime | string <date-time> Nullable |
[- {
- "title": "Smøring av deler",
- "text": " Smør deler\n Stram bolter",
- "activityCodeId": "A50",
- "activityCodeGroupId": "PM-GENE1",
- "startDateTime": "2020-11-01T00:00:00Z",
- "endDateTime": "2020-11-14T00:00:00Z"
}, - {
- "title": "Rengjøring",
- "activityCodeId": "A40",
- "activityCodeGroupId": "PM-GENE1",
- "startDateTime": "2020-11-11T12:00:00Z",
- "endDateTime": "2020-11-11T16:00:00Z"
}
]
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Add additional metadata for a failure report. This related to additional failure modes and detection modes for a failure report and only used in rare cases.
The metadata-id available to update for a given failure report can be found by querying /maintenance-records/failure-reports/{record-id}?include-additional-metadata=true
record-id required | string The recordId of the failure report. |
Update to make for metadata
title | string <= 40 characters |
failureModeId | string |
failureModeGroupId | string |
detectionMethodId | string |
detectionMethodGroupId | string |
[- {
- "title": "Material failure",
- "failureModeId": "STC",
- "failureModeGroupId": "PMMO-080",
- "detectionMethodId": "3",
- "detectionMethodGroupId": "PMDM-005"
}
]
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Lookup a single failure report
record-id required | string The recordId of the failure report. |
include-status-details | boolean Default: false Include detailed information for statuses (both active and non-active) |
include-tag-details | boolean Default: false Include details about tag for failure report |
include-activities | boolean Default: false Include detailed information for activities |
include-attachments | boolean Default: false Include attachments |
include-additional-metadata | boolean Default: false Include extra metadata related to additional failure modes and detection modes. This is only used in rare cases |
curl --request GET \ --url 'https://api-test.gateway.equinor.com/maintenance-api/maintenance-records/failure-reports/%7Brecord-id%7D?include-status-details=SOME_BOOLEAN_VALUE&include-tag-details=SOME_BOOLEAN_VALUE&include-activities=SOME_BOOLEAN_VALUE&include-attachments=SOME_BOOLEAN_VALUE&include-additional-metadata=SOME_BOOLEAN_VALUE' \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
{- "statuses": [
- {
- "statusId": "RDEX",
- "status": "Ready for execution",
- "statusOrder": 2,
- "isActive": false,
- "activatedDateTime": "2019-08-24T14:15:22Z"
}
], - "activities": [
- {
- "activityId": "12",
- "title": "Lubricated parts",
- "text": "Smørt deler\nStrammet bolter\n",
- "activityCodeId": "A50",
- "activityCode": "Lubrication",
- "activityCodeGroupId": "PM-GENE1",
- "activityCodeGroup": "PM: General Actions (E)",
- "startDateTime": "2019-08-24T14:15:22Z",
- "endDateTime": "2019-08-24T14:15:22Z"
}
], - "attachments": [
- {
- "attachmentId": "H4sIAAAAAAAACqsxMDA1MDVzNDQ3srAwdHVxdDR0dDI1MjB3MjFyMzA0cqsxMgAqMTExq6mpMTQwMDSwNKoBitQ4GRsA6ZqAzOSS0qLU-LTMvJTMvHQFXQXn_IJKBQ1jTb2CvHQAwLV5WV4AAAA",
- "fileName": "equipment_location.jpg",
- "fileSize": "1636352",
- "mimeType": "image/jpg",
- "_links": {
- "enclosure": "/work-orders/preventive-work-orders/20005446/attachments/H4sIAAAAAAAACqsxMDA1MDVzNDQ3srAwdHVxdDR0dDI1MjB3MjFyMzA0cqsxMgAqMTExq6mpMTQwMDSwNKoBitQ4GRsA6ZqAzOSS0qLU-LTMvJTMvHQFXQXn_IJKBQ1jTb2CvHQAwLV5WV4AAAA"
}
}
], - "tagDetails": {
- "isInactive": false,
- "parentTagId": "AT5566",
- "systemId": "BS",
- "system": "PM-PROG.SYST.",
- "ABCId": "5",
- "ABC": "Crit.=M & Red.=B",
- "locationId": "W14",
- "location": "METERING DECK",
- "areaId": "Deprecated - Use locationId",
- "area": "Deprecated - Use location",
- "catalogProfileId": "PM-160",
- "tagId": "AE5566",
- "tagPlantId": "1100",
- "tag": "CT5023/24 - POT.WATER PH PROBE."
}, - "additionalMetadata": [
- {
- "metadataId": "2",
- "title": "NES additional info",
- "failureModeId": "STC",
- "failureModeGroupId": "PMMO-080",
- "detectionMethodId": "STC",
- "detectionMethodGroupId": "PMDM-005"
}
], - "recordId": "45894100",
- "tagId": "PX",
- "tagPlantId": "1100",
- "equipmentId": "12410072",
- "title": "Endre skalering på PDT",
- "text": "Multi-line text based on template",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD2",
- "location": "METERING DECK",
- "areaId": "Deprecated - Use locationId",
- "area": "Deprecated - Use location",
- "failureImpactId": "D",
- "failureImpact": "Unwell (InF)",
- "isBreakdown": false,
- "requiredEndDate": "2019-08-24",
- "failureModeId": "STC",
- "failureMode": "CST Struct. deficiency containment risk",
- "failureModeGroupId": "PMMO-080",
- "failureModeGroup": "ISO Piping",
- "detectionMethodId": "3",
- "detectionMethod": "ISO Inspection",
- "detectionMethodGroupId": "PMDM-005",
- "detectionMethodGroup": "ISO Scheduled activities",
- "failureMechanismId": "2.9",
- "failureMechanism": "CST Corrosion external",
- "failureMechanismGroupId": "PMMC-010",
- "failureMechanismGroup": "ISO Material failure",
- "correctiveWorkOrderExist": false,
- "correctiveWorkOrderId": "24871954",
- "activeStatusIds": "OSNO CRTE",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "failureStartDateTime": "2019-08-24T14:15:22Z",
- "failureEndDateTime": "2019-08-24T14:15:22Z"
}
Create new failure report
Equinor governing documents states that failure reports should be created at the lowest possible level in the tag hierachy.
It is possible to create failure report for either tagId or equipmentId.
Failure report to create
title required | string |
text required | string |
failureImpactId required | string Enum: "D" "S" "U" "X" |
failureModeId required | string |
failureModeGroupId required | string |
detectionMethodId required | string |
detectionMethodGroupId required | string |
tagId | string Required to input either tag or equipment |
tagPlantId | string Required to input either tag or equipment |
equipmentId | string Required to input either tag or equipment |
isBreakdown | boolean |
failureMechanismId | string Nullable |
failureMechanismGroupId | string Nullable |
workCenterId | string If workCenter is not provided, it will use default defined on tag |
workCenterPlantId | string If workCenter is not provided, it will use default defined on tag |
externalPartnerRecordId | string <= 12 characters If failure report was initially created in an external system, this represent the unique id of it |
createdDateTime | string <date-time> Nullable Optional parameter used in special cases where the failure report was created at an earlier time. Should not be a date in the future |
failureStartDateTime | string <date-time> Nullable The point in time where the failure started |
failureEndDateTime | string <date-time> Nullable The point in time where the failure resolved |
Array of objects (MaintenanceRecordItemMetadata) Additional metadata to be used in special cases |
{- "tagId": "PX",
- "tagPlantId": "1100",
- "title": "Skiftet ventiler på bulk system",
- "failureImpactId": "S",
- "failureModeId": "STC",
- "failureModeGroupId": "PMMO-080",
- "detectionMethodId": "3",
- "detectionMethodGroupId": "PMDM-005",
- "failureMechanismId": "2.9",
- "failureMechanismGroupId": "PMMC-010",
- "text": "Skiftet 5 stk ventiler på bulk system sement og barytt da både vent og\nTrykkside var utvasket, testet alt OK.\n"
}
{- "recordId": "45894100",
- "tagId": "PX",
- "tagPlantId": "1100",
- "equipmentId": "12410072",
- "title": "Endre skalering på PDT",
- "text": "Multi-line text based on template",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD2",
- "location": "METERING DECK",
- "areaId": "Deprecated - Use locationId",
- "area": "Deprecated - Use location",
- "failureImpactId": "D",
- "failureImpact": "Unwell (InF)",
- "isBreakdown": false,
- "requiredEndDate": "2019-08-24",
- "failureModeId": "STC",
- "failureMode": "CST Struct. deficiency containment risk",
- "failureModeGroupId": "PMMO-080",
- "failureModeGroup": "ISO Piping",
- "detectionMethodId": "3",
- "detectionMethod": "ISO Inspection",
- "detectionMethodGroupId": "PMDM-005",
- "detectionMethodGroup": "ISO Scheduled activities",
- "failureMechanismId": "2.9",
- "failureMechanism": "CST Corrosion external",
- "failureMechanismGroupId": "PMMC-010",
- "failureMechanismGroup": "ISO Material failure",
- "correctiveWorkOrderExist": false,
- "correctiveWorkOrderId": "24871954",
- "activeStatusIds": "OSNO CRTE",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "failureStartDateTime": "2019-08-24T14:15:22Z",
- "failureEndDateTime": "2019-08-24T14:15:22Z"
}
Provide master data for a plant for example for tags, areas and work centers. This is information is often required as parameters to other endpoints for example when creating a failure report.
Lookup a single tag with related information
Properties areaId and area are deprecated as of 01.2021 in order to align with naming across Equinor system. Use locationId and location instead.
plant-id required | string |
tag-id required | string |
include-maintenance-records | boolean Default: true Include maintenance records. If include-maintenance-record-types is not supplied, all support types are returned |
include-maintenance-record-types | string Include which types of notifications |
include-installed-equipment | boolean Default: false Include installed equipment |
include-catalog-profile-details | boolean Default: false Include possible detection methods, failure modes and failure mechanisms |
include-characteristics | boolean Default: false Include tag characteristics such as 'Function Fail Consequence' and 'Safety Critical Element (SCE)' |
include-maintenance-plan-items | boolean Default: false Include Maintenance Plan items this functional location is part of |
curl --request GET \ --url 'https://api-test.gateway.equinor.com/maintenance-api/plants/%7Bplant-id%7D/tags/%7Btag-id%7D?include-maintenance-records=SOME_BOOLEAN_VALUE&include-maintenance-record-types=SOME_STRING_VALUE&include-installed-equipment=SOME_BOOLEAN_VALUE&include-catalog-profile-details=SOME_BOOLEAN_VALUE&include-characteristics=SOME_BOOLEAN_VALUE&include-maintenance-plan-items=SOME_BOOLEAN_VALUE' \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
{- "maintenanceConceptId": "VA1631",
- "classId": "DG0105",
- "characteristics": [
- {
- "characteristicId": "HIDDEN_FAILURE",
- "characteristic": "Safety Critical Element (SCE)",
- "valueId": "01",
- "value": "Pressure Safety Valve (PSV)"
}
], - "maintenanceRecords": {
- "failureReports": [
- {
- "recordId": "45894100",
- "tagId": "PX",
- "tagPlantId": "1100",
- "equipmentId": "12410072",
- "title": "Endre skalering på PDT",
- "requiredEndDate": "2019-08-24",
- "failureImpactId": "D",
- "isBreakdown": false,
- "failureModeId": "STC",
- "failureModeGroupId": "PMMO-080",
- "detectionMethodId": "STC",
- "detectionMethodGroupId": "PMDM-005",
- "failureMechanismId": "2.9",
- "failureMechanismGroupId": "PMMC-010",
- "activeStatusIds": "OSNO CRTE",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "correctiveWorkOrderExist": false,
- "correctiveWorkOrderId": "24871954",
- "failureStartDateTime": "2019-08-24T14:15:22Z",
- "failureEndDateTime": "2019-08-24T14:15:22Z"
}
], - "activityReports": [
- {
- "recordId": "45894100",
- "tagId": "PX",
- "tagPlantId": "1100",
- "equipmentId": "12410072",
- "title": "Endre skalering på PDT",
- "activeStatusIds": "OSNO CRTE",
- "createdDateTime": "2019-08-24T14:15:22Z"
}
]
}, - "installedEquipment": [
- {
- "equipmentId": "12578254",
- "equipment": "CAP 22 OB Protection",
- "catalogProfileId": "PMM-01",
- "serialNumber": "450024-10-001",
- "partNumber": "BB14-NT2012",
- "warrantyStartDate": "2019-08-24",
- "warrantyEndDate": "2019-08-24"
}
], - "maintenancePlanItems": [
- {
- "maintenancePlanItemId": "10072940",
- "maintenancePlanItem": "24M FV-TELE MODULPROGRAM CD2",
- "maintenancePlanId": "1056916",
- "planningPlantId": "1100",
- "mainTagId": "AE5566",
- "mainTagPlantId": "1100",
- "maintenanceActivityTypeId": "002",
- "maintenanceActivityType": "Periodic maintenance"
}
], - "catalogProfileDetails": {
- "detectionMethods": [
- {
- "detectionMethodGroupId": "PMDM-005",
- "detectionMethodGroup": "ISO Scheduled activities",
- "items": [
- {
- "detectionMethodId": "5",
- "detectionMethod": "ISO Continuous condition monitoring"
}
]
}
], - "failureModes": [
- {
- "failureModeGroupId": "PMMO-999",
- "failureModeGroup": "CST General",
- "items": [
- {
- "failureModeId": "ELP",
- "failureMode": "ISO External leakage – process medium"
}
]
}
], - "failureMechanisms": [
- {
- "failureMechanismGroupId": "PMMC-030",
- "failureMechanismGroup": "ISO Miscellaneous",
- "items": [
- {
- "failureMechanismId": "6.2",
- "failureMechanism": "ISO Combined causes"
}
]
}
]
}, - "isInactive": false,
- "parentTagId": "AT5566",
- "systemId": "BS",
- "system": "PM-PROG.SYST.",
- "ABCId": "5",
- "ABC": "Crit.=M & Red.=B",
- "locationId": "W14",
- "location": "METERING DECK",
- "areaId": "Deprecated - Use locationId",
- "area": "Deprecated - Use location",
- "catalogProfileId": "PM-160",
- "tagId": "AE5566",
- "tagPlantId": "1100",
- "tag": "CT5023/24 - POT.WATER PH PROBE."
}
Get the entire tag hierachy for a plant. For each tag you will be provided with catalog profile and the parent tag.
This returns a significant amount of data as it returns all tags for a plant (which may be up to 250 000).
The data will be cached in the API and renewed on a daily basis
plant-id required | string |
curl --request GET \ --url https://api-test.gateway.equinor.com/maintenance-api/plants/%7Bplant-id%7D/tag-hierachy \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
[- {
- "tagId": "AE5566",
- "parentTagId": "AT5566",
- "catalogProfileId": "PM-160"
}
]
Get structured locations within the plant.
locationId
is commonly used as metadata for tags and when creating project-work-orders
.
plant-id required | string |
curl --request GET \ --url https://api-test.gateway.equinor.com/maintenance-api/plants/%7Bplant-id%7D/locations \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
[- {
- "locationId": "MG29",
- "location": "MAIN DECK AFT"
}
]
Get areas
Endpoint is deprecated as of 01.2021 in order to align with naming across Equinor system. Use /plants/{plant-id}/locations instead .
plant-id required | string |
curl --request GET \ --url https://api-test.gateway.equinor.com/maintenance-api/plants/%7Bplant-id%7D/areas \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
[- {
- "areaId": "MG29",
- "area": "MAIN DECK AFT"
}
]
Get planner groups
plant-id required | string |
curl --request GET \ --url https://api-test.gateway.equinor.com/maintenance-api/plants/%7Bplant-id%7D/planner-groups \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
[- {
- "plannerGroupId": "PPM",
- "plannerGroup": "Plattform PV"
}
]
Get Work centers for plant.
plant-id required | string |
curl --request GET \ --url https://api-test.gateway.equinor.com/maintenance-api/plants/%7Bplant-id%7D/work-centers \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
[- {
- "workCenterId": "PPMELE",
- "workCenter": "PV Elektro"
}
]
Search tags for a plant based on the first few characters of the tag.
The results include key information for a tag.
Additional information for each tag can be retrieved by using the endpoint /plants/{plant-id}/tags/{tag-id}
.
If there are no tags found for the search, the response will be HTTP 200 with an empty array as content.
Properties areaId and area are deprecated as of 01.2021 in order to align with naming across Equinor system. Use locationId and location instead.
The value of the tag-prefix parameter should be url-encoded in order to support special characters
/plants/1219/tags?tag-prefix=44&api-version=v1
/plants/1100/tags?tag-prefix=02%22-EC-%202525-M&api-version=v1
plant-id required | string |
tag-prefix required | string >= 2 characters The first few characters of the tag |
curl --request GET \ --url 'https://api-test.gateway.equinor.com/maintenance-api/plants/%7Bplant-id%7D/tags?tag-prefix=SOME_STRING_VALUE' \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
[- {
- "isInactive": false,
- "parentTagId": "AT5566",
- "systemId": "BS",
- "system": "PM-PROG.SYST.",
- "ABCId": "5",
- "ABC": "Crit.=M & Red.=B",
- "locationId": "W14",
- "location": "METERING DECK",
- "areaId": "Deprecated - Use locationId",
- "area": "Deprecated - Use location",
- "catalogProfileId": "PM-160",
- "tagId": "AE5566",
- "tagPlantId": "1100",
- "tag": "CT5023/24 - POT.WATER PH PROBE."
}
]
Provide master data related to maintenance records for example activity codes.
Get a list of all activity codes which are in use for maintenance records.
To be used when adding new activities to an existing failure report
curl --request GET \ --url https://api-test.gateway.equinor.com/maintenance-api/maintenance-records/activity-codes \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
[- {
- "activityCodeGroupId": "PM-GENE1",
- "activityCodeGroup": "PM: General Actions (E)",
- "activityCodes": [
- {
- "activityCodeId": "A50",
- "activityCode": "Lubrication"
}
]
}
]
Lookup a single activity report
record-id required | string The recordId of the activity report. |
include-status-details | boolean Default: false Include detailed information for statuses (both active and non-active) |
include-activities | boolean Default: false Include detailed information for activities |
include-attachments | boolean Default: false Include attachments |
curl --request GET \ --url 'https://api-test.gateway.equinor.com/maintenance-api/maintenance-records/activity-reports/%7Brecord-id%7D?include-status-details=SOME_BOOLEAN_VALUE&include-activities=SOME_BOOLEAN_VALUE&include-attachments=SOME_BOOLEAN_VALUE' \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
{- "activities": [
- {
- "activityId": "12",
- "title": "Lubricated parts",
- "text": "Smørt deler\nStrammet bolter\n",
- "activityCodeId": "A50",
- "activityCode": "Lubrication",
- "activityCodeGroupId": "PM-GENE1",
- "activityCodeGroup": "PM: General Actions (E)",
- "startDateTime": "2019-08-24T14:15:22Z",
- "endDateTime": "2019-08-24T14:15:22Z"
}
], - "attachments": [
- {
- "attachmentId": "H4sIAAAAAAAACqsxMDA1MDVzNDQ3srAwdHVxdDR0dDI1MjB3MjFyMzA0cqsxMgAqMTExq6mpMTQwMDSwNKoBitQ4GRsA6ZqAzOSS0qLU-LTMvJTMvHQFXQXn_IJKBQ1jTb2CvHQAwLV5WV4AAAA",
- "fileName": "equipment_location.jpg",
- "fileSize": "1636352",
- "mimeType": "image/jpg",
- "_links": {
- "enclosure": "/work-orders/preventive-work-orders/20005446/attachments/H4sIAAAAAAAACqsxMDA1MDVzNDQ3srAwdHVxdDR0dDI1MjB3MjFyMzA0cqsxMgAqMTExq6mpMTQwMDSwNKoBitQ4GRsA6ZqAzOSS0qLU-LTMvJTMvHQFXQXn_IJKBQ1jTb2CvHQAwLV5WV4AAAA"
}
}
], - "statuses": [
- {
- "statusId": "RDEX",
- "status": "Ready for execution",
- "statusOrder": 2,
- "isActive": false,
- "activatedDateTime": "2019-08-24T14:15:22Z"
}
], - "recordId": "45894100",
- "tagId": "PX",
- "tagPlantId": "1100",
- "equipmentId": "12410072",
- "title": "Endre skalering på PDT",
- "text": "Multi-line text based on template",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "activeStatusIds": "OSNO CRTE",
- "createdDateTime": "2019-08-24T14:15:22Z"
}
Create new activity report
Equinor governing documents states that activity reports should be created at the lowest possible level in the tag hierachy.
Currently, it's only supported to create failure reports for tags. In the future, support for equipment will be provided.
Activity report to create
title required | string |
text required | string |
tagId | string Required to input either tag or equipment |
tagPlantId | string Required to input either tag or equipment |
equipmentId | string Required to input either tag or equipment |
{- "tagId": "PX",
- "tagPlantId": "1100",
- "title": "Skiftet ventiler på bulk system",
- "text": "Skiftet 5 stk ventiler på bulk system sement og barytt da både vent og\nTrykkside var utvasket, testet alt OK.\n"
}
{- "recordId": "45894100",
- "tagId": "PX",
- "tagPlantId": "1100",
- "equipmentId": "12410072",
- "title": "Endre skalering på PDT",
- "text": "Multi-line text based on template",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "activeStatusIds": "OSNO CRTE",
- "createdDateTime": "2019-08-24T14:15:22Z"
}
Download single attachment for activity report
record-id required | string |
attachment-id required | string |
curl --request GET \ --url https://api-test.gateway.equinor.com/maintenance-api/maintenance-records/activity-reports/%7Brecord-id%7D/attachments/%7Battachment-id%7D \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Upload attachment for activity report
record-id required | string |
files | Array of strings <binary> |
curl --request POST \ --url https://api-test.gateway.equinor.com/maintenance-api/maintenance-records/activity-reports/%7Brecord-id%7D/attachments \ --header 'content-type: multipart/form-data' \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Lookup a single failure report
record-id required | string The recordId of the failure report. |
include-status-details | boolean Default: false Include detailed information for statuses (both active and non-active) |
include-tag-details | boolean Default: false Include details about tag for failure report |
include-activities | boolean Default: false Include detailed information for activities |
include-attachments | boolean Default: false Include attachments |
include-additional-metadata | boolean Default: false Include extra metadata related to additional failure modes and detection modes. This is only used in rare cases |
curl --request GET \ --url 'https://api-test.gateway.equinor.com/maintenance-api/maintenance-records/failure-reports/%7Brecord-id%7D?include-status-details=SOME_BOOLEAN_VALUE&include-tag-details=SOME_BOOLEAN_VALUE&include-activities=SOME_BOOLEAN_VALUE&include-attachments=SOME_BOOLEAN_VALUE&include-additional-metadata=SOME_BOOLEAN_VALUE' \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
{- "statuses": [
- {
- "statusId": "RDEX",
- "status": "Ready for execution",
- "statusOrder": 2,
- "isActive": false,
- "activatedDateTime": "2019-08-24T14:15:22Z"
}
], - "activities": [
- {
- "activityId": "12",
- "title": "Lubricated parts",
- "text": "Smørt deler\nStrammet bolter\n",
- "activityCodeId": "A50",
- "activityCode": "Lubrication",
- "activityCodeGroupId": "PM-GENE1",
- "activityCodeGroup": "PM: General Actions (E)",
- "startDateTime": "2019-08-24T14:15:22Z",
- "endDateTime": "2019-08-24T14:15:22Z"
}
], - "attachments": [
- {
- "attachmentId": "H4sIAAAAAAAACqsxMDA1MDVzNDQ3srAwdHVxdDR0dDI1MjB3MjFyMzA0cqsxMgAqMTExq6mpMTQwMDSwNKoBitQ4GRsA6ZqAzOSS0qLU-LTMvJTMvHQFXQXn_IJKBQ1jTb2CvHQAwLV5WV4AAAA",
- "fileName": "equipment_location.jpg",
- "fileSize": "1636352",
- "mimeType": "image/jpg",
- "_links": {
- "enclosure": "/work-orders/preventive-work-orders/20005446/attachments/H4sIAAAAAAAACqsxMDA1MDVzNDQ3srAwdHVxdDR0dDI1MjB3MjFyMzA0cqsxMgAqMTExq6mpMTQwMDSwNKoBitQ4GRsA6ZqAzOSS0qLU-LTMvJTMvHQFXQXn_IJKBQ1jTb2CvHQAwLV5WV4AAAA"
}
}
], - "tagDetails": {
- "isInactive": false,
- "parentTagId": "AT5566",
- "systemId": "BS",
- "system": "PM-PROG.SYST.",
- "ABCId": "5",
- "ABC": "Crit.=M & Red.=B",
- "locationId": "W14",
- "location": "METERING DECK",
- "areaId": "Deprecated - Use locationId",
- "area": "Deprecated - Use location",
- "catalogProfileId": "PM-160",
- "tagId": "AE5566",
- "tagPlantId": "1100",
- "tag": "CT5023/24 - POT.WATER PH PROBE."
}, - "additionalMetadata": [
- {
- "metadataId": "2",
- "title": "NES additional info",
- "failureModeId": "STC",
- "failureModeGroupId": "PMMO-080",
- "detectionMethodId": "STC",
- "detectionMethodGroupId": "PMDM-005"
}
], - "recordId": "45894100",
- "tagId": "PX",
- "tagPlantId": "1100",
- "equipmentId": "12410072",
- "title": "Endre skalering på PDT",
- "text": "Multi-line text based on template",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD2",
- "location": "METERING DECK",
- "areaId": "Deprecated - Use locationId",
- "area": "Deprecated - Use location",
- "failureImpactId": "D",
- "failureImpact": "Unwell (InF)",
- "isBreakdown": false,
- "requiredEndDate": "2019-08-24",
- "failureModeId": "STC",
- "failureMode": "CST Struct. deficiency containment risk",
- "failureModeGroupId": "PMMO-080",
- "failureModeGroup": "ISO Piping",
- "detectionMethodId": "3",
- "detectionMethod": "ISO Inspection",
- "detectionMethodGroupId": "PMDM-005",
- "detectionMethodGroup": "ISO Scheduled activities",
- "failureMechanismId": "2.9",
- "failureMechanism": "CST Corrosion external",
- "failureMechanismGroupId": "PMMC-010",
- "failureMechanismGroup": "ISO Material failure",
- "correctiveWorkOrderExist": false,
- "correctiveWorkOrderId": "24871954",
- "activeStatusIds": "OSNO CRTE",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "failureStartDateTime": "2019-08-24T14:15:22Z",
- "failureEndDateTime": "2019-08-24T14:15:22Z"
}
Update key fields of a failure report.
To avoid accidently overwriting the multi-line text property, the endpoint will reject any request with an empty text property.
record-id required | string The recordId of the failure report. |
Failure report to create
op required | string Value: "replace" JSON Patch operation according to RFC6902 |
path required | string Enum: "/tagId" "/tagPlantId" "/equipmentId" "/failureImpactId" "/failureModeId" "/failureModeGroupId" "/detectionMethodId" "/detectionMethodGroupId" "/failureMechanismId" "/failureMechanismGroupId" "/workCenterId" "/workCenterPlantId" "/locationId" "/title" "/text" "/failureStartDateTime" "/failureEndDateTime" Path indicating the property to be impacted by the operation |
value required | string Value to be assigned to a resource property based on the operation and path. Path specific information:
|
[- {
- "op": "replace",
- "path": "/title",
- "value": "Material failure"
}, - {
- "op": "replace",
- "path": "/text",
- "value": "OBSERVERT FEILTILSTAND FYLLES UT AV INNMELDER:\nBeskriv feilen så godt som mulig (legg gjerne med bilde):\nMaterial tretthet..\n"
}
]
{- "recordId": "45894100",
- "tagId": "PX",
- "tagPlantId": "1100",
- "equipmentId": "12410072",
- "title": "Endre skalering på PDT",
- "text": "Multi-line text based on template",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD2",
- "location": "METERING DECK",
- "areaId": "Deprecated - Use locationId",
- "area": "Deprecated - Use location",
- "failureImpactId": "D",
- "failureImpact": "Unwell (InF)",
- "isBreakdown": false,
- "requiredEndDate": "2019-08-24",
- "failureModeId": "STC",
- "failureMode": "CST Struct. deficiency containment risk",
- "failureModeGroupId": "PMMO-080",
- "failureModeGroup": "ISO Piping",
- "detectionMethodId": "3",
- "detectionMethod": "ISO Inspection",
- "detectionMethodGroupId": "PMDM-005",
- "detectionMethodGroup": "ISO Scheduled activities",
- "failureMechanismId": "2.9",
- "failureMechanism": "CST Corrosion external",
- "failureMechanismGroupId": "PMMC-010",
- "failureMechanismGroup": "ISO Material failure",
- "correctiveWorkOrderExist": false,
- "correctiveWorkOrderId": "24871954",
- "activeStatusIds": "OSNO CRTE",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "failureStartDateTime": "2019-08-24T14:15:22Z",
- "failureEndDateTime": "2019-08-24T14:15:22Z"
}
Update status of failure report
The status available for the failure report can be found by querying /maintenance-records/failure-reports/{record-id}?include-status-details=true
Example statuses:
record-id required | string The recordId of the failure report. |
status-id required | string |
Work order status to update
op required | string Value: "replace" JSON Patch operation according to RFC6902 |
path required | string Value: "/isActive" Path indicating the property to be impacted by the operation |
value required | string Value to be assigned to a resource property based on the operation and path |
[- {
- "op": "replace",
- "path": "/isActive",
- "value": true
}
]
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Download single attachment for failure report
record-id required | string |
attachment-id required | string |
curl --request GET \ --url https://api-test.gateway.equinor.com/maintenance-api/maintenance-records/failure-reports/%7Brecord-id%7D/attachments/%7Battachment-id%7D \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Upload attachment for failure report
record-id required | string |
files | Array of strings <binary> |
curl --request POST \ --url https://api-test.gateway.equinor.com/maintenance-api/maintenance-records/failure-reports/%7Brecord-id%7D/attachments \ --header 'content-type: multipart/form-data' \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Search for failure reports through predefined filters. Each filter has a defined action and a set of parameters as described below.
The response does not include status details for each failure report. This can be found by subsequent call to lookup failure-reports
Failure reports based on recent status activations for the failure reports. Parameters:
filter required | string Value: "recent-status-activations" Filter to limit the failure reports by |
status-id | string Status |
plant-id | string Plant |
max-days-since-activation | integer <int32> [ 0 .. 255 ] Define how many days from the current day to include results for. 0 if only include for today |
curl --request GET \ --url 'https://api-test.gateway.equinor.com/maintenance-api/maintenance-records/failure-reports?filter=SOME_STRING_VALUE&status-id=SOME_STRING_VALUE&plant-id=SOME_STRING_VALUE&max-days-since-activation=SOME_INTEGER_VALUE' \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
[- {
- "recordId": "45894100",
- "tagId": "PX",
- "tagPlantId": "1100",
- "equipmentId": "12410072",
- "title": "Endre skalering på PDT",
- "requiredEndDate": "2019-08-24",
- "failureImpactId": "D",
- "isBreakdown": false,
- "failureModeId": "STC",
- "failureModeGroupId": "PMMO-080",
- "detectionMethodId": "STC",
- "detectionMethodGroupId": "PMDM-005",
- "failureMechanismId": "2.9",
- "failureMechanismGroupId": "PMMC-010",
- "activeStatusIds": "OSNO CRTE",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "correctiveWorkOrderExist": false,
- "correctiveWorkOrderId": "24871954",
- "failureStartDateTime": "2019-08-24T14:15:22Z",
- "failureEndDateTime": "2019-08-24T14:15:22Z"
}
]
Create new failure report
Equinor governing documents states that failure reports should be created at the lowest possible level in the tag hierachy.
It is possible to create failure report for either tagId or equipmentId.
Failure report to create
title required | string |
text required | string |
failureImpactId required | string Enum: "D" "S" "U" "X" |
failureModeId required | string |
failureModeGroupId required | string |
detectionMethodId required | string |
detectionMethodGroupId required | string |
tagId | string Required to input either tag or equipment |
tagPlantId | string Required to input either tag or equipment |
equipmentId | string Required to input either tag or equipment |
isBreakdown | boolean |
failureMechanismId | string Nullable |
failureMechanismGroupId | string Nullable |
workCenterId | string If workCenter is not provided, it will use default defined on tag |
workCenterPlantId | string If workCenter is not provided, it will use default defined on tag |
externalPartnerRecordId | string <= 12 characters If failure report was initially created in an external system, this represent the unique id of it |
createdDateTime | string <date-time> Nullable Optional parameter used in special cases where the failure report was created at an earlier time. Should not be a date in the future |
failureStartDateTime | string <date-time> Nullable The point in time where the failure started |
failureEndDateTime | string <date-time> Nullable The point in time where the failure resolved |
Array of objects (MaintenanceRecordItemMetadata) Additional metadata to be used in special cases |
{- "tagId": "PX",
- "tagPlantId": "1100",
- "title": "Skiftet ventiler på bulk system",
- "failureImpactId": "S",
- "failureModeId": "STC",
- "failureModeGroupId": "PMMO-080",
- "detectionMethodId": "3",
- "detectionMethodGroupId": "PMDM-005",
- "failureMechanismId": "2.9",
- "failureMechanismGroupId": "PMMC-010",
- "text": "Skiftet 5 stk ventiler på bulk system sement og barytt da både vent og\nTrykkside var utvasket, testet alt OK.\n"
}
{- "recordId": "45894100",
- "tagId": "PX",
- "tagPlantId": "1100",
- "equipmentId": "12410072",
- "title": "Endre skalering på PDT",
- "text": "Multi-line text based on template",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD2",
- "location": "METERING DECK",
- "areaId": "Deprecated - Use locationId",
- "area": "Deprecated - Use location",
- "failureImpactId": "D",
- "failureImpact": "Unwell (InF)",
- "isBreakdown": false,
- "requiredEndDate": "2019-08-24",
- "failureModeId": "STC",
- "failureMode": "CST Struct. deficiency containment risk",
- "failureModeGroupId": "PMMO-080",
- "failureModeGroup": "ISO Piping",
- "detectionMethodId": "3",
- "detectionMethod": "ISO Inspection",
- "detectionMethodGroupId": "PMDM-005",
- "detectionMethodGroup": "ISO Scheduled activities",
- "failureMechanismId": "2.9",
- "failureMechanism": "CST Corrosion external",
- "failureMechanismGroupId": "PMMC-010",
- "failureMechanismGroup": "ISO Material failure",
- "correctiveWorkOrderExist": false,
- "correctiveWorkOrderId": "24871954",
- "activeStatusIds": "OSNO CRTE",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "failureStartDateTime": "2019-08-24T14:15:22Z",
- "failureEndDateTime": "2019-08-24T14:15:22Z"
}
Add activities for a failure report
record-id required | string id of the failure report |
Activities to add to existing failure report
title required | string |
activityCodeId required | string |
activityCodeGroupId required | string |
text | string |
startDateTime | string <date-time> Nullable |
endDateTime | string <date-time> Nullable |
[- {
- "title": "Smøring av deler",
- "text": " Smør deler\n Stram bolter",
- "activityCodeId": "A50",
- "activityCodeGroupId": "PM-GENE1",
- "startDateTime": "2020-11-01T00:00:00Z",
- "endDateTime": "2020-11-14T00:00:00Z"
}, - {
- "title": "Rengjøring",
- "activityCodeId": "A40",
- "activityCodeGroupId": "PM-GENE1",
- "startDateTime": "2020-11-11T12:00:00Z",
- "endDateTime": "2020-11-11T16:00:00Z"
}
]
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Add additional metadata for a failure report. This related to additional failure modes and detection modes for a failure report and only used in rare cases.
The metadata-id available to update for a given failure report can be found by querying /maintenance-records/failure-reports/{record-id}?include-additional-metadata=true
record-id required | string The recordId of the failure report. |
Update to make for metadata
title | string <= 40 characters |
failureModeId | string |
failureModeGroupId | string |
detectionMethodId | string |
detectionMethodGroupId | string |
[- {
- "title": "Material failure",
- "failureModeId": "STC",
- "failureModeGroupId": "PMMO-080",
- "detectionMethodId": "3",
- "detectionMethodGroupId": "PMDM-005"
}
]
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Search for Maintenance records regardless of type through predefined filters. Each filter has a defined action and a set of parameters as described below.
The response does not include all details for each Maintenance record. This can be found by subsequent call to lookup for the respective maintenance record resource type
Find open Maintenance records for an id in an external partner system. Note: In theory different external system could have the same external-partner-record-id
but it's very unlikely. Clients are recommended to filter the response based on the plants they are intersted in to avoid any issues.
Parameters:
filter required | string Value: "by-external-partner-record-id" Filter to limit the failure reports by |
external-partner-record-id | string If failure report was initially created in an external system, this represent the unique id of it |
curl --request GET \ --url 'https://api-test.gateway.equinor.com/maintenance-api/maintenance-records?filter=SOME_STRING_VALUE&external-partner-record-id=SOME_STRING_VALUE' \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
{- "failureReports": [
- {
- "_links": {
- "self": "/maintenance-records/failure-reports/45939208"
}, - "recordId": "45894100",
- "tagId": "PX",
- "tagPlantId": "1100",
- "equipmentId": "12410072",
- "title": "Endre skalering på PDT",
- "requiredEndDate": "2019-08-24",
- "failureImpactId": "D",
- "isBreakdown": false,
- "failureModeId": "STC",
- "failureModeGroupId": "PMMO-080",
- "detectionMethodId": "STC",
- "detectionMethodGroupId": "PMDM-005",
- "failureMechanismId": "2.9",
- "failureMechanismGroupId": "PMMC-010",
- "activeStatusIds": "OSNO CRTE",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "correctiveWorkOrderExist": false,
- "correctiveWorkOrderId": "24871954",
- "failureStartDateTime": "2019-08-24T14:15:22Z",
- "failureEndDateTime": "2019-08-24T14:15:22Z"
}
], - "activityReports": [
- {
- "_links": {
- "self": "/maintenance-records/activity-reports/46126319"
}, - "recordId": "45894100",
- "tagId": "PX",
- "tagPlantId": "1100",
- "equipmentId": "12410072",
- "title": "Endre skalering på PDT",
- "activeStatusIds": "OSNO CRTE",
- "createdDateTime": "2019-08-24T14:15:22Z"
}
]
}
Search for Work orders regardless of type through predefined filters. Each filter has a defined action and a set of parameters as described below.
The response can include most of the details for each work order.
If additional data is needed, it can be retrieved by using the endpoint represented in the _links.self
property.
Find Work orders which have been recently changed for a given plant. Normally, clients will provide parameters changed-since-datetime and plant-id and in this case the endpoint will return any changed work order from changed-since-datetime and to now. It is also possible to add before-datetime query parameter and the endpoint will then return any changed work order between changed-since-datetime and before-datetime. Parameters:
Find open work orders before the basic-end-date Parameters:
filter required | string Enum: "recently-changed" "before-basic-end-date" Filter to limit the work order by |
plant-id | string Plant |
changed-since-datetime | string <date-time> Earliest datetime to returned changed work orders for |
before-datetime | string <date-time> Optional parameter to limit the response to only work orders changed after changed-since-datetime but before this datetime |
include-work-order-text | string The text of the Work order is time-consuming to retrieve. Set to false to avoid returning it |
include-work-order-operation-text | string The text of the Work order operation is time-consuming to retrieve. Set to false to avoid returning it |
include-work-order-types | Array of strings Items Enum: "correctiveWorkOrders" "preventiveWorkOrders" "modificationWorkOrders" "sasChangeWorkOrders" "projectWorkOrders" "subseaWorkOrders" Include which types of work orders. Use comma separated list of entries. |
basic-end-date | string <date> Earliest date to find maintenance plan history for (optional for filter) |
area-id | string Deprecated Deprecated. Use location-id instead |
location-id | string Structured location within the plant. Use /plants/{plant-id}/locations for possible values |
curl --request GET \ --url 'https://api-test.gateway.equinor.com/maintenance-api/work-orders?filter=SOME_STRING_VALUE&plant-id=SOME_STRING_VALUE&changed-since-datetime=SOME_STRING_VALUE&before-datetime=SOME_STRING_VALUE&include-work-order-text=SOME_STRING_VALUE&include-work-order-operation-text=SOME_STRING_VALUE&include-work-order-types=SOME_ARRAY_VALUE&basic-end-date=SOME_STRING_VALUE&area-id=SOME_STRING_VALUE&location-id=SOME_STRING_VALUE' \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
{- "correctiveWorkOrders": [
- {
- "text": "OBSERVERT FEILTILSTAND FYLLES UT AV INNMELDER:\nBeskriv feilen så godt som mulig (legg gjerne med bilde):\nHvor er utstyret fysisk plassert (legg gjerne med bilde)?\n-\n Hvordan påvirker feilen utstyrets funksjon? ...\n",
- "_links": {
- "self": "/work-orders/corrective-work-orders/24983466"
}, - "operations": [
- {
- "operationId": "1005419798-00000001",
- "operation": "0020",
- "title": "Bygge stillas",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "text": "Bygge stillas\\n\r\n3 x 3 x 5 meter",
- "standardTextTemplate": "1100-GS",
- "isCompleted": false,
- "plannedWorkHours": "PT3H",
- "actualWorkHours": "PT2H30M",
- "actualPercentageComplete": 57.14,
- "capacityCount": 1,
- "plannedDuration": "PT2H45M",
- "isScheduledExternally": true,
- "earliestStartDateTime": "2019-08-24T14:15:22Z",
- "earliestFinishDateTime": "2019-08-24T14:15:22Z",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2019-08-24T14:15:22Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2019-08-24T14:15:22Z"
}
], - "workOrderId": "24983466",
- "tagId": "BF",
- "tagPlantId": "1100",
- "tag": "CT5023/24 - POT.WATER PH PROBE.",
- "title": "Modifikasjon av brannmur",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD17OU",
- "areaId": "Deprecated - Use locationId",
- "failureReportId": "45836077",
- "plantId": "1100",
- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "activeStatusIds": "OSNO CRTE",
- "maintenanceTypeId": "002",
- "maintenanceType": "Periodic maintenance",
- "requiredEndDate": "2019-08-24",
- "basicStartDateTime": "2019-08-24T14:15:22Z",
- "basicEndDateTime": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "changedDateTime": "2019-08-24T14:15:22Z",
- "sortField": "PRS10239.WP12",
- "priorityId": "L"
}
], - "preventiveWorkOrders": [
- {
- "text": "OBSERVERT FEILTILSTAND FYLLES UT AV INNMELDER:\nBeskriv feilen så godt som mulig (legg gjerne med bilde):\nHvor er utstyret fysisk plassert (legg gjerne med bilde)?\n-\n Hvordan påvirker feilen utstyrets funksjon? ...\n",
- "_links": {
- "self": "/work-orders/preventive-work-orders/24597659"
}, - "operations": [
- {
- "operationId": "1005419798-00000001",
- "operation": "0020",
- "title": "Bygge stillas",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "text": "Bygge stillas\\n\r\n3 x 3 x 5 meter",
- "standardTextTemplate": "1100-GS",
- "isCompleted": false,
- "plannedWorkHours": "PT3H",
- "actualWorkHours": "PT2H30M",
- "actualPercentageComplete": 57.14,
- "capacityCount": 1,
- "plannedDuration": "PT2H45M",
- "isScheduledExternally": true,
- "earliestStartDateTime": "2019-08-24T14:15:22Z",
- "earliestFinishDateTime": "2019-08-24T14:15:22Z",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2019-08-24T14:15:22Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2019-08-24T14:15:22Z"
}
], - "workOrderId": "24597659",
- "tagId": "BF",
- "tagPlantId": "1100",
- "tag": "CT5023/24 - POT.WATER PH PROBE.",
- "title": "Modifikasjon av brannmur",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD17OU",
- "areaId": "Deprecated - Use locationId",
- "plantId": "1100",
- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "activeStatusIds": "OSNO CRTE",
- "maintenanceTypeId": "002",
- "maintenanceType": "Periodic maintenance",
- "plannedDate": "2019-08-24",
- "basicStartDateTime": "2019-08-24T14:15:22Z",
- "basicEndDateTime": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "changedDateTime": "2019-08-24T14:15:22Z",
- "sortField": "PRS10239.WP12"
}
], - "modificationWorkOrders": [
- {
- "text": "OBSERVERT FEILTILSTAND FYLLES UT AV INNMELDER:\nBeskriv feilen så godt som mulig (legg gjerne med bilde):\nHvor er utstyret fysisk plassert (legg gjerne med bilde)?\n-\n Hvordan påvirker feilen utstyrets funksjon? ...\n",
- "_links": {
- "self": "/work-orders/modification-work-orders/24597659"
}, - "operations": [
- {
- "operationId": "1005419798-00000001",
- "operation": "0020",
- "title": "Bygge stillas",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "text": "Bygge stillas\\n\r\n3 x 3 x 5 meter",
- "standardTextTemplate": "1100-GS",
- "isCompleted": false,
- "plannedWorkHours": "PT3H",
- "actualWorkHours": "PT2H30M",
- "actualPercentageComplete": 57.14,
- "capacityCount": 1,
- "plannedDuration": "PT2H45M",
- "isScheduledExternally": true,
- "earliestStartDateTime": "2019-08-24T14:15:22Z",
- "earliestFinishDateTime": "2019-08-24T14:15:22Z",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2019-08-24T14:15:22Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2019-08-24T14:15:22Z"
}
], - "workOrderId": "24597659",
- "tagId": "BF",
- "tagPlantId": "1100",
- "tag": "CT5023/24 - POT.WATER PH PROBE.",
- "title": "Modifikasjon av brannmur",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD17OU",
- "areaId": "Deprecated - Use locationId",
- "plantId": "1100",
- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "activeStatusIds": "OSNO CRTE",
- "maintenanceTypeId": "002",
- "maintenanceType": "Periodic maintenance",
- "basicStartDateTime": "2019-08-24T14:15:22Z",
- "basicEndDateTime": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "changedDateTime": "2019-08-24T14:15:22Z",
- "sortField": "PRS10239.WP12"
}
], - "sasChangeWorkOrders": [
- {
- "text": "OBSERVERT FEILTILSTAND FYLLES UT AV INNMELDER:\nBeskriv feilen så godt som mulig (legg gjerne med bilde):\nHvor er utstyret fysisk plassert (legg gjerne med bilde)?\n-\n Hvordan påvirker feilen utstyrets funksjon? ...\n",
- "_links": {
- "self": "/work-orders/sas-change-work-orders/24684145"
}, - "operations": [
- {
- "operationId": "1005419798-00000001",
- "operation": "0020",
- "title": "Bygge stillas",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "text": "Bygge stillas\\n\r\n3 x 3 x 5 meter",
- "standardTextTemplate": "1100-GS",
- "isCompleted": false,
- "plannedWorkHours": "PT3H",
- "actualWorkHours": "PT2H30M",
- "actualPercentageComplete": 57.14,
- "capacityCount": 1,
- "plannedDuration": "PT2H45M",
- "isScheduledExternally": true,
- "earliestStartDateTime": "2019-08-24T14:15:22Z",
- "earliestFinishDateTime": "2019-08-24T14:15:22Z",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2019-08-24T14:15:22Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2019-08-24T14:15:22Z"
}
], - "workOrderId": "24684145",
- "tagId": "LZ1012",
- "tagPlantId": "1100",
- "tag": "A10 OIL PRODUCTION WELL",
- "title": "1416/Installerer Flowlinw A10",
- "workCenterId": "PPMAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD17OU",
- "areaId": "Deprecated - Use locationId",
- "plantId": "1100",
- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "activeStatusIds": "OSNO CRTE",
- "maintenanceTypeId": "Z06",
- "maintenanceType": "SAS Change Activity",
- "basicStartDateTime": "2019-08-24T14:15:22Z",
- "basicEndDateTime": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "changedDateTime": "2019-08-24T14:15:22Z",
- "costWBSId": "M.O037C.20.A.0002.A2",
- "projectId": "M.O037C.20.A.0002",
- "costNetworkId": "9045173",
- "costNetworkOperationId": "0010",
- "sortField": "PRS10239.WP12"
}
], - "projectWorkOrders": [
- {
- "text": "OBSERVERT FEILTILSTAND FYLLES UT AV INNMELDER:\nBeskriv feilen så godt som mulig (legg gjerne med bilde):\nHvor er utstyret fysisk plassert (legg gjerne med bilde)?\n-\n Hvordan påvirker feilen utstyrets funksjon? ...\n",
- "_links": {
- "self": "/work-orders/project-work-orders/24684145"
}, - "operations": [
- {
- "operationId": "1005419798-00000001",
- "operation": "0020",
- "title": "Bygge stillas",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "text": "Bygge stillas\\n\r\n3 x 3 x 5 meter",
- "standardTextTemplate": "1100-GS",
- "isCompleted": false,
- "plannedWorkHours": "PT3H",
- "actualWorkHours": "PT2H30M",
- "actualPercentageComplete": 57.14,
- "capacityCount": 1,
- "plannedDuration": "PT2H45M",
- "isScheduledExternally": true,
- "earliestStartDateTime": "2019-08-24T14:15:22Z",
- "earliestFinishDateTime": "2019-08-24T14:15:22Z",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2019-08-24T14:15:22Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2019-08-24T14:15:22Z"
}
], - "workOrderId": "24684145",
- "tagId": "LZ1012",
- "tagPlantId": "1100",
- "tag": "A10 OIL PRODUCTION WELL",
- "title": "1416/Installerer Flowlinw A10",
- "isTimeOnlyWorkOrder": false,
- "workCenterId": "PPMAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD17OU",
- "areaId": "Deprecated - Use locationId",
- "plantId": "1100",
- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "activeStatusIds": "OSNO CRTE",
- "maintenanceTypeId": "015",
- "maintenanceType": "Project work",
- "basicStartDateTime": "2019-08-24T14:15:22Z",
- "basicEndDateTime": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "changedDateTime": "2019-08-24T14:15:22Z",
- "costWBSId": "M.O037C.20.A.0002.A2",
- "projectId": "M.O037C.20.A.0002",
- "costNetworkId": "9045173",
- "costNetworkOperationId": "0010",
- "sortField": "PRS10239.WP12"
}
], - "subseaWorkOrders": [
- {
- "text": "OBSERVERT FEILTILSTAND FYLLES UT AV INNMELDER:\nBeskriv feilen så godt som mulig (legg gjerne med bilde):\nHvor er utstyret fysisk plassert (legg gjerne med bilde)?\n-\n Hvordan påvirker feilen utstyrets funksjon? ...\n",
- "_links": {
- "self": "/work-orders/subsea-work-orders/24597659"
}, - "operations": [
- {
- "operationId": "1005419798-00000001",
- "operation": "0020",
- "title": "Bygge stillas",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "text": "Bygge stillas\\n\r\n3 x 3 x 5 meter",
- "standardTextTemplate": "1100-GS",
- "isCompleted": false,
- "plannedWorkHours": "PT3H",
- "actualWorkHours": "PT2H30M",
- "actualPercentageComplete": 57.14,
- "capacityCount": 1,
- "plannedDuration": "PT2H45M",
- "isScheduledExternally": true,
- "earliestStartDateTime": "2019-08-24T14:15:22Z",
- "earliestFinishDateTime": "2019-08-24T14:15:22Z",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2019-08-24T14:15:22Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2019-08-24T14:15:22Z"
}
], - "workOrderId": "24597659",
- "tagId": "BF",
- "tagPlantId": "1100",
- "tag": "CT5023/24 - POT.WATER PH PROBE.",
- "title": "Modifikasjon av brannmur",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD17OU",
- "areaId": "Deprecated - Use locationId",
- "plantId": "1100",
- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "activeStatusIds": "OSNO CRTE",
- "maintenanceTypeId": "002",
- "maintenanceType": "Periodic maintenance",
- "basicStartDateTime": "2019-08-24T14:15:22Z",
- "basicEndDateTime": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "changedDateTime": "2019-08-24T14:15:22Z",
- "sortField": "PRS10239.WP12"
}
]
}
Lookup single Corrective Work order with related information
Properties areaId and area are deprecated as of 01.2021 in order to align with naming across Equinor system. Use locationId and location instead.
work-order-id required | string |
include-operations | boolean Default: true Include Work order operations |
include-materials | boolean Default: true Include materials for Work order operations |
include-maintenance-records | boolean Default: false Include related maintenance records (from object list) |
include-attachments | boolean Default: false Include Work order attachments (on header and for operation) |
include-status-details | boolean Default: false Include detailed information for statuses (both active and non-active) |
include-tag-details | boolean Default: false Include detailed for the main tag of the Work order |
include-related-tags | boolean Default: false Include related tags (from object list) |
curl --request GET \ --url 'https://api-test.gateway.equinor.com/maintenance-api/work-orders/corrective-work-orders/%7Bwork-order-id%7D?include-operations=SOME_BOOLEAN_VALUE&include-materials=SOME_BOOLEAN_VALUE&include-maintenance-records=SOME_BOOLEAN_VALUE&include-attachments=SOME_BOOLEAN_VALUE&include-status-details=SOME_BOOLEAN_VALUE&include-tag-details=SOME_BOOLEAN_VALUE&include-related-tags=SOME_BOOLEAN_VALUE' \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
{- "operations": [
- {
- "materials": [
- {
- "reservationId": "TBD",
- "materialId": "741466",
- "material": "LIGHT,FIXTURE,26w,SZ 4155.100,RITTAL",
- "quantity": 1,
- "quantityUnit": "PC",
- "location": "P10N utenfor lager",
- "tracking": {
- "trackingStatusId": "0C",
- "trackingStatus": "Component cancelled",
- "trackingStatusColor": "no-color"
}
}
], - "attachments": [
- {
- "attachmentId": "H4sIAAAAAAAACqsxMDA1MDVzNDQ3srAwdHVxdDR0dDI1MjB3MjFyMzA0cqsxMgAqMTExq6mpMTQwMDSwNKoBitQ4GRsA6ZqAzOSS0qLU-LTMvJTMvHQFXQXn_IJKBQ1jTb2CvHQAwLV5WV4AAAA",
- "fileName": "equipment_location.jpg",
- "fileSize": "1636352",
- "mimeType": "image/jpg",
- "_links": {
- "enclosure": "/work-orders/preventive-work-orders/20005446/attachments/H4sIAAAAAAAACqsxMDA1MDVzNDQ3srAwdHVxdDR0dDI1MjB3MjFyMzA0cqsxMgAqMTExq6mpMTQwMDSwNKoBitQ4GRsA6ZqAzOSS0qLU-LTMvJTMvHQFXQXn_IJKBQ1jTb2CvHQAwLV5WV4AAAA"
}
}
], - "operationId": "1005419798-00000001",
- "operation": "0020",
- "title": "Bygge stillas",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "text": "Bygge stillas\\n\r\n3 x 3 x 5 meter",
- "standardTextTemplate": "1100-GS",
- "isCompleted": false,
- "plannedWorkHours": "PT3H",
- "actualWorkHours": "PT2H30M",
- "actualPercentageComplete": 57.14,
- "capacityCount": 1,
- "plannedDuration": "PT2H45M",
- "isScheduledExternally": true,
- "earliestStartDateTime": "2019-08-24T14:15:22Z",
- "earliestFinishDateTime": "2019-08-24T14:15:22Z",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2019-08-24T14:15:22Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2019-08-24T14:15:22Z"
}
], - "statuses": [
- {
- "statusId": "RDEX",
- "status": "Ready for execution",
- "statusOrder": 2,
- "isActive": false,
- "activatedDateTime": "2019-08-24T14:15:22Z"
}
], - "tagsRelated": [
- {
- "tagId": "AE5566",
- "tagPlantId": "1100",
- "tag": "CT5023/24 - POT.WATER PH PROBE."
}
], - "maintenanceRecords": [
- {
- "recordId": "45894100",
- "recordResource": "maintenance-records/modification-proposals",
- "tagId": "PX",
- "tagPlantId": "1100",
- "equipmentId": "12410072",
- "title": "Endre skalering på PDT",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "source": "ObjectList",
- "_links": {
- "self": "/maintenance-records/failure-reports/45894100"
}
}
], - "tagDetails": {
- "isInactive": false,
- "parentTagId": "AT5566",
- "systemId": "BS",
- "system": "PM-PROG.SYST.",
- "ABCId": "5",
- "ABC": "Crit.=M & Red.=B",
- "locationId": "W14",
- "location": "METERING DECK",
- "areaId": "Deprecated - Use locationId",
- "area": "Deprecated - Use location",
- "catalogProfileId": "PM-160",
- "tagId": "AE5566",
- "tagPlantId": "1100",
- "tag": "CT5023/24 - POT.WATER PH PROBE."
}, - "attachments": [
- {
- "attachmentId": "H4sIAAAAAAAACqsxMDA1MDVzNDQ3srAwdHVxdDR0dDI1MjB3MjFyMzA0cqsxMgAqMTExq6mpMTQwMDSwNKoBitQ4GRsA6ZqAzOSS0qLU-LTMvJTMvHQFXQXn_IJKBQ1jTb2CvHQAwLV5WV4AAAA",
- "fileName": "equipment_location.jpg",
- "fileSize": "1636352",
- "mimeType": "image/jpg",
- "_links": {
- "enclosure": "/work-orders/preventive-work-orders/20005446/attachments/H4sIAAAAAAAACqsxMDA1MDVzNDQ3srAwdHVxdDR0dDI1MjB3MjFyMzA0cqsxMgAqMTExq6mpMTQwMDSwNKoBitQ4GRsA6ZqAzOSS0qLU-LTMvJTMvHQFXQXn_IJKBQ1jTb2CvHQAwLV5WV4AAAA"
}
}
], - "text": "OBSERVERT FEILTILSTAND FYLLES UT AV INNMELDER:\nBeskriv feilen så godt som mulig (legg gjerne med bilde):\nHvor er utstyret fysisk plassert (legg gjerne med bilde)?\n-\n\nHvordan påvirker feilen utstyrets funksjon? ... \n",
- "plannerGroup": "Plattform PV",
- "workCenter": "AI Automasjon",
- "workOrderId": "24983466",
- "tagId": "BF",
- "tagPlantId": "1100",
- "tag": "CT5023/24 - POT.WATER PH PROBE.",
- "title": "Modifikasjon av brannmur",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD17OU",
- "areaId": "Deprecated - Use locationId",
- "failureReportId": "45836077",
- "plantId": "1100",
- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "activeStatusIds": "OSNO CRTE",
- "maintenanceTypeId": "002",
- "maintenanceType": "Periodic maintenance",
- "requiredEndDate": "2019-08-24",
- "basicStartDateTime": "2019-08-24T14:15:22Z",
- "basicEndDateTime": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "changedDateTime": "2019-08-24T14:15:22Z",
- "sortField": "PRS10239.WP12",
- "priorityId": "L"
}
Update corrective work order.
Currently, we support appending text to the Work order.
The append request body has a special syntax. See the provide example for more details.
work-order-id required | string |
The information to be updated
op | string Value: "append" The type of non-trivial patch operation to perform. Currently, only append is supported |
path | string Value: "/text" The property to be updated by the non-trivial patch operation. Currently, only /text is supported |
value | string The value to update with non-trivial patch operation. |
[- {
- "op": "append",
- "path": "/text",
- "value": "Text to append\nMulti-line"
}
]
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Add operations
work-order-id required | string |
Operations to add to existing Work order
title required | string [ 0 .. 40 ] characters Nullable |
operation required | string Nullable Id of operation user is familiar with |
workCenterId | string Nullable |
workCenterPlantId | string Nullable |
text | string Nullable |
plannedWorkDuration | string Nullable Duration as defined in ISO8601 |
capacityCount | integer <int32> |
schedulingStartConstraintId | string Nullable Enum: "MSO" "SNET" "SNLT" null Constraint: * |
schedulingStartConstraintDateTime | string <date-time> Nullable |
schedulingFinishConstraintId | string Nullable Enum: "MFO" "FNET" "FNLT" null Constraint: * |
schedulingFinishConstraintDateTime | string <date-time> Nullable |
isScheduledExternally | boolean Nullable |
earliestStartDateTime | string <date-time> Nullable |
earliestFinishDateTime | string <date-time> Nullable |
[- {
- "operation": "0010",
- "title": "Bygge stillas",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "plannedWorkDuration": "P0Y0M0DT4H0M0S",
- "capacityCount": 2,
- "text": "Bygge stillas\n3 x 3 x 5 meter",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2020-11-01T00:00:00Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2021-03-01T00:00:00Z"
}, - {
- "operation": "0020",
- "title": "Bytte del",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "plannedWorkDuration": "P0Y0M0DT3H30M0S",
- "capacityCount": 1,
- "text": "",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2020-11-01T00:00:00Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2021-03-01T00:00:00Z"
}
]
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Update the work order operation. Currently, we support completing the operation but additional functionality will be added in future releases.
work-order-id required | string |
operation required | string Example: 0020 |
Work order operation to update
isCompleted required | boolean Default: false |
{- "isCompleted": true
}
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Add time ticket for work performed
Text multi-line property currently doesn't get persisted in SAP. This will be fixed in next release.
work-order-id required | string |
operation required | string Example: 0020 |
Time ticket to add to operation
workHours required | string The work performed for the operation. Duration as defined in ISO8601 |
remainingWorkHours | string New estimate of remaining work for the operation. In Duration format as defined in ISO8601 |
workStartDateTime | string <date-time> Nullable |
workEndDateTime | string <date-time> Nullable |
workCenterId | string Resource which performed the work. Default is based on Work order operation. |
workCenterPlantId | string Resource which performed the work. Default is based on Work order operation. |
title | string <= 40 characters Title for time ticket |
text | string Multi-line description for the time ticket |
{- "workHours": "P0Y0M0DT2H0M0S",
- "remainingWorkHours": "P0Y0M0DT2H0M0S",
- "workStartDateTime": "2020-11-01T00:00:00Z",
- "workEndDateTime": "2020-11-05T00:00:00Z",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "title": "Prep jobb",
- "text": "Multi-line text\nDescribing the work done"
}
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Download single attachment for corrective Work order
record-id required | string |
attachment-id required | string |
curl --request GET \ --url https://api-test.gateway.equinor.com/maintenance-api/work-orders/corrective-work-orders/%7Brecord-id%7D/attachments/%7Battachment-id%7D \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Activate or deactivate status for Work order.
Overview of how status are used can be found in Equinor's governing document GL1561 - Work orders and notifications types
To identify which status the work order currently has perform a request to: work-orders/corrective-work-orders/{{work-order-id}}?include-status-details=true
The endpoint supports most status activiation such as:
Deactivation is supported in most cases where there is no interdependency between statuses. For status with a statusOrder value, deactivation is not necessary (nor supported) as the business logic will handle the switch.
The following statuses are not supported at the moment and will return a HTTP 405 response:
work-order-id required | string |
status-id required | string |
Work order status to update
isActive required | boolean |
{- "isActive": true
}
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Search for corrective Work orders through predefined filters. Each filter has a defined action and a set of parameters as described below.
The response does not include all details for each corrective work order. This can be found by subsequent call to lookup corrective-work-order
Properties areaId and area are deprecated as of 01.2021 in order to align with naming across Equinor system. Use locationId and location instead.
Corrective work orders based on recent status activations for the work orders. Parameters:
Find open Corrective work orders before the required-end-date Parameters:
filter required | string Enum: "recent-status-activations" "same-maintenance-plan" "before-required-end-date" Filter to limit the Corrective work order by |
status-id | string Status |
plant-id | string Plant |
max-days-since-activation | integer <int32> [ 0 .. 255 ] Define how many days from the current day to include results for. 0 if only include for today |
max-work-orders | integer <int32> >= 0 Maximal numbers of results returned (optional for filter) |
area-id | string Deprecated Deprecated. Use location-id instead |
location-id | string Structured location within the plant. Use /plants/{plant-id}/locations for possible values |
required-end-date | string <date> placeholder |
curl --request GET \ --url 'https://api-test.gateway.equinor.com/maintenance-api/work-orders/corrective-work-orders?filter=SOME_STRING_VALUE&status-id=SOME_STRING_VALUE&plant-id=SOME_STRING_VALUE&max-days-since-activation=SOME_INTEGER_VALUE&max-work-orders=SOME_INTEGER_VALUE&area-id=SOME_STRING_VALUE&location-id=SOME_STRING_VALUE&required-end-date=SOME_STRING_VALUE' \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
[- {
- "workOrderId": "24983466",
- "tagId": "BF",
- "tagPlantId": "1100",
- "tag": "CT5023/24 - POT.WATER PH PROBE.",
- "title": "Modifikasjon av brannmur",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD17OU",
- "areaId": "Deprecated - Use locationId",
- "failureReportId": "45836077",
- "plantId": "1100",
- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "activeStatusIds": "OSNO CRTE",
- "maintenanceTypeId": "002",
- "maintenanceType": "Periodic maintenance",
- "requiredEndDate": "2019-08-24",
- "basicStartDateTime": "2019-08-24T14:15:22Z",
- "basicEndDateTime": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "changedDateTime": "2019-08-24T14:15:22Z",
- "sortField": "PRS10239.WP12",
- "priorityId": "L"
}
]
Create new Corrective Work order based on a supplied failure report.
It's possible to supply operations in the create operation. If no operations are passed, a default operation will be created automatically.
To lookup the created corrective work order use endpoint /work-orders/corrective-work-orders/{work-order-id}
Corrective Work order to create
planningPlantId required | string |
workCenterId required | string |
workCenterPlantId required | string |
title required | string |
plantId required | string |
failureReportId required | string |
Array of objects (WorkOrderOperationListCreate) | |
tagId | string |
tagPlantId | string |
plannerGroupId | string |
maintenanceTypeId | string |
basicStartDateTime | string <date-time> |
basicEndDateTime | string <date-time> |
locationId | string Structured location within the plant where the tag is located |
areaId | string Deprecated Deprecated 01.2021 - Use locationId instead |
text | string |
{- "failureReportId": "45836077",
- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "workCenterId": "CO2PIP",
- "workCenterPlantId": "1100",
- "title": "14xx/Installere flowline CD2",
- "tagId": "LZ1012",
- "tagPlantId": "1100",
- "plantId": "1100",
- "basicStartDateTime": "2020-11-01T00:00:00Z",
- "basicEndDateTime": "2021-03-01T00:00:00Z",
- "text": "Project for replacing flowing on CD2\n",
- "operations": [
- {
- "operation": "0010",
- "title": "Bygge stillas",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "plannedWorkDuration": "P0Y0M0DT3H30M0S",
- "text": "Bygge stillas\n3 x 3 x 5 meter",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2020-11-01T00:00:00Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2021-03-01T00:00:00Z"
}, - {
- "operation": "0020",
- "title": "Bytte del",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "plannedWorkDuration": "P0Y0M0DT3H30M0S",
- "text": "",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2020-11-01T00:00:00Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2021-03-01T00:00:00Z"
}
]
}
{- "text": "OBSERVERT FEILTILSTAND FYLLES UT AV INNMELDER:\nBeskriv feilen så godt som mulig (legg gjerne med bilde):\nHvor er utstyret fysisk plassert (legg gjerne med bilde)?\n-\n\nHvordan påvirker feilen utstyrets funksjon? ... \n",
- "plannerGroup": "Plattform PV",
- "workCenter": "AI Automasjon",
- "workOrderId": "24983466",
- "tagId": "BF",
- "tagPlantId": "1100",
- "tag": "CT5023/24 - POT.WATER PH PROBE.",
- "title": "Modifikasjon av brannmur",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD17OU",
- "areaId": "Deprecated - Use locationId",
- "failureReportId": "45836077",
- "plantId": "1100",
- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "activeStatusIds": "OSNO CRTE",
- "maintenanceTypeId": "002",
- "maintenanceType": "Periodic maintenance",
- "requiredEndDate": "2019-08-24",
- "basicStartDateTime": "2019-08-24T14:15:22Z",
- "basicEndDateTime": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "changedDateTime": "2019-08-24T14:15:22Z",
- "sortField": "PRS10239.WP12",
- "priorityId": "L"
}
Lookup single Preventive Work order with related information.
Properties areaId and area are deprecated as of 01.2021 in order to align with naming across Equinor system. Use locationId and location instead.
work-order-id required | string |
include-operations | boolean Default: true Include Work order operations |
include-materials | boolean Default: false Include materials for Work order operations |
include-maintenance-records | boolean Default: false Include related maintenance records (from object list) |
include-maintenance-plan-details | boolean Default: false Include details for maintenance plan |
include-attachments | boolean Default: false Include Work order attachments (on header and for operation) |
include-status-details | boolean Default: false Include detailed information for statuses (both active and non-active) |
include-tag-details | boolean Default: false Include detailed for the main tag of the Work order |
include-related-tags | boolean Default: false Include related tags (from object list) |
curl --request GET \ --url 'https://api-test.gateway.equinor.com/maintenance-api/work-orders/preventive-work-orders/%7Bwork-order-id%7D?include-operations=SOME_BOOLEAN_VALUE&include-materials=SOME_BOOLEAN_VALUE&include-maintenance-records=SOME_BOOLEAN_VALUE&include-maintenance-plan-details=SOME_BOOLEAN_VALUE&include-attachments=SOME_BOOLEAN_VALUE&include-status-details=SOME_BOOLEAN_VALUE&include-tag-details=SOME_BOOLEAN_VALUE&include-related-tags=SOME_BOOLEAN_VALUE' \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
{- "operations": [
- {
- "materials": [
- {
- "reservationId": "TBD",
- "materialId": "741466",
- "material": "LIGHT,FIXTURE,26w,SZ 4155.100,RITTAL",
- "quantity": 1,
- "quantityUnit": "PC",
- "location": "P10N utenfor lager",
- "tracking": {
- "trackingStatusId": "0C",
- "trackingStatus": "Component cancelled",
- "trackingStatusColor": "no-color"
}
}
], - "attachments": [
- {
- "attachmentId": "H4sIAAAAAAAACqsxMDA1MDVzNDQ3srAwdHVxdDR0dDI1MjB3MjFyMzA0cqsxMgAqMTExq6mpMTQwMDSwNKoBitQ4GRsA6ZqAzOSS0qLU-LTMvJTMvHQFXQXn_IJKBQ1jTb2CvHQAwLV5WV4AAAA",
- "fileName": "equipment_location.jpg",
- "fileSize": "1636352",
- "mimeType": "image/jpg",
- "_links": {
- "enclosure": "/work-orders/preventive-work-orders/20005446/attachments/H4sIAAAAAAAACqsxMDA1MDVzNDQ3srAwdHVxdDR0dDI1MjB3MjFyMzA0cqsxMgAqMTExq6mpMTQwMDSwNKoBitQ4GRsA6ZqAzOSS0qLU-LTMvJTMvHQFXQXn_IJKBQ1jTb2CvHQAwLV5WV4AAAA"
}
}
], - "operationId": "1005419798-00000001",
- "operation": "0020",
- "title": "Bygge stillas",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "text": "Bygge stillas\\n\r\n3 x 3 x 5 meter",
- "standardTextTemplate": "1100-GS",
- "isCompleted": false,
- "plannedWorkHours": "PT3H",
- "actualWorkHours": "PT2H30M",
- "actualPercentageComplete": 57.14,
- "capacityCount": 1,
- "plannedDuration": "PT2H45M",
- "isScheduledExternally": true,
- "earliestStartDateTime": "2019-08-24T14:15:22Z",
- "earliestFinishDateTime": "2019-08-24T14:15:22Z",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2019-08-24T14:15:22Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2019-08-24T14:15:22Z"
}
], - "statuses": [
- {
- "statusId": "RDEX",
- "status": "Ready for execution",
- "statusOrder": 2,
- "isActive": false,
- "activatedDateTime": "2019-08-24T14:15:22Z"
}
], - "tagsRelated": [
- {
- "tagId": "AE5566",
- "tagPlantId": "1100",
- "tag": "CT5023/24 - POT.WATER PH PROBE."
}
], - "maintenanceRecords": [
- {
- "recordId": "45894100",
- "recordResource": "maintenance-records/modification-proposals",
- "tagId": "PX",
- "tagPlantId": "1100",
- "equipmentId": "12410072",
- "title": "Endre skalering på PDT",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "source": "ObjectList",
- "_links": {
- "self": "/maintenance-records/failure-reports/45894100"
}
}
], - "maintenancePlan": {
- "maintenancePlanId": "1108244",
- "maintenancePlanItemId": "10149640",
- "planDate": "2019-08-24"
}, - "tagDetails": {
- "isInactive": false,
- "parentTagId": "AT5566",
- "systemId": "BS",
- "system": "PM-PROG.SYST.",
- "ABCId": "5",
- "ABC": "Crit.=M & Red.=B",
- "locationId": "W14",
- "location": "METERING DECK",
- "areaId": "Deprecated - Use locationId",
- "area": "Deprecated - Use location",
- "catalogProfileId": "PM-160",
- "tagId": "AE5566",
- "tagPlantId": "1100",
- "tag": "CT5023/24 - POT.WATER PH PROBE."
}, - "attachments": [
- {
- "attachmentId": "H4sIAAAAAAAACqsxMDA1MDVzNDQ3srAwdHVxdDR0dDI1MjB3MjFyMzA0cqsxMgAqMTExq6mpMTQwMDSwNKoBitQ4GRsA6ZqAzOSS0qLU-LTMvJTMvHQFXQXn_IJKBQ1jTb2CvHQAwLV5WV4AAAA",
- "fileName": "equipment_location.jpg",
- "fileSize": "1636352",
- "mimeType": "image/jpg",
- "_links": {
- "enclosure": "/work-orders/preventive-work-orders/20005446/attachments/H4sIAAAAAAAACqsxMDA1MDVzNDQ3srAwdHVxdDR0dDI1MjB3MjFyMzA0cqsxMgAqMTExq6mpMTQwMDSwNKoBitQ4GRsA6ZqAzOSS0qLU-LTMvJTMvHQFXQXn_IJKBQ1jTb2CvHQAwLV5WV4AAAA"
}
}
], - "text": "OBSERVERT FEILTILSTAND FYLLES UT AV INNMELDER:\nBeskriv feilen så godt som mulig (legg gjerne med bilde):\nHvor er utstyret fysisk plassert (legg gjerne med bilde)?\n-\n\nHvordan påvirker feilen utstyrets funksjon? ...\n",
- "plannerGroup": "Plattform PV",
- "workCenter": "AI Automasjon",
- "workOrderId": "24597659",
- "tagId": "BF",
- "tagPlantId": "1100",
- "tag": "CT5023/24 - POT.WATER PH PROBE.",
- "title": "Modifikasjon av brannmur",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD17OU",
- "areaId": "Deprecated - Use locationId",
- "plantId": "1100",
- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "activeStatusIds": "OSNO CRTE",
- "maintenanceTypeId": "002",
- "maintenanceType": "Periodic maintenance",
- "plannedDate": "2019-08-24",
- "basicStartDateTime": "2019-08-24T14:15:22Z",
- "basicEndDateTime": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "changedDateTime": "2019-08-24T14:15:22Z",
- "sortField": "PRS10239.WP12"
}
Update preventive work order.
Currently, we support appending text to the Work order.
The append request body has a special syntax. See the provide example for more details.
work-order-id required | string |
The information to be updated
op | string Value: "append" The type of non-trivial patch operation to perform. Currently, only append is supported |
path | string Value: "/text" The property to be updated by the non-trivial patch operation. Currently, only /text is supported |
value | string The value to update with non-trivial patch operation. |
[- {
- "op": "append",
- "path": "/text",
- "value": "Text to append\nMulti-line"
}
]
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Add operations
work-order-id required | string |
Operations to add to existing Work order
title required | string [ 0 .. 40 ] characters Nullable |
operation required | string Nullable Id of operation user is familiar with |
workCenterId | string Nullable |
workCenterPlantId | string Nullable |
text | string Nullable |
plannedWorkDuration | string Nullable Duration as defined in ISO8601 |
capacityCount | integer <int32> |
schedulingStartConstraintId | string Nullable Enum: "MSO" "SNET" "SNLT" null Constraint: * |
schedulingStartConstraintDateTime | string <date-time> Nullable |
schedulingFinishConstraintId | string Nullable Enum: "MFO" "FNET" "FNLT" null Constraint: * |
schedulingFinishConstraintDateTime | string <date-time> Nullable |
isScheduledExternally | boolean Nullable |
earliestStartDateTime | string <date-time> Nullable |
earliestFinishDateTime | string <date-time> Nullable |
[- {
- "operation": "0010",
- "title": "Bygge stillas",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "plannedWorkDuration": "P0Y0M0DT4H0M0S",
- "capacityCount": 2,
- "text": "Bygge stillas\n3 x 3 x 5 meter",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2020-11-01T00:00:00Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2021-03-01T00:00:00Z"
}, - {
- "operation": "0020",
- "title": "Bytte del",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "plannedWorkDuration": "P0Y0M0DT3H30M0S",
- "capacityCount": 1,
- "text": "",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2020-11-01T00:00:00Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2021-03-01T00:00:00Z"
}
]
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Update the work order operation. Currently, we support completing the operation but additional functionality will be added in future releases.
work-order-id required | string |
operation required | string Example: 0020 |
Work order operation to update
isCompleted required | boolean Default: false |
{- "isCompleted": true
}
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Add time ticket for work performed
Text multi-line property currently doesn't get persisted in SAP. This will be fixed in next release.
work-order-id required | string |
operation required | string Example: 0020 |
Time ticket to add to operation
workHours required | string The work performed for the operation. Duration as defined in ISO8601 |
remainingWorkHours | string New estimate of remaining work for the operation. In Duration format as defined in ISO8601 |
workStartDateTime | string <date-time> Nullable |
workEndDateTime | string <date-time> Nullable |
workCenterId | string Resource which performed the work. Default is based on Work order operation. |
workCenterPlantId | string Resource which performed the work. Default is based on Work order operation. |
title | string <= 40 characters Title for time ticket |
text | string Multi-line description for the time ticket |
{- "workHours": "P0Y0M0DT2H0M0S",
- "remainingWorkHours": "P0Y0M0DT2H0M0S",
- "workStartDateTime": "2020-11-01T00:00:00Z",
- "workEndDateTime": "2020-11-05T00:00:00Z",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "title": "Prep jobb",
- "text": "Multi-line text\nDescribing the work done"
}
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Download single attachment for preventive Work order
record-id required | string |
attachment-id required | string |
curl --request GET \ --url https://api-test.gateway.equinor.com/maintenance-api/work-orders/preventive-work-orders/%7Brecord-id%7D/attachments/%7Battachment-id%7D \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Activate or deactivate status for Work order.
Overview of how status are used can be found in Equinor's governing document GL1561 - Work orders and notifications types
To identify which status the work order currently has perform a request to: work-orders/preventive-work-orders/{{work-order-id}}?include-status-details=true
The endpoint supports most status activiation such as:
Deactivation is supported in most cases where there is no interdependency between statuses. For status with a statusOrder value, deactivation is not necessary (nor supported) as the business logic will handle the switch.
The following statuses are not supported at the moment and will return a HTTP 405 response:
work-order-id required | string |
status-id required | string |
Work order status to update
isActive required | boolean |
{- "isActive": true
}
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Search for preventive Work orders through predefined filters. Each filter has a defind action and a set of parameters as described below.
The response does not include all details for each preventive work order. This can be found by subsequent call to lookup preventive-work-order
Properties areaId and area are deprecated as of 01.2021 in order to align with naming across Equinor system. Use locationId and location instead.
Based on the maintenance plan of the Preventive Work order provided, find other instances sorted by start date Parameters:
Preventive work orders based on recent status activations for the work order. Parameters:
Find open Preventive work orders before the before-planned-date Parameters:
filter required | string Enum: "recent-status-activations" "same-maintenance-plan" "before-planned-date" Filter to limit the failure reports by |
status-id | string Status |
plant-id | string Plant |
max-days-since-activation | integer <int32> [ 0 .. 255 ] Define how many days from the current day to include results for. 0 if only include for today |
work-order-id | string Preventive Work order id |
earliest-date | string <date> Earliest date to find maintenance plan history for (optional for filter) |
max-work-orders | integer <int32> Maximal numbers of results returned (optional for filter) |
location-id | string Structured location within the plant. Use /plants/{plant-id}/locations for possible values |
area-id | string <date> Deprecated Deprecated. Use locationId instead |
planned-date | string <date> Earliest date to find maintenance plan history for (optional for filter) |
curl --request GET \ --url 'https://api-test.gateway.equinor.com/maintenance-api/work-orders/preventive-work-orders?filter=SOME_STRING_VALUE&status-id=SOME_STRING_VALUE&plant-id=SOME_STRING_VALUE&max-days-since-activation=SOME_INTEGER_VALUE&work-order-id=SOME_STRING_VALUE&earliest-date=SOME_STRING_VALUE&max-work-orders=SOME_INTEGER_VALUE&location-id=SOME_STRING_VALUE&area-id=SOME_STRING_VALUE&planned-date=SOME_STRING_VALUE' \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
[- {
- "workOrderId": "24597659",
- "tagId": "BF",
- "tagPlantId": "1100",
- "tag": "CT5023/24 - POT.WATER PH PROBE.",
- "title": "Modifikasjon av brannmur",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD17OU",
- "areaId": "Deprecated - Use locationId",
- "plantId": "1100",
- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "activeStatusIds": "OSNO CRTE",
- "maintenanceTypeId": "002",
- "maintenanceType": "Periodic maintenance",
- "plannedDate": "2019-08-24",
- "basicStartDateTime": "2019-08-24T14:15:22Z",
- "basicEndDateTime": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "changedDateTime": "2019-08-24T14:15:22Z",
- "sortField": "PRS10239.WP12"
}
]
Download single attachment for SAS Change Work order
work-order-id required | string |
attachment-id required | string |
curl --request GET \ --url https://api-test.gateway.equinor.com/maintenance-api/work-orders/sas-change-work-orders/%7Bwork-order-id%7D/attachments/%7Battachment-id%7D \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Lookup single SAS Change Work order with related information
Properties areaId and area are deprecated as of 01.2021 in order to align with naming across Equinor system. Use locationId and location instead.
work-order-id required | string |
include-operations | boolean Default: true Include Work order operations |
include-materials | boolean Default: true Include materials for Work order operations |
include-maintenance-records | boolean Default: false Include related maintenance records (from object list) |
include-attachments | boolean Default: false Include Work order attachments (on header and for operation) |
include-status-details | boolean Default: false Include detailed information for statuses (both active and non-active) |
include-tag-details | boolean Default: false Include detailed for the main tag of the Work order |
include-related-tags | boolean Default: false Include related tags (from object list) |
curl --request GET \ --url 'https://api-test.gateway.equinor.com/maintenance-api/work-orders/sas-change-work-orders/%7Bwork-order-id%7D?include-operations=SOME_BOOLEAN_VALUE&include-materials=SOME_BOOLEAN_VALUE&include-maintenance-records=SOME_BOOLEAN_VALUE&include-attachments=SOME_BOOLEAN_VALUE&include-status-details=SOME_BOOLEAN_VALUE&include-tag-details=SOME_BOOLEAN_VALUE&include-related-tags=SOME_BOOLEAN_VALUE' \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
{- "operations": [
- {
- "materials": [
- {
- "reservationId": "TBD",
- "materialId": "741466",
- "material": "LIGHT,FIXTURE,26w,SZ 4155.100,RITTAL",
- "quantity": 1,
- "quantityUnit": "PC",
- "location": "P10N utenfor lager",
- "tracking": {
- "trackingStatusId": "0C",
- "trackingStatus": "Component cancelled",
- "trackingStatusColor": "no-color"
}
}
], - "attachments": [
- {
- "attachmentId": "H4sIAAAAAAAACqsxMDA1MDVzNDQ3srAwdHVxdDR0dDI1MjB3MjFyMzA0cqsxMgAqMTExq6mpMTQwMDSwNKoBitQ4GRsA6ZqAzOSS0qLU-LTMvJTMvHQFXQXn_IJKBQ1jTb2CvHQAwLV5WV4AAAA",
- "fileName": "equipment_location.jpg",
- "fileSize": "1636352",
- "mimeType": "image/jpg",
- "_links": {
- "enclosure": "/work-orders/preventive-work-orders/20005446/attachments/H4sIAAAAAAAACqsxMDA1MDVzNDQ3srAwdHVxdDR0dDI1MjB3MjFyMzA0cqsxMgAqMTExq6mpMTQwMDSwNKoBitQ4GRsA6ZqAzOSS0qLU-LTMvJTMvHQFXQXn_IJKBQ1jTb2CvHQAwLV5WV4AAAA"
}
}
], - "operationId": "1005419798-00000001",
- "operation": "0020",
- "title": "Bygge stillas",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "text": "Bygge stillas\\n\r\n3 x 3 x 5 meter",
- "standardTextTemplate": "1100-GS",
- "isCompleted": false,
- "plannedWorkHours": "PT3H",
- "actualWorkHours": "PT2H30M",
- "actualPercentageComplete": 57.14,
- "capacityCount": 1,
- "plannedDuration": "PT2H45M",
- "isScheduledExternally": true,
- "earliestStartDateTime": "2019-08-24T14:15:22Z",
- "earliestFinishDateTime": "2019-08-24T14:15:22Z",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2019-08-24T14:15:22Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2019-08-24T14:15:22Z"
}
], - "statuses": [
- {
- "statusId": "RDEX",
- "status": "Ready for execution",
- "statusOrder": 2,
- "isActive": false,
- "activatedDateTime": "2019-08-24T14:15:22Z"
}
], - "tagsRelated": [
- {
- "tagId": "AE5566",
- "tagPlantId": "1100",
- "tag": "CT5023/24 - POT.WATER PH PROBE."
}
], - "maintenanceRecords": [
- {
- "recordId": "45894100",
- "recordResource": "maintenance-records/modification-proposals",
- "tagId": "PX",
- "tagPlantId": "1100",
- "equipmentId": "12410072",
- "title": "Endre skalering på PDT",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "source": "ObjectList",
- "_links": {
- "self": "/maintenance-records/failure-reports/45894100"
}
}
], - "tagDetails": {
- "isInactive": false,
- "parentTagId": "AT5566",
- "systemId": "BS",
- "system": "PM-PROG.SYST.",
- "ABCId": "5",
- "ABC": "Crit.=M & Red.=B",
- "locationId": "W14",
- "location": "METERING DECK",
- "areaId": "Deprecated - Use locationId",
- "area": "Deprecated - Use location",
- "catalogProfileId": "PM-160",
- "tagId": "AE5566",
- "tagPlantId": "1100",
- "tag": "CT5023/24 - POT.WATER PH PROBE."
}, - "attachments": [
- {
- "attachmentId": "H4sIAAAAAAAACqsxMDA1MDVzNDQ3srAwdHVxdDR0dDI1MjB3MjFyMzA0cqsxMgAqMTExq6mpMTQwMDSwNKoBitQ4GRsA6ZqAzOSS0qLU-LTMvJTMvHQFXQXn_IJKBQ1jTb2CvHQAwLV5WV4AAAA",
- "fileName": "equipment_location.jpg",
- "fileSize": "1636352",
- "mimeType": "image/jpg",
- "_links": {
- "enclosure": "/work-orders/preventive-work-orders/20005446/attachments/H4sIAAAAAAAACqsxMDA1MDVzNDQ3srAwdHVxdDR0dDI1MjB3MjFyMzA0cqsxMgAqMTExq6mpMTQwMDSwNKoBitQ4GRsA6ZqAzOSS0qLU-LTMvJTMvHQFXQXn_IJKBQ1jTb2CvHQAwLV5WV4AAAA"
}
}
], - "text": "Beskrivelse av prosjekt modifikasjon\n",
- "costWBS": "Conc.: Well A10 GL hook-up FL",
- "plannerGroup": "Plattform PV",
- "workCenter": "AI Automasjon",
- "workOrderId": "24684145",
- "tagId": "LZ1012",
- "tagPlantId": "1100",
- "tag": "A10 OIL PRODUCTION WELL",
- "title": "1416/Installerer Flowlinw A10",
- "workCenterId": "PPMAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD17OU",
- "areaId": "Deprecated - Use locationId",
- "plantId": "1100",
- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "activeStatusIds": "OSNO CRTE",
- "maintenanceTypeId": "Z06",
- "maintenanceType": "SAS Change Activity",
- "basicStartDateTime": "2019-08-24T14:15:22Z",
- "basicEndDateTime": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "changedDateTime": "2019-08-24T14:15:22Z",
- "costWBSId": "M.O037C.20.A.0002.A2",
- "projectId": "M.O037C.20.A.0002",
- "costNetworkId": "9045173",
- "costNetworkOperationId": "0010",
- "sortField": "PRS10239.WP12"
}
Activate or deactivate status for Work order
Currently, not all statuses are supported.
The status supported are:
work-order-id required | string |
status-id required | string |
Work order status to update
isActive required | boolean |
{- "isActive": true
}
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Search for SAS Change Work orders through predefined filters. Each filter has a defined action and a set of parameters as described below.
The response does not include all details for each SAS Change Work order. This can be found by subsequent call to lookup sas-change-work-orders
Properties areaId and area are deprecated as of 01.2021 in order to align with naming across Equinor system. Use locationId and location instead.
Find open SAS Change Work orders by plant Parameters:
SAS Change Work orders based on recent status activations for the work orders. Parameters:
filter required | string Enum: "open-by-plant" "recent-status-activations" Filter to limit the SAS Change work order by |
status-id | string Status |
plant-id | string Plant |
max-days-since-activation | integer <int32> [ 0 .. 255 ] Define how many days from the current day to include results for. 0 if only include for today |
curl --request GET \ --url 'https://api-test.gateway.equinor.com/maintenance-api/work-orders/sas-change-work-orders?filter=SOME_STRING_VALUE&status-id=SOME_STRING_VALUE&plant-id=SOME_STRING_VALUE&max-days-since-activation=SOME_INTEGER_VALUE' \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
[- {
- "workOrderId": "24684145",
- "tagId": "LZ1012",
- "tagPlantId": "1100",
- "tag": "A10 OIL PRODUCTION WELL",
- "title": "1416/Installerer Flowlinw A10",
- "workCenterId": "PPMAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD17OU",
- "areaId": "Deprecated - Use locationId",
- "plantId": "1100",
- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "activeStatusIds": "OSNO CRTE",
- "maintenanceTypeId": "Z06",
- "maintenanceType": "SAS Change Activity",
- "basicStartDateTime": "2019-08-24T14:15:22Z",
- "basicEndDateTime": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "changedDateTime": "2019-08-24T14:15:22Z",
- "costWBSId": "M.O037C.20.A.0002.A2",
- "projectId": "M.O037C.20.A.0002",
- "costNetworkId": "9045173",
- "costNetworkOperationId": "0010",
- "sortField": "PRS10239.WP12"
}
]
Create new SAS Change Work order
Properties areaId and area are deprecated as of 01.2021 in order to align with naming across Equinor system. Use locationId and location instead.
SAS Change Work order to create
planningPlantId required | string |
workCenterId required | string |
workCenterPlantId required | string |
title required | string |
plantId required | string |
locationId required | string Structured location within the plant where the tag is located |
required | Array of objects (WorkOrderOperationCreate) |
tagId required | string |
tagPlantId required | string |
costNetworkId | string |
costNetworkOperationId | string |
plannerGroupId | string |
maintenanceTypeId | string |
basicStartDateTime | string <date-time> |
basicEndDateTime | string <date-time> |
areaId | string Deprecated Deprecated 01.2021 - Use locationId instead |
text | string |
{- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "workCenterId": "PPMAUT",
- "workCenterPlantId": "1100",
- "title": "14xx/Installere flowline CD2",
- "tagId": "LZ1012",
- "tagPlantId": "1100",
- "costNetworkId": "9045173",
- "costNetworkOperationId": "0010",
- "plantId": "1100",
- "locationId": "CD2",
- "maintenanceTypeId": "015",
- "basicStartDateTime": "2020-11-01T00:00:00Z",
- "basicEndDateTime": "2021-03-01T00:00:00Z",
- "text": "Project for replacing flowing on CD2\n",
- "operations": [
- {
- "operation": "0010",
- "title": "Bygge stillas",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "plannedWorkDuration": "P0Y0M0DT3H30M0S",
- "text": "Bygge stillas\n3 x 3 x 5 meter",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2020-11-01T00:00:00Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2021-03-01T00:00:00Z"
}, - {
- "operation": "0020",
- "title": "Bytte del",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "plannedWorkDuration": "P0Y0M0DT3H30M0S",
- "text": "",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2020-11-01T00:00:00Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2021-03-01T00:00:00Z"
}
]
}
{- "text": "Beskrivelse av prosjekt modifikasjon\n",
- "costWBS": "Conc.: Well A10 GL hook-up FL",
- "plannerGroup": "Plattform PV",
- "workCenter": "AI Automasjon",
- "workOrderId": "24684145",
- "tagId": "LZ1012",
- "tagPlantId": "1100",
- "tag": "A10 OIL PRODUCTION WELL",
- "title": "1416/Installerer Flowlinw A10",
- "workCenterId": "PPMAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD17OU",
- "areaId": "Deprecated - Use locationId",
- "plantId": "1100",
- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "activeStatusIds": "OSNO CRTE",
- "maintenanceTypeId": "Z06",
- "maintenanceType": "SAS Change Activity",
- "basicStartDateTime": "2019-08-24T14:15:22Z",
- "basicEndDateTime": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "changedDateTime": "2019-08-24T14:15:22Z",
- "costWBSId": "M.O037C.20.A.0002.A2",
- "projectId": "M.O037C.20.A.0002",
- "costNetworkId": "9045173",
- "costNetworkOperationId": "0010",
- "sortField": "PRS10239.WP12"
}
Add operations
work-order-id required | string |
Operations to add to existing Work order
title required | string [ 0 .. 40 ] characters Nullable |
operation required | string Nullable Id of operation user is familiar with |
workCenterId | string Nullable |
workCenterPlantId | string Nullable |
text | string Nullable |
plannedWorkDuration | string Nullable Duration as defined in ISO8601 |
capacityCount | integer <int32> |
schedulingStartConstraintId | string Nullable Enum: "MSO" "SNET" "SNLT" null Constraint: * |
schedulingStartConstraintDateTime | string <date-time> Nullable |
schedulingFinishConstraintId | string Nullable Enum: "MFO" "FNET" "FNLT" null Constraint: * |
schedulingFinishConstraintDateTime | string <date-time> Nullable |
isScheduledExternally | boolean Nullable |
earliestStartDateTime | string <date-time> Nullable |
earliestFinishDateTime | string <date-time> Nullable |
[- {
- "operation": "0010",
- "title": "Bygge stillas",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "plannedWorkDuration": "P0Y0M0DT4H0M0S",
- "capacityCount": 2,
- "text": "Bygge stillas\n3 x 3 x 5 meter",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2020-11-01T00:00:00Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2021-03-01T00:00:00Z"
}, - {
- "operation": "0020",
- "title": "Bytte del",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "plannedWorkDuration": "P0Y0M0DT3H30M0S",
- "capacityCount": 1,
- "text": "",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2020-11-01T00:00:00Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2021-03-01T00:00:00Z"
}
]
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Download single attachment for Project Work order
record-id required | string |
attachment-id required | string |
curl --request GET \ --url https://api-test.gateway.equinor.com/maintenance-api/work-orders/project-work-orders/%7Brecord-id%7D/attachments/%7Battachment-id%7D \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Lookup single Project Work order with related information
Properties areaId and area are deprecated as of 01.2021 in order to align with naming across Equinor system. Use locationId and location instead.
work-order-id required | string |
include-operations | boolean Default: true Include Work order operations |
include-materials | boolean Default: true Include materials for Work order operations |
include-maintenance-records | boolean Default: false Include related maintenance records (from object list) |
include-attachments | boolean Default: false Include Work order attachments (on header and for operation) |
include-status-details | boolean Default: false Include detailed information for statuses (both active and non-active) |
include-tag-details | boolean Default: false Include detailed for the main tag of the Work order |
include-related-tags | boolean Default: false Include related tags (from object list) |
curl --request GET \ --url 'https://api-test.gateway.equinor.com/maintenance-api/work-orders/project-work-orders/%7Bwork-order-id%7D?include-operations=SOME_BOOLEAN_VALUE&include-materials=SOME_BOOLEAN_VALUE&include-maintenance-records=SOME_BOOLEAN_VALUE&include-attachments=SOME_BOOLEAN_VALUE&include-status-details=SOME_BOOLEAN_VALUE&include-tag-details=SOME_BOOLEAN_VALUE&include-related-tags=SOME_BOOLEAN_VALUE' \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
{- "operations": [
- {
- "materials": [
- {
- "reservationId": "TBD",
- "materialId": "741466",
- "material": "LIGHT,FIXTURE,26w,SZ 4155.100,RITTAL",
- "quantity": 1,
- "quantityUnit": "PC",
- "location": "P10N utenfor lager",
- "tracking": {
- "trackingStatusId": "0C",
- "trackingStatus": "Component cancelled",
- "trackingStatusColor": "no-color"
}
}
], - "attachments": [
- {
- "attachmentId": "H4sIAAAAAAAACqsxMDA1MDVzNDQ3srAwdHVxdDR0dDI1MjB3MjFyMzA0cqsxMgAqMTExq6mpMTQwMDSwNKoBitQ4GRsA6ZqAzOSS0qLU-LTMvJTMvHQFXQXn_IJKBQ1jTb2CvHQAwLV5WV4AAAA",
- "fileName": "equipment_location.jpg",
- "fileSize": "1636352",
- "mimeType": "image/jpg",
- "_links": {
- "enclosure": "/work-orders/preventive-work-orders/20005446/attachments/H4sIAAAAAAAACqsxMDA1MDVzNDQ3srAwdHVxdDR0dDI1MjB3MjFyMzA0cqsxMgAqMTExq6mpMTQwMDSwNKoBitQ4GRsA6ZqAzOSS0qLU-LTMvJTMvHQFXQXn_IJKBQ1jTb2CvHQAwLV5WV4AAAA"
}
}
], - "operationId": "1005419798-00000001",
- "operation": "0020",
- "title": "Bygge stillas",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "text": "Bygge stillas\\n\r\n3 x 3 x 5 meter",
- "standardTextTemplate": "1100-GS",
- "isCompleted": false,
- "plannedWorkHours": "PT3H",
- "actualWorkHours": "PT2H30M",
- "actualPercentageComplete": 57.14,
- "capacityCount": 1,
- "plannedDuration": "PT2H45M",
- "isScheduledExternally": true,
- "earliestStartDateTime": "2019-08-24T14:15:22Z",
- "earliestFinishDateTime": "2019-08-24T14:15:22Z",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2019-08-24T14:15:22Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2019-08-24T14:15:22Z"
}
], - "statuses": [
- {
- "statusId": "RDEX",
- "status": "Ready for execution",
- "statusOrder": 2,
- "isActive": false,
- "activatedDateTime": "2019-08-24T14:15:22Z"
}
], - "tagsRelated": [
- {
- "tagId": "AE5566",
- "tagPlantId": "1100",
- "tag": "CT5023/24 - POT.WATER PH PROBE."
}
], - "maintenanceRecords": [
- {
- "recordId": "45894100",
- "recordResource": "maintenance-records/modification-proposals",
- "tagId": "PX",
- "tagPlantId": "1100",
- "equipmentId": "12410072",
- "title": "Endre skalering på PDT",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "source": "ObjectList",
- "_links": {
- "self": "/maintenance-records/failure-reports/45894100"
}
}
], - "tagDetails": {
- "isInactive": false,
- "parentTagId": "AT5566",
- "systemId": "BS",
- "system": "PM-PROG.SYST.",
- "ABCId": "5",
- "ABC": "Crit.=M & Red.=B",
- "locationId": "W14",
- "location": "METERING DECK",
- "areaId": "Deprecated - Use locationId",
- "area": "Deprecated - Use location",
- "catalogProfileId": "PM-160",
- "tagId": "AE5566",
- "tagPlantId": "1100",
- "tag": "CT5023/24 - POT.WATER PH PROBE."
}, - "attachments": [
- {
- "attachmentId": "H4sIAAAAAAAACqsxMDA1MDVzNDQ3srAwdHVxdDR0dDI1MjB3MjFyMzA0cqsxMgAqMTExq6mpMTQwMDSwNKoBitQ4GRsA6ZqAzOSS0qLU-LTMvJTMvHQFXQXn_IJKBQ1jTb2CvHQAwLV5WV4AAAA",
- "fileName": "equipment_location.jpg",
- "fileSize": "1636352",
- "mimeType": "image/jpg",
- "_links": {
- "enclosure": "/work-orders/preventive-work-orders/20005446/attachments/H4sIAAAAAAAACqsxMDA1MDVzNDQ3srAwdHVxdDR0dDI1MjB3MjFyMzA0cqsxMgAqMTExq6mpMTQwMDSwNKoBitQ4GRsA6ZqAzOSS0qLU-LTMvJTMvHQFXQXn_IJKBQ1jTb2CvHQAwLV5WV4AAAA"
}
}
], - "text": "Beskrivelse av prosjekt modifikasjon\n",
- "costWBS": "Conc.: Well A10 GL hook-up FL",
- "plannerGroup": "Plattform PV",
- "workCenter": "AI Automasjon",
- "workOrderId": "24684145",
- "tagId": "LZ1012",
- "tagPlantId": "1100",
- "tag": "A10 OIL PRODUCTION WELL",
- "title": "1416/Installerer Flowlinw A10",
- "isTimeOnlyWorkOrder": false,
- "workCenterId": "PPMAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD17OU",
- "areaId": "Deprecated - Use locationId",
- "plantId": "1100",
- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "activeStatusIds": "OSNO CRTE",
- "maintenanceTypeId": "015",
- "maintenanceType": "Project work",
- "basicStartDateTime": "2019-08-24T14:15:22Z",
- "basicEndDateTime": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "changedDateTime": "2019-08-24T14:15:22Z",
- "costWBSId": "M.O037C.20.A.0002.A2",
- "projectId": "M.O037C.20.A.0002",
- "costNetworkId": "9045173",
- "costNetworkOperationId": "0010",
- "sortField": "PRS10239.WP12"
}
Activate or deactivate status for Work order
Currently, not all statuses are supported.
The status supported are:
work-order-id required | string |
status-id required | string |
Work order status to update
isActive required | boolean |
{- "isActive": true
}
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Search for project Work orders through predefined filters. Each filter has a defined action and a set of parameters as described below.
The response does not include all details for each project work order. This can be found by subsequent call to lookup project-work-order
Properties areaId and area are deprecated as of 01.2021 in order to align with naming across Equinor system. Use locationId and location instead.
Find open Project Work orders by plant Parameters:
Project work orders based on recent status activations for the work orders. Parameters:
filter required | string Enum: "open-by-plant" "recent-status-activations" Filter to limit the Project work order by |
status-id | string Status |
plant-id | string Plant |
max-days-since-activation | integer <int32> [ 0 .. 255 ] Define how many days from the current day to include results for. 0 if only include for today |
curl --request GET \ --url 'https://api-test.gateway.equinor.com/maintenance-api/work-orders/project-work-orders?filter=SOME_STRING_VALUE&status-id=SOME_STRING_VALUE&plant-id=SOME_STRING_VALUE&max-days-since-activation=SOME_INTEGER_VALUE' \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
[- {
- "workOrderId": "24684145",
- "tagId": "LZ1012",
- "tagPlantId": "1100",
- "tag": "A10 OIL PRODUCTION WELL",
- "title": "1416/Installerer Flowlinw A10",
- "isTimeOnlyWorkOrder": false,
- "workCenterId": "PPMAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD17OU",
- "areaId": "Deprecated - Use locationId",
- "plantId": "1100",
- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "activeStatusIds": "OSNO CRTE",
- "maintenanceTypeId": "015",
- "maintenanceType": "Project work",
- "basicStartDateTime": "2019-08-24T14:15:22Z",
- "basicEndDateTime": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "changedDateTime": "2019-08-24T14:15:22Z",
- "costWBSId": "M.O037C.20.A.0002.A2",
- "projectId": "M.O037C.20.A.0002",
- "costNetworkId": "9045173",
- "costNetworkOperationId": "0010",
- "sortField": "PRS10239.WP12"
}
]
Create new Project Work order
Properties areaId and area are deprecated as of 01.2021 in order to align with naming across Equinor system. Use locationId and location instead.
Project Work order to create
planningPlantId required | string |
workCenterId required | string |
workCenterPlantId required | string |
title required | string |
plantId required | string |
locationId required | string Structured location within the plant where the tag is located |
costNetworkId required | string |
costNetworkOperationId required | string |
required | Array of objects (WorkOrderOperationCreate) |
isTimeOnlyWorkOrder | boolean If true, this project work order can only be used for time cost and is represented by a different work order type (PM20) in SAP |
tagId | string |
tagPlantId | string |
plannerGroupId | string |
maintenanceTypeId | string |
basicStartDateTime | string <date-time> |
basicEndDateTime | string <date-time> |
areaId | string Deprecated Deprecated 01.2021 - Use locationId instead |
text | string |
{- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "workCenterId": "PPMAUT",
- "workCenterPlantId": "1100",
- "title": "14xx/Installere flowline CD2",
- "isTimeOnlyWorkOrder": false,
- "tagId": "LZ1012",
- "tagPlantId": "1100",
- "costNetworkId": "9045173",
- "costNetworkOperationId": "0010",
- "plantId": "1100",
- "locationId": "CD2",
- "maintenanceTypeId": "015",
- "basicStartDateTime": "2020-11-01T00:00:00Z",
- "basicEndDateTime": "2021-03-01T00:00:00Z",
- "text": "Project for replacing flowing on CD2\n",
- "operations": [
- {
- "operation": "0010",
- "title": "Bygge stillas",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "plannedWorkDuration": "P0Y0M0DT3H30M0S",
- "text": "Bygge stillas\n3 x 3 x 5 meter",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2020-11-01T00:00:00Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2021-03-01T00:00:00Z"
}, - {
- "operation": "0020",
- "title": "Bytte del",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "plannedWorkDuration": "P0Y0M0DT3H30M0S",
- "text": "",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2020-11-01T00:00:00Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2021-03-01T00:00:00Z"
}
]
}
{- "text": "Beskrivelse av prosjekt modifikasjon\n",
- "costWBS": "Conc.: Well A10 GL hook-up FL",
- "plannerGroup": "Plattform PV",
- "workCenter": "AI Automasjon",
- "workOrderId": "24684145",
- "tagId": "LZ1012",
- "tagPlantId": "1100",
- "tag": "A10 OIL PRODUCTION WELL",
- "title": "1416/Installerer Flowlinw A10",
- "isTimeOnlyWorkOrder": false,
- "workCenterId": "PPMAUT",
- "workCenterPlantId": "1100",
- "locationId": "CD17OU",
- "areaId": "Deprecated - Use locationId",
- "plantId": "1100",
- "planningPlantId": "1100",
- "plannerGroupId": "PPM",
- "activeStatusIds": "OSNO CRTE",
- "maintenanceTypeId": "015",
- "maintenanceType": "Project work",
- "basicStartDateTime": "2019-08-24T14:15:22Z",
- "basicEndDateTime": "2019-08-24T14:15:22Z",
- "createdDateTime": "2019-08-24T14:15:22Z",
- "changedDateTime": "2019-08-24T14:15:22Z",
- "costWBSId": "M.O037C.20.A.0002.A2",
- "projectId": "M.O037C.20.A.0002",
- "costNetworkId": "9045173",
- "costNetworkOperationId": "0010",
- "sortField": "PRS10239.WP12"
}
Add operations
work-order-id required | string |
Operations to add to existing Work order
title required | string [ 0 .. 40 ] characters Nullable |
operation required | string Nullable Id of operation user is familiar with |
workCenterId | string Nullable |
workCenterPlantId | string Nullable |
text | string Nullable |
plannedWorkDuration | string Nullable Duration as defined in ISO8601 |
capacityCount | integer <int32> |
schedulingStartConstraintId | string Nullable Enum: "MSO" "SNET" "SNLT" null Constraint: * |
schedulingStartConstraintDateTime | string <date-time> Nullable |
schedulingFinishConstraintId | string Nullable Enum: "MFO" "FNET" "FNLT" null Constraint: * |
schedulingFinishConstraintDateTime | string <date-time> Nullable |
isScheduledExternally | boolean Nullable |
earliestStartDateTime | string <date-time> Nullable |
earliestFinishDateTime | string <date-time> Nullable |
[- {
- "operation": "0010",
- "title": "Bygge stillas",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "plannedWorkDuration": "P0Y0M0DT4H0M0S",
- "capacityCount": 2,
- "text": "Bygge stillas\n3 x 3 x 5 meter",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2020-11-01T00:00:00Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2021-03-01T00:00:00Z"
}, - {
- "operation": "0020",
- "title": "Bytte del",
- "workCenterId": "SPIAUT",
- "workCenterPlantId": "1100",
- "plannedWorkDuration": "P0Y0M0DT3H30M0S",
- "capacityCount": 1,
- "text": "",
- "schedulingStartConstraintId": "MSO",
- "schedulingStartConstraintDateTime": "2020-11-01T00:00:00Z",
- "schedulingFinishConstraintId": "MFO",
- "schedulingFinishConstraintDateTime": "2021-03-01T00:00:00Z"
}
]
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}
Lookup single Maintenance Plan
plan-id required | string |
include-items | boolean Default: true Include items of the Maintenance Plan |
include-item-calls | boolean Default: true Include calls to items of the Maintenance Plan |
include-cycles | boolean Default: true Include cycles of the Maintenance Plan |
curl --request GET \ --url 'https://api-test.gateway.equinor.com/maintenance-api/maintenance-plans/%7Bplan-id%7D?include-items=SOME_BOOLEAN_VALUE&include-item-calls=SOME_BOOLEAN_VALUE&include-cycles=SOME_BOOLEAN_VALUE' \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
{- "maintenancePlanId": "1056916",
- "maintenancePlan": "1100-AKCD2 MODULPROGRAM TELE CD2",
- "items": [
- {
- "calls": [
- {
- "callNr": 8,
- "plannedDate": "2019-08-24",
- "isExecuted": true,
- "preventiveWorkOrderId": "20132844"
}
], - "maintenancePlanItemId": "10072940",
- "maintenancePlanItem": "24M FV-TELE MODULPROGRAM CD2",
- "maintenancePlanId": "1056916",
- "planningPlantId": "1100",
- "mainTagId": "AE5566",
- "mainTagPlantId": "1100",
- "maintenanceActivityTypeId": "002",
- "maintenanceActivityType": "Periodic maintenance"
}
], - "cycles": [
- {
- "cycleId": "06",
- "cycle": " 6 Monthly (GROUP A)",
- "cycleDuration": "P0Y6M0DT0H0M0S"
}
]
}
Lookup single Maintenance Plan Item
Planned to extend endpoint to include object list and task list with related information in upcoming releases.
plan-id required | string |
item-id required | string |
include-item-calls | boolean Default: true Include calls to items of the Maintenance Plan |
curl --request GET \ --url 'https://api-test.gateway.equinor.com/maintenance-api/maintenance-plans/%7Bplan-id%7D/items/%7Bitem-id%7D?include-item-calls=SOME_BOOLEAN_VALUE' \ --header 'ocp-apim-subscription-key: REPLACE_KEY_VALUE'
{- "calls": [
- {
- "callNr": 8,
- "plannedDate": "2019-08-24",
- "isExecuted": true,
- "preventiveWorkOrderId": "20132844"
}
], - "maintenancePlanItemId": "10072940",
- "maintenancePlanItem": "24M FV-TELE MODULPROGRAM CD2",
- "maintenancePlanId": "1056916",
- "planningPlantId": "1100",
- "mainTagId": "AE5566",
- "mainTagPlantId": "1100",
- "maintenanceActivityTypeId": "002",
- "maintenanceActivityType": "Periodic maintenance"
}
Create new preventive work order(s) from call of maintenance plan
plan-id required | string |
Create Maintenance plan call
cycleId required | string |
plannedDate required | string <date> |
{- "cycleId": "06",
- "plannedDate": "2019-08-24"
}
{- "title": "Not Found",
- "status": 404,
- "traceId": "00-d9dc368e6caec4449a64e798dad1b5b2-7d82bdde82c9474a-00"
}