Erply event API

The event API from Erply — 1 operation(s) for event.

OpenAPI Specification

erply-event-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  description: "\n\n## Overview\n\n\n\nThis application offers an API for managing assignments and tasks.\n\n\n\nGraphQL endpoint for the same API is [also available](/graph)\n\n\n\n<details><summary>Authentication</summary>\n\n\n\n> \n\n> Authenticate using your Erply credentials and get a sessionKey. This sessionKey and your Erply clientCode must be provided in the HTTP headers of every request. You do not have to authenticate against this API - valid Erply sessionKey-s from other sources are also acceptable. To authenticate using this API, use the `POST /api/v1/auth` endpoint.\n\n>\n\n</details>\n\n"
  title: assignments Assortment event API
  contact: {}
  version: 2.36.5
host: ''
basePath: ''
schemes: []
tags:
- name: event
paths:
  /api/v1/workorder/{workorderId}/event:
    get:
      security:
      - ErplyClientCode: []
      - ErplySession: []
      - ErplyJWT: []
      - AccessToken: []
      description: "Allows searching for workorder events matching specific criteria.\r\n\r\n> Param           | Default&nbsp; | Example&nbsp; | Description\r\n> ----------------|---------|---------|----\r\n> `eventType`     |         | task_created | Event codes that should be returned\r\n> `withTotalCount` | false  | true    | If total count of matched records should be returned in response header `x-total-count\r\n> `pageSize`      | 20      | 100     | Allows specifying how many records per page should be returned\r\n> `pageNr`        | 1       | 2       | Allows specifying which page should be returned for creating paginated views over the data.\r\n> `sort`          | id      | -id     | Allows specifying in which order the rows should be returned. Supported values are: `id`. It is possible to reverse the order by adding a `-` prefix to the sorting keyword.\r\n>\r\n>"
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - event
      summary: Look up events
      parameters:
      - type: integer
        description: Workorder id
        name: workorderId
        in: path
        required: true
      - type: array
        items:
          type: string
        collectionFormat: csv
        description: Event types
        name: eventType
        in: query
      - type: boolean
        description: If total matching record count should be return in response header
        name: withTotalCount
        in: query
      - type: integer
        description: Result page size
        name: pageSize
        in: query
      - type: integer
        description: Result page number
        name: pageNr
        in: query
      - type: string
        description: Sorting order
        name: sort
        in: query
      responses:
        '200':
          description: OK
          schema:
            type: array
            items:
              $ref: '#/definitions/EventResponse'
        '401':
          description: Forbidden
        '500':
          description: Internal Server Error
    post:
      security:
      - ErplyClientCode: []
      - ErplySession: []
      - ErplyJWT: []
      - AccessToken: []
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - event
      summary: Log an event with the workorder
      parameters:
      - type: integer
        description: Record id
        name: workorderId
        in: path
        required: true
      - description: Event data
        name: record
        in: body
        required: true
        schema:
          $ref: '#/definitions/EventRequest'
      responses:
        '201':
          description: Created
          schema:
            $ref: '#/definitions/EventResponse'
        '401':
          description: Forbidden
        '500':
          description: Internal Server Error
definitions:
  EventRequest:
    type: object
    properties:
      data:
        type: object
      eventType:
        type: string
      workorderId:
        type: integer
  core.Translatable:
    type: object
    properties:
      ar:
        type: string
        example: ' '
      cs:
        type: string
        example: ' '
      da:
        type: string
        example: ' '
      de:
        type: string
        example: ' '
      default:
        type: string
        example: ' '
      el:
        type: string
        example: ' '
      en:
        type: string
        example: ' '
      es:
        type: string
        example: ' '
      et:
        type: string
        example: ' '
      fi:
        type: string
        example: ' '
      fo:
        type: string
        example: ' '
      fr:
        type: string
        example: ' '
      it:
        type: string
        example: ' '
      lt:
        type: string
        example: ' '
      lv:
        type: string
        example: ' '
      nl:
        type: string
        example: ' '
      'no':
        type: string
        example: ' '
      pl:
        type: string
        example: ' '
      ru:
        type: string
        example: ' '
      sv:
        type: string
        example: ' '
      th:
        type: string
        example: ' '
      tr:
        type: string
        example: ' '
      vi:
        type: string
        example: ' '
      zh_Hans:
        type: string
        example: ' '
      zh_Hant:
        type: string
        example: ' '
  EventResponse:
    type: object
    properties:
      createdAt:
        type: string
      createdById:
        type: integer
      data:
        type: object
      description:
        $ref: '#/definitions/core.Translatable'
      eventType:
        type: string
      id:
        type: integer
      workorderId:
        type: integer
securityDefinitions:
  AccessToken:
    type: apiKey
    name: accessToken
    in: header
  ErplyClientCode:
    type: apiKey
    name: clientCode
    in: header
  ErplyJWT:
    type: apiKey
    name: jwt
    in: header
  ErplySession:
    type: apiKey
    name: sessionKey
    in: header
  RequestKey:
    type: apiKey
    name: requestKey
    in: header