MaintainX OpenAPI Documentation API

OpenAPI Specification Documentation

OpenAPI Specification

maintainx-openapi-documentation-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  description: Welcome to the MaintainX API documentation!<br/><br/>You can use the MaintainX API to programmatically interact with all the entities in MaintainX. Use it to retrieve and manage data of Work Orders, Work Requests, Assets, and more!<br/><br/>To get started, in your MaintainX account go to <a href="https://app.getmaintainx.com/settings/integrations/apiKeys">"Settings &gt; Integrations"</a> and click "&plus; New Key" button to generate a new Rest API key.<br/><br/><b>Missing something?</b><br/>Don't hesitate to reach out <a href="mailto:support@getmaintainx.com">support@getmaintainx.com</a><br/><br/>
  version: '1'
  title: MaintainX Asset Criticalities OpenAPI Documentation API
  contact:
    url: https://www.getmaintainx.com/
    name: Support
    email: support@getmaintainx.com
  x-logo:
    url: https://maintainx-static.s3-us-west-2.amazonaws.com/img/default-org-logo.png
    backgroundColor: '#FFFFFF'
    altText: MaintainX logo
servers:
- url: https://api.getmaintainx.com/v1
  description: Endpoint
security:
- Bearer: []
tags:
- name: OpenAPI Documentation
  description: OpenAPI Specification Documentation
  x-traitTag: false
paths:
  /versions:
    get:
      summary: Get list of available API versions
      responses:
        '200':
          description: Successfully retrieved list of available versions
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  required:
                  - version
                  properties:
                    version:
                      type: string
                      example: '1'
      security: []
      tags:
      - OpenAPI Documentation
      servers:
      - url: https://api.getmaintainx.com
        description: Endpoint
components:
  securitySchemes:
    Bearer:
      description: "\n  <p>Authenticate by adding the following HTTP header to your requests:</p>\n<pre>Authorization: bearer {{token}}</pre>\n<p>The <code>token</code> can be generated in your MaintainX account. Go to <a href=\"https://app.getmaintainx.com/settings/integrations/apiKeys\">\"Settings &gt; Integrations &gt; API Keys\"</a> to generate a key for your user.</p>\n"
      type: http
      scheme: bearer
      bearerFormat: JWT
x-webhooks:
  API_TOKEN_CREATED:
    post:
      summary: API Token Created
      security: []
      description: Fires when a REST API token is generated.
      tags:
      - Subscriptions & Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - orgId
              - actorId
              - occurredAt
              properties:
                orgId:
                  type: number
                  description: Global ID of the organization
                  example: 321
                actorId:
                  type: number
                  description: User ID of the actor who triggered the event
                  example: 100
                occurredAt:
                  type: string
                  format: date-time
                  description: Date & time at which the event occurred
                  example: '2022-01-01T00:00:00.000Z'
      operationId: API_TOKEN_CREATED
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  API_TOKEN_REVOKED:
    post:
      summary: API Token Revoked
      security: []
      description: Fires when a REST API token is revoked.
      tags:
      - Subscriptions & Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - orgId
              - actorId
              - occurredAt
              properties:
                orgId:
                  type: number
                  description: Global ID of the organization
                  example: 321
                actorId:
                  type: number
                  description: User ID of the actor who triggered the event
                  example: 100
                occurredAt:
                  type: string
                  format: date-time
                  description: Date & time at which the event occurred
                  example: '2022-01-01T00:00:00.000Z'
      operationId: API_TOKEN_REVOKED
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  ASSET_STATUS_CHANGE:
    post:
      summary: Asset Status Change
      security: []
      description: ''
      tags:
      - Subscriptions & Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - assetId
              - orgId
              - oldStatus
              - newStatus
              - occurredAt
              properties:
                assetId:
                  type: number
                  description: Global ID of the asset
                  example: 42
                orgId:
                  type: number
                  description: Global ID of the organization
                  example: 21
                oldStatus:
                  description: Previous status of the asset
                  type: object
                  properties:
                    id:
                      type: number
                      example: 42
                      description: Global ID of the asset status.
                    customStatus:
                      type: object
                      required:
                      - label
                      properties:
                        id:
                          type: number
                          example: Global ID of the custom asset status.
                        label:
                          type: string
                          example: Decommissioned
                        createdAt:
                          type: string
                          format: date-time
                          description: Date & time at which the asset custom status was created.
                          example: '2022-01-01T12:34:56.123Z'
                        updatedAt:
                          type: string
                          format: date-time
                          description: Date & time at which the asset custom status was last updated.
                          example: '2022-01-01T12:34:56.123Z'
                        deletedAt:
                          type: string
                          nullable: true
                          description: Date at which the asset custom status was deleted.
                          format: date-time
                          example: '2022-01-01T12:34:56.123Z'
                        downtimeType:
                          type: string
                          nullable: true
                          example: null
                          enum:
                          - PLANNED
                          - UNPLANNED
                          deprecated: true
                          description: Downtime type on asset custom statuses will always return null. Use downtime type on asset status instead.
                      description: Custom status assigned to asset.
                      nullable: true
                    customStatusId:
                      type: number
                      description: Id of the custom status assigned to asset.
                      nullable: true
                      example: 53
                    status:
                      type: string
                      example: OFFLINE
                      description: Asset status value.
                      enum:
                      - IGNORE
                      - OFFLINE
                      - ONLINE
                    downtimeType:
                      type: string
                      nullable: true
                      example: PLANNED
                      enum:
                      - PLANNED
                      - UNPLANNED
                    startedAt:
                      type: string
                      format: date-time
                      example: '2022-01-01T12:34:56.123Z'
                      description: Asset status effective start date.
                    endedAt:
                      type: string
                      format: date-time
                      example: '2022-01-01T12:34:56.123Z'
                      description: Asset status effective end date.
                      nullable: true
                    description:
                      type: string
                      example: Overheated - needs servicing.
                      nullable: true
                    createdAt:
                      type: string
                      format: date-time
                      example: '2022-01-01T12:34:56.123Z'
                      readOnly: true
                      description: Date & time at which the asset status was created.
                    updatedAt:
                      type: string
                      format: date-time
                      example: '2022-01-01T12:34:56.123Z'
                      readOnly: true
                      description: Date & time at which the asset status was last updated.
                    deletedAt:
                      type: string
                      format: date-time
                      example: '2022-01-01T12:34:56.123Z'
                      readOnly: true
                      description: Date & time at which the asset status was deleted.
                      nullable: true
                  example:
                    status: ONLINE
                    startedAt: '2022-01-01T12:34:56.123Z'
                    endedAt: '2022-01-01T12:34:56.123Z'
                    description: Back online after scheduled maintenance
                    createdAt: '2022-01-01T12:34:56.123Z'
                    updatedAt: '2022-01-01T12:34:56.123Z'
                    deletedAt: '2022-01-01T12:34:56.123Z'
                newStatus:
                  description: New status of the asset
                  type: object
                  properties:
                    id:
                      type: number
                      example: 42
                      description: Global ID of the asset status.
                    customStatus:
                      type: object
                      required:
                      - label
                      properties:
                        id:
                          type: number
                          example: Global ID of the custom asset status.
                        label:
                          type: string
                          example: Decommissioned
                        createdAt:
                          type: string
                          format: date-time
                          description: Date & time at which the asset custom status was created.
                          example: '2022-01-01T12:34:56.123Z'
                        updatedAt:
                          type: string
                          format: date-time
                          description: Date & time at which the asset custom status was last updated.
                          example: '2022-01-01T12:34:56.123Z'
                        deletedAt:
                          type: string
                          nullable: true
                          description: Date at which the asset custom status was deleted.
                          format: date-time
                          example: '2022-01-01T12:34:56.123Z'
                        downtimeType:
                          type: string
                          nullable: true
                          example: null
                          enum:
                          - PLANNED
                          - UNPLANNED
                          deprecated: true
                          description: Downtime type on asset custom statuses will always return null. Use downtime type on asset status instead.
                      description: Custom status assigned to asset.
                      nullable: true
                    customStatusId:
                      type: number
                      description: Id of the custom status assigned to asset.
                      nullable: true
                      example: 53
                    status:
                      type: string
                      example: OFFLINE
                      description: Asset status value.
                      enum:
                      - IGNORE
                      - OFFLINE
                      - ONLINE
                    downtimeType:
                      type: string
                      nullable: true
                      example: PLANNED
                      enum:
                      - PLANNED
                      - UNPLANNED
                    startedAt:
                      type: string
                      format: date-time
                      example: '2022-01-01T12:34:56.123Z'
                      description: Asset status effective start date.
                    endedAt:
                      type: string
                      format: date-time
                      example: '2022-01-01T12:34:56.123Z'
                      description: Asset status effective end date.
                      nullable: true
                    description:
                      type: string
                      example: Overheated - needs servicing.
                      nullable: true
                    createdAt:
                      type: string
                      format: date-time
                      example: '2022-01-01T12:34:56.123Z'
                      readOnly: true
                      description: Date & time at which the asset status was created.
                    updatedAt:
                      type: string
                      format: date-time
                      example: '2022-01-01T12:34:56.123Z'
                      readOnly: true
                      description: Date & time at which the asset status was last updated.
                    deletedAt:
                      type: string
                      format: date-time
                      example: '2022-01-01T12:34:56.123Z'
                      readOnly: true
                      description: Date & time at which the asset status was deleted.
                      nullable: true
                  example:
                    status: OFFLINE
                    customStatus:
                      id: 13
                      label: Technical issues
                      downtimeType: UNPLANNED
                      createdAt: '2022-01-01T12:34:56.123Z'
                      updatedAt: '2022-01-01T12:34:56.123Z'
                    startedAt: '2022-01-01T12:34:56.123Z'
                    description: Overheated - needs servicing.
                    createdAt: '2022-01-01T12:34:56.123Z'
                    updatedAt: '2022-01-01T12:34:56.123Z'
                occurredAt:
                  type: string
                  format: date-time
                  description: Date & time at which the asset status was changed
                  example: '2022-01-01T00:00:00.000Z'
      operationId: ASSET_STATUS_CHANGE
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  CONNECTOR_TOKEN_REVOKED:
    post:
      summary: Connector Token Revoked
      security: []
      description: Fires when a connector integration token is revoked.
      tags:
      - Subscriptions & Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - orgId
              - actorId
              - occurredAt
              properties:
                orgId:
                  type: number
                  description: Global ID of the organization
                  example: 321
                actorId:
                  type: number
                  description: User ID of the actor who triggered the event
                  example: 100
                occurredAt:
                  type: string
                  format: date-time
                  description: Date & time at which the event occurred
                  example: '2022-01-01T00:00:00.000Z'
      operationId: CONNECTOR_TOKEN_REVOKED
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  DATA_EXPORT_INITIATED:
    post:
      summary: Data Export Initiated
      security: []
      description: Fires when a data export is initiated.
      tags:
      - Subscriptions & Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - orgId
              - actorId
              - exportType
              - occurredAt
              properties:
                orgId:
                  type: number
                  description: Global ID of the organization
                  example: 321
                actorId:
                  type: number
                  description: User ID of the actor who triggered the event
                  example: 100
                exportType:
                  type: string
                  description: Type of data exported
                occurredAt:
                  type: string
                  format: date-time
                  description: Date & time at which the event occurred
                  example: '2022-01-01T00:00:00.000Z'
      operationId: DATA_EXPORT_INITIATED
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  INVITE_LINK_ARCHIVED:
    post:
      summary: Invite Link Archived
      security: []
      description: Fires when an invite link is archived.
      tags:
      - Subscriptions & Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - orgId
              - actorId
              - inviteLinkId
              - occurredAt
              properties:
                orgId:
                  type: number
                  description: Global ID of the organization
                  example: 321
                actorId:
                  type: number
                  description: User ID of the actor who triggered the event
                  example: 100
                inviteLinkId:
                  type: number
                  description: ID of the invite link
                  example: 50
                occurredAt:
                  type: string
                  format: date-time
                  description: Date & time at which the event occurred
                  example: '2022-01-01T00:00:00.000Z'
      operationId: INVITE_LINK_ARCHIVED
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  INVITE_LINK_CREATED:
    post:
      summary: Invite Link Created
      security: []
      description: Fires when an invite link is created.
      tags:
      - Subscriptions & Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - orgId
              - actorId
              - inviteLinkId
              - occurredAt
              properties:
                orgId:
                  type: number
                  description: Global ID of the organization
                  example: 321
                actorId:
                  type: number
                  description: User ID of the actor who triggered the event
                  example: 100
                inviteLinkId:
                  type: number
                  description: ID of the invite link
                  example: 50
                occurredAt:
                  type: string
                  format: date-time
                  description: Date & time at which the event occurred
                  example: '2022-01-01T00:00:00.000Z'
      operationId: INVITE_LINK_CREATED
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  INVITE_LINK_UPDATED:
    post:
      summary: Invite Link Updated
      security: []
      description: Fires when an invite link is updated.
      tags:
      - Subscriptions & Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - orgId
              - actorId
              - inviteLinkId
              - occurredAt
              properties:
                orgId:
                  type: number
                  description: Global ID of the organization
                  example: 321
                actorId:
                  type: number
                  description: User ID of the actor who triggered the event
                  example: 100
                inviteLinkId:
                  type: number
                  description: ID of the invite link
                  example: 50
                occurredAt:
                  type: string
                  format: date-time
                  description: Date & time at which the event occurred
                  example: '2022-01-01T00:00:00.000Z'
      operationId: INVITE_LINK_UPDATED
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  METER_TRIGGER_STATE_CHANGE:
    post:
      summary: Meter Trigger Status Change
      security: []
      description: ''
      tags:
      - Subscriptions & Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - meterTriggerId
              - meterId
              - orgId
              - oldState
              - newState
              - occurredAt
              properties:
                meterTriggerId:
                  type: number
                  description: Global ID of the meter trigger
                  example: 123
                meterId:
                  type: number
                  description: Global ID of the meter
                  example: 123456
                orgId:
                  type: number
                  description: Global ID of the organization
                  example: 321
                oldState:
                  title: State
                  type: string
                  enum:
                  - INACTIVE
                  - INSUFFICIENT_DATA
                  - PENDING
                  - STABLE
                  - TRIGGERED
                  description: Previous state of the trigger
                  example: PENDING
                newState:
                  title: State
                  type: string
                  enum:
                  - INACTIVE
                  - INSUFFICIENT_DATA
                  - PENDING
                  - STABLE
                  - TRIGGERED
                  description: New state of the trigger
                  example: TRIGGERED
                occurredAt:
                  type: string
                  format: date-time
                  description: Date & time at which the trigger occured
                  example: '2022-01-01T00:00:00.000Z'
      operationId: METER_TRIGGER_STATE_CHANGE
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  NEW_ASSET:
    post:
      summary: New Asset
      security: []
      description: ''
      tags:
      - Subscriptions & Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - assetId
              - orgId
              - occurredAt
              properties:
                assetId:
                  type: number
                  description: Global ID of the Asset
                  example: 123456
                orgId:
                  type: number
                  description: Global ID of the organization
                  example: 321
                occurredAt:
                  type: string
                  format: date-time
                  description: Date & time at which the trigger occurred
                  example: '2022-01-01T00:00:00.000Z'
                newAsset:
                  type: object
                  description: Properties of the created Asset
                  properties:
                    name:
                      type: string
                      example: Forklift
                    description:
                      type: string
                      nullable: true
                      example: Forklift that is used to to move heavy equipments around the warehouse
                    locationId:
                      type: integer
                      nullable: true
                      example: 852
                      description: ID of the location where the asset is located
                    barcode:
                      type: string
                      nullable: true
                      example: BWFPBNRHAW54CG
                      description: String encoded barcode
                    parentId:
                      type: integer
                      nullable: true
                      example: 852
                      description: ID of the parent asset
                    vendorIds:
                      type: array
                      description: Vendor IDs
                      items:
                        type: number
                        example: 1
                    teamIds:
                      type: array
                      items:
                        type: integer
                      description: List of teams responsible for the asset
                      example:
                      - 123
                      - 456
                    assetTypes:
                      type: array
                      items:
                        type: string
                      example:
                      - manual
                      - tool
                      description: List of asset types
                    extraFields:
                      type: object
                      description: 'Custom Fields on the entity. The object keys are the exact Custom Field labels, including spaces or special characters. (ie: "My Custom Field")'
                      additionalProperties:
                        type: string
                      example:
                        My Custom Field: '000000000'
      operationId: NEW_ASSET
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  NEW_CATEGORY_ON_WORK_ORDER:
    post:
      summary: New Category on Work Order
      security: []
      description: ''
      tags:
      - Subscriptions & Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - workOrderId
              - orgId
              - newCategories
              - occurredAt
              properties:
                workOrderId:
                  type: number
                  description: Global ID of the work order
                  example: 123456
                orgId:
                  type: number
                  description: Global ID of the organization
                  example: 321
                newCategories:
                  type: array
                  description: Newly added categories on the work order
                  items:
                    type: object
                    required:
                    - id
                    - name
                    properties:
                      id:
                        type: number
                        description: Global ID of the category
                        example: 123
                      name:
                        type: string
                        description: Label of the category
                        example: Safety
                      description:
                        type: string
                        example: Used for everything related to Safety
                        description: Description field for additional information.
                occurredAt:
                  type: string
                  format: date-time
                  description: Date & time at which the trigger occurred
                  example: '2022-01-01T00:00:00.000Z'
      operationId: NEW_CATEGORY_ON_WORK_ORDER
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  NEW_COMMENT_ON_WORK_ORDER:
    post:
      summary: New Comment on Work Order
      security: []
      description: Triggered when a new comment is created on a work order
      tags:
      - Subscriptions & Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - orgId
              - workOrderId
              - type
              - comment
              - occurredAt
              properties:
                orgId:
                  type: number
                  description: Global ID of the organization
                  example: 321
                workOrderId:
                  type: number
                  description: Global ID of the work order
                  example: 123456
                occurredAt:
                  type: string
                  format: date-time
                  description: Date & time at which the trigger occurred
                  example: '2022-01-01T00:00:00.000Z'
                type:
                  type: string
                  description: Type of the comment (TEXT, IMG, FILE, AUDIO)
                comment:
                  type: string
                  description: Newly created comment on the work order
                url:
                  type: string
                  description: URL of the file attached to the work order comment. Valid for 60 minutes.
      operationId: NEW_COMMENT_ON_WORK_ORDER
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  NEW_LOCATION:
    post:
      summary: New Location
      security: []
      description: ''
      tags:
      - Subscriptions & Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - locationId
              - orgId
              - occurredAt
              properties:
                locationId:
                  type: number
                  description: Global ID of the Location
                  example: 123456
                orgId:
                  type: number
                  description: Global ID of the organization
                  example: 321
                occurredAt:
                  type: string
                  format: date-time
                  description: Date & time at which the trigger occurred
                  example: '2022-01-01T00:00:00.000Z'
      operationId: NEW_LOCATION
      responses:
        '200':
          description: Return a 200 status to indicate that the data was received successfully
  NEW_PART:
    post:
      summary: New Part
      security: []
      description: ''
      tags:
      - Subscriptions & Webhooks
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - partId
              - orgId
              - occurredAt
              properties:
                partId:
                  type: number
                  description: Global ID of the Part
                  example: 123456
                orgId:
                  type: number
                  description: Global ID of the organization
                  example: 321
                occurredAt:
                  type: string
                  format: date-time
                  description: Date & time at which the trigger occurred
                  example: '20

# --- truncated at 32 KB (183 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/maintainx/refs/heads/main/openapi/maintainx-openapi-documentation-api-openapi.yml