Losant Enterprise Instance API

Enterprise Instance resources on the Losant Platform.

Documentation

Specifications

Schemas & Data

OpenAPI Specification

losant-enterprise-instance-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Losant Application Enterprise Instance API
  version: 1.29.4
  description: Manage Losant Applications, the top-level container for IoT solutions, plus dashboards, events, webhooks, integrations, files, audit logs, credentials, certificates, application keys, API tokens, and resource jobs. Derived from the Losant Platform API (Bravado/Swagger 2) at https://api.losant.com/.
  contact:
    name: Losant Support
    url: https://www.losant.com/contact
    email: hello@losant.com
  license:
    name: Proprietary
    url: https://www.losant.com/legal
  x-source: https://api.losant.com/
  x-publisher: Losant IoT, Inc.
servers:
- url: https://api.losant.com
  description: Losant Platform API (US multi-tenant cloud)
security:
- BearerAuth: []
tags:
- name: Enterprise Instance
  description: Enterprise Instance resources on the Losant Platform.
paths:
  /instances/{instanceId}/tokens/{apiTokenId}:
    get:
      summary: Retrieves Information on an API Token
      tags:
      - Enterprise Instance
      parameters:
      - name: instanceId
        in: path
        description: ID associated with the instance
        required: true
        example: 575ec7417ae143cd83dc4a96
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: apiTokenId
        in: path
        description: ID associated with the API token
        required: true
        example: 575ec7417ae143cd83dc4a95
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      responses:
        '200':
          description: API token information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiToken'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if API token was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
    patch:
      summary: Updates Information About an API Token
      tags:
      - Enterprise Instance
      parameters:
      - name: instanceId
        in: path
        description: ID associated with the instance
        required: true
        example: 575ec7417ae143cd83dc4a96
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: apiTokenId
        in: path
        description: ID associated with the API token
        required: true
        example: 575ec7417ae143cd83dc4a95
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      requestBody:
        description: Object containing new properties of the API token
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiTokenPatch'
      responses:
        '200':
          description: Updated API token information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiToken'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if API token was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
    delete:
      summary: Deletes an API Token
      tags:
      - Enterprise Instance
      parameters:
      - name: instanceId
        in: path
        description: ID associated with the instance
        required: true
        example: 575ec7417ae143cd83dc4a96
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: apiTokenId
        in: path
        description: ID associated with the API token
        required: true
        example: 575ec7417ae143cd83dc4a95
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      responses:
        '200':
          description: If API token was successfully deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/success'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if API token was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
  /instances/{instanceId}/tokens:
    get:
      summary: Returns the API Tokens for an Instance
      tags:
      - Enterprise Instance
      parameters:
      - name: instanceId
        in: path
        description: ID associated with the instance
        required: true
        example: 575ec7417ae143cd83dc4a96
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: sortField
        in: query
        description: Field to sort the results by
        required: false
        example: name
        schema:
          type: string
          enum:
          - name
          - status
          - id
          - creationDate
          - lastUpdated
          - expirationDate
          default: name
      - name: sortDirection
        in: query
        description: Direction to sort the results by
        required: false
        example: asc
        schema:
          type: string
          enum:
          - asc
          - desc
          default: asc
      - name: page
        in: query
        description: Which page of results to return
        required: false
        example: 0
        schema:
          type: string
          default: 0
      - name: perPage
        in: query
        description: How many items to return per page
        required: false
        example: 10
        schema:
          type: string
          default: 100
      - name: filterField
        in: query
        description: Field to filter the results by. Blank or not provided means no filtering.
        required: false
        example: key
        schema:
          type: string
          enum:
          - name
          - status
      - name: filter
        in: query
        description: Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering.
        required: false
        example: my*token
        schema:
          type: string
      responses:
        '200':
          description: Collection of API tokens
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiToken'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
    post:
      summary: Create a New API Token for an Instance
      tags:
      - Enterprise Instance
      parameters:
      - name: instanceId
        in: path
        description: ID associated with the instance
        required: true
        example: 575ec7417ae143cd83dc4a96
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      requestBody:
        description: API token information
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/apiTokenPost'
      responses:
        '201':
          description: The successfully created API token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apiToken'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
  /instance/{instanceId}/audit-logs/{instanceAuditLogId}:
    get:
      summary: Retrieves Information on an Instance Audit Log
      tags:
      - Enterprise Instance
      parameters:
      - name: instanceId
        in: path
        description: ID associated with the instance
        required: true
        example: 575ec7417ae143cd83dc4a96
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: instanceAuditLogId
        in: path
        description: ID associated with the instance audit log
        required: true
        example: 57955788124b37010084c053
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      responses:
        '200':
          description: Instance audit log information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/instanceAuditLog'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if instance audit log was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
  /instance/{instanceId}/audit-logs:
    get:
      summary: Returns the Audit Logs for the Instance
      tags:
      - Enterprise Instance
      parameters:
      - name: instanceId
        in: path
        description: ID associated with the instance
        required: true
        example: 575ec7417ae143cd83dc4a96
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: sortField
        in: query
        description: Field to sort the results by
        required: false
        example: creationDate
        schema:
          type: string
          enum:
          - creationDate
          - responseStatus
          - actorName
          default: creationDate
      - name: sortDirection
        in: query
        description: Direction to sort the results by
        required: false
        example: asc
        schema:
          type: string
          enum:
          - asc
          - desc
          default: desc
      - name: page
        in: query
        description: Which page of results to return
        required: false
        example: 0
        schema:
          type: string
          default: 0
      - name: perPage
        in: query
        description: How many items to return per page
        required: false
        example: 10
        schema:
          type: string
          default: 100
      - name: start
        in: query
        description: Start of time range for audit log query
        required: false
        example: 1465790400000
        schema:
          type: string
      - name: end
        in: query
        description: End of time range for audit log query
        required: false
        example: 1465790400000
        schema:
          type: string
      - name: auditLogFilter
        in: query
        description: Filters for the audit log query
        required: false
      responses:
        '200':
          description: Collection of instance audit logs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/instanceAuditLogs'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if instance was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
  /instances/{instanceId}/nodes/{instanceCustomNodeId}:
    get:
      summary: Get Information About Errors That Occurred During Runs of This Custom Node
      tags:
      - Enterprise Instance
      parameters:
      - name: instanceId
        in: path
        description: ID associated with the instance
        required: true
        example: 575ec7417ae143cd83dc4a96
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: instanceCustomNodeId
        in: path
        description: ID associated with the Custom Node
        required: true
        example: 575ec7417ae143cd83dc4a95
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: duration
        in: query
        description: Duration of time range in milliseconds
        required: false
        example: 86400000
        schema:
          type: string
          default: 86400000
      - name: end
        in: query
        description: End of time range in milliseconds since epoch
        required: false
        example: 0
        schema:
          type: string
          default: 0
      - name: limit
        in: query
        description: Maximum number of errors to return
        required: false
        example: 25
        schema:
          type: string
          default: 25
      - name: sortDirection
        in: query
        description: Direction to sort the results by
        required: false
        example: desc
        schema:
          type: string
          enum:
          - asc
          - desc
          default: desc
      responses:
        '200':
          description: Custom Node error information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/flowErrors'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if Custom Node was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
    patch:
      summary: Updates Information About a Custom Node
      tags:
      - Enterprise Instance
      parameters:
      - name: instanceId
        in: path
        description: ID associated with the instance
        required: true
        example: 575ec7417ae143cd83dc4a96
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: instanceCustomNodeId
        in: path
        description: ID associated with the Custom Node
        required: true
        example: 575ec7417ae143cd83dc4a95
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      requestBody:
        description: Object containing new properties of the Custom Node
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/instanceCustomNodePatch'
      responses:
        '200':
          description: Updated Custom Node information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/instanceCustomNode'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if Custom Node was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
    delete:
      summary: Deletes a Custom Node
      tags:
      - Enterprise Instance
      parameters:
      - name: instanceId
        in: path
        description: ID associated with the instance
        required: true
        example: 575ec7417ae143cd83dc4a96
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: instanceCustomNodeId
        in: path
        description: ID associated with the Custom Node
        required: true
        example: 575ec7417ae143cd83dc4a95
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      responses:
        '200':
          description: If Custom Node was successfully deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/success'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if Custom Node was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
  /instances/{instanceId}/nodes:
    get:
      summary: Returns the Custom Nodes for an Instance
      tags:
      - Enterprise Instance
      parameters:
      - name: instanceId
        in: path
        description: ID associated with the instance
        required: true
        example: 575ec7417ae143cd83dc4a96
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: sortField
        in: query
        description: Field to sort the results by
        required: false
        example: name
        schema:
          type: string
          enum:
          - name
          - id
          - creationDate
          - lastUpdated
          default: name
      - name: sortDirection
        in: query
        description: Direction to sort the results by
        required: false
        example: asc
        schema:
          type: string
          enum:
          - asc
          - desc
          default: asc
      - name: page
        in: query
        description: Which page of results to return
        required: false
        example: 0
        schema:
          type: string
          default: 0
      - name: perPage
        in: query
        description: How many items to return per page
        required: false
        example: 10
        schema:
          type: string
          default: 100
      - name: filterField
        in: query
        description: Field to filter the results by. Blank or not provided means no filtering.
        required: false
        example: key
        schema:
          type: string
          enum:
          - name
      - name: filter
        in: query
        description: Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering.
        required: false
        example: my*node
        schema:
          type: string
      responses:
        '200':
          description: Collection of Custom Nodes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/instanceCustomNodes'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
    post:
      summary: Create a New Custom Node for an Instance
      tags:
      - Enterprise Instance
      parameters:
      - name: instanceId
        in: path
        description: ID associated with the instance
        required: true
        example: 575ec7417ae143cd83dc4a96
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      requestBody:
        description: Custom Node information
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/instanceCustomNodePost'
      responses:
        '201':
          description: The successfully created Custom Node
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/instanceCustomNode'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
  /instances/{instanceId}/members/{userId}:
    get:
      summary: Returns an Instance Member
      tags:
      - Enterprise Instance
      parameters:
      - name: instanceId
        in: path
        description: ID associated with the instance
        required: true
        example: 575ec8687ae143cd83dc4a97
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: userId
        in: path
        description: ID associated with the instance member
        required: true
        example: 575ec8687ae143cd83dc4a94
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      responses:
        '200':
          description: A single instance member
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/instanceMember'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if instance or member was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
    patch:
      summary: Modifies the Role of an Instance Member
      tags:
      - Enterprise Instance
      parameters:
      - name: instanceId
        in: path
        description: ID associated with the instance
        required: true
        example: 575ec8687ae143cd83dc4a97
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: userId
        in: path
        description: ID associated with the instance member
        required: true
        example: 575ec8687ae143cd83dc4a94
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      requestBody:
        description: Object containing new member info
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/instanceMemberPatch'
      responses:
        '200':
          description: The modified instance member
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/instanceMemberPatch'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if instance or member was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
    delete:
      summary: Deletes an Instance Member
      tags:
      - Enterprise Instance
      parameters:
      - name: instanceId
        in: path
        description: ID associated with the instance
        required: true
        example: 575ec8687ae143cd83dc4a97
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: userId
        in: path
        description: ID associated with the instance member
        required: true
        example: 575ec8687ae143cd83dc4a94
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      responses:
        '200':
          description: If member was successfully deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/success'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if instance or member was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
  /instances/{instanceId}/members:
    get:
      summary: Returns a Collection of Instance Members
      tags:
      - Enterprise Instance
      parameters:
      - name: instanceId
        in: path
        description: ID associated with the instance
        required: true
        example: 575ec8687ae143cd83dc4a97
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: sortField
        in: query
        description: Field to sort the results by
        required: false
        example: role
        schema:
          type: string
          enum:
          - email
          - role
          default: email
      - name: sortDirection
        in: query
        description: Direction to sort the results by
        required: false
        example: asc
        schema:
          type: string
          enum:
          - asc
          - desc
          default: asc
      - name: filterField
        in: query
        description: Field to filter the results by. Blank or not provided means no filtering.
        required: false
        example: email
        schema:
          type: string
          enum:
          - email
          - role
      - name: filter
        in: query
        description: Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering.
        required: false
        example: my * instance
        schema:
          type: string
      responses:
        '200':
          description: A collection of instance members
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/instanceMembers'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if instance was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
    post:
      summary: Creates a New Instance Member
      tags:
      - Enterprise Instance
      parameters:
      - name: instanceId
        in: path
        description: ID associated with the instance
        required: true
        example: 575ec8687ae143cd83dc4a97
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      requestBody:
        description: Object containing new member info
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/instanceMemberPost'
      responses:
        '200':
          description: The newly created instance member
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/instanceMember'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if instance was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
  /instances/{instanceId}/notification-rules/{notificationRuleId}:
    get:
      summary: Retrieves Information on Notification Rule Deliveries
      tags:
      - Enterprise Instance
      parameters:
      - name: instanceId
        in: path
        description: ID associated with the instance
        required: true
        example: 575ec7417ae143cd83dc4a96
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: notificationRuleId
        in: path
        description: ID associated with the notification rule
        required: true
        example: 575ec7417ae143cd83dc4a95
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: limit
        in: query
        description: Max log entries to return (ordered by time descending)
        required: false
        example: 10
        schema:
          type: string
          default: 1
      - name: since
        in: query
        description: Look for log entries since this time (ms since epoch)
        required: false
        example: 1465790400000
        schema:
          type: string
      responses:
        '200':
          description: Notification delivery information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notificationRuleDeliveryLogs'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if notification rule was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
    patch:
      summary: Updates Information About a Notification Rule
      tags:
      - Enterprise Instance
      parameters:
      - name: instanceId
        in: path
        description: ID associated with the instance
        required: true
        example: 575ec7417ae143cd83dc4a96
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: notificationRuleId
        in: path
        description: ID associated with the notification rule
        required: true
        example: 575ec7417ae143cd83dc4a95
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      requestBody:
        description: Object containing new properties of the notification rule
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/notificationRulePatch'
      responses:
        '200':
          description: Updated notification rule information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/notificationRule'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if notification rule was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
    delete:
      summary: Deletes a Notification Rule
      tags:
      - Enterprise Instance
      parameters:
      - name: instanceId
        in: path
        description: ID associated with the instance
        required: true
        example: 575ec7417ae143cd83dc4a96
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: notificationRuleId
        in: path
        description: ID associated with the notification rule
        required: true
        example: 575ec7417ae143cd83dc4a95
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      responses:
        '200':
          description: If notification rule was successfully deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/success'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if notification rule was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
    post:
      summary: Queues the Evaluation of a Notification Rule
      tags:
      - Enterprise Instance
      parameters:
      - name: instanceId
        in: path
        description: ID associated with the instance
        required: true
        example: 575ec7417ae143cd83dc4a96
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: notificationRuleId
        in: path
        description: ID associated with the notification rule
        required: true
        example: 575ec7417ae143cd83dc4a95
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      requestBody:
        description: The options for the evaluation
        required: true
        content:
    

# --- truncated at 32 KB (127 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/losant/refs/heads/main/openapi/losant-enterprise-instance-api-openapi.yml