openapi: 3.2.0 info: title: Platform Experience Groups API version: 1.31.0 description: User API for accessing platform data servers: - url: https://api.losant.com security: - bearerAuth: [] tags: - name: Experience Groups paths: /applications/{applicationId}/experience/groups: get: operationId: experienceGroups.get summary: Returns the experience groups for an application tags: - Experience Groups parameters: - name: applicationId in: path required: true description: ID associated with the application schema: type: string pattern: ^[A-Fa-f\d]{24}$ example: 575ec8687ae143cd83dc4a97 - name: sortField in: query required: false description: Field to sort the results by schema: type: string enum: - name - id - creationDate - lastUpdated default: name example: name - name: sortDirection in: query required: false description: Direction to sort the results by schema: type: string enum: - asc - desc default: asc example: asc - name: page in: query required: false description: Which page of results to return schema: type: string default: 0 example: 0 - name: perPage in: query required: false description: How many items to return per page schema: type: string default: 100 example: 10 - name: filterField in: query required: false description: Field to filter the results by. Blank or not provided means no filtering. schema: type: string enum: - name example: name - name: filter in: query required: false description: Filter to apply against the filtered field. Supports globbing. Blank or not provided means no filtering. schema: type: string example: my*group - name: query in: query required: false description: Experience group filter JSON object which overrides the filter and filterField fields. schema: $ref: '#/components/schemas/advancedExperienceGroupQuery' 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' x-losant-auth-scopes: - experienceGroups.get post: operationId: experienceGroups.post summary: Create a new experience group for an application tags: - Experience Groups parameters: - name: applicationId in: path required: true description: ID associated with the application schema: type: string pattern: ^[A-Fa-f\d]{24}$ example: 575ec8687ae143cd83dc4a97 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' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/experienceGroupPost' description: New experience group information x-losant-auth-scopes: - experienceGroups.post /applications/{applicationId}/experience/groups/{experienceGroupId}: get: operationId: experienceGroup.get summary: Retrieves information on an experience group tags: - Experience Groups parameters: - name: applicationId in: path required: true description: ID associated with the application schema: type: string pattern: ^[A-Fa-f\d]{24}$ example: 575ec8687ae143cd83dc4a97 - name: experienceGroupId in: path required: true description: ID associated with the experience group schema: type: string pattern: ^[A-Fa-f\d]{24}$ example: 575ed78e7ae143cd83dc4aab - name: includeDirectDeviceCount in: query required: false description: Whether or not to return count of devices associated directly with this group schema: type: string default: 'false' example: 'true' - name: includeTotalDeviceCount in: query required: false description: Whether or not to return count of devices associated with this group or any of its descendants schema: type: string default: 'false' example: 'true' 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' x-losant-auth-scopes: - experienceGroup.get patch: operationId: experienceGroup.patch summary: Updates information about an experience group tags: - Experience Groups parameters: - name: applicationId in: path required: true description: ID associated with the application schema: type: string pattern: ^[A-Fa-f\d]{24}$ example: 575ec8687ae143cd83dc4a97 - name: experienceGroupId in: path required: true description: ID associated with the experience group schema: type: string pattern: ^[A-Fa-f\d]{24}$ example: 575ed78e7ae143cd83dc4aab 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' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/experienceGroupPatch' description: Object containing new properties of the experience group x-losant-auth-scopes: - experienceGroup.patch delete: operationId: experienceGroup.delete summary: Deletes an experience group tags: - Experience Groups parameters: - name: applicationId in: path required: true description: ID associated with the application schema: type: string pattern: ^[A-Fa-f\d]{24}$ example: 575ec8687ae143cd83dc4a97 - name: experienceGroupId in: path required: true description: ID associated with the experience group schema: type: string pattern: ^[A-Fa-f\d]{24}$ example: 575ed78e7ae143cd83dc4aab 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' x-losant-auth-scopes: - experienceGroup.delete components: schemas: error: title: Error description: Schema for errors returned by the API type: object properties: type: type: string message: type: string validationErrors: type: array items: type: object properties: field: type: string validationMessage: type: string success: title: Success description: Schema for reporting a successful operation type: object properties: success: type: boolean enum: - true experienceGroupPost: title: Experience Group Post description: Schema for the body of an Experience Group creation request type: object properties: name: type: string minLength: 1 maxLength: 255 description: type: string maxLength: 32767 experienceUserIds: type: array items: type: string pattern: ^[A-Fa-f\d]{24}$ maxItems: 1000 experienceEndpointIds: type: array items: type: string pattern: ^[A-Fa-f\d]{24}$ maxItems: 1000 groupTags: type: object patternProperties: ^[0-9a-zA-Z_-]{1,255}$: type: string minLength: 1 maxLength: 255 additionalProperties: false deviceIds: type: array items: type: string pattern: ^[A-Fa-f\d]{24}$ maxItems: 1000 deviceTags: type: array items: type: object properties: key: type: string pattern: ^[0-9a-zA-Z_-]{1,255}$ value: type: string minLength: 1 maxLength: 255 additionalProperties: false maxItems: 100 deviceQueryJson: type: - string - 'null' maxLength: 8192 parentId: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' additionalProperties: false required: - name experienceGroupPatch: title: Experience Group Patch description: Schema for the body of an Experience Group modification request type: object properties: name: type: string minLength: 1 maxLength: 255 description: type: string maxLength: 32767 experienceUserIds: type: array items: type: string pattern: ^[A-Fa-f\d]{24}$ maxItems: 1000 experienceEndpointIds: type: array items: type: string pattern: ^[A-Fa-f\d]{24}$ maxItems: 1000 groupTags: type: object patternProperties: ^[0-9a-zA-Z_-]{1,255}$: type: string minLength: 1 maxLength: 255 additionalProperties: false deviceIds: type: array items: type: string pattern: ^[A-Fa-f\d]{24}$ maxItems: 1000 deviceTags: type: array items: type: object properties: key: type: string pattern: ^[0-9a-zA-Z_-]{1,255}$ value: type: string minLength: 1 maxLength: 255 additionalProperties: false maxItems: 100 deviceQueryJson: type: - string - 'null' maxLength: 8192 parentId: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' additionalProperties: false advancedExperienceGroupQuery: title: Advanced Experience Group Query description: Schema for advanced experience group queries type: object properties: $and: type: array items: $ref: '#/components/schemas/advancedExperienceGroupQuery' maxItems: 100 $or: type: array items: $ref: '#/components/schemas/advancedExperienceGroupQuery' maxItems: 100 $nor: type: array items: $ref: '#/components/schemas/advancedExperienceGroupQuery' maxItems: 100 id: oneOf: - oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' - type: object properties: $eq: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $ne: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $gt: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $lt: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $gte: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $lte: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $in: type: array maxItems: 100 items: type: string pattern: ^[A-Fa-f\d]{24}$ $nin: type: array maxItems: 100 items: type: string pattern: ^[A-Fa-f\d]{24}$ additionalProperties: false minProperties: 1 maxProperties: 1 creationDate: oneOf: - type: - string - number - boolean - 'null' - type: object properties: $eq: type: - string - number - boolean - 'null' $ne: type: - string - number - boolean - 'null' $gt: type: - string - number - boolean - 'null' $lt: type: - string - number - boolean - 'null' $gte: type: - string - number - boolean - 'null' $lte: type: - string - number - boolean - 'null' $startsWith: type: string minLength: 1 $endsWith: type: string minLength: 1 $contains: type: string minLength: 1 $ci: type: boolean $in: type: array maxItems: 100 items: type: - string - number - boolean $nin: type: array maxItems: 100 items: type: - string - number - boolean additionalProperties: false lastUpdated: oneOf: - type: - string - number - boolean - 'null' - type: object properties: $eq: type: - string - number - boolean - 'null' $ne: type: - string - number - boolean - 'null' $gt: type: - string - number - boolean - 'null' $lt: type: - string - number - boolean - 'null' $gte: type: - string - number - boolean - 'null' $lte: type: - string - number - boolean - 'null' $startsWith: type: string minLength: 1 $endsWith: type: string minLength: 1 $contains: type: string minLength: 1 $ci: type: boolean $in: type: array maxItems: 100 items: type: - string - number - boolean $nin: type: array maxItems: 100 items: type: - string - number - boolean additionalProperties: false name: oneOf: - type: - string - number - boolean - 'null' - type: object properties: $eq: type: - string - number - boolean - 'null' $ne: type: - string - number - boolean - 'null' $gt: type: - string - number - boolean - 'null' $lt: type: - string - number - boolean - 'null' $gte: type: - string - number - boolean - 'null' $lte: type: - string - number - boolean - 'null' $startsWith: type: string minLength: 1 $endsWith: type: string minLength: 1 $contains: type: string minLength: 1 $ci: type: boolean $in: type: array maxItems: 100 items: type: - string - number - boolean $nin: type: array maxItems: 100 items: type: - string - number - boolean additionalProperties: false parentId: oneOf: - oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' - type: object properties: $eq: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $ne: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $gt: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $lt: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $gte: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $lte: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $in: type: array maxItems: 100 items: type: string pattern: ^[A-Fa-f\d]{24}$ $nin: type: array maxItems: 100 items: type: string pattern: ^[A-Fa-f\d]{24}$ additionalProperties: false minProperties: 1 maxProperties: 1 ancestorId: oneOf: - oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' - type: object properties: $eq: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $ne: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $gt: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $lt: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $gte: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $lte: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $in: type: array maxItems: 100 items: type: string pattern: ^[A-Fa-f\d]{24}$ $nin: type: array maxItems: 100 items: type: string pattern: ^[A-Fa-f\d]{24}$ additionalProperties: false minProperties: 1 maxProperties: 1 groupTags: oneOf: - oneOf: - type: 'null' - type: object properties: $tagKey: oneOf: - type: string maxLength: 255 - type: 'null' - type: object properties: $in: type: array maxItems: 100 items: type: string maxLength: 255 required: - $in additionalProperties: false - type: object properties: $nin: type: array maxItems: 100 items: type: string maxLength: 255 required: - $nin additionalProperties: false $tagValue: oneOf: - type: string maxLength: 255 - type: 'null' - type: object properties: $in: type: array maxItems: 100 items: type: string maxLength: 255 required: - $in additionalProperties: false - type: object properties: $nin: type: array maxItems: 100 items: type: string maxLength: 255 required: - $nin additionalProperties: false additionalProperties: false minProperties: 1 - type: object patternProperties: ^[0-9a-zA-Z_-]{1,255}: oneOf: - type: string maxLength: 255 - type: 'null' - type: object properties: $in: type: array maxItems: 100 items: type: string maxLength: 255 required: - $in additionalProperties: false - type: object properties: $nin: type: array maxItems: 100 items: type: string maxLength: 255 required: - $nin additionalProperties: false additionalProperties: false - type: object properties: $eq: oneOf: - type: 'null' - type: object properties: $tagKey: oneOf: - type: string maxLength: 255 - type: 'null' - type: object properties: $in: type: array maxItems: 100 items: type: string maxLength: 255 required: - $in additionalProperties: false - type: object properties: $nin: type: array maxItems: 100 items: type: string maxLength: 255 required: - $nin additionalProperties: false $tagValue: oneOf: - type: string maxLength: 255 - type: 'null' - type: object properties: $in: type: array maxItems: 100 items: type: string maxLength: 255 required: - $in additionalProperties: false - type: object properties: $nin: type: array maxItems: 100 items: type: string maxLength: 255 required: - $nin additionalProperties: false additionalProperties: false minProperties: 1 - type: object patternProperties: ^[0-9a-zA-Z_-]{1,255}: oneOf: - type: string maxLength: 255 - type: 'null' - type: object properties: $in: type: array maxItems: 100 items: type: string maxLength: 255 required: - $in additionalProperties: false - type: object properties: $nin: type: array maxItems: 100 items: type: string maxLength: 255 required: - $nin additionalProperties: false additionalProperties: false required: - $eq additionalProperties: false - type: object properties: $ne: oneOf: - type: 'null' - type: object properties: $tagKey: oneOf: - type: string maxLength: 255 - type: 'null' - type: object properties: $in: type: array maxItems: 100 items: type: string maxLength: 255 required: - $in additionalProperties: false - type: object properties: $nin: type: array maxItems: 100 items: type: string maxLength: 255 required: - $nin additionalProperties: false $tagValue: oneOf: - type: string maxLength: 255 - type: 'null' - type: object properties: $in: type: array maxItems: 100 items: type: string maxLength: 255 required: - $in additionalProperties: false - type: object properties: $nin: type: array maxItems: 100 items: type: string maxLength: 255 required: - $nin additionalProperties: false additionalProperties: false minProperties: 1 - type: object patternProperties: ^[0-9a-zA-Z_-]{1,255}: oneOf: - type: string maxLength: 255 - type: 'null' - type: object properties: $in: type: array maxItems: 100 items: type: string maxLength: 255 required: - $in additionalProperties: false - type: object properties: $nin: type: array maxItems: 100 items: type: string maxLength: 255 required: - $nin additionalProperties: false additionalProperties: false required: - $ne additionalProperties: false experienceUserId: oneOf: - oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' - type: object properties: $eq: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $ne: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $gt: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $lt: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $gte: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $lte: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $in: type: array maxItems: 100 items: type: string pattern: ^[A-Fa-f\d]{24}$ $nin: type: array maxItems: 100 items: type: string pattern: ^[A-Fa-f\d]{24}$ additionalProperties: false minProperties: 1 maxProperties: 1 experienceEndpointId: oneOf: - oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' - type: object properties: $eq: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $ne: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $gt: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $lt: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $gte: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $lte: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' $in: type: array maxItems: 100 items: type: string pattern: ^[A-Fa-f\d]{24}$ $nin: type: array maxItems: 100 items: type: string pattern: ^[A-Fa-f\d]{24}$ additionalProperties: false minProperties: 1 maxProperties: 1 additionalProperties: false experienceGroup: title: Experience Group description: Schema for a single Experience Group type: object properties: id: type: string pattern: ^[A-Fa-f\d]{24}$ experienceGroupId: type: string pattern: ^[A-Fa-f\d]{24}$ applicationId: type: string pattern: ^[A-Fa-f\d]{24}$ creationDate: type: string format: date-time lastUpdated: type: string format: date-time name: type: string minLength: 1 maxLength: 255 description: type: string maxLength: 32767 experienceUserIds: type: array items: type: string pattern: ^[A-Fa-f\d]{24}$ maxItems: 1000 experienceEndpointIds: type: array items: type: string pattern: ^[A-Fa-f\d]{24}$ maxItems: 1000 groupTags: type: object patternProperties: ^[0-9a-zA-Z_-]{1,255}$: type: string minLength: 1 maxLength: 255 additionalProperties: false deviceIds: type: array items: type: string pattern: ^[A-Fa-f\d]{24}$ maxItems: 1000 deviceTags: type: array items: type: object properties: key: type: string pattern: ^[0-9a-zA-Z_-]{1,255}$ value: type: string minLength: 1 maxLength: 255 additionalProperties: false maxItems: 100 deviceQueryJson: type: - string - 'null' maxLength: 8192 parentId: oneOf: - type: string pattern: ^[A-Fa-f\d]{24}$ - type: 'null' ancestorIds: type: array items: type: string pattern: ^[A-Fa-f\d]{24}$ maxItems: 1000 directDeviceCount: type: number totalDeviceCount: type: number experienceGroups: title: Experience Groups description: Schema for a collection of Experience Groups type: object properties: items: type: array items: $ref: '#/components/schemas/experienceGroup' count: type: integer totalCount: type: integer perPage: type: integer page: type: integer filter: type: string filterField: type: string sortField: type: string sortDirection: type: string enum: - asc - desc - ASC - DESC - '' applicationId: type: string pattern: ^[A-Fa-f\d]{24}$ securitySchemes: bearerAuth: type: http scheme: bearer x-derived-from: format: bravado 1.0 by: all/0-working/bravado-to-openapi.py (roadmap#799) note: 'every action keeps its own path: resource.path + action.path'