Losant Experience API

Build white-labeled end-user web Experiences on top of a Losant Application: experience users, groups, HTTP endpoints, server-rendered views, slugs, custom domains, versions, and the Experience publishing pipeline.

OpenAPI Specification

losant-experience-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Losant Application Experience 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: Experience
  description: Experience resources on the Losant Platform.
paths:
  /applications/{applicationId}/experience/domains/{experienceDomainId}:
    get:
      summary: Retrieves Information on an Experience Domain
      tags:
      - Experience
      parameters:
      - name: applicationId
        in: path
        description: ID associated with the application
        required: true
        example: 575ec8687ae143cd83dc4a97
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: experienceDomainId
        in: path
        description: ID associated with the experience domain
        required: true
        example: 575ed78e7ae143cd83dc4aab
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      responses:
        '200':
          description: Experience domain information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/experienceDomain'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if experience domain was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
    patch:
      summary: Updates Information About an Experience Domain
      tags:
      - Experience
      parameters:
      - name: applicationId
        in: path
        description: ID associated with the application
        required: true
        example: 575ec8687ae143cd83dc4a97
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: experienceDomainId
        in: path
        description: ID associated with the experience domain
        required: true
        example: 575ed78e7ae143cd83dc4aab
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      requestBody:
        description: Object containing new properties of the experience domain
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/experienceDomainPatch'
      responses:
        '200':
          description: Updated experience domain information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/experienceDomain'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if experience domain was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
    delete:
      summary: Deletes an Experience Domain
      tags:
      - Experience
      parameters:
      - name: applicationId
        in: path
        description: ID associated with the application
        required: true
        example: 575ec8687ae143cd83dc4a97
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: experienceDomainId
        in: path
        description: ID associated with the experience domain
        required: true
        example: 575ed78e7ae143cd83dc4aab
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      responses:
        '200':
          description: If experience domain 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 experience domain was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
  /applications/{applicationId}/experience/domains:
    get:
      summary: Returns the Experience Domains for an Application
      tags:
      - Experience
      parameters:
      - name: applicationId
        in: path
        description: ID associated with the application
        required: true
        example: 575ec8687ae143cd83dc4a97
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      responses:
        '200':
          description: Collection of experience domains
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/experienceDomains'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if application was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
    post:
      summary: Create a New Experience Domain for an Application
      tags:
      - Experience
      parameters:
      - name: applicationId
        in: path
        description: ID associated with the application
        required: true
        example: 575ec8687ae143cd83dc4a97
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      requestBody:
        description: New experience domain information
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/experienceDomainPost'
      responses:
        '201':
          description: Successfully created experience domain
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/experienceDomain'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if application was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
  /applications/{applicationId}/experience/endpoints/{experienceEndpointId}:
    get:
      summary: Retrieves Information on Resources Linked to an Experience Endpoint
      tags:
      - Experience
      parameters:
      - name: applicationId
        in: path
        description: ID associated with the application
        required: true
        example: 575ec8687ae143cd83dc4a97
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: experienceEndpointId
        in: path
        description: ID associated with the experience endpoint
        required: true
        example: 575ed78e7ae143cd83dc4aab
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: version
        in: query
        description: Version of this experience endpoint to query
        required: false
        example: develop
        schema:
          type: string
          default: develop
      - name: includeCustomNodes
        in: query
        description: If the result of the request should also include the details of any custom nodes referenced by returned workflows
        required: false
        example: true
        schema:
          type: string
          default: false
      responses:
        '200':
          description: Linked resource information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/experienceLinkedResources'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if experience endpoint was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
    patch:
      summary: Updates Information About an Experience Endpoint
      tags:
      - Experience
      parameters:
      - name: applicationId
        in: path
        description: ID associated with the application
        required: true
        example: 575ec8687ae143cd83dc4a97
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: experienceEndpointId
        in: path
        description: ID associated with the experience endpoint
        required: true
        example: 575ed78e7ae143cd83dc4aab
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      requestBody:
        description: Object containing new properties of the experience endpoint
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/experienceEndpointPatch'
      responses:
        '200':
          description: Updated experience endpoint information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/experienceEndpoint'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if experience endpoint was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
    delete:
      summary: Deletes an Experience Endpoint
      tags:
      - Experience
      parameters:
      - name: applicationId
        in: path
        description: ID associated with the application
        required: true
        example: 575ec8687ae143cd83dc4a97
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: experienceEndpointId
        in: path
        description: ID associated with the experience endpoint
        required: true
        example: 575ed78e7ae143cd83dc4aab
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: includeWorkflows
        in: query
        description: If the workflows that utilize this experience endpoint should also be deleted.
        required: false
        example: true
        schema:
          type: string
      responses:
        '200':
          description: If experience endpoint 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 experience endpoint was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
  /applications/{applicationId}/experience/endpoints:
    get:
      summary: Get Statistics About Endpoint Requests
      tags:
      - Experience
      parameters:
      - name: applicationId
        in: path
        description: ID associated with the application
        required: true
        example: 575ec8687ae143cd83dc4a97
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: statGrouping
        in: query
        description: Field to group the statistics by
        required: false
        example: statusCode
        schema:
          type: string
          enum:
          - statusCode
          - endpointId
          - version
          - domain
          default: statusCode
      - name: duration
        in: query
        description: Duration 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: resolution
        in: query
        description: Resolution in milliseconds
        required: false
        example: 3600000
        schema:
          type: string
          default: 3600000
      - name: versionFilter
        in: query
        description: Filters the stats to a particular experience version
        required: false
        example: myVersion
        schema:
          type: string
      - name: domainFilter
        in: query
        description: Filters the stats to a particular experience domain or slug
        required: false
        example: example.com
        schema:
          type: string
      - name: statusCodeFilter
        in: query
        description: Filters the stats to a particular status code
        required: false
        example: 200
        schema:
          type: string
      - name: endpointIdFilter
        in: query
        description: Filters the stats to a particular endpoint
        required: false
        example: 575ec8687ae143cd83dc4a98
        schema:
          type: string
      responses:
        '200':
          description: Statistics for endpoint requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/experienceEndpointStats'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if application was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
    post:
      summary: Create a New Experience Endpoint for an Application
      tags:
      - Experience
      parameters:
      - name: applicationId
        in: path
        description: ID associated with the application
        required: true
        example: 575ec8687ae143cd83dc4a97
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      requestBody:
        description: New experience endpoint information
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/experienceEndpointPost'
      responses:
        '201':
          description: Successfully created experience endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/experienceEndpoint'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if application was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
  /applications/{applicationId}/experience/groups/{experienceGroupId}:
    get:
      summary: Retrieves Information on an Experience Group
      tags:
      - Experience
      parameters:
      - name: applicationId
        in: path
        description: ID associated with the application
        required: true
        example: 575ec8687ae143cd83dc4a97
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: experienceGroupId
        in: path
        description: ID associated with the experience group
        required: true
        example: 575ed78e7ae143cd83dc4aab
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: includeDirectDeviceCount
        in: query
        description: Whether or not to return count of devices associated directly with this group
        required: false
        example: 'true'
        schema:
          type: string
          default: 'false'
      - name: includeTotalDeviceCount
        in: query
        description: Whether or not to return count of devices associated with this group or any of its descendants
        required: false
        example: 'true'
        schema:
          type: string
          default: 'false'
      responses:
        '200':
          description: Experience group information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/experienceGroup'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if experience group was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
    patch:
      summary: Updates Information About an Experience Group
      tags:
      - Experience
      parameters:
      - name: applicationId
        in: path
        description: ID associated with the application
        required: true
        example: 575ec8687ae143cd83dc4a97
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: experienceGroupId
        in: path
        description: ID associated with the experience group
        required: true
        example: 575ed78e7ae143cd83dc4aab
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      requestBody:
        description: Object containing new properties of the experience group
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/experienceGroupPatch'
      responses:
        '200':
          description: Updated experience group information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/experienceGroup'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if experience group was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
    delete:
      summary: Deletes an Experience Group
      tags:
      - Experience
      parameters:
      - name: applicationId
        in: path
        description: ID associated with the application
        required: true
        example: 575ec8687ae143cd83dc4a97
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: experienceGroupId
        in: path
        description: ID associated with the experience group
        required: true
        example: 575ed78e7ae143cd83dc4aab
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      responses:
        '200':
          description: If experience group 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 experience group was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
  /applications/{applicationId}/experience/groups:
    get:
      summary: Returns the Experience Groups for an Application
      tags:
      - Experience
      parameters:
      - name: applicationId
        in: path
        description: ID associated with the application
        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: 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: name
        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*group
        schema:
          type: string
      - name: query
        in: query
        description: Experience group filter JSON object which overrides the filter and filterField fields.
        required: false
        schema:
          type: object
      responses:
        '200':
          description: Collection of experience groups
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/experienceGroups'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if application was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
    post:
      summary: Create a New Experience Group for an Application
      tags:
      - Experience
      parameters:
      - name: applicationId
        in: path
        description: ID associated with the application
        required: true
        example: 575ec8687ae143cd83dc4a97
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      requestBody:
        description: New experience group information
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/experienceGroupPost'
      responses:
        '201':
          description: Successfully created experience group
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/experienceGroup'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if application was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
  /applications/{applicationId}/experience/slugs/{experienceSlugId}:
    get:
      summary: Retrieves Information on an Experience Slug
      tags:
      - Experience
      parameters:
      - name: applicationId
        in: path
        description: ID associated with the application
        required: true
        example: 575ec8687ae143cd83dc4a97
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: experienceSlugId
        in: path
        description: ID associated with the experience slug
        required: true
        example: 575ed78e7ae143cd83dc4aab
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      responses:
        '200':
          description: Experience slug information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/experienceSlug'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if experience slug was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
    patch:
      summary: Updates Information About an Experience Slug
      tags:
      - Experience
      parameters:
      - name: applicationId
        in: path
        description: ID associated with the application
        required: true
        example: 575ec8687ae143cd83dc4a97
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: experienceSlugId
        in: path
        description: ID associated with the experience slug
        required: true
        example: 575ed78e7ae143cd83dc4aab
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      requestBody:
        description: Object containing new properties of the experience slug
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/experienceSlugPatch'
      responses:
        '200':
          description: Updated experience slug information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/experienceSlug'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if experience slug was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
    delete:
      summary: Deletes an Experience Slug
      tags:
      - Experience
      parameters:
      - name: applicationId
        in: path
        description: ID associated with the application
        required: true
        example: 575ec8687ae143cd83dc4a97
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: experienceSlugId
        in: path
        description: ID associated with the experience slug
        required: true
        example: 575ed78e7ae143cd83dc4aab
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      responses:
        '200':
          description: If experience slug 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 experience slug was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
  /applications/{applicationId}/experience/slugs:
    get:
      summary: Returns the Experience Slugs for an Application
      tags:
      - Experience
      parameters:
      - name: applicationId
        in: path
        description: ID associated with the application
        required: true
        example: 575ec8687ae143cd83dc4a97
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      responses:
        '200':
          description: Collection of experience slugs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/experienceSlugs'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if application was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
    post:
      summary: Create a New Experience Slug for an Application
      tags:
      - Experience
      parameters:
      - name: applicationId
        in: path
        description: ID associated with the application
        required: true
        example: 575ec8687ae143cd83dc4a97
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      requestBody:
        description: New experience slug information
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/experienceSlugPost'
      responses:
        '201':
          description: Successfully created experience slug
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/experienceSlug'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if application was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
  /applications/{applicationId}/experience/users/{experienceUserId}:
    get:
      summary: Retrieves Information on an Experience User
      tags:
      - Experience
      parameters:
      - name: applicationId
        in: path
        description: ID associated with the application
        required: true
        example: 575ec8687ae143cd83dc4a97
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      - name: experienceUserId
        in: path
        description: ID associated with the experience user
        required: true
        example: 575ed78e7ae143cd83dc4aab
        schema:
          type: string
          pattern: ^[A-Fa-f\d]{24}$
      responses:
        '200':
          description: Experience user information
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/experienceUser'
        '400':
          description: Error if malformed request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Error if experience user was not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
      - BearerAuth: []
    patch:
      summary: Updates Information About an Experience User
      tags:
      - Experience
      parameters:
      - name: applicationId
        in: path
        description: ID associated with the application
        required: true
        example: 575ec868

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