Automile ResourceOwnerTriggers3 API

The ResourceOwnerTriggers3 API from Automile — 5 operation(s) for resourceownertriggers3.

OpenAPI Specification

automile-resourceownertriggers3-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: Automile ClientApi ResourceOwnerTriggers3 API
  version: v1
tags:
- name: ResourceOwnerTriggers3
paths:
  /v1/resourceowner/triggers3:
    get:
      tags:
      - ResourceOwnerTriggers3
      summary: Get all triggers
      description: Only triggers that the user has access to will be returned by this operation.
      operationId: GetResourceOwnerTriggers3
      produces:
      - text/plain
      - application/json
      - text/json
      responses:
        '200':
          description: The triggers are returned
          schema:
            type: array
            items:
              $ref: '#/definitions/Trigger3Model'
        '500':
          description: Internal server error
      security:
      - oauth2: []
    post:
      tags:
      - ResourceOwnerTriggers3
      summary: Creates a new trigger
      operationId: CreateResourceOwnerTrigger3
      consumes:
      - application/json
      - text/json
      - application/*+json
      parameters:
      - in: body
        name: body
        description: The company model
        schema:
          $ref: '#/definitions/Trigger3CreateModel'
      responses:
        '200':
          description: A link in the header is returned to the newly created trigger
        '500':
          description: Internal server error
        '403':
          description: Request is forbidden, this could occur if you try to associate to other users than yourself
      security:
      - oauth2: []
  /v1/resourceowner/triggers3/{triggerId}:
    get:
      tags:
      - ResourceOwnerTriggers3
      summary: Get a trigger by id
      description: Will only return the trigger if the user has access to it
      operationId: GetResourceOwnerTrigger3
      produces:
      - text/plain
      - application/json
      - text/json
      parameters:
      - in: path
        name: triggerId
        description: The Id of the trigger
        required: true
        type: integer
        format: int32
      responses:
        '200':
          description: The trigger details are returned
          schema:
            $ref: '#/definitions/Trigger3DetailModel'
        '500':
          description: Internal server error
        '403':
          description: Request is forbidden, meaning you dont' have access to this notification config
        '404':
          description: The notification config that you tried to update doesn't exist
      security:
      - oauth2: []
    put:
      tags:
      - ResourceOwnerTriggers3
      summary: Updates the given trigger
      description: This will update the trigger with the new model.
      operationId: EditResourceOwnerTrigger3
      consumes:
      - application/json
      - text/json
      - application/*+json
      parameters:
      - in: path
        name: triggerId
        description: The  trigger hat should be updated
        required: true
        type: integer
        format: int32
      - in: body
        name: body
        description: The new  notification config model
        schema:
          $ref: '#/definitions/Trigger3EditModel'
      responses:
        '200':
          description: The trigger was saved
        '500':
          description: Internal server error
        '403':
          description: Request is forbidden, this could occur if you are not associated with the notification config
        '404':
          description: The  notification config that you tried to update doesn't exist
      security:
      - oauth2: []
    delete:
      tags:
      - ResourceOwnerTriggers3
      summary: Removes the given trigger
      description: This will remove the given trigger including all historic message belonging to this trigger.
      operationId: DeleteResourceOwnerTrigger3
      parameters:
      - in: path
        name: triggerId
        description: The company id
        required: true
        type: integer
        format: int32
      responses:
        '200':
          description: The trigger has been deleted
        '403':
          description: Request is forbidden, this could occur if you are not associated with the notification config
        '404':
          description: The  notification config that you tried to remove doesn't exist
        '500':
          description: Internal server error
      security:
      - oauth2: []
  /v1/resourceowner/triggers3/mute/{triggerId}:
    put:
      tags:
      - ResourceOwnerTriggers3
      summary: Updates how long the trigger should be muted
      description: This will update how long the trigger should be muted
      operationId: EditResourceOwnerTriggerMute3
      consumes:
      - application/json
      - text/json
      - application/*+json
      parameters:
      - in: path
        name: triggerId
        description: The trigger that should be muted
        required: true
        type: integer
        format: int32
      - in: body
        name: body
        description: How long the trigger should be muted in seconds from now
        schema:
          $ref: '#/definitions/TriggerEditMutedUntilModel'
      responses:
        '200':
          description: The trigger was saved
        '500':
          description: Internal server error
        '403':
          description: Request is forbidden, this could occur if you are not associated with the notification config
        '404':
          description: The  notification config that you tried to update doesn't exist
      security:
      - oauth2: []
  /v1/resourceowner/triggers3/unmute/{triggerId}:
    put:
      tags:
      - ResourceOwnerTriggers3
      summary: Unmutes a trigger
      description: This will unmute a trigger
      operationId: EditResourceOwnerTriggerUnMute3
      parameters:
      - in: path
        name: triggerId
        description: The trigger to unmute
        required: true
        type: integer
        format: int32
      responses:
        '200':
          description: The trigger was saved
        '500':
          description: Internal server error
        '403':
          description: Request is forbidden, this could occur if you are not associated with the notification config
        '404':
          description: The  notification config that you tried to update doesn't exist
      security:
      - oauth2: []
  /v1/resourceowner/triggers3/movepush:
    post:
      tags:
      - ResourceOwnerTriggers3
      summary: Move all users push triggers to userdevice
      operationId: ResourceOwnerTriggerMovePush3
      consumes:
      - application/json
      - text/json
      - application/*+json
      parameters:
      - in: body
        name: body
        description: ''
        schema:
          $ref: '#/definitions/MovePushTriggers'
      responses:
        '200':
          description: All push triggers moved
        '500':
          description: Internal server error
        '403':
          description: Request is forbidden, this could occur if you try to associate to other users than yourself
      security:
      - oauth2: []
definitions:
  Trigger3EditModel:
    required:
    - DestinationData
    type: object
    properties:
      TriggerType:
        format: int32
        description: "FirmwareConfigurationUpdate = 236, Eventype 236 loggas i [IMEIPing], sättet att detektera en uppdatering är att från föregående rad se om versionen ändrats\r\nHur får vi tag i föregående rad? Första raden måste då hämta senaste inserten i databasen?....inom datatabellen som ska insertas är det inga problem gissar jag....men analysen kan inte ske rad för rad utan hela datatabellen ska med\r\n \r\nMILStatusOnOff = 154, åtefinns i Datalogger message decoder, flik event messages, kolumn f MIL status\r\n \r\nDeviceDisconnect = 136,, åtefinns i Datalogger message decoder, flik event messages\r\nDeviceStillNotConnected = 137,, åtefinns i Datalogger message decoder, flik event messages\r\n\r\n SpeedNotification, återfinns i Pid0013"
        enum:
        - 0
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        - 10
        - 11
        - 12
        - 13
        - 14
        - 15
        - 16
        - 17
        - 18
        - 19
        - 20
        - 21
        - 22
        - 23
        - 24
        - 25
        - 26
        - 27
        - 28
        - 29
        - 30
        - 31
        - 32
        - 33
        - 34
        - 35
        - 36
        - 37
        - 38
        - 39
        - 40
        - 41
        - 42
        - 43
        - 44
        - 45
        - 46
        - 47
        - 48
        - 49
        - 52
        - 53
        - 54
        - 55
        - 64
        type: integer
      TriggerTypeData:
        type: string
      TriggerTypeData2:
        type: string
      ValidFrom:
        format: date-time
        type: string
      ValidTo:
        format: date-time
        type: string
      MutedUntilDateTime:
        format: date-time
        type: string
      DestinationType:
        format: int32
        enum:
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        type: integer
      DestinationData:
        minLength: 1
        type: string
      DeliveryType:
        format: int32
        enum:
        - 0
        - 1
        - 2
        - 3
        type: integer
      OrganizationNodeId:
        format: int32
        type: integer
      TriggerTypeData3:
        type: string
    additionalProperties: false
  Trigger3DetailModel:
    type: object
    properties:
      TriggerId:
        format: int32
        type: integer
      IMEIConfigId:
        format: int32
        type: integer
      TriggerType:
        format: int32
        description: "FirmwareConfigurationUpdate = 236, Eventype 236 loggas i [IMEIPing], sättet att detektera en uppdatering är att från föregående rad se om versionen ändrats\r\nHur får vi tag i föregående rad? Första raden måste då hämta senaste inserten i databasen?....inom datatabellen som ska insertas är det inga problem gissar jag....men analysen kan inte ske rad för rad utan hela datatabellen ska med\r\n \r\nMILStatusOnOff = 154, åtefinns i Datalogger message decoder, flik event messages, kolumn f MIL status\r\n \r\nDeviceDisconnect = 136,, åtefinns i Datalogger message decoder, flik event messages\r\nDeviceStillNotConnected = 137,, åtefinns i Datalogger message decoder, flik event messages\r\n\r\n SpeedNotification, återfinns i Pid0013"
        enum:
        - 0
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        - 10
        - 11
        - 12
        - 13
        - 14
        - 15
        - 16
        - 17
        - 18
        - 19
        - 20
        - 21
        - 22
        - 23
        - 24
        - 25
        - 26
        - 27
        - 28
        - 29
        - 30
        - 31
        - 32
        - 33
        - 34
        - 35
        - 36
        - 37
        - 38
        - 39
        - 40
        - 41
        - 42
        - 43
        - 44
        - 45
        - 46
        - 47
        - 48
        - 49
        - 52
        - 53
        - 54
        - 55
        - 64
        type: integer
      TriggerTypeData:
        type: string
      ValidFrom:
        format: date-time
        type: string
      ValidTo:
        format: date-time
        type: string
      MutedUntilDateTime:
        format: date-time
        type: string
      MutedForAdditionalSeconds:
        format: int32
        type: integer
      DestinationType:
        format: int32
        enum:
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        type: integer
      DestinationData:
        type: string
      DeliveryType:
        format: int32
        enum:
        - 0
        - 1
        - 2
        - 3
        type: integer
      APIClientId:
        format: int32
        type: integer
      CreatedAt:
        format: date-time
        type: string
      TriggerTypeData2:
        type: string
      OrganizationNodeId:
        format: int32
        type: integer
      TriggerTypeData3:
        type: string
      TriggerDeviceType:
        format: int32
        enum:
        - 0
        - 1
        - 2
        - 255
        type: integer
    additionalProperties: false
  TriggerEditMutedUntilModel:
    type: object
    properties:
      SecondsFromNow:
        format: int32
        type: integer
    additionalProperties: false
  MovePushTriggers:
    type: object
    properties:
      ToUserDeviceId:
        format: int32
        type: integer
    additionalProperties: false
  Trigger3CreateModel:
    required:
    - DestinationData
    type: object
    properties:
      TriggerType:
        format: int32
        description: "FirmwareConfigurationUpdate = 236, Eventype 236 loggas i [IMEIPing], sättet att detektera en uppdatering är att från föregående rad se om versionen ändrats\r\nHur får vi tag i föregående rad? Första raden måste då hämta senaste inserten i databasen?....inom datatabellen som ska insertas är det inga problem gissar jag....men analysen kan inte ske rad för rad utan hela datatabellen ska med\r\n \r\nMILStatusOnOff = 154, åtefinns i Datalogger message decoder, flik event messages, kolumn f MIL status\r\n \r\nDeviceDisconnect = 136,, åtefinns i Datalogger message decoder, flik event messages\r\nDeviceStillNotConnected = 137,, åtefinns i Datalogger message decoder, flik event messages\r\n\r\n SpeedNotification, återfinns i Pid0013"
        enum:
        - 0
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        - 10
        - 11
        - 12
        - 13
        - 14
        - 15
        - 16
        - 17
        - 18
        - 19
        - 20
        - 21
        - 22
        - 23
        - 24
        - 25
        - 26
        - 27
        - 28
        - 29
        - 30
        - 31
        - 32
        - 33
        - 34
        - 35
        - 36
        - 37
        - 38
        - 39
        - 40
        - 41
        - 42
        - 43
        - 44
        - 45
        - 46
        - 47
        - 48
        - 49
        - 52
        - 53
        - 54
        - 55
        - 64
        type: integer
      TriggerTypeData:
        type: string
      TriggerTypeData2:
        type: string
      TriggerTypeData3:
        type: string
      ValidFrom:
        format: date-time
        type: string
      ValidTo:
        format: date-time
        type: string
      DestinationType:
        format: int32
        enum:
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        type: integer
      DestinationData:
        minLength: 1
        type: string
      DeliveryType:
        format: int32
        enum:
        - 0
        - 1
        - 2
        - 3
        type: integer
      OrganizationNodeId:
        format: int32
        type: integer
    additionalProperties: false
  Trigger3Model:
    type: object
    properties:
      TriggerId:
        format: int32
        type: integer
      IMEIConfigId:
        format: int32
        type: integer
      TriggerType:
        format: int32
        description: "FirmwareConfigurationUpdate = 236, Eventype 236 loggas i [IMEIPing], sättet att detektera en uppdatering är att från föregående rad se om versionen ändrats\r\nHur får vi tag i föregående rad? Första raden måste då hämta senaste inserten i databasen?....inom datatabellen som ska insertas är det inga problem gissar jag....men analysen kan inte ske rad för rad utan hela datatabellen ska med\r\n \r\nMILStatusOnOff = 154, åtefinns i Datalogger message decoder, flik event messages, kolumn f MIL status\r\n \r\nDeviceDisconnect = 136,, åtefinns i Datalogger message decoder, flik event messages\r\nDeviceStillNotConnected = 137,, åtefinns i Datalogger message decoder, flik event messages\r\n\r\n SpeedNotification, återfinns i Pid0013"
        enum:
        - 0
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        - 10
        - 11
        - 12
        - 13
        - 14
        - 15
        - 16
        - 17
        - 18
        - 19
        - 20
        - 21
        - 22
        - 23
        - 24
        - 25
        - 26
        - 27
        - 28
        - 29
        - 30
        - 31
        - 32
        - 33
        - 34
        - 35
        - 36
        - 37
        - 38
        - 39
        - 40
        - 41
        - 42
        - 43
        - 44
        - 45
        - 46
        - 47
        - 48
        - 49
        - 52
        - 53
        - 54
        - 55
        - 64
        type: integer
      DestinationType:
        format: int32
        enum:
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
        - 7
        - 8
        - 9
        type: integer
      DestinationData:
        type: string
      TriggerTypeData:
        type: string
      ValidFrom:
        format: date-time
        type: string
      ValidTo:
        format: date-time
        type: string
      MutedUntilDateTime:
        format: date-time
        type: string
      MutedForAdditionalSeconds:
        format: int32
        type: integer
      CreatedAt:
        format: date-time
        type: string
      TriggerTypeData2:
        type: string
      OrganizationNodeId:
        format: int32
        type: integer
      TriggerTypeData3:
        type: string
      TriggerDeviceType:
        format: int32
        enum:
        - 0
        - 1
        - 2
        - 255
        type: integer
      IsEditable:
        type: boolean
    additionalProperties: false
securityDefinitions:
  oauth2:
    type: oauth2
    flow: implicit
    authorizationUrl: https://api.automile.com/login/
    scopes:
      read: Read access to protected resources
      write: Write access to protected resources
    description: OAuth2 Implicit Grant