Esper Application V1 API

APIs for application management

OpenAPI Specification

esper-application-v1-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  description: "# Introduction\nEsper APIs are a set of REST-based APIs that help you programmatically control and monitor Android-based Dedicated Devices running the Esper agent using Esper Manage. With these APIs, you can orchestrate and manage devices that have been provisioned against your Esper Manage environment. Furthermore, these APIs allows you to manage the Android applications installed on your Dedicated Device fleet. To read more about the various capabilities of Esper APIs and Esper managed devices, please visit [esper.io](https://esper.io). This guide describes all the available APIs in detail, along with code samples for you to quickly ramp up to using them.\\\nTo use these APIs you will need to create a developer account with Esper and get access to the Esper Dev Console and the Esper ManageDashboard. You can find out more about Esper and sign up for free at [esper.io/signup](https://esper.io/signup)\\\nWe've done our best to keep this document up to date, but if you find any issues, please reach out to us at developer@esper.io.\n\n# SDK\n\n  You are welcome to use your favorite HTTP/REST library for your programming language in order to call these APIs, or you can use our SDK (currently supporting [python](https://github.com/esper-io/esper-client-py)) to do so.\n\n\n# Authentication\nThe client needs to send authentication details to access the Esper APIs by generating and applying an API key. Be sure to sign up for your free trial account with Esper Dev to generate your key:\n\n# Errors\nThe APIs use standard HTTP status codes to indicate success or failure. All error responses will have a JSON body in the following format:\n\n```\n{\n  \"errors\": [],\n  \"message\": \"error message\",\n  \"status\": 400\n}\n```\n* `errors` -  List of error details\n* `message` - Error description\n* `status` - HTTP status code\n"
  version: 1.0.0
  title: ESPER API REFERENCE Application Application V1 API
  termsOfService: https://esper.io/terms-of-service
  contact:
    email: developer@esper.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
host: foo-api.esper.cloud
basePath: /api
schemes:
- https
tags:
- name: Application V1
  description: APIs for application management
paths:
  /v1/enterprise/{enterprise_id}/application/:
    parameters:
    - name: enterprise_id
      description: A UUID string identifying this enterprise.
      in: path
      required: true
      type: string
    get:
      operationId: getAllApplicationsV1
      summary: List apps in enterprise
      description: Returns Application list
      produces:
      - application/json
      parameters:
      - name: application_name
        in: query
        description: filter by application name
        required: false
        type: string
      - name: package_name
        in: query
        description: filter by package name
        required: false
        type: string
      - name: package_name_exact
        in: query
        description: filter by package name (exact match)
        required: false
        type: string
      - name: has_uploaded_version
        in: query
        description: Returns applications having atleast on version uploaded
        required: false
        type: boolean
      - name: category
        in: query
        description: filter by category
        required: false
        type: string
      - name: supported_sdk
        in: query
        description: filter by supported sdk versions
        required: false
        type: integer
      - name: is_active
        in: query
        description: filter by active applications
        required: false
        type: boolean
      - name: is_hidden
        in: query
        description: filter default esper apps
        required: false
        type: boolean
        default: false
      - name: created_on_gt
        in: query
        description: filter applications created after a given timestamp
        required: false
        type: string
        format: datetime
      - name: created_on_lt
        in: query
        description: filter applications created before a given timestamp
        required: false
        type: string
        format: datetime
      - name: updated_on_gt
        in: query
        description: filter applications updated after a given timestamp
        required: false
        type: string
        format: datetime
      - name: updated_on_lt
        in: query
        description: filter applications updated before a given timestamp
        required: false
        type: string
        format: datetime
      - name: limit
        in: query
        description: Number of results to return per page.
        required: false
        type: integer
        default: 20
      - name: offset
        in: query
        description: The initial index from which to return the results.
        required: false
        type: integer
        default: 0
      responses:
        '200':
          description: successful operation
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: url
                x-nullable: true
              previous:
                type: string
                format: url
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/ApplicationV1'
        '401':
          description: Authorization information is missing or invalid.
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Internal server error
          schema:
            $ref: '#/definitions/ErrorResponse'
      security:
      - apiKey: []
      tags:
      - Application V1
  /v1/enterprise/{enterprise_id}/application/{application_id}/:
    parameters:
    - name: application_id
      in: path
      description: A UUID string identifying this application.
      required: true
      type: string
      format: uuid
    - name: enterprise_id
      description: A UUID string identifying enterprise.
      in: path
      required: true
      type: string
    get:
      operationId: getApplicationv1
      summary: Get application information
      description: Returns Application instance
      produces:
      - application/json
      parameters: []
      responses:
        '200':
          description: successful operation
          schema:
            $ref: '#/definitions/ApplicationV1'
        '401':
          description: Authorization information is missing or invalid.
          schema:
            $ref: '#/definitions/ErrorResponse'
        '404':
          description: Not Found.
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Internal server error
          schema:
            $ref: '#/definitions/ErrorResponse'
      security:
      - apiKey: []
      tags:
      - Application V1
    delete:
      operationId: deleteApplicationV1
      summary: Delete an application
      description: Empty response
      produces:
      - application/json
      parameters: []
      responses:
        '204':
          description: The resource was deleted successfully.
        '401':
          description: Authorization information is missing or invalid.
          schema:
            $ref: '#/definitions/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          schema:
            $ref: '#/definitions/ErrorResponse'
        '404':
          description: Not Found.
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Internal server error
          schema:
            $ref: '#/definitions/ErrorResponse'
      security:
      - apiKey: []
      tags:
      - Application V1
  /v1/enterprise/{enterprise_id}/application/{application_id}/version/:
    parameters:
    - name: application_id
      in: path
      description: A UUID string identifying this application.
      required: true
      type: string
      format: uuid
    - name: enterprise_id
      description: A UUID string identifying enterprise.
      in: path
      required: true
      type: string
    get:
      operationId: getAppVersionsV1
      summary: List App versions
      description: Returns AppVersion list
      produces:
      - application/json
      parameters:
      - name: version_code
        in: query
        description: filter by version code
        required: false
        type: string
      - name: build_number
        in: query
        description: filter by build number
        required: false
        type: string
      - name: is_g_play
        in: query
        description: filter google play applications
        required: false
        type: boolean
      - name: approval_status
        in: query
        description: filter by approval status
        required: false
        type: string
        enum:
        - AVAILABLE
        - ACCEPTED
        - APPROVED
        - REJECTED
      - name: is_enabled
        in: query
        description: filter by enabled versions
        required: false
        type: boolean
      - name: is_default
        in: query
        description: filter by default versions
        required: false
        type: boolean
      - name: created_on_gt
        in: query
        description: filter applications created after a given timestamp
        required: false
        type: string
        format: datetime
      - name: created_on_lt
        in: query
        description: filter applications created before a given timestamp
        required: false
        type: string
        format: datetime
      - name: updated_on_gt
        in: query
        description: filter applications updated after a given timestamp
        required: false
        type: string
        format: datetime
      - name: updated_on_lt
        in: query
        description: filter applications updated before a given timestamp
        required: false
        type: string
        format: datetime
      - name: limit
        in: query
        description: Number of results to return per page.
        required: false
        type: integer
      - name: offset
        in: query
        description: The initial index from which to return the results.
        required: false
        type: integer
        default: 0
      - name: ordering
        in: query
        description: 'Order result set by field name.


          ```

          * installed_count: order by asc

          * -installed_count: order by desc

          ```

          '
        required: false
        type: string
      responses:
        '200':
          description: successful operation
          schema:
            required:
            - count
            - results
            type: object
            properties:
              count:
                type: integer
              next:
                type: string
                format: url
                x-nullable: true
              previous:
                type: string
                format: url
                x-nullable: true
              results:
                type: array
                items:
                  $ref: '#/definitions/AppVersionV1'
        '401':
          description: Authorization information is missing or invalid.
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Internal server error
          schema:
            $ref: '#/definitions/ErrorResponse'
      security:
      - apiKey: []
      tags:
      - Application V1
  /v1/enterprise/{enterprise_id}/application/{application_id}/version/{version_id}/:
    parameters:
    - name: version_id
      in: path
      description: A UUID string identifying this app version.
      required: true
      type: string
      format: uuid
    - name: application_id
      in: path
      description: A UUID string identifying this application.
      required: true
      type: string
      format: uuid
    - name: enterprise_id
      description: A UUID string identifying enterprise.
      in: path
      required: true
      type: string
    get:
      operationId: getAppVersionV1
      summary: Get app version information
      description: Returns AppVersion instance
      produces:
      - application/json
      parameters: []
      responses:
        '200':
          description: successful operation
          schema:
            $ref: '#/definitions/AppVersionV1'
        '401':
          description: Authorization information is missing or invalid.
          schema:
            $ref: '#/definitions/ErrorResponse'
        '404':
          description: Not Found.
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Internal server error
          schema:
            $ref: '#/definitions/ErrorResponse'
      security:
      - apiKey: []
      tags:
      - Application V1
    delete:
      operationId: deleteAppVersionV1
      summary: Delete app version
      description: Empty response
      produces:
      - application/json
      parameters:
      - name: request_id
        in: query
        description: If this value exists in cache, delete the application and cache entry.
        required: false
        type: string
      responses:
        '200':
          description: No request id is provided and the application is linked to one or more templates. Returns a request_id. Call with this request id to delete the resource.
          schema:
            $ref: '#/definitions/AppVersionDelete'
        '204':
          description: The resource was deleted successfully.
        '400':
          description: Invalid request.
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          schema:
            $ref: '#/definitions/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          schema:
            $ref: '#/definitions/ErrorResponse'
        '404':
          description: Not Found.
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Internal server error
          schema:
            $ref: '#/definitions/ErrorResponse'
      security:
      - apiKey: []
      tags:
      - Application V1
    patch:
      operationId: patchAppVersionV1
      summary: Patch an App version instance
      produces:
      - application/json
      parameters:
      - name: data
        in: body
        schema:
          type: object
          properties:
            release_name:
              title: Release name
              description: Name of the Release
              type: string
            is_default:
              title: Is Default
              description: Is the app version the deafult
              type: boolean
            min_sdk_version:
              title: Minimum SDK version
              description: Version number of minimum SDK version that supports this app version
              type: string
            build_number:
              title: Build Number
              description: Build number of this app version
              type: string
            version_code:
              title: Version Code
              description: Verion code of this app version
              type: string
            approval_status:
              title: Approval Status
              description: Approval status of this app version
              type: string
              enum:
              - AVAILABLE
              - ACCEPTED
              - APPROVED
              - REJECTED
      responses:
        '200':
          description: successful operation
          schema:
            $ref: '#/definitions/AppVersionV1'
        '400':
          description: Bad request
          schema:
            $ref: '#/definitions/ErrorResponse'
        '401':
          description: Authorization information is missing or invalid.
          schema:
            $ref: '#/definitions/ErrorResponse'
        '403':
          description: Forbidden, no permission to perform this action.
          schema:
            $ref: '#/definitions/ErrorResponse'
        '404':
          description: Not Found.
          schema:
            $ref: '#/definitions/ErrorResponse'
        '500':
          description: Internal server error
          schema:
            $ref: '#/definitions/ErrorResponse'
      security:
      - apiKey: []
      tags:
      - Application V1
definitions:
  ApplicationV1:
    required:
    - application_name
    - package_name
    - enterprise
    type: object
    properties:
      id:
        title: Id
        type: string
        format: uuid
        readOnly: true
      latest_version:
        $ref: '#/definitions/ApplicationVersionV1'
      application_name:
        title: Application name
        type: string
        maxLength: 255
        minLength: 1
      package_name:
        title: Package name
        type: string
        maxLength: 255
        minLength: 1
        readOnly: true
      is_hidden:
        title: Is hidden
        type: boolean
      enterprise:
        title: Enterprise
        type: string
        format: url
  ErrorResponse:
    type: object
    properties:
      errors:
        title: Messages describing the error
        type: array
        items:
          type: string
      message:
        title: Message describing the error
        type: string
      status:
        title: alias name
        type: integer
  ApplicationVersionV1:
    title: Application Version V1
    type: object
    properties:
      id:
        title: Id
        type: string
        format: uuid
        readOnly: true
      version_code:
        title: Version code
        type: string
        maxLength: 50
        minLength: 1
      build_number:
        title: Build number
        type: string
        maxLength: 100
        minLength: 1
        x-nullable: true
      hash_string:
        title: Hash string
        type: string
      min_sdk_version:
        title: Min sdk version
        type: string
        maxLength: 10
        minLength: 1
        x-nullable: true
      target_sdk_version:
        title: Target sdk version
        type: string
        maxLength: 10
        minLength: 1
        x-nullable: true
      icon_url:
        title: Url for the icon
        type: string
        format: url
      release_name:
        title: Name of the release
        type: string
  AppVersionV1:
    title: Application Version V1
    required:
    - version_code
    - enterprise
    type: object
    properties:
      id:
        title: Id
        type: string
        format: uuid
        readOnly: true
      installed_count:
        title: Installed count
        type: integer
        readOnly: true
      is_g_play:
        title: Is google play
        type: boolean
      app_file:
        title: App file url
        type: string
        format: url
        x-nullable: true
      app_icon:
        title: App icon url
        type: string
        format: url
        x-nullable: true
      version_code:
        title: Version code
        type: string
        maxLength: 50
        minLength: 1
        x-nullable: true
      build_number:
        title: Build number
        type: string
        maxLength: 100
        minLength: 1
        x-nullable: true
      min_sdk_version:
        title: Minimum sdk version
        type: string
        maxLength: 10
        minLength: 1
        x-nullable: true
      enterprise:
        title: Enterprise URL
        type: string
        format: url
      application:
        title: Application URL
        type: string
        format: url
      release_name:
        title: Name of the release
        type: string
        maxLength: 255
        x-nullable: true
      release_comments:
        title: Release comments
        type: string
        x-nullable: true
      approval_status:
        title: Approval Status
        type: string
        maxLength: 50
        enum:
        - AVAILABLE
        - ACCEPTED
        - APPROVED
        - REJECTED
        default: APPROVED
      release_date:
        title: Release date
        type: string
        format: date-time
      size_in_mb:
        title: Size in mb
        type: number
        default: 0
      is_default:
        title: Is default
        type: boolean
        default: false
      created_on:
        title: Created on
        type: string
        format: date-time
        readOnly: true
  AppVersionDelete:
    type: object
    properties:
      request_id:
        title: Request id
        type: string
        format: uuid
      templates:
        description: List of linked templates to an app version
        type: array
        items:
          type: object
          properties:
            id:
              title: Id
              description: Id of the linked template
              type: integer
            name:
              title: Name
              description: Name of the linked template
              type: string
securityDefinitions:
  apiKey:
    description: "#### API KEY - Access Token\nAccess token for APIs passed as authorization header in calls. You need to generate this from your Esper Dev Console at `<domain>-api.esper.cloud` where foo is the sub-domain name you gave for your Esper Dev environment when you signed up for your Esper Dev account. Please follow the instructions [here](https://docs.esper.io/home/module/genapikey.html) to generate an access token.\nOnce you have the access token, you need to send an authorization header as below\n\n```bash\n\n    curl -X GET \\\n      https://<domain>-api.esper.cloud/api/enterprise/<enterprise_id>/device/ \\\n      -H 'Authorization: Bearer <ACCESS_TOKEN>' \\\n      -H 'Content-Type: application/json' \\\n```\n\n> Please note the use of keyword **Bearer** before the token value.\n\n\nYou can read more about api key authentication scheme [here](https://console-docs.esper.io/API/generate.html).\n"
    name: Authorization
    type: apiKey
    in: header
x-tagGroups:
- name: API Reference
  tags:
  - Enterprise
  - Application
  - Application V1
  - Device
  - Device Group
  - Commands
  - Group Commands
  - Token
  - Commands V2
  - Enterprise Policy
  - Geofence
  - Reports
  - Subscription
  - Content