openapi: 3.0.1
info:
  title: Workspace Service
  description: The Workspace Service provides a variety of APIs for creating, deleting, and retrieving workspace hierarchies.
  version: '2.0'
tags:
  - name: WorkspaceService
security:
  - Authorization: []
paths:
  /users/workspace-roles:
    get:
      summary: List roles for the given workspace
      description: 'Permission Level: Read'
      operationId: WorkspaceService_ListWorkspaceRoles
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2ListWorkspaceRolesResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: workspaceType
          description: 'The workspace type of the workspace. Required: true'
          in: query
          required: false
          schema:
            type: string
        - name: workspaceName
          description: 'Name of the workspace. Required: true'
          in: query
          required: false
          schema:
            type: string
        - name: tenantId
          description: 'Tenant of the workspace. Required: false'
          in: query
          required: false
          schema:
            type: string
      tags:
        - WorkspaceService
  /users/workspace/{workspaceType}/{workspaceName}/things:
    get:
      summary: List things inside a Workspace by workspace_type, name and tenant (all of them required).
      description: 'Permission Level: Read'
      operationId: WorkspaceService_ListWorkspaceThings
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2ListWorkspaceThingsResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: workspaceType
          description: 'The workspace type of the workspace. Required: true'
          in: path
          required: true
          schema:
            type: string
        - name: workspaceName
          description: 'Name of the workspace. Required: true'
          in: path
          required: true
          schema:
            type: string
        - name: tenantId
          description: 'Tenant of the workspace. Required: false'
          in: query
          required: false
          schema:
            type: string
        - name: thingType
          description: 'Filter by this type. Required: false'
          in: query
          required: false
          schema:
            type: string
      tags:
        - WorkspaceService
    patch:
      summary: Add to a Workspace by workspace type, name and tenant (all of them required) many things of the same type.
      description: 'Permission Level: Read-Write'
      operationId: WorkspaceService_AddSameTypedThings
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: workspaceType
          description: 'The workspace type of the workspace. Required: true'
          in: path
          required: true
          schema:
            type: string
        - name: workspaceName
          description: 'Name of the workspace. Required: true'
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceServiceAddSameTypedThingsBody'
        required: true
      tags:
        - WorkspaceService
  /users/workspaces:
    get:
      summary: List workspaces by workspace type and tenant.
      description: 'Permission Level: Read'
      operationId: WorkspaceService_ListWorkspaces
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2ListWorkspacesResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: genericFilter
          description: |-
            Generic filter for workspaces fields (name, parent, displayName)
            If it contains a whitespace, it splits the text and filter by both words. Required: false
          in: query
          required: false
          schema:
            type: string
        - name: tenantId
          description: 'List of Tenants of the workspaces. Required: false'
          in: query
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: pageSize
          description: 'Items per page. Required: false'
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: pageToken
          description: 'Mongo DB Field, describes the encoded page token for page traversal, Required: false'
          in: query
          required: false
          schema:
            type: string
        - name: sortField
          description: 'sort field valid values: name, workspaceType, parent, displayName, lastUpdated. Default: name, Required: false'
          in: query
          required: false
          schema:
            type: string
        - name: sortType
          description: 'Sort Type for the results, Default: ASC, Required: false'
          in: query
          required: false
          schema:
            type: string
            enum:
              - NONE
              - ASC
              - DESC
            default: NONE
        - name: includeUsers
          description: 'Whether to include list of users who belong to the workspace. Required : false'
          in: query
          required: false
          schema:
            type: boolean
        - name: workspaceType
          description: 'WorkspaceType filter. Required : false'
          in: query
          required: false
          schema:
            type: string
        - name: domain
          description: 'Domain of the workspace (example: zpa, reflexis, wfc, etc), Required: false'
          in: query
          required: false
          schema:
            type: string
        - name: scope
          description: 'scope of the workspace , Required: false'
          in: query
          required: false
          schema:
            type: string
        - name: specificFilter.displayName
          description: Only non blank
          in: query
          required: false
          schema:
            type: string
        - name: specificFilter.parentSpecificFilter.parent
          in: query
          required: false
          schema:
            type: string
        - name: specificFilter.hierarchyNodeSpecificFilter.isHierarchyNode
          in: query
          required: false
          schema:
            type: boolean
        - name: startsWithSingleCharacter
          description: 'Ability to search for a single starts with character, only applicable to specific_filter: display_name, Required: false, Default: false'
          in: query
          required: false
          schema:
            type: boolean
        - name: excludeTenantIds
          description: 'List of tenant IDs to exclude. Required: false'
          in: query
          required: false
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: statusInScope
          description: |-
            The enabled status of the workspace's scope in this request to search on, Default: enabled, Required: false

             - ENTITY_ENABLED: Entity is enabled
             - ENTITY_DISABLED: Entity is disabled
             - ENTITY_BOTH_ENABLED_DISABLED: Entity either enabled or disabled
          in: query
          required: false
          schema:
            type: string
            enum:
              - ENTITY_ENABLED
              - ENTITY_DISABLED
              - ENTITY_BOTH_ENABLED_DISABLED
            default: ENTITY_ENABLED
      tags:
        - WorkspaceService
    delete:
      summary: Delete list of Workspace by workspace type, name and tenant.
      description: 'Permission Level: Read-Write'
      operationId: WorkspaceService_DeleteWorkspaces
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/v2DeleteWorkspacesRequest'
        required: true
      tags:
        - WorkspaceService
    post:
      summary: Create multiple new Workspaces.
      description: 'Permission Level: Read-Write'
      operationId: WorkspaceService_CreateWorkspaces
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/v2CreateWorkspacesRequest'
        required: true
      tags:
        - WorkspaceService
    put:
      summary: Update multiple Workspaces.
      description: 'Permission Level: Read-Write'
      operationId: WorkspaceService_UpdateWorkspaces
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/v2UpdateWorkspacesRequest'
        required: true
      tags:
        - WorkspaceService
  /users/workspaces-by-things:
    get:
      summary: 'List workspaces matching the given "thing". A "thing" is an object with these 3 fields: value, name and type, each of which is required for this call.'
      description: 'Permission Level: Read'
      operationId: WorkspaceService_ListWorkspacesByThing
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2ListWorkspacesByThingResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: name
          description: 'Name of the thing. Required: false'
          in: query
          required: false
          schema:
            type: string
        - name: value
          description: 'Value of the thing. Required: false'
          in: query
          required: false
          schema:
            type: string
        - name: type
          description: 'Type of the thing. Required: false'
          in: query
          required: false
          schema:
            type: string
      tags:
        - WorkspaceService
  /users/workspaces/download:
    get:
      summary: |-
        "Bulk" CSV download for workspaces
        The CSV format is the same as bulk upload
        Permission Level: Read
      operationId: WorkspaceService_DownloadWorkspacesAsCsv
      responses:
        '200':
          description: A successful response.(streaming responses)
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    $ref: '#/components/schemas/v2DownloadWorkspacesAsCsvResponse'
                  error:
                    $ref: '#/components/schemas/googleRpcStatus'
                title: Stream result of v2DownloadWorkspacesAsCsvResponse
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: tenantId
          description: Tenant of the workspace. Required = false
          in: query
          required: false
          schema:
            type: string
      tags:
        - WorkspaceService
  /users/workspaces/expire:
    post:
      summary: |-
        Expire (Set enabled scope to false) where the expiration date is today.
        Permission Level: Admin Read Write
      operationId: WorkspaceService_ExpireWorkspaces
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      tags:
        - WorkspaceService
  /users/workspaces/import:
    post:
      summary: |-
        The base64 encoded csv must have this format -> name,workspace_type,display_name,parent,description,domain,scope
        If the record already exists display_name and parent fields are updated.
        If any workspace creation/update fails, the process return the list of errors and make the save/update for the rest of workspaces.
      operationId: WorkspaceService_ImportWorkspacesFromCsv
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2ImportWorkspacesFromCsvResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/v2ImportWorkspacesFromCsvRequest'
        description: ' (streaming inputs)'
        required: true
      tags:
        - WorkspaceService
  /users/workspaces/search:
    get:
      summary: Search workspaces by text string across name, displayname, description, and attributes. Returns 10 best results.
      description: 'Permission Level: Read'
      operationId: WorkspaceService_SearchWorkspaceByTextSearch
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2SearchWorkspaceByTextSearchResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: tenantId
          description: 'Tenant of the workspace, Required: false'
          in: query
          required: false
          schema:
            type: string
        - name: workspaceText
          description: 'Text for the workspace to search on this fields: name, displayName, description, attributes. Required: true'
          in: query
          required: false
          schema:
            type: string
        - name: scope
          description: 'Scope. Required: false'
          in: query
          required: false
          schema:
            type: string
        - name: workspaceType
          description: 'Workspace type of the workspace. Required: false'
          in: query
          required: false
          schema:
            type: string
        - name: filter.workspaceAttribute.scope
          description: 'General scoping for workspace attribute. Required: false'
          in: query
          required: false
          schema:
            type: string
        - name: filter.workspaceAttribute.fieldName
          description: 'Name of the attribute. Required: true'
          in: query
          required: false
          schema:
            type: string
        - name: filter.workspaceAttribute.value
          description: 'Value of the attribute. Required: false'
          in: query
          required: false
          schema:
            type: string
        - name: filter.workspaceAttribute.domain
          description: 'Domain of the attribute. Required : false'
          in: query
          required: false
          schema:
            type: string
        - name: pageSize
          description: 'Items per page. Required: false'
          in: query
          required: false
          schema:
            type: integer
            format: int32
        - name: pageToken
          description: 'Mongo DB Field, describes the encoded page token for page traversal, Required: false'
          in: query
          required: false
          schema:
            type: string
      tags:
        - WorkspaceService
    post:
      summary: |-
        List workspaces with filters
        Permission Level: Read
      operationId: WorkspaceService_ListWorkspacesWithFilters
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2ListWorkspacesResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/v2ListWorkspacesWithFiltersRequest'
        required: true
      tags:
        - WorkspaceService
  /users/workspaces/type/{workspaceType}/name/{workspaceName}/tenant/{tenantId}/nested:
    get:
      summary: |-
        Get one Workspace by workspace type, name and tenant, all of them required.
        The descendants will be represented as a nested structure
      description: 'Permission Level: Read'
      operationId: WorkspaceService_GetNestedWorkspace
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2NestedWorkspaceProto'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: workspaceType
          description: 'The workspace type of the workspace. Required: true'
          in: path
          required: true
          schema:
            type: string
        - name: workspaceName
          description: 'Name of the workspace. Required: true'
          in: path
          required: true
          schema:
            type: string
        - name: tenantId
          description: 'Tenant of the workspace. Required: false'
          in: path
          required: true
          schema:
            type: string
        - name: includeUsers
          description: 'Whether to include list of users who belong to the workspace. Required : false'
          in: query
          required: false
          schema:
            type: boolean
        - name: fieldMask
          description: |-
            FieldMask to control what fields are to be returned, if empty assumes everything, Required: false
            Valid path names are names of each field in the WorkspaceResponse proto
          in: query
          required: false
          schema:
            type: string
      tags:
        - WorkspaceService
  /users/workspaces/workspaceTypes:
    get:
      summary: Get Unique Workspace Types for a particular tenant.
      description: 'Permission Level: Read'
      operationId: WorkspaceService_ListWorkspaceTypes
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2ListWorkspaceTypesResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: tenantId
          description: 'Tenant of the workspace. Required: true'
          in: query
          required: false
          schema:
            type: string
      tags:
        - WorkspaceService
  /users/workspaces/{workspaceType}/{workspaceName}:
    get:
      summary: Get one Workspace by workspace type, name and tenant, all of them required.
      description: 'Permission Level: Read'
      operationId: WorkspaceService_GetWorkspace
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2WorkspaceResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: workspaceType
          description: 'The workspace type of the workspace. Required: true'
          in: path
          required: true
          schema:
            type: string
        - name: workspaceName
          description: 'Name of the workspace. Required: true'
          in: path
          required: true
          schema:
            type: string
        - name: tenantId
          description: 'Tenant of the workspace. Required: false'
          in: query
          required: false
          schema:
            type: string
        - name: includeUsers
          description: 'Whether to include list of users who belong to the workspace. Required : false'
          in: query
          required: false
          schema:
            type: boolean
        - name: fieldMask
          description: |-
            FieldMask to control what fields are to be returned, if empty assumes everything, Required: false
            Valid path names are names of each field in the WorkspaceResponse proto
          in: query
          required: false
          schema:
            type: string
      tags:
        - WorkspaceService
    delete:
      summary: Delete one Workspace by workspace type, name and tenant, all of them required.
      description: 'Permission Level: Read-Write'
      operationId: WorkspaceService_DeleteWorkspace
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: workspaceType
          description: 'The workspace type of the workspace. Required: true'
          in: path
          required: true
          schema:
            type: string
        - name: workspaceName
          description: 'Name of the workspace. Required: true'
          in: path
          required: true
          schema:
            type: string
        - name: tenantId
          description: 'Tenant of the workspace. Required: false'
          in: query
          required: false
          schema:
            type: string
      tags:
        - WorkspaceService
    put:
      summary: Update one Workspace by workspace type, name and tenant, all of them required.
      description: 'Permission Level: Read-Write'
      operationId: WorkspaceService_UpdateWorkspace
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2WorkspaceResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: workspaceType
          description: 'The Workspace type of the workspace. Required: true'
          in: path
          required: true
          schema:
            type: string
        - name: workspaceName
          description: 'Name of the workspace. Required: true'
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceServiceUpdateWorkspaceBody'
        required: true
      tags:
        - WorkspaceService
  /users/workspaces/{workspaceType}/{workspaceName}/roles:
    delete:
      summary: |-
        Remove roles from a Workspace.
         It is required a Workspace and list of roles to be removed.
         Permission Level: Read-Write
      operationId: WorkspaceService_DeleteWorkspaceRoles
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2WorkspaceRoleResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: workspaceType
          description: 'The workspace type of the workspace. Required: true'
          in: path
          required: true
          schema:
            type: string
        - name: workspaceName
          description: 'Name of the workspace. Required: true'
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceServiceDeleteWorkspaceRolesBody'
        required: true
      tags:
        - WorkspaceService
    post:
      summary: |-
        Add roles to a Workspace.
         It is required a Workspace and list of roles to be added.
         Permission Level: Read-Write
      operationId: WorkspaceService_AddWorkspaceRoles
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2WorkspaceRoleResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: workspaceType
          description: 'The workspace type of the workspace. Required: true'
          in: path
          required: true
          schema:
            type: string
        - name: workspaceName
          description: 'Name of the workspace. Required: true'
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceServiceAddWorkspaceRolesBody'
        required: true
      tags:
        - WorkspaceService
  /users/workspaces/{workspaceType}/{workspaceName}/things:
    delete:
      summary: Delete from a Workspace by workspace type, name and tenant (all of them required) many things (value, name and type).
      description: 'Permission Level: Read-Write'
      operationId: WorkspaceService_DeleteThings
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: workspaceType
          description: 'The workspace type of the workspace. Required: true'
          in: path
          required: true
          schema:
            type: string
        - name: workspaceName
          description: 'Name of the workspace. Required: true'
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceServiceDeleteThingsBody'
        required: true
      tags:
        - WorkspaceService
    post:
      summary: Add to a Workspace by workspace type, name and tenant (all of them required) many things (value, name and type).
      description: 'Permission Level: Read-Write'
      operationId: WorkspaceService_AddThings
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: workspaceType
          description: 'The workspace type of the workspace. Required: true'
          in: path
          required: true
          schema:
            type: string
        - name: workspaceName
          description: 'Name of the workspace. Required: true'
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceServiceAddThingsBody'
        required: true
      tags:
        - WorkspaceService
  /users/workspaces/{workspaceType}/{workspaceName}/users:
    delete:
      summary: |-
        Remove users from a Workspace.
         It is required a Workspace and a list of users to remove.
         Permission Level: Read-Write
      operationId: WorkspaceService_DeleteWorkspaceUsers
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2WorkspaceResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: workspaceType
          description: 'The workspace type of the workspace. Required: true'
          in: path
          required: true
          schema:
            type: string
        - name: workspaceName
          description: 'Name of the workspace. Required: true'
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceServiceDeleteWorkspaceUsersBody'
        required: true
      tags:
        - WorkspaceService
    post:
      summary: |-
        Add users to a Workspace.
         It is required a Workspace and a list of users to add.
         Permission Level: Read-Write
      operationId: WorkspaceService_AddWorkspaceUsers
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v2WorkspaceResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
      parameters:
        - name: workspaceType
          description: 'The workspace type of the workspace. Required: true'
          in: path
          required: true
          schema:
            type: string
        - name: workspaceName
          description: 'Name of the workspace. Required: true'
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceServiceAddWorkspaceUsersBody'
        required: true
      tags:
        - WorkspaceService
servers:
  - url: https://prod-ui-zwseuprod01p.pp.zebra.com/api
    description: EU Server
  - url: https://prod-ui-zwsusprod01p.pp.zebra.com/api
    description: NA Server
components:
  schemas:
    WorkspaceServiceAddSameTypedThingsBody:
      type: object
      properties:
        tenantId:
          type: string
          title: 'Tenant of the workspace. Required: false'
        thingType:
          type: string
          title: 'Type of the things to add. Required: true'
        namesValuesThings:
          type: array
          items:
            $ref: '#/components/schemas/v2NameValueThing'
          title: List of same-typed things to add
        deleteOld:
          type: boolean
          title: 'Whether to remove all existing things. Default: false'
    WorkspaceServiceAddThingsBody:
      type: object
      properties:
        tenantId:
          type: string
          title: 'Tenant of the workspace. Required: false'
        things:
          type: array
          items:
            $ref: '#/components/schemas/v2ThingProto'
          title: 'List of things. Required: true'
    WorkspaceServiceAddWorkspaceRolesBody:
      type: object
      properties:
        tenantId:
          type: string
          title: 'Tenant of the workspace. Required: false'
        roles:
          type: array
          items:
            $ref: '#/components/schemas/v2UniqueRoleProto'
          title: 'list of roles to be added to the workspace, Required: true'
    WorkspaceServiceAddWorkspaceUsersBody:
      type: object
      properties:
        tenantId:
          type: string
          title: 'Tenant of the workspace. Required: false'
        users:
          type: array
          items:
            $ref: '#/components/schemas/v2UniqueUserProto'
          title: 'list of users (user_ids) to add to the workspace, Required: true'
        fieldMask:
          type: string
          title: |-
            FieldMask to control what fields are to be returned, if empty assumes everything, Required: false
            Valid path names are names of each field in the WorkspaceResponse proto
    WorkspaceServiceDeleteThingsBody:
      type: object
      properties:
        tenantId:
          type: string
          title: 'Tenant of the workspace. Required: false'
        things:
          type: array
          items:
            $ref: '#/components/schemas/v2ThingProto'
          title: 'List of things. Required: true'
    WorkspaceServiceDeleteWorkspaceRolesBody:
      type: object
      properties:
        tenantId:
          type: string
          title: 'Tenant of the workspace. Required: false'
        roles:
          type: array
          items:
            $ref: '#/components/schemas/v2UniqueRoleProto'
          title: 'list of roles (roles_ids) to be removed from the workspace, Required: true'
    WorkspaceServiceDeleteWorkspaceUsersBody:
      type: object
      properties:
        tenantId:
          type: string
          title: 'Tenant of the workspace. Required: false'
        users:
          type: array
          items:
            $ref: '#/components/schemas/v2UniqueUserProto'
          title: 'list of users (user_ids) to remove from the workspace, Required: true'
        fieldMask:
          type: string
          title: |-
            FieldMask to control what fields are to be returned, if empty assumes everything, Required: false
            Valid path names are names of each field in the WorkspaceResponse proto
    WorkspaceServiceUpdateWorkspaceBody:
      type: object
      properties:
        tenantId:
          type: string
          title: 'Tenant of the workspace. Required: false'
        newParent:
          type: string
          title: 'New parent for this workspace. Required: false'
        displayName:
          type: string
          title: 'A friendly display name. Required: false'
        attributesWrapper:
          $ref: '#/components/schemas/v2AttributeWrapper'
        updateScopeOption:
          $ref: '#/components/schemas/v2UpdateWorkspaceScope'
        updateFieldMask:
          type: string
          title: |-
            FieldMask to control what fields are to be updated, Required: false
            Valid path names (display_name, parent, attributes, scopes, description) as related to WorkspaceProto
        description:
          type: string
          title: 'Updated workspace description, Required: false'
        expiration:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/typeDate'
          title: 'Scopes and expiration dates, Required: false'
    commonsSortType:
      type: string
      enum:
        - NONE
        - ASC
        - DESC
      default: NONE
    protobufAny:
      type: object
      properties:
        '@type':
          type: string
      additionalProperties: {}
    protobufNullValue:
      type: string
      enum:
        - NULL_VALUE
      default: NULL_VALUE
      description: |-
        `NullValue` is a singleton enumeration to represent the null value for the
        `Value` type union.

        The JSON representation for `NullValue` is JSON `null`.

         - NULL_VALUE: Null value.
    rpcStatus:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/protobufAny'
    typeDate:
      type: object
      properties:
        year:
          type: integer
          format: int32
          description: |-
            Year of the date. Must be from 1 to 9999, or 0 to specify a date without
            a year.
        month:
          type: integer
          format: int32
          description: |-
            Month of a year. Must be from 1 to 12, or 0 to specify a year without a
            month and day.
        day:
          type: integer
          format: int32
          description: |-
            Day of a month. Must be from 1 to 31 and valid for the year and month, or 0
            to specify a year by itself or a year and month where the day isn't
            significant.
      description: |-
        * A full date, with non-zero year, month, and day values
        * A month and day value, with a zero year, such as an anniversary
        * A year on its own, with zero month and day values
        * A year and month value, with a zero day, such as a credit card expiration
        date

        Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and
        `google.protobuf.Timestamp`.
      title: |-
        Represents a whole or partial calendar date, such as a birthday. The time of
        day and time zone are either specified elsewhere or are insignificant. The
        date is relative to the Gregorian Calendar. This can represent one of the
        following:
    v2AttributeWrapper:
      type: object
      properties:
        workspaceAttributes:
          type: array
          items:
            $ref: '#/components/schemas/v2WorkspaceAttributeProto'
          title: 'Workspace specific attributes, Required: false'
    v2CreateWorkspaceProto:
      type: object
      properties:
        name:
          type: string
          title: 'The name of the workspace. Required: true'
        parent:
          type: string
          title: 'Parent of this workspace. Required: false'
        workspaceType:
          type: string
          title: 'The workspace type of the workspace. Required: true'
        tenantId:
          type: string
          title: 'Tenant of the workspace. Required: false'
        displayName:
          type: string
          title: 'A friendly display name. Required: false'
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/v2WorkspaceAttributeProto'
          title: 'Workspace specific attributes, Required: false'
        scope:
          type: string
          title: 'Workspace scope (ZPA, Reflexis, etc). Only set on creation as enable, Required: false'
        domain:
          type: string
          title: 'Domain of the workspace (example: zpa, reflexis, wfc, etc), Required: false'
        description:
          type: string
          title: 'Workspace free form description, Required: false'
        expiration:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/typeDate'
          title: 'Scopes and expiration dates, Required: false'
    v2CreateWorkspacesRequest:
      type: object
      properties:
        workspaces:
          type: array
          items:
            $ref: '#/components/schemas/v2CreateWorkspaceProto'
          title: 'List of workspaces to create. Required: true'
        rollback:
          type: boolean
          title: Whether to rollback any created workspace if there is an error
    v2DeleteWorkspacesRequest:
      type: object
      properties:
        tenantId:
          type: string
          title: 'Tenant of the workspace. Required: false'
        workspaceType:
          type: string
          title: 'The workspace type of the workspace. Required: true'
        workspaces:
          type: array
          items:
            type: string
          title: 'Name of the workspaces. Required: true'
    v2DownloadWorkspacesAsCsvResponse:
      type: object
      properties:
        data:
          type: string
          format: byte
          title: Array of bytes representing csv file data of workspaces
    v2EnabledStatusInScope:
      type: string
      enum:
        - ENTITY_ENABLED
        - ENTITY_DISABLED
        - ENTITY_BOTH_ENABLED_DISABLED
      default: ENTITY_ENABLED
      description: |-
        - ENTITY_ENABLED: Entity is enabled
         - ENTITY_DISABLED: Entity is disabled
         - ENTITY_BOTH_ENABLED_DISABLED: Entity either enabled or disabled
      title: This enum represents the search of Enabled/Disabled/Both for a entity's scope
    v2ErrorLineAndMessages:
      type: object
      properties:
        line:
          type: integer
          format: int32
          title: line number of error
        message:
          type: string
          title: message describing the error
    v2File:
      type: object
      properties:
        content:
          type: string
          format: byte
      description: This protobuf message represents any file through an array of bytes.
    v2HierarchyNodeSpecificFilter:
      type: object
      properties:
        isHierarchyNode:
          type: boolean
      title: Controls Retail Operating Model "Hierarchy Node" specific filter null or empty or value
    v2ImportWorkspacesFromCsvRequest:
      type: object
      properties:
        tenantId:
          type: string
          title: 'tenant_id of the bulk upload workspaces. Required: false'
        ignoreHeader:
          type: boolean
          title: 'Set if the header row of the CSV file I''m uploading must be ignored. Required: false, default value "false"'
        replaceExisting:
          type: boolean
          title: 'If true, all existing workspaces for the tenant are deleted. Required: false, default value "false"'
        file:
          $ref: '#/components/schemas/v2File'
    v2ImportWorkspacesFromCsvResponse:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/v2WorkspaceStatus'
        created:
          type: integer
          format: int32
          title: number of workspace created
        updated:
          type: integer
          format: int32
          title: number of workspace updated
        deleted:
          type: integer
          format: int32
          title: number of workspace deleted
        errors:
          type: array
          items:
            $ref: '#/components/schemas/v2ErrorLineAndMessages'
          title: errors
    v2ListWorkspaceRolesResponse:
      type: object
      properties:
        roles:
          type: array
          items:
            $ref: '#/components/schemas/v2MinimalRoleResponse'
        inheritedRoles:
          type: array
          items:
            $ref: '#/components/schemas/v2MinimalRoleResponse'
    v2ListWorkspaceThingsResponse:
      type: object
      properties:
        things:
          type: array
          items:
            $ref: '#/components/schemas/v2ThingProto'
          title: List of things
    v2ListWorkspaceTypesResponse:
      type: object
      properties:
        workspaceTypes:
          type: array
          items:
            type: string
    v2ListWorkspacesByThingResponse:
      type: object
      properties:
        workspaces:
          type: array
          items:
            $ref: '#/components/schemas/v2WorkspaceProto'
          title: List of workspaces that contain the thing
    v2ListWorkspacesResponse:
      type: object
      properties:
        workspaces:
          type: array
          items:
            $ref: '#/components/schemas/v2WorkspaceProto'
          title: List of workspaces found
        nextPageToken:
          type: string
          title: Next page token
    v2ListWorkspacesWithFiltersRequest:
      type: object
      properties:
        genericFilter:
          type: string
          title: |-
            Generic filter for workspaces fields (name, parent, displayName)
            If it contains a whitespace, it splits the text and filter by both words. Required: false
        tenantId:
          type: array
          items:
            type: string
          title: 'List of Tenants of the workspaces. Required: false'
        pageSize:
          type: integer
          format: int32
          title: 'Items per page. Required: false'
        pageToken:
          type: string
          title: 'Mongo DB Field, describes the encoded page token for page traversal, Required: false'
        sortField:
          type: string
          title: 'sort field valid values: name, workspaceType, parent, displayName, lastUpdated. Default: name, Required: false'
        sortType:
          $ref: '#/components/schemas/commonsSortType'
        includeUsers:
          type: boolean
          title: 'Whether to include list of users who belong to the workspace. Required : false'
        workspaceType:
          type: string
          title: 'WorkspaceType filter. Required : false'
        domain:
          type: string
          title: 'Domain of the workspace (example: zpa, reflexis, wfc, etc), Required: false'
        scope:
          type: string
          title: 'scope of the workspace , Required: false'
        specificSearchFilter:
          $ref: '#/components/schemas/v2WorkspaceSpecificSearchFilter'
        startsWithSingleCharacter:
          type: boolean
          title: 'Ability to search for a single starts with character, only applicable to specific_filter: display_name, Required: false, Default: false'
        excludeTenantIds:
          type: array
          items:
            type: string
          title: 'List of tenant IDs to exclude. Required: false'
        statusInScope:
          $ref: '#/components/schemas/v2EnabledStatusInScope'
    v2MinimalRoleResponse:
      type: object
      properties:
        tenantId:
          type: string
          title: The id of the tenant
        domain:
          type: string
          title: 'The platform domain (example: zpa, reflexis, wfc)'
        scope:
          type: string
          description: Some more general scoping for the data (like a particular app in the domain).
        roleId:
          type: string
          title: Role id
        description:
          type: string
          description: Role description.
      title: The role data model, fewer fields
    v2NameValueThing:
      type: object
      properties:
        name:
          type: string
          title: Name of the thing
        value:
          type: string
          title: Value of the thing
    v2NestedWorkspaceProto:
      type: object
      properties:
        name:
          type: string
          title: Name of the workspace
        parent:
          type: string
          description: Name of the parent of the workspace. Empty if root workspace.
        workspaceType:
          type: string
          title: Workspace type of the workspace
        tenantId:
          type: string
          title: Tenant of the workspace
        ancestors:
          type: array
          items:
            type: string
          title: Ancestor list
        descendants:
          type: object
          title: There is no support for map<string, object> so we use `Struct` to represent an arbitrary structure
        displayName:
          type: string
          title: Friendly display name
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/v2WorkspaceAttributeProto'
          title: 'Workspace specific attributes, Required: false'
        users:
          type: array
          items:
            $ref: '#/components/schemas/v2UniqueUserProto'
          title: users list
      title: A workspace with the descendants as a nested structure
    v2ParentSpecificFilter:
      type: object
      properties:
        parent:
          type: string
      title: Controls parent specific filter null or empty or value
    v2SearchWorkspaceByTextSearchResponse:
      type: object
      properties:
        workspaces:
          type: array
          items:
            $ref: '#/components/schemas/v2WorkspaceProtoForTextSearchResponse'
          title: List of workspaces found
        nextPageToken:
          type: string
          title: Next page token
    v2ThingProto:
      type: object
      properties:
        name:
          type: string
          title: Name of the thing
        value:
          type: string
          title: Value of the thing
        type:
          type: string
          title: Type of the thing
    v2UniqueRoleProto:
      type: object
      properties:
        tenantId:
          type: string
          description: 'The ID of the tenant. Required: false. Defaults to the tenant of the user making the call.'
        domain:
          type: string
          description: |-
            The platform domain. Required: true. (e.g. ZPA, Reflexis, WFC)
            Defaults to the domain in the request.
        scope:
          type: string
          description: 'Some more general scoping for the data (like a particular app in the domain). Required: false.'
        roleId:
          type: string
          description: 'The role ID. Required: true.'
        userIds:
          type: array
          items:
            type: string
          title: 'The User Ids for the Unique Role Proto, Required: false'
    v2UniqueUserProto:
      type: object
      properties:
        tenantId:
          type: string
          description: 'The ID of the tenant. Required: false. Defaults to the tenant of the user making the call.'
        userId:
          type: string
          description: 'The user ID. Required: true.'
        firstName:
          type: string
          description: 'The first name. Required: false.'
        lastName:
          type: string
          description: 'The last name. Required: false.'
    v2UpdateWorkspaceRequest:
      type: object
      properties:
        workspaceName:
          type: string
          title: 'Name of the workspace. Required: true'
        workspaceType:
          type: string
          title: 'The Workspace type of the workspace. Required: true'
        tenantId:
          type: string
          title: 'Tenant of the workspace. Required: false'
        newParent:
          type: string
          title: 'New parent for this workspace. Required: false'
        displayName:
          type: string
          title: 'A friendly display name. Required: false'
        attributesWrapper:
          $ref: '#/components/schemas/v2AttributeWrapper'
        updateScopeOption:
          $ref: '#/components/schemas/v2UpdateWorkspaceScope'
        updateFieldMask:
          type: string
          title: |-
            FieldMask to control what fields are to be updated, Required: false
            Valid path names (display_name, parent, attributes, scopes, description) as related to WorkspaceProto
        description:
          type: string
          title: 'Updated workspace description, Required: false'
        expiration:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/typeDate'
          title: 'Scopes and expiration dates, Required: false'
    v2UpdateWorkspaceScope:
      type: object
      properties:
        scopes:
          type: object
          additionalProperties:
            type: boolean
          title: 'Scope names and enabled status, Required: false'
        autoRemoveUsers:
          type: boolean
          title: 'Option to remove the workspace from related users upon disabling, Required: false, Default: false'
    v2UpdateWorkspacesRequest:
      type: object
      properties:
        workspaces:
          type: array
          items:
            $ref: '#/components/schemas/v2UpdateWorkspaceRequest'
          title: List of workspaces to update
        rollback:
          type: boolean
          title: Whether to rollback any workspace change if there is an error
    v2WorkspaceAttributeProto:
      type: object
      properties:
        scope:
          type: string
          title: 'General scoping for workspace attribute. Required: false'
        fieldName:
          type: string
          title: 'Name of the attribute. Required: true'
        value:
          type: string
          title: 'Value of the attribute. Required: false'
        domain:
          type: string
          title: 'Domain of the attribute. Required : false'
    v2WorkspaceProto:
      type: object
      properties:
        name:
          type: string
          title: Name of the workspace
        parent:
          type: string
          description: Name of the parent of the workspace. Empty if root workspace.
        workspaceType:
          type: string
          title: Workspace type of the workspace
        tenantId:
          type: string
          title: Tenant of the workspace
        ancestors:
          type: array
          items:
            type: string
          title: Ancestor list
        descendants:
          type: array
          items:
            type: string
          title: Flattened list of descendants
        displayName:
          type: string
          title: Friendly display name
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/v2WorkspaceAttributeProto'
          title: 'Workspace specific attributes, Required: false'
        users:
          type: array
          items:
            $ref: '#/components/schemas/v2UniqueUserProto'
          title: list of users who belong to the workspace
        enabledScopes:
          type: object
          additionalProperties:
            type: boolean
          title: 'Scopes and status (enable, disable) for a workspace. Scope is optional. Typically applications will always pass their scope, but it is optional for admin purposes, Default: empty'
        creationTime:
          type: string
          format: date-time
          title: Time of creation of workspace entity
        domain:
          type: string
          title: Workspace domain
        lastUpdated:
          type: string
          format: date-time
          title: Time of most recent update to the workspace entity
        description:
          type: string
          title: Workspace free form description
        expiration:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/typeDate'
          title: Scopes and expiration dates
    v2WorkspaceProtoForTextSearchResponse:
      type: object
      properties:
        name:
          type: string
          title: Name of the workspace
        displayName:
          type: string
          title: Friendly display name
        description:
          type: string
          title: Workspace free form description
        tenantId:
          type: string
          title: Tenant of the workspace
        domain:
          type: string
          title: Domain
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/v2WorkspaceAttributeProto'
          title: Workspace specific attributes
        enabledScopes:
          type: object
          additionalProperties:
            type: boolean
          title: Scopes and status (enable, disable)
    v2WorkspaceResponse:
      type: object
      properties:
        workspace:
          $ref: '#/components/schemas/v2WorkspaceProto'
    v2WorkspaceRoleProto:
      type: object
      properties:
        name:
          type: string
          title: Name of the workspace
        parent:
          type: string
          description: Name of the parent of the workspace. Empty if root workspace.
        workspaceType:
          type: string
          title: Workspace type of the workspace
        tenantId:
          type: string
          title: Tenant of the workspace
        ancestors:
          type: array
          items:
            type: string
          title: Ancestor list
        descendants:
          type: array
          items:
            type: string
          title: Flattened list of descendants
        displayName:
          type: string
          title: Friendly display name
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/v2WorkspaceAttributeProto'
          title: 'Workspace specific attributes, Required: false'
        roles:
          type: array
          items:
            $ref: '#/components/schemas/v2UniqueRoleProto'
          title: list of roles that belong to the workspace
        enabledScopes:
          type: object
          additionalProperties:
            type: boolean
          title: 'Scopes and status (enable, disable) for a workspace. Scope is optional. Typically applications will always pass their scope, but it is optional for admin purposes, Default: empty'
        creationTime:
          type: string
          format: date-time
          title: Time of creation of workspace entity
        domain:
          type: string
          title: Workspace domain
        lastUpdated:
          type: string
          format: date-time
          title: Time of most recent update to the workspace entity
        description:
          type: string
          title: Workspace free form description
    v2WorkspaceRoleResponse:
      type: object
      properties:
        workspace:
          $ref: '#/components/schemas/v2WorkspaceRoleProto'
    v2WorkspaceSpecificFilter:
      type: object
      properties:
        displayName:
          type: string
          title: Only non blank
        parentSpecificFilter:
          $ref: '#/components/schemas/v2ParentSpecificFilter'
        hierarchyNodeSpecificFilter:
          $ref: '#/components/schemas/v2HierarchyNodeSpecificFilter'
      title: 'This will create and AND criteria on the specific fields for any of the values. Required: false'
    v2WorkspaceSpecificSearchByTextFilter:
      type: object
      properties:
        workspaceAttribute:
          $ref: '#/components/schemas/v2WorkspaceAttributeProto'
    v2WorkspaceSpecificSearchFilter:
      type: object
      properties:
        displayName:
          type: string
          title: displayName of the workspace you wish to search for
        workspaceAttributes:
          type: array
          items:
            $ref: '#/components/schemas/v2WorkspaceAttributeProto'
          title: |-
            Optional - workspace-attributes of the user to search
            As per http, fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type.
            Sending repeated message as part of the GET API does not work. Thus used in the POST API
        parentSpecificFilter:
          $ref: '#/components/schemas/v2ParentSpecificFilter'
        hierarchyNodeSpecificFilter:
          $ref: '#/components/schemas/v2HierarchyNodeSpecificFilter'
      title: 'This will create and AND criteria on the specific fields for any of the non-blank values. Required: false'
    v2WorkspaceStatus:
      type: string
      enum:
        - WORKSPACE_IMPORT_PENDING
        - WORKSPACE_IMPORT_IN_PROGRESS
        - WORKSPACE_IMPORT_SUCCESS
        - WORKSPACE_IMPORT_FAILED
        - WORKSPACE_IMPORT_SUCCESS_WITH_ERRORS
      default: WORKSPACE_IMPORT_PENDING
      description: |-
        - WORKSPACE_IMPORT_PENDING: The file upload is pending. Default option.
         - WORKSPACE_IMPORT_IN_PROGRESS: The file is being uploaded.
         - WORKSPACE_IMPORT_SUCCESS: The file was successfully uploaded.
         - WORKSPACE_IMPORT_FAILED: The file upload failed.
         - WORKSPACE_IMPORT_SUCCESS_WITH_ERRORS: At least one workspace was successfully uploaded, but others had errors
      title: This enum represents the current status of a template bulk workspace upload
    googleRpcStatus:
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/protobufAny'
  securitySchemes:
    Authorization:
      type: apiKey
      description: Bearer token
      name: Authorization
      in: header
