openapi: 3.0.3
info:
  version: "3"
  title: SAS Clinical Acceleration Repository
  description: >
    The SAS Clinical Acceleration Repository API provides the necessary endpoints for managing the clinical repository.
  termsOfService: https://www.sas.com/en_us/legal/copyright.html
  contact:
    name: SAS Developers
    url: https://developer.sas.com
    email: devex@sas.com
servers:
  - url: https://example.com/clinicalRepository
    description: kubernetes mock server
tags:
  - name: Root
    description: The operations for the root resource.
  - name: Audit
    description: The operations for audit history.
  - name: Repository
    description: The operations for repository management.
  - name: Types
    description: The operations for types.
  - name: Membership
    description: The operations for managing context membership.
  - name: Roles
    description: The operations for managing roles.
  - name: Groups
    description: The operations for managing groups.
  - name: Workspace
    description: The operations for managing the current user workspace.
  - name: Clinical Workflow
    description: The operations for managing clinical workflows.
paths:
  /:
    get:
      tags:
        - Root
      summary: Get the links for the API
      description: Returns the links to the top-level resources for the API.
      operationId: root
      responses:
        "200":
          description: The request succeeded.
          headers:
            Content-Type:
              schema:
                type: string
              description: Describes the representation of the collection response.
          content:
            application/vnd.sas.api+json:
              schema:
                $ref: "#/components/schemas/api"
              examples:
                json:
                  $ref: "#/components/examples/apiResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/api"
              examples:
                json:
                  $ref: "#/components/examples/apiResponse"
        "404":
          description: The service is not available.
    head:
      tags:
        - Root
      summary: Get the headers for the API
      description: >
        Returns the headers for the API. Also determines whether the service provided by the API is available.
      operationId: headersForRoot
      responses:
        "200":
          description: The service is running.
          headers:
            Content-Type:
              schema:
                type: string
        "404":
          description: The service is not available.
  /audit/entries:
    get:
      tags:
        - Audit
      summary: Get the collection of audit entries
      description: >
        Returns a collection of audit entries. The default sort is timestamp:ascending:primary. Requires administrative privileges.
      operationId: getAuditEntries
      parameters:
        - $ref: "#/components/parameters/startParam"
        - $ref: "#/components/parameters/limitParam"
        - $ref: "#/components/parameters/auditFilterParam"
        - $ref: "#/components/parameters/auditSortByParam"
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/components/schemas/auditEntryCollection"
              examples:
                json:
                  $ref: "#/components/schemas/auditEntryCollection/example"
            application/json:
              schema:
                $ref: "#/components/schemas/auditEntryCollection"
              examples:
                json:
                  $ref: "#/components/schemas/auditEntryCollection/example"
  "/audit/entries/{entryId}":
    get:
      tags:
        - Audit
      summary: Get the specified audit entry
      description: >
        Returns the specified audit entry. Requires administrative privileges.
      operationId: getAuditEntry
      parameters:
        - name: entryId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier for the audit entry.
          example: d6eefec9-dcc2-4574-8af8-69897038d9c5
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.clinical.audit.entry:
              schema:
                $ref: "#/components/schemas/auditEntry"
              examples:
                json:
                  $ref: "#/components/schemas/auditEntry/example"
            application/json:
              schema:
                $ref: "#/components/schemas/auditEntry"
              examples:
                json:
                  $ref: "#/components/schemas/auditEntry/example"
        "404":
          description: The request did not find the specified audit entry.
    head:
      tags:
        - Audit
      summary: Determines whether the specified audit entry exists
      description: >
        Checks whether the specified audit entry exists. Requires administrative privileges.
      operationId: headersForAuditEntry
      parameters:
        - name: entryId
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier for the audit entry.
          example: d6eefec9-dcc2-4574-8af8-69897038d9c5
      responses:
        "200":
          description: The request succeeded; the audit entry exists.
        "404":
          description: The request did not find the specified audit entry.
  /audit/actions:
    get:
      tags:
        - Audit
      summary: Get the collection of audit actions
      description: >
        Returns a collection of audit actions. The default sort is action:ascending:primary. Requires administrative privileges. This collection supports only basic filtering. In addition, only a single sort is supported, and sort strength is ignored.
      operationId: getAuditActions
      parameters:
        - name: typeIdFilter
          in: query
          description: >
            Filter criteria for the action type ID. Audit Actions supports basic filtering only. See [Filtering in REST APIs](https://developer.sas.com/apis/rest/Topics/#filters).
          schema:
            type: string
          example: folder
        - name: actionFilter
          in: query
          description: >
            Filter criteria for the action name. Audit Actions supports basic filtering only. See [Filtering in REST APIs](https://developer.sas.com/apis/rest/Topics/#filters).
          schema:
            type: string
          example: deleted
        - name: displayNameFilter
          in: query
          description: >
            Filter criteria for the action display name. Audit Actions supports basic filtering only. See [Filtering in REST APIs](https://developer.sas.com/apis/rest/Topics/#filters).
          schema:
            type: string
          example: Deleted
        - $ref: "#/components/parameters/startParam"
        - $ref: "#/components/parameters/limitParam"
        - $ref: "#/components/parameters/auditActionSortByParam"
      responses:
        "200":
          description: OK.
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/components/schemas/auditActionCollection"
              examples:
                json:
                  $ref: "#/components/schemas/auditActionCollection/example"
            application/json:
              schema:
                $ref: "#/components/schemas/auditActionCollection"
              examples:
                json:
                  $ref: "#/components/schemas/auditActionCollection/example"
  /repository/files/content:
    get:
      tags:
        - Repository
      summary: Download repository content by filter as a ZIP file
      description: >
        Downloads repository content that satisfies the filter as a ZIP file and returns the stream on the response body.         <p><b>Authorization:</b>  Requires read permission on all files and containers to be included in the ZIP file.
      operationId: getContentsByFilter
      parameters:
        - $ref: "#/components/parameters/filterParam"
      responses:
        "200":
          description: Content downloaded.
        "400":
          description: Bad request. Invalid filter.
    post:
      tags:
        - Repository
      summary: Download repository content by search as a zip file
      description: >
        Downloads repository content as a ZIP file based on search criteria, including filter or file content search text, and returns the stream on the response body.        <p> Optionally, an action status ID can be provided to monitor the completion status.  To get the action status ID, first call [batchUpdate](#operationId:batchUpdate) with the action DOWNLOAD_BY_FILTER, which returns the action status ID on the request header.  <p><b>Authorization:</b>  Requires read permission on all files and containers to be included in the ZIP file.
      operationId: getContentsBySearch
      requestBody:
        description: >
          The repository search specification for download.
        content:
          application/vnd.sas.clinical.search:
            schema:
              $ref: "#/components/schemas/contentSearchByBody"
            examples:
              json:
                $ref: "#/components/schemas/contentSearchByBody/example"
          application/json:
            schema:
              $ref: "#/components/schemas/contentSearchByBody"
            examples:
              json:
                $ref: "#/components/schemas/contentSearchByBody/example"
      responses:
        "200":
          description: Content downloaded.
        "400":
          description: Bad request. Invalid filter or file content search text.
  /repository/items:
    get:
      tags:
        - Repository
      summary: Get the collection of repository items including contexts, folders and files
      description: >
        Returns the collection of repository items by query. <p><b>Authorization:</b>  Requires read permission on all items that are returned.
      operationId: getRepositoryItems
      parameters:
        - $ref: "#/components/parameters/startParam"
        - $ref: "#/components/parameters/limitParam"
        - name: filter
          in: query
          description: >
            Filter criteria for items. The following fields are not supported in filter criteria: children, contentType,  and digest. See [Filtering in REST APIs](https://developer.sas.com/apis/rest/Topics/#filters).
          schema:
            type: string
            format: filter-criteria
            example: eq(name,'reports')
        - name: sortBy
          in: query
          description: >
            Sorts the returned items. The following fields are not supported for sort: children, contentType, and digest. See [Sorting in REST APIs](https://developer.sas.com/apis/rest/Topics/#sorting).
          schema:
            type: string
            format: sort-criteria
            example: name:ascending:primary
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.clinical.limited.collection:
              schema:
                $ref: "#/components/schemas/repositoryItemLimitedCollection"
              examples:
                json:
                  $ref: "#/components/schemas/repositoryItemLimitedCollection/example"
            application/json:
              schema:
                $ref: "#/components/schemas/repositoryItemLimitedCollection"
              examples:
                json:
                  $ref: "#/components/schemas/repositoryItemLimitedCollection/example"
  "/repository/items/{itemId}":
    get:
      tags:
        - Repository
      summary: Get the specified repository item
      description: >
        Returns the specified repository item. <p><b>Authorization:</b>  Requires read permission.
      operationId: getRepositoryItem
      parameters:
        - $ref: "#/components/parameters/itemIdPathParameter"
      responses:
        "200":
          description: OK
          headers:
            ETag:
              $ref: "#/components/headers/Etag"
            Last-Modified:
              $ref: "#/components/headers/Last-Modified"
          content:
            application/vnd.sas.clinical.repository.item:
              schema:
                $ref: "#/components/schemas/repositoryItem"
              examples:
                repositoryContext:
                  $ref: "#/components/examples/repositoryContext"
                repositoryFolder:
                  $ref: "#/components/examples/repositoryFolder"
                repositoryFile:
                  $ref: "#/components/examples/repositoryFile"
            application/json:
              schema:
                $ref: "#/components/schemas/repositoryItem"
              examples:
                repositoryContext:
                  $ref: "#/components/examples/repositoryContext"
                repositoryFolder:
                  $ref: "#/components/examples/repositoryFolder"
                repositoryFile:
                  $ref: "#/components/examples/repositoryFile"
        "404":
          description: Not found - the repository item could not be found.
    head:
      tags:
        - Repository
      summary: Determine whether the specified repository item exists
      description: >
        Checks whether the specified repository item exists. <p><b>Authorization:</b>  Requires read permission.
      operationId: headersForRepositoryItem
      parameters:
        - $ref: "#/components/parameters/itemIdPathParameter"
      responses:
        "200":
          description: OK - the repository item exists.
          headers:
            ETag:
              $ref: "#/components/headers/Etag"
            Last-Modified:
              $ref: "#/components/headers/Last-Modified"
        "404":
          description: Not found - the repository item could not be found.
    patch:
      tags:
        - Repository
      summary: Update the attributes of a repository item
      description: >
        Updates the editable attributes of this repository item.  <p><b>Authorization:</b>  Requires read and write permissions.
      operationId: patchRepositoryItem
      parameters:
        - $ref: "#/components/parameters/itemIdPathParameter"
        - $ref: "#/components/parameters/ifMatchHeader"
      requestBody:
        required: true
        description: The attributes on the repository item to update.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/repositoryItemPatchRequestBody"
            examples:
              json:
                $ref: "#/components/schemas/repositoryItemPatchRequestBody/example"
      responses:
        "200":
          description: OK - the repository item was updated.
          headers:
            ETag:
              $ref: "#/components/headers/Etag"
            Last-Modified:
              $ref: "#/components/headers/Last-Modified"
          content:
            application/vnd.sas.clinical.repository.item:
              schema:
                $ref: "#/components/schemas/repositoryItem"
              examples:
                json:
                  $ref: "#/components/schemas/repositoryItem/example"
            application/json:
              schema:
                $ref: "#/components/schemas/repositoryItem"
              examples:
                json:
                  $ref: "#/components/schemas/repositoryItem/example"
        "400":
          description: Bad Request
        "404":
          description: Not found - the repository item could not be found.
        "412":
          description: The ETag provided does not match the current resource.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                json:
                  $ref: "#/components/examples/preConditionFailedResponse"
        "428":
          description: The request headers did not include a `If-Match` precondition.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                json:
                  $ref: "#/components/examples/noIfMatchHeader"
    delete:
      tags:
        - Repository
      summary: Delete a repository item
      description: >
        Deletes a repository item.  By default, the item is moved to the recycle bin. If the permanent parameter value is set to true, the item is permanently deleted.  <p> Note: Contexts are always permanently deleted so the permanent parameter is ignored if the item is a context.   <p><b>Authorization:</b>  Requires read and write permission on the parent  container as well as read and delete permission on the item.
      operationId: deleteRepositoryItem
      parameters:
        - $ref: "#/components/parameters/itemIdPathParameter"
        - name: permanent
          in: query
          schema:
            type: boolean
          required: false
          description: >
            Determines whether the deletion should be permanent or logical.  Permanent deletion is unrecoverable; logical deletion moves the deleted item to the recycle bin where it can either be recovered or permanently deleted later.
      responses:
        "204":
          description: The repository item was deleted.
  "/repository/items/{itemId}/children":
    get:
      tags:
        - Repository
      summary: Get the children of the specified repository item
      description: >
        Returns the children of the specified repository item. <p><b>Authorization:</b>  Requires read permission on the parent and children.
      operationId: getRepositoryChildrenByParent
      parameters:
        - $ref: "#/components/parameters/itemIdPathParameter"
        - name: recurse
          in: query
          schema:
            type: boolean
          required: false
          description: When true, items are returned for the specified itemId and all subfolders. Default is false.
        - name: includeSynchronizationInfo
          in: query
          schema:
            type: boolean
          required: false
          description: >
            Whether to include synchronization information for files that are returned. Default is false.
        - $ref: "#/components/parameters/startParam"
        - $ref: "#/components/parameters/limitParam"
        - $ref: "#/components/parameters/repositoryItemFilterParam"
        - $ref: "#/components/parameters/repositoryItemSortByParam"
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/components/schemas/repositoryChildrenCollection"
              examples:
                json:
                  $ref: "#/components/schemas/repositoryChildrenCollection/example"
            application/json:
              schema:
                $ref: "#/components/schemas/repositoryChildrenCollection"
              examples:
                json:
                  $ref: "#/components/schemas/repositoryChildrenCollection/example"
        "404":
          description: Not found - the repository parent item could not be found.
    head:
      tags:
        - Repository
      summary: Determine whether the specified repository item has children
      description: >
        Checks whether the specified repository item has children. <p><b>Authorization:</b>  Requires read permission on the parent and children.
      operationId: headersForChildren
      parameters:
        - $ref: "#/components/parameters/itemIdPathParameter"
        - name: recurse
          in: query
          schema:
            type: boolean
          required: false
          description: When true, items are returned for the specified itemId and all subfolders. Default is false.
        - name: includeSynchronizationInfo
          in: query
          schema:
            type: boolean
          required: false
          description: >
            Whether to include synchronization information for files that are returned. Default is false.
        - $ref: "#/components/parameters/startParam"
        - $ref: "#/components/parameters/limitParam"
        - $ref: "#/components/parameters/repositoryItemFilterParam"
        - $ref: "#/components/parameters/repositoryItemSortByParam"
      responses:
        "200":
          description: OK - the repository item has children.
        "404":
          description: Not found - the repository item does not have children.
    post:
      tags:
        - Repository
      summary: Create a new repository container
      description: >
        Create a new repository context or folder.
      operationId: createRepositoryItem
      parameters:
        - name: itemId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the repository location in which to create the item.
          example: d6eefec9-dcc2-4574-8af8-69897038d9c5
        - name: name
          in: query
          description: >
            The name of the new item to be created.
          required: true
          schema:
            type: string
          example: MyProject
        - name: type
          in: query
          description: >
            The primary type of the new item to be created.
          required: true
          schema:
            type: string
            enum:
              - CONTEXT
              - FOLDER
        - name: typeId
          in: query
          description: >
            The type identifier of the context to be created.  This parameter is required when a context is being created. For folder primary types this parameter will be ignored.
          required: false
          schema:
            type: string
          example: project
        - name: owner
          in: query
          description: >
            The owner to set for the newly created context.  By default, the default permission's owner is used to  set the new owner. However, this behavior can be overwritten by explicitly setting the owner with this parameter. This can be set only for contexts, this parameter is ignored when creating folders.
          required: false
          schema:
            type: string
          example: sastest
        - name: description
          in: query
          description: >
            The description for the newly created item.
          required: false
          schema:
            type: string
          example: Project for ad hoc reporting.
      responses:
        "201":
          description: Created - the repository item was created successfully.
          headers:
            ETag:
              $ref: "#/components/headers/Etag"
            Last-Modified:
              $ref: "#/components/headers/Last-Modified"
          content:
            application/vnd.sas.clinical.repository.container:
              schema:
                $ref: "#/components/schemas/repositoryContainer"
              examples:
                json:
                  $ref: "#/components/schemas/repositoryContainer/example"
            application/json:
              schema:
                $ref: "#/components/schemas/repositoryContainer"
              examples:
                json:
                  $ref: "#/components/schemas/repositoryContainer/example"
        "400":
          description: Bad Request
        "404":
          description: A repository item with the specified identifier could not be found.
        "409":
          description: A repository item with the same name already exists at the specified location.
  "/repository/items/{itemId}/content":
    post:
      tags:
        - Repository
      summary: Download repository content
      description: >
        Downloads repository content and returns the stream on the response body.        <p> If the itemId is for a file, the latest file content is downloaded by default. To download the content of a specific version, see [getRepositoryFileContentByIdAndVersion](#operationId:getRepositoryFileContentByIdAndVersion) operation. <p> If the itemId is for a container, the container and all of its children are downloaded to a ZIP file.  Multiple items in the container can be downloaded to a ZIP file by providing the item names on the request body.      
         <p>
         Optionally, an action status ID can be provided to monitor the completion
        status. 
         To get the action status ID, first call [batchUpdate](#operationId:batchUpdate)
        with the action DOWNLOAD, which returns the action status ID on the request header.  <p><b>Authorization:</b>  Requires read permission on the file for file downloads. Requires read permission on the container and children for container downloads.
      operationId: getRepositoryItemContent
      parameters:
        - $ref: "#/components/parameters/itemIdPathParameter"
        - name: actionStatusId
          in: query
          description: >
            The action status ID if monitoring the completion status. The action status ID is obtained by calling batchUpdate with the action DOWNLOAD.
          required: false
          schema:
            type: string
          example: z31efec9-dcc2-4574-8af8-69897038d9c6
      requestBody:
        required: false
        description: >
          A collection of strings that includes the names of items in the container specified to download to a ZIP file. File and container names can be specified. The request body is ignored, if the itemId for to a file.
        content:
          application/json:
            schema:
              type: array
            example:
              - file1.sas
              - file2.txt
              - folder1
      responses:
        "200":
          description: Content downloaded.
        "404":
          description: Not found - the repository item could not be found.
    put:
      tags:
        - Repository
      summary: Upload repository content
      description: >
        Uploads a single file to create a new file or updates the content of an existing file. You can also upload and expand a ZIP file to a container.
           <p>
        If the itemId is for a file, the content of the file is updated. If the file is versioned, a new version is added. Otherwise, the content is overwritten.

         <p>
        If the itemId is for a container, a single file can be uploaded or uploaded and expanded if the upload file is a ZIP file.     
         <p>
        When uploading a file to a container, if a name is not provided, the API will attempt to use the name of the file on the multipart request.  If a file does not exist with that name, the file is created. By default, the file is created unversioned.   Optionally, version information can be specified to create the file as versioned. If a file with that name exists,  a new version is added if the file is versioned; otherwise, the content is overwritten. When upload and expanding, the same rules apply to files and any folders that do not exist are created.

        <p>
         Optionally, an action status ID can be provided to monitor the completion
        status. 
              To get the action status ID, first call [batchUpdate](#operationId:batchUpdate)
        with the action UPLOAD or UPLOAD_EXPAND, which returns the action status ID on the request header. <p><b>Authorization:</b>  Requires write permission on any upload locations. If versioning is specified, the Enable Versioning and/or Manage Versioning privilege is required when creating files.
      operationId: putRepositoryItemContent
      parameters:
        - $ref: "#/components/parameters/itemIdPathParameter"
        - name: name
          in: query
          description: >
            The name of the file to be created or updated.
          schema:
            type: string
          example: testFile.txt
        - name: fileVersion
          in: query
          description: >
            The version specification for creating a version of the file. This parameter is not required,  so unless a version parameter value is provided, the file is created un-versioned. The valid values for  version are MAJOR, MINOR, or a specific version such as 2.3. If MAJOR, the file is created as versioned with  initial version 1.0. Similarly, MINOR creates a versioned file with version 0.1. If the file exists and is  versioned, new versions are MINOR versions by default. To specify a version other than MAJOR or MINOR, a value  can be specified between 0.1 and 99999.99999. If a context or folder is being created, this parameter is ignored.
          required: false
          schema:
            type: string
          example: MAJOR
        - name: enableVersioningOnNewFiles
          in: query
          schema:
            type: boolean
          required: false
          description: >
            Applies to upload and expand (when expand parameter value is true) only.  If true, new files are created as  versioned. If a fileVersion is specified, it versions according to that specification, otherwise it uses  a major (1.0) version. If a file with that name exists, a new version is added if the file is versioned;  otherwise, the content is overwritten. The default is false.
        - name: comment
          in: query
          description: >
            The file version comment for this newly created repository file.  If a context or folder is being created this  parameter will be ignored.
          required: false
          schema:
            type: string
          example: Final report version.
        - name: expand
          in: query
          schema:
            type: boolean
          required: false
          description: >
            Determines if the ZIP file on the request should be expanded when it is uploaded to the repository container. This parameter is ignored if the itemId is for a file.
          example: true
        - name: actionStatusId
          in: query
          description: >
            The action status ID for monitoring the completion status. The action status ID is obtained by calling batchUpdate with the action UPLOAD or UPLOAD_EXPAND.
          required: false
          schema:
            type: string
          example: z31efec9-dcc2-4574-8af8-69897038d9c6
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                filename:
                  description: The name of the file. Clients must specify name of the file as form data in the request body.
                  type: string
                file:
                  description: The actual file content. The content should be listed in the format of standard form data in the request body. Only one file is permitted in a multipart request.
                  type: string
                  format: binary
            examples:
              file:
                value:
                  filename: test_file.txt
                  file: file content to upload.
      responses:
        "200":
          description: Content was uploaded successfully.
          headers:
            ETag:
              $ref: "#/components/headers/Etag"
            Last-Modified:
              $ref: "#/components/headers/Last-Modified"
          content:
            application/vnd.sas.clinical.repository.item:
              schema:
                $ref: "#/components/schemas/repositoryItem"
              examples:
                json:
                  $ref: "#/components/schemas/repositoryItem/example"
            application/json:
              schema:
                $ref: "#/components/schemas/repositoryItem"
              examples:
                json:
                  $ref: "#/components/schemas/repositoryItem/example"
        "400":
          description: Bad Request
        "404":
          description: Not found - the repository item could not be found.
  /repository/paths:
    get:
      tags:
        - Repository
      summary: Returns the specified repository item by path
      description: >
        Get the specified repository item by path. <p><b>Authorization:</b>  Requires read permission.
      operationId: getRepositoryItemByPath
      parameters:
        - name: path
          in: query
          schema:
            type: string
          required: true
          description: The full path for the repository item.
          example: /org/project/reports
        - name: fileVersion
          in: query
          schema:
            type: string
          required: false
          description: >
            The version of the repository file to return if the path is to a versioned file.  If the path is  to a container or the file is unversioned, an error is returned.  If the file is versioned and no version is  specified then the latest version is returned.'
          example: "1.42"
        - name: itemId
          in: query
          schema:
            type: string
          required: false
          description: >
            The unique identifier of the item. 

            This property is not required. However, if provided, and the item exists based on the other parameters  provided, but the id of the server item does not match the id provided, a 404 error response will be returned.
          example: 2b489bdc-0ddd-4aa4-be19-567bb827aacb
        - name: digest
          in: query
          schema:
            type: string
          required: false
          description: >
            The hash value of a file based on the MD5 algorithm. This only applies to repository files.

            This property is not required. However, if provided, and the file exists on the server based on the other  parameters provided, but the digest of the server file does not match the digest provided, a 404 error response  will be returned.
          example: 0D9ADE3E0280E904037804556B299C13
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.clinical.repository.item:
              schema:
                $ref: "#/components/schemas/repositoryItem"
              examples:
                json:
                  $ref: "#/components/schemas/repositoryItem/example"
            application/json:
              schema:
                $ref: "#/components/schemas/repositoryItem"
              examples:
                json:
                  $ref: "#/components/schemas/repositoryItem/example"
        "404":
          description: Not found - the repository item could not be found.
  "/repository/items/{itemId}/permissions":
    get:
      tags:
        - Repository
      summary: Get the repository item permissions
      description: Returns the repository item permissions.
      operationId: getItemPermissions
      parameters:
        - name: itemId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the repository item.
        - name: current
          in: query
          schema:
            type: boolean
          required: false
          description: True (default) if retrieving current permissions; otherwise false.
      responses:
        "200":
          description: The request succeeded and the specified repository item permissions are returned.
          content:
            application/vnd.sas.clinical.permissions:
              schema:
                $ref: "#/components/schemas/permissions"
              examples:
                currentPermissions:
                  $ref: "#/components/examples/currentPermissions"
                defaultPermissions:
                  $ref: "#/components/examples/defaultPermissions"
            application/json:
              schema:
                $ref: "#/components/schemas/permissions"
              examples:
                currentPermissions:
                  $ref: "#/components/examples/currentPermissions"
                defaultPermissions:
                  $ref: "#/components/examples/defaultPermissions"
    head:
      tags:
        - Repository
      summary: Determine whether the specified repository item permissions exist
      description: Determines whether the specified repository item permissions exist.
      operationId: headersForPermissions
      parameters:
        - $ref: "#/components/parameters/itemIdPathParameter"
        - name: current
          in: query
          schema:
            type: boolean
          required: false
          description: True (default) if retrieving current permissions; otherwise false.
      responses:
        "200":
          description: The repository item permissions exist.
        "404":
          description: The request did not find the specified repository item permissions.
    patch:
      tags:
        - Repository
      summary: Update the repository item permissions
      description: Update the repository item permissions.
      operationId: patchItemPermissions
      parameters:
        - $ref: "#/components/parameters/itemIdPathParameter"
        - name: current
          in: query
          schema:
            type: boolean
          required: false
          description: True (default) if updating current permissions; otherwise false.
      requestBody:
        required: true
        description: The specification for permission list updates, additions and removals.
        content:
          application/vnd.sas.clinical.permissions.update:
            schema:
              $ref: "#/components/schemas/permissionsUpdate"
            examples:
              json:
                $ref: "#/components/schemas/permissionsUpdate/example"
          application/json:
            schema:
              $ref: "#/components/schemas/permissionsUpdate"
            examples:
              json:
                $ref: "#/components/schemas/permissionsUpdate/example"
      responses:
        "200":
          description: The request succeeded and the specified repository item permissions have been updated.
          content:
            application/vnd.sas.clinical.permissions:
              schema:
                $ref: "#/components/schemas/permissions"
              examples:
                currentPermissions:
                  $ref: "#/components/examples/currentPermissions"
                defaultPermissions:
                  $ref: "#/components/examples/defaultPermissions"
            application/json:
              schema:
                $ref: "#/components/schemas/permissions"
              examples:
                currentPermissions:
                  $ref: "#/components/examples/currentPermissions"
                defaultPermissions:
                  $ref: "#/components/examples/defaultPermissions"
        "400":
          description: Bad Request
  "/repository/items/{itemId}/owner":
    get:
      tags:
        - Repository
      summary: Get the repository item owner
      description: Returns the repository item owner.
      operationId: getItemOwner
      parameters:
        - $ref: "#/components/parameters/itemIdPathParameter"
        - name: current
          in: query
          schema:
            type: boolean
          required: false
          description: True (true) if retrieving the current owner; otherwise false.
      responses:
        "200":
          description: The request succeeded and the specified repository item owner is returned.
          content:
            application/vnd.sas.clinical.principal:
              schema:
                $ref: "#/components/schemas/principal"
              examples:
                json:
                  $ref: "#/components/schemas/principal/example"
            application/json:
              schema:
                $ref: "#/components/schemas/principal"
              examples:
                json:
                  $ref: "#/components/schemas/principal/example"
    head:
      tags:
        - Repository
      summary: Determine whether the specified repository item owner exists
      description: Determines whether the specified repository item owner exists.
      operationId: headersForOwner
      parameters:
        - $ref: "#/components/parameters/itemIdPathParameter"
        - name: current
          in: query
          schema:
            type: boolean
          required: false
          description: True (default) if checking the current owner; otherwise false.
      responses:
        "200":
          description: The repository item owner exists.
        "404":
          description: The request did not find the specified repository item owner.
    put:
      tags:
        - Repository
      summary: Update the repository item owner
      description: Update the repository item owner.
      operationId: updateItemOwner
      parameters:
        - $ref: "#/components/parameters/itemIdPathParameter"
        - name: ownerId
          in: query
          schema:
            type: string
          required: true
          description: The user ID of the new owner.
        - name: current
          in: query
          schema:
            type: boolean
          required: false
          description: True (default) if updating the current owner; otherwise, false.
      responses:
        "200":
          description: The request succeeded and the specified repository item owner has been updated.
          content:
            application/vnd.sas.clinical.principal:
              schema:
                $ref: "#/components/schemas/principal"
              examples:
                json:
                  $ref: "#/components/schemas/principal/example"
            application/json:
              schema:
                $ref: "#/components/schemas/principal"
              examples:
                json:
                  $ref: "#/components/schemas/principal/example"
        "400":
          description: Bad Request
  "/repository/items/{fileId}/versions":
    get:
      tags:
        - Repository
      summary: Get the list of versions attached to the fileId
      description: >
        Returns the version history for the specified file.
      operationId: getVersions
      parameters:
        - name: fileId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the file item.
          example: a76f30da-5662-4456-9689-7664de187395
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/components/schemas/repositoryFileVersionCollection"
              examples:
                getVersions:
                  $ref: "#/components/schemas/repositoryFileVersionCollection/example"
            application/json:
              schema:
                $ref: "#/components/schemas/repositoryFileVersionCollection"
              examples:
                json:
                  $ref: "#/components/schemas/repositoryFileVersionCollection/example"
  "/repository/items/{fileId}/versions/{fileVersion}":
    get:
      tags:
        - Repository
      summary: Get the specified version of the file with the matching ID
      description: >
        Returns the specified version of the specified file.
      operationId: getVersionByFileIdAndVersion
      parameters:
        - name: Accept
          in: header
          description: >
            The requested representation of the file version. Media type 'application/vnd.sas.clinical.version+json' is the default.
          required: false
          schema:
            type: string
            enum:
              - application/vnd.sas.clinical.version+json
              - application/vnd.sas.clinical.repository.file+json
              - application/json
        - name: fileId
          in: path
          schema:
            type: string
          required: true
          description: The ID of the specified repository file.
          example: b8cf3235-7bd8-4374-a4b2-650371f0311d
        - name: fileVersion
          in: path
          schema:
            type: string
          required: true
          description: The specified version of the file.
          example: "2.0"
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.clinical.version:
              schema:
                $ref: "#/components/schemas/repositoryFileVersion"
              examples:
                json:
                  $ref: "#/components/schemas/repositoryFileVersion/example"
            application/vnd.sas.clinical.repository.file:
              schema:
                $ref: "#/components/schemas/repositoryFile"
              examples:
                json:
                  $ref: "#/components/schemas/repositoryFile/example"
            application/json:
              schema:
                $ref: "#/components/schemas/repositoryFileVersion"
              examples:
                json:
                  $ref: "#/components/schemas/repositoryFileVersion/example"
  "/repository/items/{fileId}/versions/{fileVersion}/content":
    get:
      tags:
        - Repository
      summary: Download specific repository file version content
      description: >
        Downloads the content of a specific version of a repository file. The content is returned as a stream on the response body. 
         <p>
        Optionally, you can provide an action status ID to monitor the completion status.  To get the action status ID, first call [batchUpdate](#operationId:batchUpdate) with the action DOWNLOAD_VERSIONS, which returns the action status ID on the request header.

        <p><b>Authorization:</b>  Requires read permission on the file for file downloads. Requires read permission on the container and children for container downloads.
      operationId: getRepositoryFileContentByIdAndVersion
      parameters:
        - name: fileId
          in: path
          schema:
            type: string
          required: true
          description: The ID of the specified repository file.
          example: b8cf3235-7bd8-4374-a4b2-650371f0311d
        - name: fileVersion
          in: path
          schema:
            type: string
          required: true
          description: The specified version of the file.
          example: "2.0"
      responses:
        "200":
          description: File version content downloaded.
        "404":
          description: Not found - the repository file or version could not be found.
  "/memberships/{membershipId}":
    get:
      tags:
        - Membership
      summary: Get the membership of a repository item
      description: Returns the membership of a repository item.
      operationId: getMembership
      parameters:
        - name: membershipId
          in: path
          schema:
            type: string
          required: true
          description: >
            The unique identifier for the repository item for which to retrieve the membership. If this is a context with membership capability,  the members of the context are returned. If this is a file, folder, or non-membership context the members of the nearest membership context are returned.
      responses:
        "200":
          description: The request succeeded and the specified membership is returned.
          headers:
            ETag:
              $ref: "#/components/headers/Etag"
            Last-Modified:
              $ref: "#/components/headers/Last-Modified"
          content:
            application/vnd.sas.clinical.membership:
              schema:
                $ref: "#/components/schemas/membership"
              examples:
                membership:
                  $ref: "#/components/schemas/membership/example"
            application/json:
              schema:
                $ref: "#/components/schemas/membership"
              examples:
                membership:
                  $ref: "#/components/schemas/membership/example"
    head:
      tags:
        - Membership
      summary: Determine whether the specified context membership exists
      description: Determines whether the specified context membership exists.
      operationId: headersForMembership
      parameters:
        - name: membershipId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the repository item for which to check whether the membership exists.
      responses:
        "200":
          description: The repository item membership exists.
          headers:
            ETag:
              $ref: "#/components/headers/Etag"
            Last-Modified:
              $ref: "#/components/headers/Last-Modified"
        "404":
          description: The request did not find the specified repository item membership.
  "/memberships/{membershipId}/members":
    get:
      tags:
        - Membership
      summary: Get the members of the specified context
      description: Returns the members of the specified context, which includes assigned users and groups as well as groups explicitly created at the context.
      operationId: getContextMembers
      parameters:
        - name: membershipId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the context for which to retrieve the members.
        - name: assignedOnly
          in: query
          description: >
            Optionally, specify whether to get only assigned user and group members. By default, all members are returned. This  includes both assigned users and groups as well as groups created at the context. If true is specified, only assigned users and group members are returned. If false is specified, only groups created at the specified context are returned.
          required: false
          schema:
            type: boolean
        - $ref: "#/components/parameters/startParam"
        - $ref: "#/components/parameters/limitParam"
        - name: sortBy
          in: query
          description: >
            Sorts the returned items. See [Sorting in REST APIs](https://developer.sas.com/apis/rest/Topics/#sorting).
          schema:
            type: string
            format: sort-criteria
            example: name:ascending:primary
        - name: filter
          in: query
          description: >
            Filter criteria for items. See [Filtering in REST APIs](https://developer.sas.com/apis/rest/Topics/#filters).
          schema:
            type: string
            format: filter-criteria
          example: eq(name,'ACME')
      responses:
        "200":
          description: The request succeeded and the specified context members are returned.
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/components/schemas/membersCollection"
              examples:
                getAssignedMembers:
                  $ref: "#/components/schemas/membersCollection/example"
            application/json:
              schema:
                $ref: "#/components/schemas/membersCollection"
              examples:
                getAssignedMembers:
                  $ref: "#/components/schemas/membersCollection/example"
    patch:
      tags:
        - Membership
      summary: Add or remove members from a context
      description: Adds or removes members from a context.
      operationId: patchContextMembers
      parameters:
        - name: membershipId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the context for which to update the members.
        - name: action
          in: query
          required: true
          description: The membership update action to perform on the context.
          schema:
            type: string
            enum:
              - UPDATE_MEMBERS
              - REMOVE_MEMBERS_BY_FILTER
        - name: If-Match
          in: header
          description: The ETag that was returned from a GET, POST or PUT of a resource.
          required: true
          schema:
            type: string
          example: '"lgdxya1m"'
      requestBody:
        required: false
        description: The specification for context member additions or removals.
        content:
          application/vnd.sas.clinical.members.update:
            schema:
              $ref: "#/components/schemas/membersUpdate"
            examples:
              membersUpdate:
                $ref: "#/components/schemas/membersUpdate/example"
          text/plain:
            schema:
              description: >
                The filter to retrieve the members to remove. This applies only when the 'action' request parameter is 'REMOVE_MEMBERS_BY_FILTER'.
            example: eq(id,'johndoe')
          application/json:
            schema:
              $ref: "#/components/schemas/membersUpdate"
            examples:
              membersUpdate:
                $ref: "#/components/schemas/membersUpdate/example"
      responses:
        "200":
          description: The request succeeded and the specified context members were updated.
          headers:
            ETag:
              $ref: "#/components/headers/Etag"
            Last-Modified:
              $ref: "#/components/headers/Last-Modified"
          content:
            application/vnd.sas.clinical.membership:
              schema:
                $ref: "#/components/schemas/membership"
              examples:
                membership:
                  $ref: "#/components/schemas/membership/example"
            application/json:
              schema:
                $ref: "#/components/schemas/membership"
              examples:
                membership:
                  $ref: "#/components/schemas/membership/example"
        "400":
          description: Bad Request
        "412":
          description: Precondition failed
        "428":
          description: Precondition required
  "/memberships/{membershipId}/members/candidates":
    get:
      tags:
        - Membership
      summary: Get the users and groups that can be assigned to the membership of the specified context
      description: Returns the users and groups that can be assigned to the membership of the specified context.
      operationId: getContextCandidateMembers
      parameters:
        - name: membershipId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the context for which to retrieve the candidate members.
        - $ref: "#/components/parameters/startParam"
        - $ref: "#/components/parameters/limitParam"
        - $ref: "#/components/parameters/memberFilterByParam"
        - $ref: "#/components/parameters/memberSortByParam"
      responses:
        "200":
          description: The request succeeded and the specified context candidate members are returned.
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/components/schemas/candidateMembersCollection"
              examples:
                candidateMembers:
                  $ref: "#/components/schemas/candidateMembersCollection/example"
            application/json:
              schema:
                $ref: "#/components/schemas/candidateMembersCollection"
              examples:
                candidateMembers:
                  $ref: "#/components/schemas/candidateMembersCollection/example"
  /roles:
    get:
      tags:
        - Roles
      operationId: getRolesByContext
      summary: Get assigned roles
      description: >
        Returns the roles assigned at the context. <p><b>Authorization:</b>  Requires read access on the context.
      parameters:
        - name: contextId
          in: query
          description: >
            The ID of the context for which to get the assigned roles.
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/startParam"
        - $ref: "#/components/parameters/limitParam"
        - name: filter
          in: query
          description: >
            Filter criteria for items. The following fields are not supported in filter criteria: typeId. See [Filtering in REST APIs](https://developer.sas.com/apis/rest/Topics/#filters).
          schema:
            type: string
            format: filter-criteria
            example: in(name,'group1','group2')
        - name: sortBy
          in: query
          description: >
            Sorts the returned items. The following fields are not supported for sort: typeId. See [Sorting in REST APIs](https://developer.sas.com/apis/rest/Topics/#sorting).
          schema:
            type: string
            format: sort-criteria
            example: name:ascending:primary
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/components/schemas/roleCollection"
              examples:
                json:
                  $ref: "#/components/schemas/roleCollection/example"
            application/json:
              schema:
                $ref: "#/components/schemas/roleCollection"
              examples:
                json:
                  $ref: "#/components/schemas/roleCollection/example"
    post:
      tags:
        - Roles
      summary: Create a new role
      description: >
        Adds a new role. <p><b>Authorization:</b>  Requires the Manage Roles privilege and read access to the role context.
      operationId: createRole
      parameters:
        - name: contextId
          in: query
          description: >
            The ID of the context for which to get the assigned roles.
          required: true
          schema:
            type: string
          example: d6eefec9-dcc2-4574-8af8-69897038d9c5
        - name: name
          in: query
          description: >
            The name of the role.
          required: true
          schema:
            type: string
          example: Developers
        - name: description
          in: query
          description: >
            The description of the role.
          schema:
            type: string
          example: This is a role description.
      responses:
        "201":
          description: The request succeeded and the created role is returned.
          headers:
            ETag:
              $ref: "#/components/headers/Etag"
            Last-Modified:
              $ref: "#/components/headers/Last-Modified"
          content:
            application/vnd.sas.clinical.role:
              schema:
                $ref: "#/components/schemas/role"
              examples:
                json:
                  $ref: "#/components/schemas/role/example"
            application/json:
              schema:
                $ref: "#/components/schemas/role"
              examples:
                json:
                  $ref: "#/components/schemas/role/example"
        "400":
          description: Bad Request
  /roles/unassigned:
    get:
      tags:
        - Roles
      summary: Get unassigned roles
      description: >
        Returns roles that are assigned at the parent context. These unassigned roles can be added as inherited roles.
      operationId: getUnassignedRoles
      parameters:
        - name: contextId
          in: query
          description: >
            The unique identifier of the context in which to add inherited roles.
          required: true
          schema:
            type: string
          example: d6eefec9-dcc2-4574-8af8-69897038d9c5
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/components/schemas/unassignedRoleCollection"
              examples:
                json:
                  $ref: "#/components/schemas/unassignedRoleCollection/example"
            application/json:
              schema:
                $ref: "#/components/schemas/unassignedRoleCollection"
              examples:
                json:
                  $ref: "#/components/schemas/unassignedRoleCollection/example"
  /roles/inherited:
    post:
      tags:
        - Roles
      summary: Create one or more inherited roles
      description: >
        Creates one or more inherited roles at the context from roles assigned at the parent context. <p><b>Authorization:</b>  Requires the Manage Roles privilege and read access to the role context.
      operationId: createInheritedRoles
      parameters:
        - name: contextId
          in: query
          description: >
            The unique identifier of the context in which to add inherited roles.
          required: true
          schema:
            type: string
          example: d6eefec9-dcc2-4574-8af8-69897038d9c5
      requestBody:
        $ref: "#/components/requestBodies/idsRequestBody"
      responses:
        "201":
          description: One or more inherited roles were created at the current context.
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/components/schemas/roleCollection"
              examples:
                json:
                  $ref: "#/components/schemas/roleCollection/example"
            application/json:
              schema:
                $ref: "#/components/schemas/roleCollection"
              examples:
                json:
                  $ref: "#/components/schemas/roleCollection/example"
        "400":
          description: Bad Request
  "/roles/{roleId}":
    get:
      tags:
        - Roles
      operationId: getRole
      summary: Get the specified role
      description: >
        Returns role by ID. <p><b>Authorization:</b> Requires read access to the role context.
      parameters:
        - name: roleId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the role.
      responses:
        "200":
          description: OK
          headers:
            ETag:
              $ref: "#/components/headers/Etag"
            Last-Modified:
              $ref: "#/components/headers/Last-Modified"
          content:
            application/vnd.sas.clinical.role:
              schema:
                $ref: "#/components/schemas/role"
              examples:
                json:
                  $ref: "#/components/schemas/role/example"
            application/json:
              schema:
                $ref: "#/components/schemas/role"
              examples:
                json:
                  $ref: "#/components/schemas/role/example"
        "404":
          description: The role could not be found.
    head:
      tags:
        - Roles
      summary: Determine whether the specified role exists
      description: >
        Check whether the specified role exists. <p><b>Authorization:</b> Requires read access to the role context.
      operationId: headersForRole
      parameters:
        - name: roleId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier of the role.
          example: e6cde4d0-c6d6-47b4-b322-74def48c1dd1
      responses:
        "200":
          description: OK - the role exists.
          headers:
            ETag:
              $ref: "#/components/headers/Etag"
            Last-Modified:
              $ref: "#/components/headers/Last-Modified"
        "404":
          description: The role could not be found.
    patch:
      tags:
        - Roles
      summary: Update the attributes of a role
      description: >
        Updates the editable attributes of this role.  <p><b>Authorization:</b> Requires the Manage Roles privilege and read access to the role context.
      operationId: patchRole
      parameters:
        - name: roleId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the role.
          example: d6eefec9-dcc2-4574-8af8-69897038d9c5
      requestBody:
        required: true
        description: The attributes on the role to update.
        content:
          application/json:
            schema:
              type: object
              additionalProperties:
                type: string
            examples:
              Role:
                value:
                  name: New Role Name
                  description: New role description.
      responses:
        "200":
          description: OK - the role was updated.
          headers:
            ETag:
              $ref: "#/components/headers/Etag"
            Last-Modified:
              $ref: "#/components/headers/Last-Modified"
          content:
            application/vnd.sas.clinical.role:
              schema:
                $ref: "#/components/schemas/role"
              examples:
                json:
                  $ref: "#/components/schemas/role/example"
            application/json:
              schema:
                $ref: "#/components/schemas/role"
              examples:
                json:
                  $ref: "#/components/schemas/role/example"
        "400":
          description: Bad request
        "404":
          description: Not found - the role could not be found.
        "412":
          description: Precondition failed
        "428":
          description: Precondition required
    delete:
      tags:
        - Roles
      summary: Delete a role
      description: >
        Deletes a role. If this is the original role definition (where the role was created), and it was assigned at any context below  the current context, those inherited role assignments are also deleted.  <p><b>Authorization:</b>  Requires the Manage Roles privilege and read access to the role context.
      operationId: deleteRole
      parameters:
        - name: roleId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the role.
          example: d6eefec9-dcc2-4574-8af8-69897038d9c5
      responses:
        "204":
          description: The role was deleted.
  "/roles/{roleId}/members":
    get:
      tags:
        - Roles
      operationId: getRoleMembers
      summary: Get the members of the specified role
      description: >
        Returns members of the role by ID. <p><b>Authorization:</b> Requires read access to the role context.
      parameters:
        - name: roleId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the role.
        - $ref: "#/components/parameters/startParam"
        - $ref: "#/components/parameters/limitParam"
        - $ref: "#/components/parameters/groupFilterByParam"
        - $ref: "#/components/parameters/groupSortByParam"
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/components/schemas/roleMembersCollection"
              examples:
                getRoleMembers:
                  $ref: "#/components/schemas/roleMembersCollection/example"
            application/json:
              schema:
                $ref: "#/components/schemas/roleMembersCollection"
              examples:
                getRoleMembers:
                  $ref: "#/components/schemas/roleMembersCollection/example"
        "404":
          description: The role could not be found to retrieve members.
    patch:
      tags:
        - Roles
      summary: Update the members of a role
      description: >
        Updates the members of the role.  <p><b>Authorization:</b> Requires the Manage Roles privilege and read access to the role context.
      operationId: patchRoleMembers
      parameters:
        - name: roleId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the role.
          example: d6eefec9-dcc2-4574-8af8-69897038d9c5
        - name: action
          in: query
          required: true
          description: The membership update action to perform on the role.
          schema:
            type: string
            enum:
              - UPDATE_MEMBERS
              - REMOVE_MEMBERS_BY_FILTER
        - name: If-Match
          in: header
          description: The ETag that was returned from a GET, POST or PUT of a resource.
          required: true
          schema:
            type: string
          example: '"lgdxya1m"'
      requestBody:
        required: true
        description: The specification for member additions and removals.
        content:
          application/vnd.sas.clinical.members.update:
            schema:
              $ref: "#/components/schemas/membersUpdate"
            examples:
              membersUpdate:
                $ref: "#/components/schemas/membersUpdate/example"
          text/plain:
            schema:
              description: >
                The filter to retrieve the members to remove. This applies only when the 'action' request parameter is 'REMOVE_MEMBERS_BY_FILTER'.
            example: eq(id,'johndoe')
          application/json:
            schema:
              $ref: "#/components/schemas/membersUpdate"
            examples:
              membersUpdate:
                $ref: "#/components/schemas/membersUpdate/example"
      responses:
        "200":
          description: OK - the role was updated
          headers:
            ETag:
              $ref: "#/components/headers/Etag"
            Last-Modified:
              $ref: "#/components/headers/Last-Modified"
          content:
            application/vnd.sas.clinical.role:
              schema:
                $ref: "#/components/schemas/role"
              examples:
                json:
                  $ref: "#/components/schemas/role/example"
            application/json:
              schema:
                $ref: "#/components/schemas/role"
              examples:
                json:
                  $ref: "#/components/schemas/role/example"
        "400":
          description: Bad Request
        "404":
          description: The role could not be found.
        "412":
          description: Precondition failed
        "428":
          description: Precondition required
  "/roles/{roleId}/members/candidates":
    get:
      tags:
        - Roles
      summary: Get candidate members for role
      description: Returns the users and groups that can be assigned to the role.
      operationId: getRoleCandidateMembers
      parameters:
        - name: roleId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the role.
        - $ref: "#/components/parameters/startParam"
        - $ref: "#/components/parameters/limitParam"
        - $ref: "#/components/parameters/memberFilterByParam"
        - $ref: "#/components/parameters/memberSortByParam"
      responses:
        "200":
          description: The request succeeded and the specified role candidate members are returned.
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/components/schemas/roleCandidateCollection"
              examples:
                roleCandidateMembers:
                  $ref: "#/components/schemas/roleCandidateCollection/example"
            application/json:
              schema:
                $ref: "#/components/schemas/roleCandidateCollection"
              examples:
                roleCandidateMembers:
                  $ref: "#/components/schemas/roleCandidateCollection/example"
  "/roles/{roleId}/privileges":
    get:
      tags:
        - Roles
      operationId: getRolePrivileges
      summary: Get the privileges of the specified role
      description: >
        Returns the privileges of the role by ID. <p><b>Authorization:</b> Requires read access to the role context.
      parameters:
        - name: roleId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the role.
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/components/schemas/privilegeCollection"
              examples:
                json:
                  $ref: "#/components/schemas/privilegeCollection/example"
            application/json:
              schema:
                $ref: "#/components/schemas/privilegeCollection"
              examples:
                json:
                  $ref: "#/components/schemas/privilegeCollection/example"
        "404":
          description: The role could not be found to retrieve privileges.
    patch:
      tags:
        - Roles
      summary: Update the privileges for a role
      description: >
        Updates the privileges of the role.  <p><b>Authorization:</b> Requires the Manage Roles privilege and read access to the role context.
      operationId: patchRolePrivileges
      parameters:
        - name: roleId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the role.
          example: d6eefec9-dcc2-4574-8af8-69897038d9c5
        - name: If-Match
          in: header
          description: The ETag that was returned from a GET, POST or PUT of a resource.
          required: true
          schema:
            type: string
          example: '"lgdxya1m"'
      requestBody:
        required: true
        description: The specification for privilege additions and removals.
        content:
          application/vnd.sas.clinical.privileges.update:
            schema:
              $ref: "#/components/schemas/updateRolePrivileges"
            examples:
              json:
                $ref: "#/components/schemas/updateRolePrivileges/example"
          application/json:
            schema:
              $ref: "#/components/schemas/updateRolePrivileges"
            examples:
              json:
                $ref: "#/components/schemas/updateRolePrivileges/example"
      responses:
        "200":
          description: OK - the role was updated.
          content:
            application/vnd.sas.clinical.role:
              schema:
                $ref: "#/components/schemas/role"
              examples:
                json:
                  $ref: "#/components/schemas/role/example"
            application/json:
              schema:
                $ref: "#/components/schemas/role"
              examples:
                json:
                  $ref: "#/components/schemas/role/example"
        "400":
          description: Bad request
        "404":
          description: The role could not be found.
        "412":
          description: Precondition failed
        "428":
          description: Precondition required
  /roles/privileges:
    get:
      tags:
        - Roles
      summary: Get all privileges
      description: >
        Returns all privileges that can be defined to a role.
      operationId: getAllPrivileges
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/components/schemas/privilegeCollection"
              examples:
                json:
                  $ref: "#/components/schemas/privilegeCollection/example"
            application/json:
              schema:
                $ref: "#/components/schemas/privilegeCollection"
              examples:
                json:
                  $ref: "#/components/schemas/privilegeCollection/example"
  /types:
    get:
      tags:
        - Types
      summary: Get the collection of types
      description: >
        Returns a collection of types.
      operationId: getTypes
      parameters:
        - name: auditable
          in: query
          description: >
            Filter criteria based on whether it is auditable.
          required: false
          schema:
            type: boolean
        - name: searchable
          in: query
          description: >
            Filter criteria based on whether it is searchable.
          required: false
          schema:
            type: boolean
      responses:
        "200":
          description: The request succeeded and matching types are returned.
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/components/schemas/typeCollection"
              examples:
                json:
                  $ref: "#/components/schemas/typeCollection/example"
            application/json:
              schema:
                $ref: "#/components/schemas/typeCollection"
              examples:
                json:
                  $ref: "#/components/schemas/typeCollection/example"
  "/types/{typeId}":
    get:
      tags:
        - Types
      summary: Get the specific type entry
      description: >
        Returns the specific type entry.
      operationId: getType
      parameters:
        - name: typeId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the type entry.
      responses:
        "200":
          description: The request succeeded and the matching type is returned.
          content:
            application/vnd.sas.clinical.type:
              schema:
                $ref: "#/components/schemas/type"
              examples:
                json:
                  $ref: "#/components/schemas/type/example"
            application/json:
              schema:
                $ref: "#/components/schemas/type"
              examples:
                json:
                  $ref: "#/components/schemas/type/example"
    head:
      tags:
        - Types
      summary: Check whether the specified type exists
      description: >
        Checks whether the specified type exists.
      operationId: headersForType
      parameters:
        - name: typeId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the type entry.
      responses:
        "200":
          description: The request succeeded - the type exists.
        "404":
          description: The request did not find the specified type.
  /groups:
    get:
      tags:
        - Groups
      operationId: getGroupsByContext
      summary: Get groups
      description: Returns the groups assigned to the context.
      parameters:
        - name: contextId
          in: query
          description: >
            The ID of the context for which to get the groups.
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/startParam"
        - $ref: "#/components/parameters/limitParam"
        - $ref: "#/components/parameters/groupFilterByParam"
        - $ref: "#/components/parameters/groupSortByParam"
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/components/schemas/groupCollection"
              examples:
                json:
                  $ref: "#/components/schemas/groupCollection/example"
            application/json:
              schema:
                $ref: "#/components/schemas/groupCollection"
              examples:
                json:
                  $ref: "#/components/schemas/groupCollection/example"
        "404":
          description: The group could not be found.
    post:
      tags:
        - Groups
      summary: Create a group
      description: Creates a group.
      operationId: createGroup
      parameters:
        - name: contextId
          in: query
          schema:
            type: string
          required: true
          description: The unique identifier for the context that contains the group.
          example: d6eefec9-dcc2-4574-8af8-69897038d9c5
        - name: name
          in: query
          schema:
            type: string
          required: true
          description: The name of the group.
          example: Test Users Group
        - name: description
          in: query
          schema:
            type: string
          required: false
          description: The description for the group
      responses:
        "201":
          description: Created - the group was created successfully.
          headers:
            ETag:
              $ref: "#/components/headers/Etag"
            Last-Modified:
              $ref: "#/components/headers/Last-Modified"
          content:
            application/vnd.sas.clinical.group:
              schema:
                $ref: "#/components/schemas/group"
              examples:
                json:
                  $ref: "#/components/schemas/group/example"
            application/json:
              schema:
                $ref: "#/components/schemas/group"
              examples:
                json:
                  $ref: "#/components/schemas/group/example"
        "400":
          description: Bad Request
        "409":
          description: A group with the same name already exists at the specified context.
  "/groups/{groupId}":
    get:
      tags:
        - Groups
      operationId: getGroup
      summary: Get the specified group
      description: Returns the group by ID.
      parameters:
        - name: groupId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the group.
          example: d6eefec9-dcc2-4574-8af8-69897038d9c5
      responses:
        "200":
          description: OK
          headers:
            ETag:
              $ref: "#/components/headers/Etag"
            Last-Modified:
              $ref: "#/components/headers/Last-Modified"
          content:
            application/vnd.sas.clinical.group+json:
              schema:
                $ref: "#/components/schemas/group"
              examples:
                json:
                  $ref: "#/components/schemas/group/example"
            application/json:
              schema:
                $ref: "#/components/schemas/group"
              examples:
                json:
                  $ref: "#/components/schemas/group/example"
        "404":
          description: The group could not be found.
    head:
      tags:
        - Groups
      summary: Determine whether the specified group exists
      description: >
        Checks whether the group exists.
      operationId: headersForGroup
      parameters:
        - name: groupId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the group.
          example: d6eefec9-dcc2-4574-8af8-69897038d9c5
      responses:
        "200":
          description: OK - the group exists.
          headers:
            ETag:
              $ref: "#/components/headers/Etag"
            Last-Modified:
              $ref: "#/components/headers/Last-Modified"
        "404":
          description: Not found - the group could not be found.
    patch:
      tags:
        - Groups
      summary: Update group attributes
      description: Updates the attributes of a group.
      operationId: patchGroup
      parameters:
        - name: groupId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the group being modified.
          example: d6eefec9-dcc2-4574-8af8-69897038d9c5
        - name: If-Match
          in: header
          description: The ETag that was returned from a GET, POST or PUT of a resource.
          required: true
          schema:
            type: string
          example: '"lgdxya1m"'
      requestBody:
        required: true
        description: The attributes on the group to update.
        content:
          application/json:
            schema:
              type: object
              additionalProperties:
                type: string
            examples:
              Group:
                value:
                  name: New Group Name
                  description: New group description.
      responses:
        "200":
          description: OK
          headers:
            ETag:
              $ref: "#/components/headers/Etag"
            Last-Modified:
              $ref: "#/components/headers/Last-Modified"
          content:
            application/vnd.sas.clinical.group:
              schema:
                $ref: "#/components/schemas/group"
              examples:
                json:
                  $ref: "#/components/schemas/group/example"
            application/json:
              schema:
                $ref: "#/components/schemas/group"
              examples:
                json:
                  $ref: "#/components/schemas/group/example"
        "400":
          description: Bad Request
        "404":
          description: The group could not be found.
        "409":
          description: The group already exists.
        "412":
          description: Precondition failed
        "428":
          description: Precondition required
    delete:
      tags:
        - Groups
      summary: Delete a group
      description: Deletes a group.
      operationId: deleteGroup
      parameters:
        - name: groupId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the group.
          example: d6eefec9-dcc2-4574-8af8-69897038d9c5
      responses:
        "204":
          description: The group was successfully deleted.
        "404":
          description: The group could not be found.
  "/groups/{groupId}/members":
    get:
      tags:
        - Groups
      operationId: getAssignedGroupMembers
      summary: Get assigned group members
      description: Returns the members that are assigned to a group.
      parameters:
        - name: groupId
          in: path
          description: >
            The ID of the group for which to get the members.
          required: true
          schema:
            type: string
        - $ref: "#/components/parameters/startParam"
        - $ref: "#/components/parameters/limitParam"
        - $ref: "#/components/parameters/filterParam"
        - $ref: "#/components/parameters/sortByParam"
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/components/schemas/groupMembersCollection"
              examples:
                json:
                  $ref: "#/components/schemas/groupMembersCollection/example"
            application/json:
              schema:
                $ref: "#/components/schemas/groupMembersCollection"
              examples:
                json:
                  $ref: "#/components/schemas/groupMembersCollection/example"
        "404":
          description: The group could not be found.
    patch:
      tags:
        - Groups
      operationId: patchGroupMembers
      summary: Update Group Members
      description: Adds or removes members from a group.
      parameters:
        - name: groupId
          in: path
          description: The identifier of the group to be modified.
          required: true
          schema:
            type: string
        - name: action
          in: query
          required: true
          description: The membership update action to perform on the context.
          schema:
            type: string
            enum:
              - UPDATE_MEMBERS
              - REMOVE_MEMBERS_BY_FILTER
        - name: If-Match
          in: header
          description: The ETag that was returned from a GET, POST or PUT of a resource.
          required: true
          schema:
            type: string
          example: '"lgdxya1m"'
      requestBody:
        required: false
        description: The specification for group member additions or removals.
        content:
          application/vnd.sas.clinical.members.update:
            schema:
              $ref: "#/components/schemas/membersUpdate"
            examples:
              membersUpdate:
                $ref: "#/components/schemas/membersUpdate/example"
          text/plain:
            schema:
              description: >
                The filter to retrieve the members to remove. This applies only when the 'action' request parameter is 'REMOVE_MEMBERS_BY_FILTER'.
            example: eq(id,'johndoe')
          application/json:
            schema:
              $ref: "#/components/schemas/membersUpdate"
            examples:
              membersUpdate:
                $ref: "#/components/schemas/membersUpdate/example"
      responses:
        "200":
          description: OK
          headers:
            ETag:
              $ref: "#/components/headers/Etag"
            Last-Modified:
              $ref: "#/components/headers/Last-Modified"
          content:
            application/vnd.sas.clinical.group:
              schema:
                $ref: "#/components/schemas/group"
              examples:
                json:
                  $ref: "#/components/schemas/group/example"
            application/json:
              schema:
                $ref: "#/components/schemas/group"
              examples:
                json:
                  $ref: "#/components/schemas/group/example"
        "400":
          description: Bad Request
        "404":
          description: The group could not be found.
        "412":
          description: Precondition failed
        "428":
          description: Precondition required
  "/groups/{groupId}/members/candidates":
    get:
      tags:
        - Groups
      summary: Get the users and groups that can be assigned as members to the specified group
      description: Returns the users and groups that can be assigned as members to the specified group.
      operationId: getGroupCandidateMembers
      parameters:
        - name: groupId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the group for which to retrieve the candidate members.
        - $ref: "#/components/parameters/startParam"
        - $ref: "#/components/parameters/limitParam"
        - $ref: "#/components/parameters/memberFilterByParam"
        - $ref: "#/components/parameters/memberSortByParam"
      responses:
        "200":
          description: The request succeeded and the specified group candidate members are returned.
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/components/schemas/groupCandidateCollection"
              examples:
                getCandidates:
                  $ref: "#/components/schemas/groupCandidateCollection/example"
            application/json:
              schema:
                $ref: "#/components/schemas/groupCandidateCollection"
              examples:
                getCandidates:
                  $ref: "#/components/schemas/groupCandidateCollection/example"
  /workflowDefinitions:
    get:
      tags:
        - Clinical Workflow
      operationId: getClinicalWorkflowDefinitions
      summary: Get clinical workflow definitions
      description: >
        Returns clinical workflow definitions defined with the specified repository context type.
      parameters:
        - name: clinicalContextType
          in: query
          schema:
            type: string
          required: true
          description: The type identifier of a clinical context.
          example: organization
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/components/schemas/workflowDefinitionCollection"
              examples:
                clinicalWorkflows:
                  $ref: "#/components/schemas/workflowDefinitionCollection/example"
            application/json:
              schema:
                $ref: "#/components/schemas/workflowDefinitionCollection"
              examples:
                clinicalWorkflows:
                  $ref: "#/components/schemas/workflowDefinitionCollection/example"
  /workflows:
    get:
      tags:
        - Clinical Workflow
      operationId: getClinicalWorkflows
      summary: Get clinical workflows
      description: >
        Returns clinical workflows defined at repository contexts to which the current user has read access.
      parameters:
        - $ref: "#/components/parameters/filterParam"
        - $ref: "#/components/parameters/sortByParam"
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/components/schemas/workflowCollection"
              examples:
                clinicalWorkflows:
                  $ref: "#/components/schemas/workflowCollection/example"
            application/json:
              schema:
                $ref: "#/components/schemas/workflowCollection"
              examples:
                clinicalWorkflows:
                  $ref: "#/components/schemas/workflowCollection/example"
    post:
      tags:
        - Clinical Workflow
      summary: Create a clinical workflow
      description: Creates a clinical workflow.
      operationId: createClinicalWorkflow
      requestBody:
        required: true
        description: >
          Specifies information for creating a clinical workflow
        content:
          application/vnd.sas.clinical.workflow.create+json:
            schema:
              $ref: "#/components/schemas/workflowCreateRequestBody"
            examples:
              json:
                $ref: "#/components/schemas/workflowCreateRequestBody/example"
          application/json:
            schema:
              $ref: "#/components/schemas/workflowCreateRequestBody"
            examples:
              json:
                $ref: "#/components/schemas/workflowCreateRequestBody/example"
      responses:
        "201":
          description: Created - the clinical workflow was created successfully.
          headers:
            ETag:
              $ref: "#/components/headers/Etag"
            Last-Modified:
              $ref: "#/components/headers/Last-Modified"
          content:
            application/vnd.sas.clinical.workflow+json:
              schema:
                $ref: "#/components/schemas/workflow"
              examples:
                json:
                  $ref: "#/components/schemas/workflow/example"
            application/json:
              schema:
                $ref: "#/components/schemas/workflow"
              examples:
                json:
                  $ref: "#/components/schemas/workflow/example"
        "400":
          description: Bad Request
        "409":
          description: A clinical workflow with the same name already exists
  "/workflows/{workflowId}":
    get:
      tags:
        - Clinical Workflow
      operationId: getClinicalWorkflow
      summary: Asynchronously update one or more clinical workflows
      description: Returns a representation of the clinical workflow.
      parameters:
        - $ref: "#/components/parameters/workflowIdPathParameter"
      responses:
        "200":
          description: OK
          headers:
            ETag:
              $ref: "#/components/headers/Etag"
            Last-Modified:
              $ref: "#/components/headers/Last-Modified"
          content:
            application/vnd.sas.clinical.workflow+json:
              schema:
                $ref: "#/components/schemas/workflow"
              examples:
                json:
                  $ref: "#/components/schemas/workflow/example"
            application/json:
              schema:
                $ref: "#/components/schemas/workflow"
              examples:
                json:
                  $ref: "#/components/schemas/workflow/example"
        "404":
          description: The clinical workflow could not be found.
    head:
      tags:
        - Clinical Workflow
      summary: Determine whether the specified clinical workflow exists
      description: >
        Checks whether the clinical workflow exists.
      operationId: headersForClinicalWorkflow
      parameters:
        - $ref: "#/components/parameters/workflowIdPathParameter"
      responses:
        "200":
          description: OK - the clinical workflow exists.
          headers:
            ETag:
              $ref: "#/components/headers/Etag"
            Last-Modified:
              $ref: "#/components/headers/Last-Modified"
        "404":
          description: The clinical workflow could not be found.
    patch:
      tags:
        - Clinical Workflow
      operationId: patchClinicalWorkflow
      summary: Update the specified clinical workflow
      description: >
        Updates the editable attributes of this clinical workflow.
      parameters:
        - $ref: "#/components/parameters/workflowIdPathParameter"
        - $ref: "#/components/parameters/ifMatchHeader"
      requestBody:
        required: true
        description: The attributes on the clinical workflow to update.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/workflowPatchRequestBody"
            examples:
              json:
                $ref: "#/components/schemas/workflowPatchRequestBody/example"
      responses:
        "200":
          description: OK - the clinical workflow was updated.
          headers:
            ETag:
              $ref: "#/components/headers/Etag"
            Last-Modified:
              $ref: "#/components/headers/Last-Modified"
          content:
            application/vnd.sas.clinical.workflow+json:
              schema:
                $ref: "#/components/schemas/workflow"
              examples:
                json:
                  $ref: "#/components/schemas/workflow/example"
            application/json:
              schema:
                $ref: "#/components/schemas/workflow"
              examples:
                json:
                  $ref: "#/components/schemas/workflow/example"
        "400":
          description: Bad Request
        "404":
          description: Not found - the clinical workflow could not be found.
        "412":
          description: The ETag provided does not match the current resource.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                json:
                  $ref: "#/components/examples/preConditionFailedResponse"
        "428":
          description: The request headers did not include a `If-Match` precondition.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                json:
                  $ref: "#/components/examples/noIfMatchHeader"
    delete:
      tags:
        - Clinical Workflow
      summary: Delete a clinical workflow
      description: Deletes a clinical workflow.
      operationId: deleteClinicalWorkflow
      parameters:
        - $ref: "#/components/parameters/workflowIdPathParameter"
      responses:
        "204":
          description: The clinical workflow was successfully deleted.
        "404":
          description: The clinical workflow could not be found.
  "/workflows/{workflowId}/elementdefinitions":
    get:
      tags:
        - Clinical Workflow
      operationId: getClinicalWorkflowElementDefinitions
      summary: Get the element setup for a specific clinical workflow
      description: Returns workflow component information for a clinical workflow. This includes all items that have setup data that can be configured for the workflow -- user tasks, timers, clinical job tasks, notifications, and signal events.
      parameters:
        - $ref: "#/components/parameters/workflowIdPathParameter"
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/components/schemas/workflowElementCollection"
              examples:
                clinicalWorkflowElements:
                  $ref: "#/components/schemas/workflowElementCollection/example"
            application/json:
              schema:
                $ref: "#/components/schemas/workflowElementCollection"
              examples:
                clinicalWorkflowElements:
                  $ref: "#/components/schemas/workflowElementCollection/example"
        "404":
          description: The clinical workflow could not be found.
  "/workflows/{workflowId}/elementdefinitions/{elementId}":
    get:
      tags:
        - Clinical Workflow
      operationId: getClinicalWorkflowElementDefinition
      summary: Get an element setup for a specific clinical workflow
      description: Returns workflow component information for a clinical workflow element. These can include user tasks, timers, clinical job tasks, notifications, and signal events.
      parameters:
        - $ref: "#/components/parameters/workflowIdPathParameter"
        - $ref: "#/components/parameters/elementIdPathParameter"
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.clinical.workflow.elementdefinition+json:
              schema:
                anyOf:
                  - $ref: "#/components/schemas/workflowUserTaskSetup"
                  - $ref: "#/components/schemas/workflowTimerSetup"
                  - $ref: "#/components/schemas/workflowSignalEventSetup"
                  - $ref: "#/components/schemas/workflowNotificationSetup"
                  - $ref: "#/components/schemas/workflowJobSetup"
              examples:
                json:
                  $ref: "#/components/schemas/workflowElementCollection/example"
            application/json:
              schema:
                anyOf:
                  - $ref: "#/components/schemas/workflowUserTaskSetup"
                  - $ref: "#/components/schemas/workflowTimerSetup"
                  - $ref: "#/components/schemas/workflowSignalEventSetup"
                  - $ref: "#/components/schemas/workflowNotificationSetup"
                  - $ref: "#/components/schemas/workflowJobSetup"
              examples:
                json:
                  $ref: "#/components/schemas/workflowElementCollection/example"
        "404":
          description: The clinical workflow or element could not be found.
    head:
      tags:
        - Clinical Workflow
      summary: Determine whether the specified clinical workflow element exists
      description: >
        Checks whether the clinical workflow element exists.
      operationId: headersForClinicalWorkflowElement
      parameters:
        - $ref: "#/components/parameters/workflowIdPathParameter"
        - $ref: "#/components/parameters/elementIdPathParameter"
      responses:
        "200":
          description: OK - the clinical workflow element exists.
        "404":
          description: The clinical workflow or element could not be found.
    patch:
      tags:
        - Clinical Workflow
      operationId: patchClinicalWorkflowElement
      summary: Update the specified clinical workflow element
      description: Updates the specified clinical workflow element with the values specified.
      parameters:
        - $ref: "#/components/parameters/workflowIdPathParameter"
        - $ref: "#/components/parameters/elementIdPathParameter"
      requestBody:
        required: true
        description: The values to set for the specified clinical workflow element.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/workflowCommonElementSetup"
            examples:
              json:
                $ref: "#/components/schemas/workflowCommonElementSetup/example"
      responses:
        "200":
          description: OK - the clinical workflow element was updated successfully.
          content:
            application/vnd.sas.clinical.workflow.elementdefinition+json:
              schema:
                $ref: "#/components/schemas/workflowCommonElementSetup"
              examples:
                userTask:
                  $ref: "#/components/schemas/workflowUserTaskSetup/example"
                notification:
                  $ref: "#/components/schemas/workflowNotificationSetup/example"
                timer:
                  $ref: "#/components/schemas/workflowTimerSetup/example"
                signal:
                  $ref: "#/components/schemas/workflowSignalEventSetup/example"
                jobTask:
                  $ref: "#/components/schemas/workflowJobSetup/example"
            application/json:
              schema:
                $ref: "#/components/schemas/workflowCommonElementSetup"
              examples:
                userTask:
                  $ref: "#/components/schemas/workflowUserTaskSetup/example"
                notification:
                  $ref: "#/components/schemas/workflowNotificationSetup/example"
                timer:
                  $ref: "#/components/schemas/workflowTimerSetup/example"
                signal:
                  $ref: "#/components/schemas/workflowSignalEventSetup/example"
                jobTask:
                  $ref: "#/components/schemas/workflowJobSetup/example"
        "400":
          description: Bad Request
        "404":
          description: The clinical workflow or element could not be found.
  "/workflows/{workflowId}/currentElements":
    get:
      tags:
        - Clinical Workflow
      operationId: getClinicalWorkflowCurrentElements
      summary: Get the current elements of a clinical workflow
      description: Returns the current active flow elements of the specified clinical workflow. Current element types could be -- user tasks, timers, clinical job tasks, notifications, and signal events.
      parameters:
        - $ref: "#/components/parameters/workflowIdPathParameter"
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/components/schemas/workflowCurrentElementCollection"
              examples:
                currentWorkflowElements:
                  $ref: "#/components/schemas/workflowCurrentElementCollection/example"
            application/json:
              schema:
                $ref: "#/components/schemas/workflowCurrentElementCollection"
              examples:
                currentWorkflowElements:
                  $ref: "#/components/schemas/workflowCurrentElementCollection/example"
        "404":
          description: The clinical workflow could not be found.
  "/workflows/{workflowId}/completedElements":
    get:
      tags:
        - Clinical Workflow
      operationId: getClinicalWorkflowCompletedElements
      summary: Get the completed elements of a clinical workflow
      description: Returns the completed active flow elements of the specified clinical workflow. Completed element types could be -- user tasks, timers, clinical job tasks, notifications, and signal events.
      parameters:
        - $ref: "#/components/parameters/workflowIdPathParameter"
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/components/schemas/workflowCompletedElementCollection"
              examples:
                completedWorkflowElements:
                  $ref: "#/components/schemas/workflowCompletedElementCollection/example"
            application/json:
              schema:
                $ref: "#/components/schemas/workflowCompletedElementCollection"
              examples:
                completedWorkflowElements:
                  $ref: "#/components/schemas/workflowCompletedElementCollection/example"
        "404":
          description: The clinical workflow could not be found.
  "/workflows/{workflowId}/completedTasks/{taskId}":
    get:
      tags:
        - Clinical Workflow
      operationId: getClinicalWorkflowCompletedTask
      summary: Get details for a completed user task
      description: Returns full details for a completed user task.
      parameters:
        - $ref: "#/components/parameters/workflowIdPathParameter"
        - $ref: "#/components/parameters/taskIdPathParameter"
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.clinical.workflow.completedtask+json:
              schema:
                anyOf:
                  - $ref: "#/components/schemas/workflowCompletedUserTaskSummary"
                  - $ref: "#/components/schemas/workflowCompletedTimerEvent"
                  - $ref: "#/components/schemas/workflowCompletedSignalEvent"
                  - $ref: "#/components/schemas/workflowCompletedNotificationTask"
                  - $ref: "#/components/schemas/workflowCompletedJobTask"
              examples:
                completedUserTask:
                  $ref: "#/components/schemas/workflowCompletedUserTaskSummary/example"
                completedTimerEvent:
                  $ref: "#/components/schemas/workflowCompletedTimerEvent/example"
                completedSignalEvent:
                  $ref: "#/components/schemas/workflowCompletedSignalEvent/example"
                completedNotificationEvent:
                  $ref: "#/components/schemas/workflowCompletedNotificationTask/example"
                completedJobTask:
                  $ref: "#/components/schemas/workflowCompletedJobTask/example"
            application/json:
              schema:
                $ref: "#/components/schemas/workflowCompletedUserTaskDetail"
              examples:
                json:
                  $ref: "#/components/schemas/workflowCompletedUserTaskDetail/example"
        "404":
          description: The clinical task could not be found.
  /workflowTasks:
    get:
      tags:
        - Clinical Workflow
      operationId: getClinicalWorkflowTasks
      summary: Get clinical tasks
      description: >
        Returns clinical tasks
      parameters:
        - $ref: "#/components/parameters/filterParam"
        - $ref: "#/components/parameters/sortByParam"
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/components/schemas/taskCollection"
              examples:
                clinicalWorkflowTasks:
                  $ref: "#/components/schemas/taskCollection/example"
            application/json:
              schema:
                $ref: "#/components/schemas/taskCollection"
              examples:
                clinicalWorkflowTasks:
                  $ref: "#/components/schemas/taskCollection/example"
  "/workflowTasks/{taskId}":
    get:
      tags:
        - Clinical Workflow
      operationId: getClinicalWorkflowTask
      summary: Get the specified clinical task
      description: Returns a representation of the clinical task.
      parameters:
        - name: Accept
          in: header
          description: >
            The requested representation of the clinical task. Media type 'application/vnd.sas.clinical.workflow.task+json' is the default.
          required: false
          schema:
            type: string
            enum:
              - application/vnd.sas.clinical.workflow.task+json
              - application/vnd.sas.clinical.workflow.task.summary+json
              - application/json
        - $ref: "#/components/parameters/taskIdPathParameter"
      responses:
        "200":
          description: OK
          headers:
            ETag:
              $ref: "#/components/headers/Etag"
            Last-Modified:
              $ref: "#/components/headers/Last-Modified"
          content:
            application/vnd.sas.clinical.workflow.task+json:
              schema:
                $ref: "#/components/schemas/task"
              examples:
                json:
                  $ref: "#/components/schemas/task/example"
            application/vnd.sas.clinical.workflow.task.summary+json:
              schema:
                $ref: "#/components/schemas/workflowTaskSummary"
              examples:
                json:
                  $ref: "#/components/schemas/workflowTaskSummary/example"
            application/json:
              schema:
                $ref: "#/components/schemas/workflowTaskSummary"
              examples:
                json:
                  $ref: "#/components/schemas/workflowTaskSummary/example"
        "404":
          description: The clinical task could not be found.
    head:
      tags:
        - Clinical Workflow
      summary: Determine whether the specified clinical task exists
      description: >
        Checks whether the clinical task exists.
      operationId: headersForClinicalWorkflowTask
      parameters:
        - name: Accept
          in: header
          description: >
            The requested representation of the clinical task. Media type 'application/vnd.sas.clinical.workflow.task+json' is the default.
          required: false
          schema:
            type: string
            enum:
              - application/vnd.sas.clinical.workflow.task+json
              - application/vnd.sas.clinical.workflow.task.summary+json
              - application/json
        - $ref: "#/components/parameters/taskIdPathParameter"
      responses:
        "200":
          description: OK - the clinical task exists.
          headers:
            ETag:
              $ref: "#/components/headers/Etag"
            Last-Modified:
              $ref: "#/components/headers/Last-Modified"
        "404":
          description: The clinical task could not be found.
    patch:
      tags:
        - Clinical Workflow
      operationId: patchClinicalWorkflowTask
      summary: Update the specified clinical task
      description: Updates the specified clinical task with the values specified.
      parameters:
        - $ref: "#/components/parameters/taskIdPathParameter"
      requestBody:
        required: true
        description: The values to set for the specified clinical task.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/userTaskUpdate"
            examples:
              json:
                $ref: "#/components/schemas/userTaskUpdate/example"
      responses:
        "200":
          description: OK - the clinical task was updated successfully.
          content:
            application/vnd.sas.clinical.workflow.task+json:
              schema:
                $ref: "#/components/schemas/task"
              examples:
                json:
                  $ref: "#/components/schemas/task/example"
            application/json:
              schema:
                $ref: "#/components/schemas/task"
              examples:
                json:
                  $ref: "#/components/schemas/task/example"
        "400":
          description: Bad Request
        "404":
          description: The clinical task could not be found.
  "/workflowTasks/{taskId}/assignments":
    put:
      tags:
        - Clinical Workflow
      operationId: updateClinicalWorkflowTaskAssignment
      summary: Assign the specified clinical task
      description: Assigns the specified user to the clinical task.
      parameters:
        - $ref: "#/components/parameters/taskIdPathParameter"
      requestBody:
        required: true
        description: The clinical task ID, name, and hours worked by the completing user.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/userTaskUpdateAssignment"
            examples:
              json:
                $ref: "#/components/schemas/userTaskUpdateAssignment/example"
      responses:
        "200":
          description: OK - the clinical task was assigned successfully.
          content:
            application/vnd.sas.clinical.workflow.task.summary+json:
              schema:
                $ref: "#/components/schemas/workflowTaskSummary"
              examples:
                json:
                  $ref: "#/components/schemas/workflowTaskSummary/example"
            application/json:
              schema:
                $ref: "#/components/schemas/task"
              examples:
                json:
                  $ref: "#/components/schemas/task/example"
        "400":
          description: Bad Request
        "404":
          description: The clinical task could not be found.
  "/workflowTasks/{taskId}/completedTask":
    post:
      tags:
        - Clinical Workflow
      operationId: completeClinicalWorkflowTask
      summary: Complete the specified clinical task
      description: Completes the clinical task.
      parameters:
        - $ref: "#/components/parameters/taskIdPathParameter"
      requestBody:
        required: true
        description: The clinical task ID, name, and hours worked by the completing user.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/userTaskComplete"
            examples:
              json:
                $ref: "#/components/schemas/userTaskComplete/example"
      responses:
        "200":
          description: OK - the clinical task was assigned successfully.
          content:
            application/vnd.sas.clinical.workflow.task.summary+json:
              schema:
                $ref: "#/components/schemas/userTaskUpdateAssignment"
              examples:
                json:
                  $ref: "#/components/schemas/userTaskUpdateAssignment/example"
            application/json:
              schema:
                $ref: "#/components/schemas/task"
              examples:
                json:
                  $ref: "#/components/schemas/task/example"
        "400":
          description: Bad Request
        "404":
          description: The clinical task could not be found.
  "/workflowTasks/{taskId}/startedTasks":
    put:
      tags:
        - Clinical Workflow
      operationId: updateClinicalWorkflowTaskForStart
      summary: Start the specified clinical task
      description: Starts the clinical task.
      parameters:
        - $ref: "#/components/parameters/taskIdPathParameter"
      responses:
        "200":
          description: OK - the clinical task was started successfully.
          content:
            application/vnd.sas.clinical.workflow.task.summary+json:
              schema:
                $ref: "#/components/schemas/workflowTaskSummary"
              examples:
                json:
                  $ref: "#/components/schemas/workflowTaskSummary/example"
            application/json:
              schema:
                $ref: "#/components/schemas/task"
              examples:
                json:
                  $ref: "#/components/schemas/task/example"
        "404":
          description: The clinical task could not be found.
  /workspaces/@currentUser/files:
    post:
      tags:
        - Workspace
      summary: Update the file with the specified path
      description: Update the file with the specified path.
      operationId: updateFile
      parameters:
        - name: path
          in: query
          required: true
          description: >
            The full path of the workspace file.
          schema:
            type: string
          example: /Org/project/programs/report.sas
        - name: action
          in: query
          required: true
          description: >
            The update action to perform on the file. Supported actions:

            * CHECK_OUT: Check out a repository file and copy it to the workspace. If the file exists in the workspace its

            content is overwritten. Any parent contexts and folders that do not currently exist in the workspace are

            created in the workspace as folders.

            * CHECK_OUT_WITHOUT_COPY: Check out a repository file and do not copy the file or its parent containers to the

            workspace.

            * UNDO_CHECKOUT: Undo the check-out of a file that is currently checked out. Users can only undo check-out on

            files they have checked out. The workspace content of the file is not affected by undo check-out.

            * CHECK_IN: Check in a file that currently exists in the repository and is checked out or check in a new file

            that exists in the workspace but does not yet exist in the repository. Checking in a file results in the

            file being created or updated in the repository and any missing parent folders are created in the repository.

            The optional version and file comments are applied if they are specified.

            * COPY_LATEST_VERSION: Copy the content of a file in the repository to the workspace. For versioned files, the

            content of the most recent version of the file is copied to the workspace. Existing workspace files are

            overwritten if the content of the file does not already match that of the most recent version of the file

            in the repository.

            * COPY_VERSION: Copy the content of a file in the repository to the workspace. For versioned files, by default the

            content of the latest version of the file is copied to the workspace. The optional parameter "fileVersion" can

            be specified to copy the content of an earlier version of the file. Existing workspace files are overwritten

            if the content of the file does not already match that of the specified file version in the repository, or 

            the latest version when no version is specified.
          schema:
            type: string
            enum:
              - CHECK_OUT
              - CHECK_OUT_WITHOUT_COPY
              - UNDO_CHECKOUT
              - CHECK_IN
              - COPY_LATEST_VERSION
        - name: fileVersion
          in: query
          description: >
            The optional version specification for checking in a version of the file or copying a version of the file to the workspace. This parameter is not required, so for check in, unless a version parameter value is provided, new files are created un-versioned. For the CHECK_IN action, the valid values for version are MAJOR, MINOR, or a specific version such as 2.3. If the value is MAJOR, new files are created as versioned with initial version 1.0. Similarly, if the value is MINOR, a versioned file is created with version 0.1. If the file exists and is versioned, new versions are MINOR versions by default. To specify a version other than MAJOR or MINOR, you can specify a value between 0.1 and 99999.99999. For COPY_VERSION, the specific file version you want to copy to the workspace can be specified; otherwise, the content of the most recent version is copied. This parameter is applicable only when the action is CHECK_IN and COPY_VERSION.
          required: false
          schema:
            type: string
          example: MAJOR
        - name: comment
          in: query
          description: >
            The optional file version comment for the file. This is  applicable only when the action is CHECK_IN.
          required: false
          schema:
            type: string
          example: Final report version.
      responses:
        "200":
          description: OK - the file was updated successfully.
          content:
            application/vnd.sas.clinical.workspace.file:
              schema:
                $ref: "#/components/schemas/workspaceFile"
              examples:
                workspaceFile:
                  $ref: "#/components/examples/workspaceFile"
            application/json:
              schema:
                $ref: "#/components/schemas/workspaceFile"
              examples:
                workspaceFile:
                  $ref: "#/components/examples/workspaceFile"
  /workspaces/@currentUser/items:
    get:
      tags:
        - Workspace
      summary: Get the workspace item with the specified path
      description: >
        Retrieves the workspace item with the specified path.
      operationId: getWorkspaceItem
      parameters:
        - name: Accept
          in: header
          description: >
            The requested representation of the action status. Media type 'application/vnd.sas.clinical.workspace.item+json' is the default.
          required: false
          schema:
            type: string
            enum:
              - application/vnd.sas.clinical.workspace.item+json
              - application/vnd.sas.collection+json
              - application/json
        - $ref: "#/components/parameters/workspacePathParameter"
        - $ref: "#/components/parameters/workspaceItemType"
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/components/schemas/workspaceChildrenCollection"
              examples:
                getWorkspaceChildren:
                  $ref: "#/components/schemas/workspaceChildrenCollection/example"
            application/vnd.sas.clinical.workspace.item:
              schema:
                $ref: "#/components/schemas/workspaceItem"
              examples:
                workspaceFolder:
                  $ref: "#/components/examples/workspaceFolder"
                workspaceFile:
                  $ref: "#/components/examples/workspaceFile"
            application/json:
              schema:
                $ref: "#/components/schemas/workspaceItem"
              examples:
                workspaceFolder:
                  $ref: "#/components/examples/workspaceFolder"
                workspaceFile:
                  $ref: "#/components/examples/workspaceFile"
        "404":
          description: Not found - the workspace item could not be found.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                notFoundResponse:
                  $ref: "#/components/examples/notFoundResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                notFoundResponse:
                  $ref: "#/components/examples/notFoundResponse"
    head:
      tags:
        - Workspace
      summary: Determine whether the workspace item with the specified path exists
      description: >
        Checks whether the workspace item with the specified path exists.
      operationId: headersForWorkspaceItem
      parameters:
        - name: Accept
          in: header
          description: >
            The requested representation of the action status. Media type 'application/vnd.sas.clinical.workspace.item+json' is the default.
          required: false
          schema:
            type: string
            enum:
              - application/vnd.sas.clinical.workspace.item+json
              - application/vnd.sas.collection+json
              - application/json
        - $ref: "#/components/parameters/workspacePathParameter"
        - $ref: "#/components/parameters/workspaceItemType"
      responses:
        "200":
          description: OK - the workspace item exists.
        "404":
          description: Not found - the workspace item could not be found.
  /workspaces/@currentUser/folders:
    post:
      tags:
        - Workspace
      summary: Create a folder at the specified path with the specified name
      description: >
        Creates a folder at the specified path with the specified name.
      operationId: createFolder
      parameters:
        - name: path
          in: query
          required: true
          description: >
            The full path of the workspace folder.
          schema:
            type: string
          example: /Org/project/programs
        - name: name
          in: query
          schema:
            type: string
          required: true
          description: The name of the folder to be created.
          example: Results
      responses:
        "201":
          description: Created - the folder was created.
          content:
            application/vnd.sas.clinical.workspace.folder:
              schema:
                $ref: "#/components/schemas/workspaceFolder"
              examples:
                workspaceFolder:
                  $ref: "#/components/examples/workspaceFolder"
            application/json:
              schema:
                $ref: "#/components/schemas/workspaceFolder"
              examples:
                workspaceFolder:
                  $ref: "#/components/examples/workspaceFolder"
        "400":
          description: Bad Request
        "404":
          description: Not found - the parent folder could not be found.
        "409":
          description: The workspace folder already exists.
  /workspaces/@currentUser/items/content:
    post:
      tags:
        - Workspace
      summary: Download workspace item content
      description: >
        Downloads one or more workspace items as defined by the paths specified in the request body. Paths can be to files or folders. If a single path is specified and it is to a file, that file is downloaded as a stream on the response. If it is a single path and it is to a folder or if multiple paths are provided, the items are downloaded to a ZIP file and returned as a stream on the response.  For folders, all child items are downloaded to the ZIP file. <p> Optionally, an action status ID can be provided to monitor the completion status.  To get the action status ID, first call [batchUpdate](#operationId:batchUpdate) with the action DOWNLOAD, which returns the action status ID on the request header.
      operationId: downloadContent
      requestBody:
        required: true
        description: >
          The workspace download specification. One or more paths can be specified for download. An optional actionStatusId can be specified if performing a batch operation and tracking download status via the action status API.
        content:
          application/vnd.sas.clinical.workspace.download:
            schema:
              $ref: "#/components/schemas/workspaceDownloadRequestBody"
            examples:
              download:
                $ref: "#/components/schemas/workspaceDownloadRequestBody/example"
          application/json:
            schema:
              $ref: "#/components/schemas/workspaceDownloadRequestBody"
            examples:
              download:
                $ref: "#/components/schemas/workspaceDownloadRequestBody/example"
      responses:
        "200":
          description: OK
components:
  headers:
    Etag:
      description: The E-tag for response
      schema:
        type: string
      example: '"lgdxya1m"'
    Last-Modified:
      description: The time at which the resource was last updated.
      schema:
        type: string
      example: 2024-01-26T18:25:43.511Z
  parameters:
    startParam:
      name: start
      in: query
      description: 0-based offset of the first type to return. Defaults to 0.
      schema:
        type: integer
      example: 10
    limitParam:
      name: limit
      in: query
      description: The maximum number of items to return. Defaults to 10. The maximum cannot exceed 500.
      schema:
        type: integer
      example: 10
    filterParam:
      name: filter
      in: query
      description: >
        Filter criteria for items. See [Filtering in REST APIs](https://developer.sas.com/apis/rest/Topics/#filters).
      schema:
        type: string
        format: filter-criteria
      example: eq(name,'ACME')
    sortByParam:
      name: sortBy
      in: query
      description: >
        Sorts the returned items. See [Sorting in REST APIs](https://developer.sas.com/apis/rest/Topics/#sorting).
      schema:
        type: string
        format: sort-criteria
        example: name:ascending:primary
    auditFilterParam:
      name: filter
      in: query
      description: >
        Filter criteria for items. The following fields are not supported in filter criteria: typeId, actionDisplayName,  and auditEntryDetails. See [Filtering in REST APIs](https://developer.sas.com/apis/rest/Topics/#filters).
      schema:
        type: string
        format: filter-criteria
        example: eq(action,'created')
    auditSortByParam:
      name: sortBy
      in: query
      description: >
        Sorts the returned items. The following fields are not supported for sort: typeId, actionDisplayName,  and auditEntryDetails. See [Sorting in REST APIs](https://developer.sas.com/apis/rest/Topics/#sorting).
      schema:
        type: string
        format: sort-criteria
        example: timestamp:ascending:primary
    auditActionSortByParam:
      name: sortBy
      in: query
      description: >
        Sorts the returned types. See [Sorting in REST APIs](https://developer.sas.com/apis/rest/Topics/#sorting).
      schema:
        type: string
        format: sort-criteria
        example: action:ascending:primary
    memberFilterByParam:
      name: filter
      in: query
      description: >
        Filter criteria for items. The following fields are not supported in filter criteria: typeId, displayName,  contextId, and contextTypeId. See [Filtering in REST APIs](https://developer.sas.com/apis/rest/Topics/#filters).
      schema:
        type: string
        format: filter-criteria
        example: contains(name,'test')
    memberSortByParam:
      name: sortBy
      in: query
      description: >
        Sorts the returned items. The following fields are not supported for sort: typeId, displayName,  contextId, and contextTypeId. See [Sorting in REST APIs](https://developer.sas.com/apis/rest/Topics/#sorting).
      schema:
        type: string
        format: sort-criteria
        example: displayName:ascending:primary
    userFilterByParam:
      name: filter
      in: query
      description: >
        Filter criteria for items. The following fields are not supported in filter criteria: typeId, deletedTimeStamp,  deactivatedTimeStamp, uid, gid, providerId, email, state, and phone. See [Filtering in REST APIs](https://developer.sas.com/apis/rest/Topics/#filters).
      schema:
        type: string
        format: filter-criteria
        example: eq(id,'admin')
    userSortByParam:
      name: sortBy
      in: query
      description: >
        Sorts the returned items. The following fields are not supported for sort: typeId, deletedTimeStamp,  deactivatedTimeStamp, uid, gid, providerId, email, state, and phone. See [Sorting in REST APIs](https://developer.sas.com/apis/rest/Topics/#sorting).
      schema:
        type: string
        format: sort-criteria
        example: name:ascending:primary
    groupFilterByParam:
      name: filter
      in: query
      description: >
        Filter criteria for items. The following fields are not supported in filter criteria: typeId. See [Filtering in REST APIs](https://developer.sas.com/apis/rest/Topics/#filters).
      schema:
        type: string
        format: filter-criteria
        example: in(name,'group1','group2')
    groupSortByParam:
      name: sortBy
      in: query
      description: >
        Sorts the returned items. The following fields are not supported for sort: typeId. See [Sorting in REST APIs](https://developer.sas.com/apis/rest/Topics/#sorting).
      schema:
        type: string
        format: sort-criteria
        example: name:ascending:primary
    repositoryItemFilterParam:
      name: filter
      in: query
      description: >
        Filter criteria for items. The following fields are not supported in filter criteria: children, contentType,  and digest. See [Filtering in REST APIs](https://developer.sas.com/apis/rest/Topics/#filters).
      schema:
        type: string
        format: filter-criteria
        example: eq(name,'reports')
    repositoryItemSortByParam:
      name: sortBy
      in: query
      description: >
        Sorts the returned items. The following fields are not supported for sort: children, contentType, and digest. See [Sorting in REST APIs](https://developer.sas.com/apis/rest/Topics/#sorting).
      schema:
        type: string
        format: sort-criteria
        example: name:ascending:primary
    repositoryFileFilterParam:
      name: filter
      in: query
      description: >
        Filter criteria for items. The following fields are not supported in filter criteria: contentType,  and digest. See [Filtering in REST APIs](https://developer.sas.com/apis/rest/Topics/#filters).
      schema:
        type: string
        format: filter-criteria
        example: eq(name,'reports')
    repositoryFileSortByParam:
      name: sortBy
      in: query
      description: >
        Sorts the returned files. The following fields are not supported for sort: contentType and digest. See [Sorting in REST APIs](https://developer.sas.com/apis/rest/Topics/#sorting).
      schema:
        type: string
        format: sort-criteria
        example: name:ascending:primary
    ifMatchHeader:
      name: If-Match
      in: header
      description: The ETag that was returned from a GET, POST or PUT of a resource.
      required: true
      schema:
        type: string
      example: '"lgdxya1m"'
    workspacePathParameter:
      name: path
      in: query
      required: true
      description: >
        The full path of the workspace item.
      schema:
        type: string
      examples:
        folder:
          value: /Org/project/programs
        file:
          value: /Org/project/programs/report.sas
    workspaceItemType:
      name: type
      in: query
      schema:
        type: string
        enum:
          - FILE
          - FOLDER
      required: false
      description: >
        Only files are returned when 'FILE' specified and only folders when 'FOLDER' specified. Both files and folders are returned if no 'type' value is specified. This parameter is ignored when the accept value is not 'application/vnd.sas.collection'.
      example: FILE
    itemIdPathParameter:
      name: itemId
      in: path
      schema:
        type: string
      required: true
      description: The unique identifier for the repository item.
    workflowIdPathParameter:
      name: workflowId
      in: path
      schema:
        type: string
      required: true
      description: The unique identifier for the clinical workflow.
    taskIdPathParameter:
      name: taskId
      in: path
      schema:
        type: string
      required: true
      description: The unique identifier for the clinical workflow task.
    elementIdPathParameter:
      name: elementId
      in: path
      schema:
        type: string
      required: true
      description: The unique identifier for the clinical workflow element.
  requestBodies:
    idsRequestBody:
      description: Specifies the request body which is a list of id's.
      required: true
      content:
        application/json:
          schema:
            type: array
            items:
              type: string
          example:
            - d6eefec9-dcc2-4574-8af8-69897038d9c5
            - be655ec9-dcc2-4574-8af8-69897038d9c5
  examples:
    noIfMatchHeader:
      description: An example of an error response when the \"If-Match\" request header is not included in the request for an update.
      value:
        errorCode: 1011
        message: The request header field \"If-Match\" is required.
        details:
          - "traceId: 1277f7c486ad9ad2"
          - "path: /items/4706fd26-7c9b-4826-9e16-47b353d915c4"
        links: []
        remediation: In the request header, include the resource entity tag for the field \"If-Match\".
        version: 2
        httpStatusCode: 428
    preConditionFailedResponse:
      description: The ETag value provided for the request header field \"If-Match\" does not match the current resource's entity tag.
      value:
        errorCode: 1013
        message: The value for the request header field "If-Match" ("lgdxya1m") and the resource's entity tag ("lglbntj8") are not the same.
        details:
          - "traceId: 1277f7c486ad9ad2"
          - "path: /items/4706fd26-7c9b-4826-9e16-47b353d915c4"
        remediation: Get the latest representation of the resource, and apply the desired changes. Retry the operation with the modified representation and the entity tag from the response header field "ETag".
        links: []
        version: 2
        httpStatusCode: 412
    apiResponse:
      summary: Links to the API resources
      description: The list of links to top-level resources and operations available from the root service.
      value:
        version: 1
        links:
          - method: GET
            rel: entries
            href: /clinicalRepository/audit/entries
            uri: /clinicalRepository/audit/entries
            type: application/vnd.sas.collection
            itemType: application/vnd.sas.clinical.audit.summary.entry+json
          - method: GET
            rel: items
            href: /clinicalRepository/repository/items
            uri: /clinicalRepository/repository/items
            type: application/vnd.sas.collection
            itemType: application/vnd.sas.clinical.repository.item+json
          - method: POST
            rel: createContainer
            href: /clinicalRepository/repository/items/{itemId}/children
            uri: /clinicalRepository/repository/items/{itemId}/children
            responseType: application/vnd.sas.clinical.repository.container+json
          - method: GET
            rel: members
            href: /clinicalRepository/memberships/members
            uri: /clinicalRepository/memberships/members
            type: application/vnd.sas.collection
            itemType: application/vnd.sas.clinical.principal+json
          - method: GET
            rel: users
            href: /clinicalRepository/users
            uri: /clinicalRepository/users
            type: application/vnd.sas.collection
            itemType: application/vnd.sas.clinical.user+json
    currentPermissions:
      summary: An example of current repository item permissions
      description: An example representation of current repository item permissions.
      value:
        version: 1
        itemId: cac68a83-2f9b-4e45-859f-1163581edf1e
        itemTypeId: businessunit
        current: true
        owner:
          version: 1
          id: sastest1
          typeId: user
          name: SAS Test User 1
          displayName: SAS Test User 1 (sastest1)
        entries:
          - version: 1
            principal:
              version: 1
              id: sastest1
              typeId: aclOwner
              name: Owner
              displayName: Owner
            readPermission: ALLOW
            writePermission: ALLOW
            deletePermission: ALLOW
            adminPermission: ALLOW
          - version: 1
            principal:
              version: 1
              id: cac68a83-2f9b-4e45-859f-1163581edf1e
              typeId: aclMembers
              name: Members
              displayName: Members
            readPermission: ALLOW
            writePermission: UNSET
            deletePermission: UNSET
            adminPermission: UNSET
          - version: 1
            principal:
              version: 1
              id: sastest2
              typeId: user
              name: SAS Test User 2
              displayName: SAS Test User 2 (sastest2)
            readPermission: ALLOW
            writePermission: UNSET
            deletePermission: UNSET
            adminPermission: UNSET
          - version: 1
            principal:
              version: 1
              id: 01c4b251-639e-4500-a575-6c680c219b9a
              typeId: group
              name: TestGroup
              displayName: TestGroup (Business Unit)
              contextId: cac68a83-2f9b-4e45-859f-1163581edf1e
              contextTypeId: businessunit
            readPermission: ALLOW
            writePermission: ALLOW
            deletePermission: ALLOW
            adminPermission: UNSET
    defaultPermissions:
      description: An example representation of default permissions, which applies only to containers such as contexts or folders.
      summary: An example of default repository item permissions
      value:
        version: 1
        itemId: cac68a83-2f9b-4e45-859f-1163581edf1e
        itemTypeId: businessunit
        current: false
        owner:
          version: 1
          id: sastest1
          typeId: user
          name: SAS Test User 1
          displayName: SAS Test User 1 (sastest1)
        entries:
          - version: 1
            principal:
              version: 1
              id: sastest1
              typeId: aclOwner
              name: Owner
              displayName: Owner
            readPermission: ALLOW
            writePermission: ALLOW
            deletePermission: ALLOW
            adminPermission: ALLOW
          - version: 1
            principal:
              version: 1
              id: cac68a83-2f9b-4e45-859f-1163581edf1e
              typeId: aclMembers
              name: Members
              displayName: Members
            readPermission: ALLOW
            writePermission: UNSET
            deletePermission: UNSET
            adminPermission: UNSET
        ownerPropagation: USER
    workflowSetupsRequestBody:
      description: An example of workflow element setups to update.
      value:
        - version: 1
          workflowId: f05a3a94-0d97-4e13-9a67-bf296d64dd8c
          elementId: WFA359E49C-C88A-43CB-AA26-BABA1ED8D7A8
          elementName: User task
          elementType: USER_TASK
          summaryDetails: SAS Test User 1 (sastest1)
          type: USERTASK
          name: User task
          dueTimeStamp: 2026-03-05T19:17:00.000Z
          dueDateDuration: ""
          priority: MEDIUM
          assigneeId: sastest1
          assigneeDisplayName: SAS Test User 1 (sastest1)
          candidates:
            - version: 1
              id: sastest1
              typeId: user
              name: SAS Test User 1
              displayName: SAS Test User 1 (sastest1)
            - version: 1
              id: sastest2
              typeId: user
              name: SAS Test User 2
              displayName: SAS Test User 2 (sastest2)
        - elementId: WFFB513DFF-6C99-438D-9CF6-2AA9DEE2C2F8
          workflowId: f05a3a94-0d97-4e13-9a67-bf296d64dd8c
          elementType: NOTIFICATION_TASK
          type: NOTIFICATION
          subject: This is a test
          message: Test message
          bccRecipients:
            - version: 1
              id: sastest1
              typeId: user
              name: SAS Test User 1
              displayName: SAS Test User 1 (sastest1)
            - version: 1,
              id: sastest2
              typeId: user
              name: SAS Test User 2
              displayName: SAS Test User 2 (sastest2)
        - version: 1
          workflowId: f05a3a94-0d97-4e13-9a67-bf296d64dd8c
          elementId: WF9221DA57-7A25-499A-9515-9638DC3E958B
          elementName: Intermediate timer2
          elementType: TIMER_INTERMEDIATE_CATCH_EVENT
          summaryDetails: PT30M
          type: TIMEREVENT
          timerType: DURATION
          timerDuration: PT45M
          valueType: DURATION
    workflowVariables:
      description: An example of clinical workflow variables to update.
      value:
        - version: 1
          id: WF3347EC21-A96D-4E8D-9FD5-3CD925831684
          label: startCharPrompt
          name: startChar
          value: Default String
          type: String
          required: true
        - version: 1
          id: WF5BC71B97-297F-447E-8B7E-78237CCB3323
          label: startEnumPrompt
          name: startEnum
          value: Choice1
          type: String
          selectionOptions:
            Choice 3: Choice3
            Choice 1: Choice1
            Choice 2: Choice2
          required: false
        - version: 1
          id: WF2BC37BCD-B19C-4EBD-9E76-C64FEB586DDB
          label: startDatePrompt
          name: startDate
          value: 2025-04-21T15:27:45Z
          type: DateTime
          required: true
        - version: 1
          id: WF373CB873-FC94-4965-B3F4-E18678AA93AA
          label: startIntPrompt
          name: startInt
          value: "100"
          type: Integer
          required: true
          useDefault: false
          defaultValue: "16"
    workflowVariablesPatchRequestBody:
      description: An example request body of clinical workflow variables to update.
      value:
        - version: 1
          name: startBool
          value: "true"
        - version: 1
          name: startEnum
          value: Choice1
        - version: 1
          name: startDate
          value: 2025-04-21T19:27:45.000Z
    workflowDescriptorsRequestBody:
      description: An example of a request body of clinical workflow descriptors.
      value:
        - version: 1
          name: ClinicalWorkflow1
          id: 0f2ca54e-760e-4a83-816f-34cae70122a8
        - version: 1
          name: ClinicalWorkflow2
          id: e738e909-b506-4050-b59c-e9037cc3ada5
        - version: 1
          name: ClinicalWorkflow3
          id: 23e00d32-926c-42b8-bd8a-ee27c2a878e3
    repositoryContext:
      description: Example of a repository context representation.
      value:
        version: 1
        createdBy: sastest1
        creationTimeStamp: 2023-08-29T12:23:24Z
        modifiedBy: sastest1
        modifiedTimeStamp: 2023-09-19T19:01:21Z
        id: cac68a83-2f9b-4e45-859f-1163581edf1e
        typeId: businessunit
        createdByDisplayName: SAS Test User 1 (sastest1)
        modifiedByDisplayName: SAS Test User 1 (sastest1)
        primaryType: CONTEXT
        name: BU
        location: /
        path: /BU
        size: 5318049
        propertiesModifiedTimeStamp: 2023-08-29T12:23:24Z
        propertiesModifiedBy: sastest1
        propertiesModifiedByDisplayName: SAS Test User 1 (sastest1)
        state: ACTIVE
        owner: sastest1
        ownerDisplayName: SAS Test User 1 (sastest1)
        syncable: ALLOW
        defaultOwner: sastest1
        defaultOwnerDisplayName: SAS Test User 1 (sastest1)
        defaultMajorVersionLimit: 5
        defaultMinorVersionLimit: 10
        tags: []
    repositoryFolder:
      description: Example of a repository folder representation.
      value:
        version: 1
        createdBy: sastest1
        creationTimeStamp: 2023-09-15T15:41:22Z
        modifiedBy: sastest1
        modifiedTimeStamp: 2023-09-17T18:08:16Z
        id: 16edf3c1-b383-4649-9e34-8e153b111f1a
        typeId: folder
        createdByDisplayName: SAS Test User 1 (sastest1)
        modifiedByDisplayName: SAS Test User 1 (sastest1)
        primaryType: FOLDER
        name: folder1
        location: /BU
        path: /BU/folder1
        size: 1420
        propertiesModifiedTimeStamp: 2023-09-15T15:41:22Z
        propertiesModifiedBy: sastest1
        propertiesModifiedByDisplayName: SAS Test User 1 (sastest1)
        state: ACTIVE
        syncable: ALLOW
        owner: sastest1
        ownerDisplayName: SAS Test User 1 (sastest1)
        defaultOwner: sastest1
        defaultOwnerDisplayName: SAS Test User 1 (sastest1)
        tags: []
    repositoryFile:
      description: Example of a repository file representation.
      value:
        version: 1
        createdBy: sastest1
        creationTimeStamp: 2023-09-18T12:22:38Z
        modifiedBy: sastest1
        modifiedTimeStamp: 2023-09-18T12:22:38Z
        id: 2b489bdc-0ddd-4aa4-be19-567bb827aacb
        typeId: sasdataset
        createdByDisplayName: SAS Test User 1 (sastest1)
        modifiedByDisplayName: SAS Test User 1 (sastest1)
        primaryType: FILE
        name: a1.sas7bdat
        location: /BU
        path: /BU/a1.sas7bdat
        size: 5120
        propertiesModifiedTimeStamp: 2023-09-18T12:31:33Z
        propertiesModifiedBy: sastest1
        propertiesModifiedByDisplayName: SAS Test User 1 (sastest1)
        state: ACTIVE
        owner: sastest1
        ownerDisplayName: SAS Test User 1 (sastest1)
        syncable: ALLOW
        contentType: application/x-sas-data
        locked: true
        digest: 0D9ADE3E0280E904037804556B299C13
        signingStatus: NONE
        versioned: false
        fileVersion: "-"
        fileSize: 5120
        tags: []
    workspaceFolder:
      summary: An example of getting a workspace item that is a folder
      description: Returns a workspace folder representation.
      value:
        version: 1
        workspaceId: ce211872-f840-4d41-bcb4-4974cb35840e
        name: programs
        location: /Org/project
        path: /Org/project/programs
        type: FOLDER
        modifiedTimeStamp: 2023-12-13T16:04:52.385000Z
    workspaceFile:
      summary: An example of getting a workspace item that is a file
      description: Returns a workspace file representation.
      value:
        version: 1
        workspaceId: ce211872-f840-4d41-bcb4-4974cb35840e
        name: sleep.sas
        path: /Org/project/programs/sleep.sas
        type: FILE
        modifiedTimeStamp: 2023-12-13T15:39:09.907000Z
        contentType: application/x-sas
        size: 22
    notFoundResponse:
      summary: Not found error response
      description: This is an example of an error response for a resource that is not found.
      value:
        errorCode: 145016
        message: No resource with the path "/does/not/exist" was found.
        details:
          - Workspace item was not found /does/not/exist
        remediation: Either the path is incorrect or the desired resource does not exist.
        version: 2
        httpStatusCode: 404
    updateAssignmentExample:
      description: An example of a request body for updating task assignments.
      value:
        WFf2328f27-a0de-41e6-97bf-ffc1a110233f:
          assigneeId: sastest1
          hoursWorked: 0
          taskName: User task
        WF9bc35dcb-e0f5-422a-9e4e-ee0fedad7c06:
          assigneeId: sastest1
          hoursWorked: 5.5
          taskName: User task
        WF36954ca0-3503-43ec-bcdb-367732d8efe5:
          assigneeId: sastest1
          hoursWorked: 7
          taskName: User task
  schemas:
    actionStatusSummaryCollection:
      title: Action Status Summary Collection
      description: Provides a paginated collection of action status summaries.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/actionStatusSummary"
      example:
        value:
          name: actionStatusSummaries
          accept: application/vnd.sas.clinical.action.status.summary+json
          start: 0
          count: 1
          items:
            - version: 1
              id: 80ab2460-b236-4faa-b2ac-3b31cd7cb161
              clientId: b5797837-8b7b-47bf-8e21-9c2ba6172b01
              action: Upload File
              message: 1 of 1 item processed successfully.
              detailMessage: Processed 1 item.  1 successfully, 0 with warnings, and 0 with errors.
              startTimeStamp: 2023-08-28T20:28:09.558000Z
              endTimeStamp: 2023-08-28T20:28:10.142000Z
              percentComplete: 100
              stoppable: true
              progressStatus: COMPLETED
              completionStatus: INFO
          limit: 10
          version: 2
    actionStatusDeleteResponseErrorCollection:
      title: Action Status Delete Error Response Collection
      description: Provides a paginated collection of action status delete responses.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/error2"
      example:
        summary: Response for successful action status delete
        description: Here is a response for a POST request to delete action status entries. An empty list means that the delete was successful.
        value:
          name: errors
          accept: application/vnd.sas.error
          start: 0
          count: 0
          items: {}
          limit: 10
          version: 2
    auditEntrySummary:
      title: Audit Entry Summary
      description: The schema for an audit history record.
      properties:
        version:
          description: The version of the representation. This is version 1.
          type: number
        id:
          description: The unique identifier of the entry.
          type: string
        typeId:
          type: string
          description: The fine-grained type identifier of the item.
        timestamp:
          description: The time at which the event occurred.
          type: string
        userId:
          description: The identifier of the user who performed the audited action.
          type: string
        userDisplayName:
          description: The readable full display name for the user who performed the audited action.
          type: string
        action:
          description: The audited action taken.
          type: string
        actionDisplayName:
          description: The user-friendly display name for the audited action taken.
          type: string
        sourceId:
          description: The identifier for the source of the audited action.
          type: string
        sourceTypeId:
          description: The identifier for the source of the type of the audited action.
          type: string
        sourcePrimaryType:
          description: The primary category of the source type such as FILE, FOLDER, or CONTEXT.
          type: string
        sourceName:
          description: The name for the source of the audited action.
          type: string
        sourceLocation:
          description: The location for the source of the audited action.
          type: string
          nullable: true
        mode:
          description: The mode of the action taken.
          type: string
          enum:
            - USER
            - SYSTEM
            - ADMIN
        links:
          title: Links
          description: The links that apply to the resource.
          type: array
          items:
            title: Link
            type: object
            description: A link to a related operation or resource.
            required:
              - rel
            properties:
              method:
                type: string
                description: The HTTP method for the link.
              rel:
                type: string
                description: The relationship of the link to the resource.
              uri:
                type: string
                description: The relative URI for the link.
              href:
                type: string
                description: The URL for the link.
              title:
                type: string
                description: The title for the link.
              type:
                type: string
                description: The media type or link type for the link.
              itemType:
                type: string
                description: If this is a link to a container, `itemType` is the media type or link type for the items in the container.
              responseType:
                type: string
                description: The media type or link type of the response body for a `PUT`, `POST`, or `PATCH` operation.
              responseItemType:
                type: string
                description: The media type or link type of the items in the response body for a `PUT`, `POST`, or `PATCH` operation.
      example:
        value:
          version: 1
          id: 3d75111c-4f87-4341-8e81-cdeea8baa509
          typeId: auditEntry
          timestamp: 2023-09-18T17:27:31.321000Z
          userId: sastest1
          action: memberAdded
          sourcePrimaryType: CONTEXT
          sourceTypeId: organization
          sourceId: 4ce179a8-9f7b-406f-b22b-18b74e4d637e
          sourceName: RemoteRepositoryControllerTest-1695058044252
          sourceLocation: /
          mode: ADMIN
          userDisplayName: SAS Test User 1 (sastest1)
          actionDisplayName: Member added
          links:
            - method: GET
              rel: self
              href: /clinicalRepository/audit/entries/3d75111c-4f87-4341-8e81-cdeea8baa509
              uri: /clinicalRepository/audit/entries/3d75111c-4f87-4341-8e81-cdeea8baa509
              type: application/vnd.sas.clinical.audit.entry+json
    auditEntry:
      title: Audit Entry
      description: The schema for an audit history record with any supporting details.
      allOf:
        - $ref: "#/components/schemas/auditEntrySummary"
        - type: object
          properties:
            details:
              description: Additional information about the action. Included only when a single entry is requested.
              type: array
              items:
                $ref: "#/components/schemas/auditDetail"
      example:
        value:
          summary: Get audit entry
          description: Returns a representation of an audit entry, including details.
          value:
            links:
              - method: GET
                rel: self
                href: /clinicalRepository/audit/entries/3d75111c-4f87-4341-8e81-cdeea8baa509
                uri: /clinicalRepository/audit/entries/3d75111c-4f87-4341-8e81-cdeea8baa509
                type: application/vnd.sas.clinical.audit.entry+json
            version: 1
            id: 3d75111c-4f87-4341-8e81-cdeea8baa509
            typeId: auditEntry
            timestamp: 2023-09-18T17:27:31.321000Z
            userId: sastest1
            action: memberAdded
            sourcePrimaryType: CONTEXT
            sourceTypeId: organization
            sourceId: 4ce179a8-9f7b-406f-b22b-18b74e4d637e
            sourceName: RemoteRepositoryControllerTest-1695058044252
            sourceLocation: /
            mode: ADMIN
            userDisplayName: SAS Test User 1 (sastest1)
            actionDisplayName: Member added
            auditEntryDetails:
              - version: 1
                auditEntryId: 3d75111c-4f87-4341-8e81-cdeea8baa509
                detailId: 1
                attributeType: user
                attributeId: sastest1
                attributeName: Member
                newValue: sastest1
    auditEntryCollection:
      title: Audit Summary Entries
      description: Returns a collection of audit summary entries
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/auditEntrySummary"
      example:
        value:
          links:
            - method: GET
              rel: self
              href: /clinicalRepository/audit/entries?filter=and(or(eq(userId,'sastest1'),eq(userId,'sastest2')),ge(timestamp,2023-09-19T11:30:00.000Z))&sortBy=timestamp:descending:primary,timestamp:ascending:secondary&start=0&limit=100
              uri: /clinicalRepository/audit/entries?filter=and(or(eq(userId,'sastest1'),eq(userId,'sastest2')),ge(timestamp,2023-09-19T11:30:00.000Z))&sortBy=timestamp:descending:primary,timestamp:ascending:secondary&start=0&limit=100
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.audit.summary.entry+json
            - method: GET
              rel: collection
              href: /clinicalRepository/audit/entries
              uri: /clinicalRepository/audit/entries
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.audit.summary.entry+json
          name: entries
          accept: application/vnd.sas.clinical.audit.summary.entry+json
          start: 0
          count: 6
          items:
            - version: 1
              id: c8859454-9bb7-4bb3-aa3a-1b87b1a17ada
              typeId: auditEntry
              timestamp: 2023-09-20T03:30:59.741000Z
              userId: sastest1
              action: created
              sourcePrimaryType: CONTEXT
              sourceTypeId: businessunit
              sourceId: eecfdac1-268c-477b-abc7-55e53cbbff0f
              sourceName: topContext_BU
              sourceLocation: /
              mode: ADMIN
              userDisplayName: SAS Test User 1 (sastest1)
              actionDisplayName: Created
            - version: 1
              id: 49987776-69b8-453d-930a-e24c774f96a5
              typeId: auditEntry
              timestamp: 2023-09-20T03:28:41.654000Z
              userId: sastest2
              action: enabledVersioning
              sourcePrimaryType: FILE
              sourceTypeId: sasprogram
              sourceId: 6de9a72b-37ab-4fa2-a11c-6ba2531dd205
              sourceName: newFileMinor Versioned.sas
              sourceLocation: /RemoteRepositoryControllerTest-1695165452890/RemoteRepoUpDownloadControllerTest-1695165452890
              mode: USER
              userDisplayName: SAS Test User 2 (sastest2)
              actionDisplayName: Versioning enabled
            - version: 1
              id: b2dd0cc1-e1c2-4279-9a1e-c7a37aaed703
              typeId: auditEntry
              timestamp: 2023-09-20T03:28:41.552000Z
              userId: sastest2
              action: ownerChanged
              sourcePrimaryType: FILE
              sourceTypeId: sasprogram
              sourceId: 6de9a72b-37ab-4fa2-a11c-6ba2531dd205
              sourceName: newFileMinor Versioned.sas
              sourceLocation: /RemoteRepositoryControllerTest-1695165452890/RemoteRepoUpDownloadControllerTest-1695165452890
              mode: USER
              userDisplayName: SAS Test User 2 (sastest2)
              actionDisplayName: Owner changed
            - version: 1
              id: 41eb621f-59cb-4539-ae6e-17cf520e8301
              typeId: auditEntry
              timestamp: 2023-09-20T03:28:41.520000Z
              userId: sastest1
              action: aclCreated
              sourcePrimaryType: FILE
              sourceTypeId: sasprogram
              sourceId: 6de9a72b-37ab-4fa2-a11c-6ba2531dd205
              sourceName: newFileMinor Versioned.sas
              sourceLocation: /RemoteRepositoryControllerTest-1695165452890/RemoteRepoUpDownloadControllerTest-1695165452890
              mode: USER
              userDisplayName: SAS Test User 2 (sastest2)
              actionDisplayName: Permissions created
            - version: 1
              id: 70b836f3-d493-4f6a-9b3f-dce3a90d7ddb
              typeId: auditEntry
              timestamp: 2023-09-20T03:28:41.098000Z
              userId: sastest2
              action: associated
              sourcePrimaryType: FILE
              sourceTypeId: sasprogram
              sourceId: 6de9a72b-37ab-4fa2-a11c-6ba2531dd205
              sourceName: newFileMinor Versioned.sas
              sourceLocation: /RemoteRepositoryControllerTest-1695165452890/RemoteRepoUpDownloadControllerTest-1695165452890
              mode: USER
              userDisplayName: SAS Test User 2 (sastest2)
              actionDisplayName: Associated
            - version: 1
              id: 16a485ff-7848-4170-885d-a3bf06aafb4c
              typeId: auditEntry
              timestamp: 2023-09-20T03:28:41.098000Z
              userId: sastest2
              action: created
              sourcePrimaryType: FILE
              sourceTypeId: sasprogram
              sourceId: 6de9a72b-37ab-4fa2-a11c-6ba2531dd205
              sourceName: newFileMinor Versioned.sas
              sourceLocation: /RemoteRepositoryControllerTest-1695165452890/RemoteRepoUpDownloadControllerTest-1695165452890
              mode: USER
              userDisplayName: SAS Test User 2 (sastest2)
              actionDisplayName: Created
          limit: 100
          version: 2
    auditDetail:
      title: Audit Detail
      description: The audit entry detail.
      properties:
        auditEntryId:
          description: The identifier for the audit entry to which the detail belongs.
          type: string
        detailId:
          description: The numeric identifier for the audit entry detail record.
          type: integer
        attributeType:
          description: The type of the attribute value.
          type: string
        attributeId:
          description: The attribute identifier.
          type: string
        attributeName:
          description: The attribute name.
          type: string
        oldValue:
          description: The old value of the attribute before the action.
          type: string
        newValue:
          description: The new value of the attribute after the action.
          type: string
    auditActionCollection:
      title: Get Audit Actions
      description: Returns a collection of audit actions
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/auditAction"
      example:
        value:
          links:
            - method: GET
              rel: self
              href: /clinicalRepository/audit/actions?action=downloaded&sortBy=action:ascending:primary&start=0&limit=10
              uri: /clinicalRepository/audit/actions?action=downloaded&sortBy=action:ascending:primary&start=0&limit=10
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.audit.action+json
            - method: GET
              rel: collection
              href: /clinicalRepository/audit/actions
              uri: /clinicalRepository/audit/actions
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.audit.action+json
          name: actions
          accept: application/vnd.sas.clinical.audit.action+json
          start: 0
          count: 7
          items:
            - version: 1
              typeId: sasdataset
              action: downloaded
              displayName: Downloaded
            - version: 1
              typeId: rprogram
              action: downloaded
              displayName: Downloaded
            - version: 1
              typeId: file
              action: downloaded
              displayName: Downloaded
            - version: 1
              typeId: pdf
              action: downloaded
              displayName: Downloaded
            - version: 1
              typeId: sasprogram
              action: downloaded
              displayName: Downloaded
            - version: 1
              typeId: rds
              action: downloaded
              displayName: Downloaded
            - version: 1
              typeId: rdata
              action: downloaded
              displayName: Downloaded
          limit: 10
          version: 2
    auditAction:
      title: Audit Action
      description: The audit action item.
      properties:
        version:
          description: The version of the representation. This is version 1.
          type: number
        action:
          description: The audited action name.
          type: string
        displayName:
          description: The user-friendly display name for the audited action taken.
          type: string
        typeId:
          description: The type identifier of the action.
          type: string
      example:
        value:
          version: 1
          typeId: sasprogram
          action: downloaded
          displayName: Downloaded
    repositoryItem:
      title: Repository Item
      description: The representation of a repository item.
      type: object
      properties:
        version:
          type: number
          description: The version of the representation. This is version 1.
        id:
          type: string
          description: The unique identifier of the item.
        primaryType:
          type: string
          description: The primary category of the source type such as FILE, FOLDER, or CONTEXT.
          enum:
            - FILE
            - FOLDER
            - CONTEXT
        typeId:
          type: string
          description: The type identifier of the repository item.
        name:
          type: string
          description: The name of the item.
        location:
          description: The location, or parent path, of the item.
          type: string
        path:
          type: string
          description: The path of the item.
        size:
          type: number
          description: The size of the item in bytes.
        state:
          type: string
          description: The current state of the item.
          enum:
            - ACTIVE
            - CLOSED
        description:
          type: string
          description: The description of the item.
        createdBy:
          type: string
          description: The user ID for the user who created the item.
        createdByDisplayName:
          type: string
          description: The display name for the user who created the item.
        creationTimeStamp:
          type: string
          format: date-time
          description: The date and time the item was created.
        modifiedBy:
          type: string
          description: The user ID for the user who last modified the item.
        modifiedByDisplayName:
          type: string
          description: The display name for the user who last modified the item.
        modifiedTimeStamp:
          type: string
          format: date-time
          description: The date and time the item was last modified.
        propertiesModifiedBy:
          type: string
          description: The user ID for the user who last modified the item properties.
        propertiesModifiedByDisplayName:
          type: string
          description: The display name for the user who last modified the item properties.
        propertiesModifiedTimeStamp:
          type: string
          format: date-time
          description: The date and time the item properties were last modified.
        owner:
          type: string
          description: The user ID for the user who is the owner.
        ownerDisplayName:
          type: string
          description: The display name for the user who is the owner.
        syncable:
          type: string
          description: >
            Whether to allow, warn or deny when performing an action that attempts to sync the file associated with this synchronization information.
          enum:
            - ALLOW
            - WARN
            - DENY
            - DENY_ALL
        tags:
          type: array
          description: One or more strings who can be associated with the item so it can be grouped with other items.
          items: {}
      example:
        value:
          version: 1
          createdBy: sastest1
          creationTimeStamp: 2023-08-29T12:23:24Z
          modifiedBy: sastest1
          modifiedTimeStamp: 2023-09-19T19:01:21Z
          id: cac68a83-2f9b-4e45-859f-1163581edf1e
          typeId: businessunit
          createdByDisplayName: SAS Test User 1 (sastest1)
          modifiedByDisplayName: SAS Test User 1 (sastest1)
          primaryType: CONTEXT
          name: BU
          location: /
          path: /BU
          size: 5318049
          propertiesModifiedTimeStamp: 2023-08-29T12:23:24Z
          propertiesModifiedBy: sastest1
          propertiesModifiedByDisplayName: SAS Test User 1 (sastest1)
          state: ACTIVE
          owner: sastest1
          ownerDisplayName: SAS Test User 1 (sastest1)
          syncable: ALLOW
          defaultOwner: sastest1
          defaultOwnerDisplayName: SAS Test User 1 (sastest1)
          defaultMajorVersionLimit: 5
          defaultMinorVersionLimit: 10
          tags: []
    repositoryContainer:
      title: Repository Container
      description: The representation of a repository container.
      allOf:
        - $ref: "#/components/schemas/repositoryItem"
        - type: object
          properties:
            defaultMajorVersionLimit:
              type: integer
              description: The default limit to the number of major versions maintained for any files created within this container.
            defaultMinorVersionLimit:
              type: integer
              description: The default limit to the number of minor versions maintained for any files created within this container.
            defaultOwner:
              type: string
              description: The user ID of the user who is the default owner of this context or folder.
            defaultOwnerDisplayName:
              type: string
              description: The display name for the user who is the default owner of this context or folder.
      example:
        value:
          RepositoryContext:
            version: 1
            createdBy: sastest1
            creationTimeStamp: 2023-08-29T12:23:24Z
            modifiedBy: sastest1
            modifiedTimeStamp: 2023-09-19T19:01:21Z
            id: cac68a83-2f9b-4e45-859f-1163581edf1e
            typeId: businessunit
            createdByDisplayName: SAS Test User 1 (sastest1)
            modifiedByDisplayName: SAS Test User 1 (sastest1)
            primaryType: CONTEXT
            name: BU
            location: /
            path: /BU
            size: 5318049
            propertiesModifiedTimeStamp: 2023-08-29T12:23:24Z
            propertiesModifiedBy: sastest1
            propertiesModifiedByDisplayName: SAS Test User 1 (sastest1)
            state: ACTIVE
            owner: sastest1
            ownerDisplayName: SAS Test User 1 (sastest1)
            syncable: ALLOW
            defaultOwner: sastest1
            defaultOwnerDisplayName: SAS Test User 1 (sastest1)
            defaultMajorVersionLimit: 5
            defaultMinorVersionLimit: 10
            tags: []
          RepositoryFolder:
            version: 1
            createdBy: sastest1
            creationTimeStamp: 2023-09-15T15:41:22Z
            modifiedBy: sastest1
            modifiedTimeStamp: 2023-09-17T18:08:16Z
            id: 16edf3c1-b383-4649-9e34-8e153b111f1a
            typeId: folder
            createdByDisplayName: SAS Test User 1 (sastest1)
            modifiedByDisplayName: SAS Test User 1 (sastest1)
            primaryType: FOLDER
            name: folder1
            location: /BU
            path: /BU/folder1
            size: 1420
            propertiesModifiedTimeStamp: 2023-09-15T15:41:22Z
            propertiesModifiedBy: sastest1
            propertiesModifiedByDisplayName: SAS Test User 1 (sastest1)
            state: ACTIVE
            syncable: ALLOW
            owner: sastest1
            ownerDisplayName: SAS Test User 1 (sastest1)
            defaultOwner: sastest1
            defaultOwnerDisplayName: SAS Test User 1 (sastest1)
            tags: []
    repositoryItemPatchRequestBody:
      title: Update Repository Item
      description: Specifies the attributes and values to update the repository item.
      properties:
        attributes:
          type: object
          description: Specifies the attributes and values to update.  See example for details.
      example:
        value:
          name: MyNewFileName
          description: My new file description.
          minorVersionLimit: "5"
          majorVersionLimit: "10"
    limitedCollection:
      title: Limited Collection
      description: The schema for a limited collection of repository files.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          properties:
            limitReached:
              type: boolean
              description: >
                Flag that indicates whether the limit was reached.  If true, more search results might exist beyond what was returned.
    workspaceFolder:
      title: Workspace Folder
      description: The representation of a workspace folder.
      allOf:
        - $ref: "#/components/schemas/workspaceItem"
    workspaceFile:
      title: Workspace File
      description: The representation of a workspace file.
      allOf:
        - $ref: "#/components/schemas/workspaceItem"
        - type: object
          properties:
            contentType:
              type: string
              description: The content type of the file.
            size:
              type: number
              description: The size of the file in bytes.
    workspaceItem:
      title: Workspace Item
      description: A workspace item representation.
      type: object
      properties:
        version:
          type: number
          description: The version of the representation. This is version 1.
        workspaceId:
          type: string
          description: The unique identifier of the workspace in which this item is stored.
        name:
          type: string
          description: The name of the item.
        location:
          type: string
          description: The location, or parent path, of the item.
        path:
          type: string
          description: The path of the item.
        type:
          type: string
          description: The type of the workspace item.
          enum:
            - FILE
            - FOLDER
        modifiedTimeStamp:
          type: string
          format: date-time
          description: The date and time the item was last modified.
      example:
        value:
          version: 1
          workspaceId: ce211872-f840-4d41-bcb4-4974cb35840e
          name: sleep.sas
          location: /Org/project/programs
          path: /Org/project/programs/sleep.sas
          type: FILE
          modifiedTimeStamp: 2023-12-13T15:39:09.907Z
    workspaceDownloadRequestBody:
      title: Workspace Download
      description: The information to download items from the workspace.
      properties:
        version:
          description: The version of the representation. This is version 1.
          type: number
          example: 1
        paths:
          description: The paths of the files or folders to be downloaded.
          type: array
          items:
            type: string
          example:
            - /Results/1-12-23.txt
            - /Results/Data
      example:
        value:
          version: 1
          paths:
            - /proj1/data
            - /proj1/programs
            - /proj2/summary.doc
    workspaceChildrenCollection:
      description: The schema for a collection of workspace items which can be folders or files.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          properties:
            items:
              type: array
              description: The array of workspace items.
              items:
                $ref: "#/components/schemas/workspaceItem"
      example:
        value:
          links:
            - method: GET
              rel: self
              href: /clinicalWorkspaces/userWorkspace/items/Org/project/programs?start=0&limit=3
              uri: /clinicalWorkspaces/userWorkspace/items/Org/project/programs?start=0&limit=3
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.workspace.item+json
            - method: GET
              rel: collection
              href: /clinicalWorkspaces/userWorkspace/items/Org/project/programs
              uri: /clinicalWorkspaces/userWorkspace/items/Org/project/programs
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.workspace.item+json
          name: items
          accept: application/vnd.sas.clinical.workspace.item+json
          start: 0
          count: 3
          items:
            - version: 1
              workspaceId: ce211872-f840-4d41-bcb4-4974cb35840e
              name: inputs
              path: /Org/project/programs/inputs
              type: FOLDER
              modifiedTimeStamp: 2023-12-13T16:04:42.183000Z
            - version: 1
              workspaceId: ce211872-f840-4d41-bcb4-4974cb35840e
              name: outputs
              path: /Org/project/programs/outputs
              type: FOLDER
              modifiedTimeStamp: 2023-12-13T16:04:49.306000Z
            - version: 1
              workspaceId: ce211872-f840-4d41-bcb4-4974cb35840e
              name: sleep.sas
              path: /Org/project/programs/sleep.sas
              type: FILE
              modifiedTimeStamp: 2023-12-13T15:39:09.907000Z
              contentType: application/x-sas
              size: 22
          limit: 3
          version: 2
    repositoryChildrenCollection:
      title: Repository Children
      description: Returns the children of the specified repository item.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/repositoryItem"
      example:
        value:
          links:
            - method: GET
              rel: self
              href: /clinicalRepository/repository/items/cac68a83-2f9b-4e45-859f-1163581edf1e/children?sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=100
              uri: /clinicalRepository/repository/items/cac68a83-2f9b-4e45-859f-1163581edf1e/children?sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=100
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.repository.item+json
            - method: GET
              rel: collection
              href: /clinicalRepository/repository/items/cac68a83-2f9b-4e45-859f-1163581edf1e/children
              uri: /clinicalRepository/repository/items/cac68a83-2f9b-4e45-859f-1163581edf1e/children
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.repository.item+json
          name: items
          accept: application/vnd.sas.clinical.repository.item+json
          start: 0
          count: 4
          items:
            - version: 1
              createdBy: sastest1
              creationTimeStamp: 2023-09-15T15:41:22Z
              modifiedBy: sastest1
              modifiedTimeStamp: 2023-09-17T18:08:16Z
              id: 16edf3c1-b383-4649-9e34-8e153b111f1a
              typeId: folder
              createdByDisplayName: SAS Test User 1 (sastest1)
              modifiedByDisplayName: SAS Test User 1 (sastest1)
              primaryType: FOLDER
              name: folder1
              location: /BU2
              path: /BU2/folder1
              size: 1420
              propertiesModifiedTimeStamp: 2023-09-15T15:41:22Z
              propertiesModifiedBy: sastest1
              propertiesModifiedByDisplayName: SAS Test User 1 (sastest1)
              state: ACTIVE
              owner: sastest1
              ownerDisplayName: SAS Test User 1 (sastest1)
              defaultOwner: sastest1
              defaultOwnerDisplayName: SAS Test User 1 (sastest1)
            - version: 1
              createdBy: sastest1
              creationTimeStamp: 2023-09-13T13:35:34Z
              modifiedBy: sastest1
              modifiedTimeStamp: 2023-09-13T15:01:35Z
              id: 4437483c-dc7f-4512-986e-cde49d97d507
              typeId: therapeuticarea
              createdByDisplayName: SAS Test User 1 (sastest1)
              modifiedByDisplayName: SAS Test User 1 (sastest1)
              primaryType: CONTEXT
              name: ta1
              location: /BU2
              path: /BU2/ta1
              size: 5120000
              propertiesModifiedTimeStamp: 2023-09-13T13:35:34Z
              propertiesModifiedBy: sastest1
              propertiesModifiedByDisplayName: SAS Test User 1 (sastest1)
              state: ACTIVE
              owner: sastest1
              ownerDisplayName: SAS Test User 1 (sastest1)
              defaultOwner: sastest1
              defaultOwnerDisplayName: SAS Test User 1 (sastest1)
            - version: 1
              createdBy: sastest1
              creationTimeStamp: 2023-09-19T19:01:21Z
              modifiedBy: sastest1
              modifiedTimeStamp: 2023-09-19T19:01:21Z
              id: 6258036d-2d2a-4fb6-99a1-f1770d9c9784
              typeId: sasdataset
              createdByDisplayName: SAS Test User 1 (sastest1)
              modifiedByDisplayName: SAS Test User 1 (sastest1)
              primaryType: FILE
              name: testdata.sas7bdat
              location: /BU
              path: /BU/testdata.sas7bdat
              size: 196608
              propertiesModifiedTimeStamp: 2023-09-19T19:01:21Z
              propertiesModifiedBy: sastest1
              propertiesModifiedByDisplayName: SAS Test User 1 (sastest1)
              state: ACTIVE
              owner: sastest1
              ownerDisplayName: SAS Test User 1 (sastest1)
              contentType: application/x-sas-data
              locked: false
              digest: 0D9ADE3E0280E904037804556B299C13
              signingStatus: NONE
              versioned: true
              fileVersion: "2.0"
              fileSize: 0
            - version: 1
              createdBy: sastest1
              creationTimeStamp: 2023-09-17T18:16:52Z
              modifiedBy: sastest1
              modifiedTimeStamp: 2023-09-17T18:16:52Z
              id: 0f367366-3d6a-4157-8f61-2082e289d810
              typeId: file
              createdByDisplayName: SAS Test User 1 (sastest1)
              modifiedByDisplayName: SAS Test User 1 (sastest1)
              primaryType: FILE
              name: file1
              location: /BU
              path: /BU/file1
              size: 21
              propertiesModifiedTimeStamp: 2023-09-17T18:16:52Z
              propertiesModifiedBy: sastest1
              propertiesModifiedByDisplayName: SAS Test User 1 (sastest1)
              state: ACTIVE
              owner: sastest1
              ownerDisplayName: SAS Test User 1 (sastest1)
              contentType: application/octet-stream
              locked: false
              digest: 0D9ADE3E0280E904037804556B299C13
              signingStatus: NONE
              versioned: false
              fileVersion: "-"
              fileSize: 0
          limit: 100
          version: 2
    repositoryItemLimitedCollection:
      title: Repository Item Collection
      description: Provides a paginated collection of repository items.
      allOf:
        - $ref: "#/components/schemas/limitedCollection"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/repositoryItem"
      example:
        value:
          links:
            - method: GET
              rel: self
              href: /clinicalRepository/repository/items?filter=and(like(name,'test*'),like(location,'/BU'))&sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=100
              uri: /clinicalRepository/repository/items?filter=and(like(name,'test*'),like(location,'/BU'))&sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=100
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.repository.item+json
            - method: GET
              rel: collection
              href: /clinicalRepository/repository/items
              uri: /clinicalRepository/repository/items
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.repository.item+json
          name: items
          accept: application/vnd.sas.clinical.repository.item+json
          start: 0
          count: 10
          items:
            - version: 1
              createdBy: sastest1
              creationTimeStamp: 2023-09-19T19:14:39Z
              modifiedBy: sastest1
              modifiedTimeStamp: 2023-09-19T19:15:34Z
              id: 031ed8d9-f188-4d8f-ad74-ef917d0bec31
              typeId: folder
              createdByDisplayName: SAS Test User 1 (sastest1)
              modifiedByDisplayName: SAS Test User 1 (sastest1)
              primaryType: FOLDER
              name: TestData
              location: /BU
              path: /BU/TestData
              size: 32768
              propertiesModifiedTimeStamp: 2023-09-19T19:14:39Z
              propertiesModifiedBy: sastest1
              propertiesModifiedByDisplayName: SAS Test User 1 (sastest1)
              state: ACTIVE
              owner: sastest1
              ownerDisplayName: SAS Test User 1 (sastest1)
              defaultOwner: sastest1
              defaultOwnerDisplayName: SAS Test User 1 (sastest1)
            - version: 1
              createdBy: sastest1
              creationTimeStamp: 2023-09-19T19:14:57Z
              modifiedBy: sastest1
              modifiedTimeStamp: 2023-09-19T19:17:04Z
              id: 01f15a4c-06db-4bcc-b999-09bf99e8ae0b
              typeId: folder
              createdByDisplayName: SAS Test User 1 (sastest1)
              modifiedByDisplayName: SAS Test User 1 (sastest1)
              primaryType: FOLDER
              name: TestDocuments
              location: /BU
              path: /BU/TestDocuments
              size: 1385
              propertiesModifiedTimeStamp: 2023-09-19T19:14:57Z
              propertiesModifiedBy: sastest1
              propertiesModifiedByDisplayName: SAS Test User 1 (sastest1)
              state: ACTIVE
              owner: sastest1
              ownerDisplayName: SAS Test User 1 (sastest1)
              defaultOwner: sastest1
              defaultOwnerDisplayName: SAS Test User 1 (sastest1)
          limit: 2
          version: 2
    repositoryFileLimitedCollection:
      title: Repository File Collection
      description: Provides a paginated collection of repository files.
      allOf:
        - $ref: "#/components/schemas/limitedCollection"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/repositoryFile"
      example:
        value:
          links:
            - method: GET
              rel: self
              href: /clinicalRepository/repository/files?sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=5
              uri: /clinicalRepository/repository/files?sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=5
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.repository.file+json
            - method: GET
              rel: collection
              href: /clinicalRepository/repository/files
              uri: /clinicalRepository/repository/files
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.repository.file+json
          name: files
          accept: application/vnd.sas.clinical.repository.file+json
          start: 0
          count: 34
          items:
            - version: 1
              createdBy: sastest1
              creationTimeStamp: 2023-09-19T18:51:20Z
              modifiedBy: sastest1
              modifiedTimeStamp: 2023-09-19T18:51:20Z
              id: 14628a38-dab3-4021-a402-c6fa94c287ff
              typeId: file
              createdByDisplayName: SAS Test User 1 (sastest1)
              modifiedByDisplayName: SAS Test User 1 (sastest1)
              primaryType: FILE
              name: 0.txt
              location: /RemoteTests2/testGetFilesByQuery
              path: /RemoteTests2/testGetFilesByQuery/0.txt
              size: 19
              propertiesModifiedTimeStamp: 2023-09-19T18:51:20Z
              propertiesModifiedBy: sastest1
              propertiesModifiedByDisplayName: SAS Test User 1 (sastest1)
              state: ACTIVE
              owner: sastest1
              ownerDisplayName: SAS Test User 1 (sastest1)
              contentType: text/plain
              locked: false
              digest: 0D9ADE3E0280E904037804556B299C13
              signingStatus: NONE
              versioned: false
              fileVersion: "-"
              fileSize: 0
            - version: 1
              createdBy: sastest1
              creationTimeStamp: 2023-09-19T18:51:21Z
              modifiedBy: sastest1
              modifiedTimeStamp: 2023-09-19T18:51:21Z
              id: 9d1dab01-57ce-4f45-a9b3-cdb95d7087d2
              typeId: file
              createdByDisplayName: SAS Test User 1 (sastest1)
              modifiedByDisplayName: SAS Test User 1 (sastest1)
              primaryType: FILE
              name: 1.txt
              location: /RemoteTests2/testGetFilesByQuery
              path: /RemoteTests2/testGetFilesByQuery/1.txt
              size: 19
              propertiesModifiedTimeStamp: 2023-09-19T18:51:21Z
              propertiesModifiedBy: sastest1
              propertiesModifiedByDisplayName: SAS Test User 1 (sastest1)
              state: ACTIVE
              owner: sastest1
              ownerDisplayName: SAS Test User 1 (sastest1)
              contentType: text/plain
              locked: false
              digest: 3D9ADE3E0280E904037804556B299D45
              signingStatus: NONE
              versioned: false
              fileVersion: "-"
              fileSize: 0
            - version: 1
              createdBy: sastest1
              creationTimeStamp: 2023-09-19T18:51:23Z
              modifiedBy: sastest1
              modifiedTimeStamp: 2023-09-19T18:51:23Z
              id: ea43277e-fb07-4937-b853-7e29025080ea
              typeId: file
              createdByDisplayName: SAS Test User 1 (sastest1)
              modifiedByDisplayName: SAS Test User 1 (sastest1)
              primaryType: FILE
              name: 2.txt
              location: /RemoteTests2/testGetFilesByQuery
              path: /RemoteTests2/testGetFilesByQuery/2.txt
              size: 19
              propertiesModifiedTimeStamp: 2023-09-19T18:51:23Z
              propertiesModifiedBy: sastest1
              propertiesModifiedByDisplayName: SAS Test User 1 (sastest1)
              state: ACTIVE
              owner: sastest1
              ownerDisplayName: SAS Test User 1 (sastest1)
              contentType: text/plain
              locked: false
              signingStatus: NONE
              versioned: false
              fileVersion: "-"
              fileSize: 0
            - version: 1
              createdBy: sastest1
              creationTimeStamp: 2023-09-19T18:51:25Z
              modifiedBy: sastest1
              modifiedTimeStamp: 2023-09-19T18:51:25Z
              id: 9d71394a-b8ed-4fee-bedb-e190fbf30929
              typeId: file
              createdByDisplayName: SAS Test User 1 (sastest1)
              modifiedByDisplayName: SAS Test User 1 (sastest1)
              primaryType: FILE
              name: 3.txt
              location: /RemoteTests2/testGetFilesByQuery
              path: /RemoteTests2/testGetFilesByQuery/3.txt
              size: 19
              propertiesModifiedTimeStamp: 2023-09-19T18:51:25Z
              propertiesModifiedBy: sastest1
              propertiesModifiedByDisplayName: SAS Test User 1 (sastest1)
              state: ACTIVE
              owner: sastest1
              ownerDisplayName: SAS Test User 1 (sastest1)
              contentType: text/plain
              locked: false
              digest: 0D9ADE3E0280E904037804556B299C13
              signingStatus: NONE
              versioned: false
              fileVersion: "-"
              fileSize: 0
            - version: 1
              createdBy: sastest1
              creationTimeStamp: 2023-09-19T18:51:27Z
              modifiedBy: sastest1
              modifiedTimeStamp: 2023-09-19T18:51:27Z
              id: f9027a63-632f-4acf-be84-659e8089cd0e
              typeId: file
              createdByDisplayName: SAS Test User 1 (sastest1)
              modifiedByDisplayName: SAS Test User 1 (sastest1)
              primaryType: FILE
              name: 4.txt
              location: /RemoteTests2/testGetFilesByQuery
              path: /RemoteTests2/testGetFilesByQuery/4.txt
              size: 19
              propertiesModifiedTimeStamp: 2023-09-19T18:51:27Z
              propertiesModifiedBy: sastest1
              propertiesModifiedByDisplayName: SAS Test User 1 (sastest1)
              state: ACTIVE
              owner: sastest1
              ownerDisplayName: SAS Test User 1 (sastest1)
              contentType: text/plain
              locked: false
              signingStatus: NONE
              versioned: false
              fileVersion: "-"
              fileSize: 0
          limit: 5
          version: 2
          limitReached: false
    repositoryFile:
      title: Repository File
      description: The representation of a repository file.
      allOf:
        - $ref: "#/components/schemas/repositoryItem"
        - type: object
          properties:
            versioned:
              type: boolean
              description: Shows whether the file is versioned.
            fileVersion:
              type: string
              description: The version of the file.
            fileSize:
              type: number
              description: The size of the file in bytes.
            digest:
              type: string
              description: The hash value of the file based on the MD5 algorithm.
            locked:
              type: boolean
              description: Shows whether the file is locked.
            signingStatus:
              type: string
              description: Indicates the signing status of the file.
              enum:
                - NONE
                - CURRENT
                - PREVIOUS
                - BOTH
            majorVersionLimit:
              type: integer
              description: The limit to the number of major versions maintained for this file.
            minorVersionLimit:
              type: integer
              description: The limit to the number of minor versions maintained for this file.
      example:
        value:
          version: 1
          createdBy: sastest1
          creationTimeStamp: 2023-09-18T12:22:38Z
          modifiedBy: sastest1
          modifiedTimeStamp: 2023-09-18T12:22:38Z
          id: 2b489bdc-0ddd-4aa4-be19-567bb827aacb
          typeId: sasdataset
          createdByDisplayName: SAS Test User 1 (sastest1)
          modifiedByDisplayName: SAS Test User 1 (sastest1)
          primaryType: FILE
          name: a1.sas7bdat
          location: /BU
          path: /BU/a1.sas7bdat
          size: 5120
          propertiesModifiedTimeStamp: 2023-09-18T12:31:33Z
          propertiesModifiedBy: sastest1
          propertiesModifiedByDisplayName: SAS Test User 1 (sastest1)
          state: ACTIVE
          owner: sastest1
          ownerDisplayName: SAS Test User 1 (sastest1)
          syncable: ALLOW
          contentType: application/x-sas-data
          locked: true
          digest: 0D9ADE3E0280E904037804556B299C13
          signingStatus: NONE
          versioned: false
          fileVersion: "-"
          fileSize: 5120
          tags: []
    repositoryFileVersion:
      title: Repository File Version
      description: The repository file version representation.
      properties:
        version:
          description: The version of the representation. This is version 1.
          type: number
        fileId:
          description: The unique identifier of the file.
          type: string
        path:
          description: The path of the file.
          type: string
        fileVersion:
          description: The version of the file
          type: string
        comment:
          description: The comment added when creating the version.
          type: string
        createdBy:
          description: The user who created the version.
          type: string
        createdByDisplayName:
          type: string
          description: The display name of the user that created the item.
        creationTimeStamp:
          description: The date when the version was created.
          type: string
        latest:
          description: Whether this is the latest file version or not.
          type: boolean
        size:
          description: The size of the file version in bytes.
          type: number
        signed:
          description: Whether the version has been signed or not.
          type: boolean
      example:
        value:
          version: 1
          fileId: 8ab1344f-86e3-422a-8f80-a6124b8bebc2
          path: /Test Context/test file three.rtf
          fileVersion: "6.1"
          createdBy: sastest1
          createdByDisplayName: SAS Test User 1 (sastest1)
          size: 368
          creationTimeStamp: 2023-08-31T20:44:58Z
          signed: true
          latest: false
    repositoryFileVersionCollection:
      title: Repository File Versions
      description: The schema for a collection of repository file versions.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/repositoryFileVersion"
      example:
        value:
          links:
            - method: GET
              rel: self
              href: /healthClinicalAcceleration/repository/items/a76f30da-5662-4456-9689-7664de187395/versions?start=0&limit=4
              uri: /healthClinicalAcceleration/repository/items/a76f30da-5662-4456-9689-7664de187395/versions?start=0&limit=4
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.version+json
            - method: GET
              rel: collection
              href: /healthClinicalAcceleration/repository/items/a76f30da-5662-4456-9689-7664de187395/versions
              uri: /healthClinicalAcceleration/repository/items/a76f30da-5662-4456-9689-7664de187395/versions
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.version+json
          name: versions
          accept: application/vnd.sas.clinical.version+json
          start: 0
          count: 4
          items:
            - version: 1
              fileId: 8ab1344f-86e3-422a-8f80-a6124b8bebc2
              path: /Test Context/test file three.rtf
              fileVersion: "6.1"
              createdBy: sastest1
              createdByDisplayName: SAS Test User 1 (sastest1)
              size: 368
              creationTimeStamp: 2023-08-31T20:44:58Z
              signed: true
              latest: false
            - version: 1
              fileId: 8ab1344f-86e3-422a-8f80-a6124b8bebc2
              path: /Test Context/test file three.rtf
              fileVersion: "2.0"
              createdBy: sastest1
              createdByDisplayName: SAS Test User 1 (sastest1)
              size: 368
              creationTimeStamp: 2023-08-31T20:38:25Z
              signed: true
              latest: false
            - version: 1
              fileId: 8ab1344f-86e3-422a-8f80-a6124b8bebc2
              path: /Test Context/test file three.rtf
              fileVersion: "1.1"
              createdBy: sastest1
              createdByDisplayName: SAS Test User 1 (sastest1)
              size: 368
              creationTimeStamp: 2023-08-31T20:38:11Z
              signed: false
              latest: false
            - version: 1
              fileId: 8ab1344f-86e3-422a-8f80-a6124b8bebc2
              path: /Test Context/test file three.rtf
              fileVersion: "1.0"
              createdBy: sastest1
              createdByDisplayName: SAS Test User 1 (sastest1)
              size: 368
              creationTimeStamp: 2023-08-31T16:18:01Z
              signed: false
              latest: false
          limit: 4
          version: 2
    clinicalFilter:
      title: Filter
      description: This representation is used when specifying a filter for batch operations.
      properties:
        filter:
          description: The filter to retrieve the repository files(s) to sign.
          type: string
      example:
        value:
          version: 1
          filter: and(startsWith(path,'/P21-001/PROJ-001/results/'),eq(primaryType,'FILE'))
    contentSearchByBody:
      title: Download Items By Search Request Body
      description: This representation is used when specifying a filter for search.
      properties:
        filter:
          description: The filter to retrieve the repository files(s).
          type: string
          example: and(startsWith(name,'results'),eq(primaryType,'FILE'))
        text:
          description: The text for file content search to retrieve the repository files(s) to sign.
          type: string
          example: death
      example:
        value:
          version: 1
          filter: and(startsWith(path,'/P21-001/PROJ-001/results/'),eq(name,'report*'))
          text: penicillin
    ownerUpdate:
      title: Owner Update
      description: >
        The specification for updating the owner on a single repository item. This applies only when the 'action' request parameter is 'UPDATE'.
      properties:
        version:
          description: The version of the representation. This is version 1.
          type: number
        ownerId:
          description: The user ID of the new owner.
          type: string
        propagate:
          description: >
            Determines whether the owner update is propagated to the children of the specified repository item, if it is a container.
          type: boolean
        ensureMembership:
          description: >
            Determines whether the owner is added to the membership of contexts for which they are not currently a member during the update.
          type: boolean
      example:
        value:
          version: 1
          ownerId: sastest1
          propagate: true
          ensureMembership: true
    permissions:
      title: Permissions
      description: The permissions and owner that are set on a repository item.
      properties:
        version:
          description: The version of the representation. This is version 1.
          type: number
        itemId:
          description: The unique identifier of the repository item.
          type: string
        itemTypeId:
          description: The type identifier of the repository item.
          type: string
        current:
          description: Specifies whether the representation is of the current or default permissions.
          type: boolean
        owner:
          $ref: "#/components/schemas/principal"
        entries:
          type: array
          items:
            $ref: "#/components/schemas/permissionsEntry"
      example:
        value1:
          version: 1
          itemId: cac68a83-2f9b-4e45-859f-1163581edf1e
          itemTypeId: businessunit
          current: true
          owner:
            version: 1
            id: sastest1
            typeId: user
            name: SAS Test User 1
            displayName: SAS Test User 1 (sastest1)
          entries:
            - version: 1
              principal:
                version: 1
                id: sastest1
                typeId: aclOwner
                name: Owner
                displayName: Owner
              readPermission: ALLOW
              writePermission: ALLOW
              deletePermission: ALLOW
              adminPermission: ALLOW
            - version: 1
              principal:
                version: 1
                id: cac68a83-2f9b-4e45-859f-1163581edf1e
                typeId: aclMembers
                name: Members
                displayName: Members
              readPermission: ALLOW
              writePermission: UNSET
              deletePermission: UNSET
              adminPermission: UNSET
            - version: 1
              principal:
                version: 1
                id: sastest2
                typeId: user
                name: SAS Test User 2
                displayName: SAS Test User 2 (sastest2)
              readPermission: ALLOW
              writePermission: UNSET
              deletePermission: UNSET
              adminPermission: UNSET
            - version: 1
              principal:
                version: 1
                id: 01c4b251-639e-4500-a575-6c680c219b9a
                typeId: group
                name: TestGroup
                displayName: TestGroup (Business Unit)
                contextId: cac68a83-2f9b-4e45-859f-1163581edf1e
                contextTypeId: businessunit
              readPermission: ALLOW
              writePermission: ALLOW
              deletePermission: ALLOW
              adminPermission: UNSET
    permissionsEntry:
      title: Permissions Entry
      description: A single permissions entry.
      properties:
        version:
          description: The version of the representation. This is version 1.
          type: number
        principal:
          $ref: "#/components/schemas/principal"
        readPermission:
          description: The setting for read permission for the associated user or group.
          type: string
          enum:
            - ALLOW
            - UNSET
            - DENY
        writePermission:
          description: The setting for write permission for the associated user or group.
          type: string
          enum:
            - ALLOW
            - UNSET
            - DENY
        deletePermission:
          description: The setting for delete permission for the associated user or group.
          type: string
          enum:
            - ALLOW
            - UNSET
            - DENY
        adminPermission:
          description: The setting for admin permission for the associated user or group.
          type: string
          enum:
            - ALLOW
            - UNSET
            - DENY
    permissionsEntryUpdate:
      title: Permissions Entry Update
      description: A light-weight representation of a single permissions entry for updates.
      properties:
        version:
          description: The version of the representation. This is version 1.
          type: number
          example: 1
        principal:
          $ref: "#/components/schemas/principalIdentity"
        readPermission:
          description: The setting for read permission for the associated user or group.
          type: string
          example: ALLOW
          enum:
            - ALLOW
            - UNSET
            - DENY
        writePermission:
          description: The setting for write permission for the associated user or group.
          type: string
          example: ALLOW
          enum:
            - ALLOW
            - UNSET
            - DENY
        deletePermission:
          description: The setting for delete permission for the associated user or group.
          type: string
          example: UNSET
          enum:
            - ALLOW
            - UNSET
            - DENY
        adminPermission:
          description: The setting for admin permission for the associated user or group.
          type: string
          example: DENY
          enum:
            - ALLOW
            - UNSET
            - DENY
    permissionsUpdate:
      title: Permissions Update
      description: >
        The specification for updating permissions on a single repository item. This applies only when the 'action' request parameter is 'UPDATE'.
      properties:
        version:
          description: The version of the representation. This is version 1.
          type: number
          example: 1
        removals:
          description: The set of principals to remove from the permissions list.
          type: array
          items:
            $ref: "#/components/schemas/principalIdentity"
        updates:
          description: The set of existing permissions entries to update in the permissions list.
          type: array
          items:
            $ref: "#/components/schemas/permissionsEntryUpdate"
        additions:
          description: The set of permission entries to add to the permissions list.
          type: array
          items:
            $ref: "#/components/schemas/permissionsEntryUpdate"
      example:
        value:
          version: 1
          removals:
            - version: 1
              id: johndoe
              typeId: user
          updates:
            - version: 1
              principal:
                version: 1
                id: johndoe
                typeId: user
              readPermission: ALLOW
              writePermission: ALLOW
              deletePermission: UNSET
              adminPermission: DENY
          additions:
            - version: 1
              principal:
                version: 1
                id: johndoe
                typeId: user
              readPermission: ALLOW
              writePermission: ALLOW
              deletePermission: UNSET
              adminPermission: DENY
    principal:
      title: Principal
      description: A user or group in the system.
      type: object
      allOf:
        - $ref: "#/components/schemas/principalIdentity"
        - type: object
          properties:
            name:
              description: The user name or the group name.
              type: string
            displayName:
              description: The display name for the user or group.
              type: string
            contextId:
              description: >
                The identifier of the context that is associated with the group. This applies only when the principal is a group.
              type: string
              nullable: true
            contextTypeId:
              description: >
                The type identifier of the context that is associated with the group. This applies only when the principal is a group.
              type: string
              nullable: true
      example:
        value:
          version: 1
          id: dbdbef7d-dbdb-49c3-a154-fb41c261b802
          typeId: user
          name: SAS Test User 1
          displayName: SAS Test User 1 (sastest1)
    principalIdentity:
      title: Principal Identity
      type: object
      description: A light-weight representation of a user or group in the system.
      properties:
        version:
          description: The version of the representation. This is version 1.
          type: number
          example: 1
        id:
          description: The user or group identifier.
          type: string
          example: johndoe
        typeId:
          description: The type identifier.
          type: string
          example: user
      example:
        value:
          version: 1
          id: dbdbef7d-dbdb-49c3-a154-fb41c261b802
          typeId: user
    unassignedRoleCollection:
      title: Unassigned Roles
      description: The schema for a collection of unassigned roles.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/role"
      example:
        value:
          links:
            - method: GET
              rel: self
              href: /clinicalRepository/roles/unassigned?sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=100
              uri: /clinicalRepository/roles/unassigned?sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=100
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.role+json
            - method: GET
              rel: collection
              href: /clinicalRepository/roles/unassigned
              uri: /clinicalRepository/roles/unassigned
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.role+json
          name: roles
          accept: application/vnd.sas.clinical.role+json
          start: 0
          count: 2
          items:
            - version: 1
              createdBy: sastest1
              creationTimeStamp: 2023-08-30T12:23:48.037000Z
              modifiedBy: sastest1
              modifiedTimeStamp: 2023-09-19T19:00:42.594000Z
              id: f93ed790-c745-445d-8b67-304b478bb78b
              typeId: roleassignment
              createdByDisplayName: SAS Test User 1 (sastest1)
              modifiedByDisplayName: SAS Test User 1 (sastest1)
              name: role1
              displayName: role1
              assignedContextId: cac68a83-2f9b-4e45-859f-1163581edf1e
              assignedContextTypeId: businessunit
              definedContextId: cac68a83-2f9b-4e45-859f-1163581edf1e
              definedContextTypeId: businessunit
              inherited: false
            - version: 1
              createdBy: sastest1
              creationTimeStamp: 2023-08-30T12:23:48.037000Z
              modifiedBy: sastest1
              modifiedTimeStamp: 2023-09-19T19:00:42.594000Z
              id: 554a9400-0962-454d-9cb4-394772e2ea74
              typeId: roleassignment
              createdByDisplayName: SAS Test User 1 (sastest1)
              modifiedByDisplayName: SAS Test User 1 (sastest1)
              name: role2
              displayName: role2
              assignedContextId: cac68a83-2f9b-4e45-859f-1163581edf1e
              assignedContextTypeId: businessunit
              definedContextId: cac68a83-2f9b-4e45-859f-1163581edf1e
              definedContextTypeId: businessunit
              inherited: false
          limit: 100
          version: 2
    roleCollection:
      title: Roles
      description: The schema for a collection of roles.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/role"
      example:
        value:
          links:
            - method: GET
              rel: self
              href: /clinicalRepository/roles?sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=100
              uri: /clinicalRepository/roles?sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=100
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.role+json
            - method: GET
              rel: collection
              href: /clinicalRepository/roles
              uri: /clinicalRepository/roles
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.role+json
          name: roles
          accept: application/vnd.sas.clinical.role+json
          start: 0
          count: 2
          items:
            - version: 1
              createdBy: sastest1
              creationTimeStamp: 2023-09-13T13:35:54.593000Z
              modifiedBy: sastest1
              modifiedTimeStamp: 2023-09-13T13:35:54.593000Z
              id: 1d629863-ec6f-4c9c-9f60-147695d73849
              typeId: roleassignment
              createdByDisplayName: SAS Test User 1 (sastest1)
              modifiedByDisplayName: SAS Test User 1 (sastest1)
              name: buTestRole
              displayName: buTestRole (Business Unit)
              assignedContextId: 4437483c-dc7f-4512-986e-cde49d97d507
              assignedContextTypeId: therapeuticarea
              definedContextId: cac68a83-2f9b-4e45-859f-1163581edf1e
              definedContextTypeId: businessunit
              inherited: true
            - version: 1
              createdBy: sastest1
              creationTimeStamp: 2023-09-26T15:46:09.962000Z
              modifiedBy: sastest1
              modifiedTimeStamp: 2023-09-26T15:46:09.962000Z
              id: c39cf904-5dc5-4dab-b17e-f7960182feb0
              typeId: roleassignment
              createdByDisplayName: SAS Test User 1 (sastest1)
              modifiedByDisplayName: SAS Test User 1 (sastest1)
              name: taAdminRole
              displayName: taAdminRole
              description: Role for the therapeutic area administrator.
              assignedContextId: 4437483c-dc7f-4512-986e-cde49d97d507
              assignedContextTypeId: therapeuticarea
              definedContextId: 4437483c-dc7f-4512-986e-cde49d97d507
              definedContextTypeId: therapeuticarea
              inherited: false
          limit: 100
          version: 2
    role:
      title: Role
      description: A role is a collection of privileges to which user accounts and user groups can be assigned.
      properties:
        version:
          description: The version of the representation. This is version 1.
          type: number
        id:
          description: The unique identifier of the role.
          type: string
        typeId:
          description: The unique identifier of the role type.
          type: string
        name:
          description: The name of the role.
          type: string
        displayName:
          description: The name of the role. If the role is inherited, the context type it inherits from is displayed beside the name in parentheses.
          type: string
        description:
          description: The description of the role.
          type: string
        assignedContextId:
          description: The identifier of the context where the role is assigned.
          type: string
        assignedContextTypeId:
          description: The identifier of the context type where the role is assigned.
          type: string
        definedContextId:
          description: The identifier of the context in which the role is defined. If this ID is not the same as the assignedContextId, this represents an inherited role.
          type: string
        definedContextTypeId:
          description: The identifier of the context type where the role is defined.
          type: string
        inherited:
          description: Shows whether the role is inherited from another context.
          type: boolean
        creationTimeStamp:
          description: The date and time the role was created.
          type: string
        createdBy:
          description: The identifier of the user who created the role.
          type: string
        createdByDisplayName:
          description: The readable full display name for the user who created the role.
          type: string
        modifiedTimeStamp:
          description: The date and time the role was last modified.
          type: string
        modifiedBy:
          description: The identifier of the user who modified the role.
          type: string
        modifiedByDisplayName:
          description: The readable full display name for the user who modified the role.
          type: string
      example:
        value:
          version: 1
          createdBy: sastest1
          creationTimeStamp: 2023-09-26T15:46:09.962000Z
          modifiedBy: sastest1
          modifiedTimeStamp: 2023-09-26T15:46:09.962000Z
          id: c39cf904-5dc5-4dab-b17e-f7960182feb0
          typeId: roleassignment
          createdByDisplayName: SAS Test User 1 (sastest1)
          modifiedByDisplayName: SAS Test User 1 (sastest1)
          name: taAdminRole
          displayName: taAdminRole
          description: Role for the therapeutic area administrator.
          assignedContextId: 4437483c-dc7f-4512-986e-cde49d97d507
          assignedContextTypeId: therapeuticarea
          definedContextId: 4437483c-dc7f-4512-986e-cde49d97d507
          definedContextTypeId: therapeuticarea
          inherited: false
    privilegeCollection:
      title: Privileges
      description: The schema for a collection of privileges.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/privilege"
      example:
        summary: All privileges that can be assigned to a role
        value:
          links:
            - method: GET
              rel: self
              href: /clinicalRepository/roles/privileges?start=0&limit=10
              uri: /clinicalRepository/roles/privileges?start=0&limit=10
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.role.privilege+json
            - method: GET
              rel: collection
              href: /clinicalRepository/roles/privileges
              uri: /clinicalRepository/roles/privileges
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.role.privilege+json
          name: rolePrivileges
          accept: application/vnd.sas.clinical.role.privilege+json
          start: 0
          count: 10
          items:
            - version: 1
              id: PRIVILEGE_MANAGE_VERSIONING
              typeId: privilege
              name: Manage Versioning
              description: Can enable/disable versioning as well as manage version retention limits.
            - version: 1
              id: PRIVILEGE_MANAGE_STATE
              typeId: privilege
              name: Manage State
              description: Can manage state
            - version: 1
              id: PRIVILEGE_RESTORE
              typeId: privilege
              name: Restore Items Deleted by Others
              description: Can restore items deleted by others
            - version: 1
              id: PRIVILEGE_MANAGE_MEMBERSHIP
              typeId: privilege
              name: Manage Membership
              description: Can manage membership
            - version: 1
              id: PRIVILEGE_PERMANENTLY_DELETE
              typeId: privilege
              name: Permanently Delete Items
              description: Can permanently delete items
            - version: 1
              id: PRIVILEGE_MANAGE_LOCKS
              typeId: privilege
              name: Manage Locking
              description: Can lock and unlock files
            - version: 1
              id: PRIVILEGE_SIGN_FILE
              typeId: privilege
              name: Sign Files
              description: Can sign files
            - version: 1
              id: PRIVILEGE_MANAGE_ROLES
              typeId: privilege
              name: Manage Roles
              description: Can manage roles
            - version: 1
              id: PRIVILEGE_ACL_PROPAGATION
              typeId: privilege
              name: Propagate Permissions
              description: Can propagate permission changes down repository hierarchy.
            - version: 1
              id: PRIVILEGE_ENABLE_VERSIONING
              typeId: privilege
              name: Enable Versioning
              description: Can enable versioning
          limit: 10
          version: 2
    updateRolePrivileges:
      title: Role Privileges Update
      description: The specification for updating role privileges.
      properties:
        version:
          description: The version of the representation. This is version 1.
          type: number
        addPrivileges:
          description: The set of privilege IDs to add to the role.
          type: array
          items:
            type: string
        removePrivileges:
          description: The set of privilege IDs to remove from the role.
          type: array
          items:
            type: string
      example:
        value:
          version: 1
          addPrivileges:
            - PRIVILEGE_MANAGE_MEMBERSHIP
            - PRIVILEGE_SIGN_FILE
          removePrivileges:
            - PRIVILEGE_ENABLE_VERSIONING
            - PRIVILEGE_MANAGE_VERSIONING
    privilege:
      title: Privilege
      description: The privilege.
      properties:
        version:
          description: The version of the representation. This is version 1.
          type: number
        id:
          description: The identifier of the privilege.
          type: string
        typeId:
          description: The type identifier of the privilege.
          type: string
        name:
          description: The user-friendly name for the privilege.
          type: string
        description:
          description: The description of the privilege.
          type: string
    signatureCollection:
      title: Signatures
      description: The schema for a collection of signatures.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/signature"
      example:
        value:
          links:
            - method: GET
              rel: self
              href: /clinicalRepository/repository/items/8ab1344f-86e3-422a-8f80-a6124b8bebc2/signatures?start=0&limit=2
              uri: /clinicalRepository/repository/items/8ab1344f-86e3-422a-8f80-a6124b8bebc2/signatures?start=0&limit=2
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.signature+json
            - method: GET
              rel: collection
              href: /clinicalRepository/repository/items/8ab1344f-86e3-422a-8f80-a6124b8bebc2/signatures
              uri: /clinicalRepository/repository/items/8ab1344f-86e3-422a-8f80-a6124b8bebc2/signatures
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.signature+json
          name: signatures
          accept: application/vnd.sas.clinical.signature+json
          start: 0
          count: 2
          items:
            - version: 1
              id: 554a9400-0962-454d-9cb4-394772e2ea74
              fileId: 8ab1344f-86e3-422a-8f80-a6124b8bebc2
              fileVersion: "2.0"
              userId: sastest1
              userDisplayName: SAS Test User 1
              role: Approver
              reason: Approve
              creationTimeStamp: 2023-08-31T20:44:23.987000Z
            - version: 1
              id: 32ad3a44-7830-4ef8-9751-46bd30f92c64
              fileId: 8ab1344f-86e3-422a-8f80-a6124b8bebc2
              fileVersion: "6.1"
              userId: sastest1
              userDisplayName: SAS Test User 1
              role: Approver
              reason: Approve
              creationTimeStamp: 2023-08-31T20:45:37.964000Z
          limit: 2
          version: 2
    repositoryChildTypes:
      title: Child Types
      description: The representation of repository item child types.
      type: object
      properties:
        version:
          type: number
          description: The version of the representation. This is version 2.
        contexts:
          description: The total number of child contexts.
          type: integer
        folders:
          description: The total number of child folders.
          type: integer
        files:
          description: The total number of child files.
          type: integer
        deletedFolders:
          description: The total number of deleted folders residing in child recycle bins.
          type: integer
        deletedFiles:
          description: The total number of deleted files residing in child recycle bins.
          type: integer
        workflows:
          description: The total number of associated workflows.
          type: integer
      example:
        value:
          version: 2
          contexts: 21
          folders: 77
          files: 231
          deletedFolders: 0
          deletedFiles: 7
          workflows: 4
    typeCollection:
      title: Types
      description: The schema for a collection of types.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/type"
      example:
        value:
          links:
            - method: GET
              rel: self
              href: /clinicalRepository/types?start=0&limit=41
              uri: /clinicalRepository/types?start=0&limit=41
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.type+json
            - method: GET
              rel: collection
              href: /clinicalRepository/types
              uri: /clinicalRepository/types
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.type+json
          name: types
          accept: application/vnd.sas.clinical.type+json
          start: 0
          count: 4
          items:
            - version: 1
              id: name
              name: Name
              attributeType: STRING
              required: true
              searchable: true
            - version: 1
              id: description
              name: Description
              attributeType: STRING
              logicalType: MULTILINE
              required: false
              searchable: true
            - version: 1
              id: createdBy
              name: Created by
              attributeType: STRING
              logicalType: USER
              required: true
              searchable: true
            - version: 1
              id: created
              name: Date created
              attributeType: DATE
              logicalType: DATETIME
              required: true
              searchable: true
          limit: 100
          version: 2
    type:
      title: Type
      description: The type of the item
      properties:
        version:
          description: The version of the representation. This is version 1.
          type: number
        id:
          description: The unique identifier of the type.
          type: string
        name:
          description: The name of the type.
          type: string
        description:
          description: The description of the type.
          type: string
        auditable:
          description: Shows whether the type has actions that can be audited.
          type: boolean
        searchable:
          description: Shows whether the type is searchable.
          type: boolean
        contextType:
          description: Shows whether the type is a context type.
          type: boolean
        fileType:
          description: Shows whether the type is a file type.
          type: boolean
        icon:
          description: The icon for the type instance.
          type: string
        capabilities:
          description: The list of capabilities of the type. Possible values include TOP, MEMBERSHIP, STATE, and FILES.
          type: array
          items:
            type: string
        attributeDefinitions:
          description: The list of attribute definitions of the type used for sorting.
          type: array
          items:
            title: Type Attribute Definition
            description: The type attribute definition item
            properties:
              version:
                description: The version of the representation. This is version 1.
                type: number
              id:
                description: The unique identifier of the attribute definition.
                type: string
              name:
                description: The name of the attribute definition.
                type: string
              attributeType:
                description: The attribute type of the attribute definition.
                type: string
                enum:
                  - LONG
                  - STRING
                  - DATE
                  - BOOLEAN
              logicalType:
                description: The logical type of the attribute definition.
                type: string
              required:
                description: Shows whether the attribute definition is required.
                type: boolean
              searchable:
                description: Shows whether the attribute definition is searchable.
        allowableChildTypes:
          description: The list of allowable child types for the type.
          type: array
          items:
            type: string
      example:
        value:
          version: 1
          id: name
          name: Name
          attributeType: STRING
          required: true
          searchable: true
    utilizationHistory:
      title: Utilization History
      description: Utilization history including the most current utilization.
      properties:
        version:
          description: The version of the representation. This is version 1.
          type: number
        timestamp:
          description: The time at which the utilization history was collected.
          type: string
        size:
          description: The repository size in bytes at time collected.
          type: number
    utilizationHistoryCollection:
      title: Utilization History Collection
      description: The schema for a collection of daily utilization.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/utilizationHistory"
      example:
        value:
          links:
            - method: GET
              rel: self
              href: /clinicalRepository/utilization/history?start=0&limit=0
              uri: /clinicalRepository/utilization/history?start=0&limit=0
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.utilization.history.item+json
            - method: GET
              rel: collection
              href: /clinicalRepository/utilization/history
              uri: /clinicalRepository/utilization/history
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.utilization.history.item+json
          name: utilizationhistory
          accept: application/vnd.sas.clinical.utilization.history.item+json
          start: 0
          count: 7
          items:
            - version: 1
              timestamp: 2023-09-22T23:55:18.971000Z
              size: 2064921874
            - version: 1
              timestamp: 2023-09-23T23:55:21.208000Z
              size: 2064921874
            - version: 1
              timestamp: 2023-09-24T23:55:23.552000Z
              size: 2064922117
            - version: 1
              timestamp: 2023-09-25T23:56:58.559000Z
              size: 2066478911
            - version: 1
              timestamp: 2023-09-26T23:55:15.946000Z
              size: 2066431510
            - version: 1
              timestamp: 2023-09-27T23:55:26.596000Z
              size: 2067777023
            - version: 1
              timestamp: 2023-09-28T22:19:36.793000Z
              size: 2067895922
          limit: 0
          version: 2
    utilizationCollection:
      title: Repository Container Utilization
      description: The schema for a collection of repository containers.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/repositoryContainer"
      example:
        value:
          links:
            - method: GET
              rel: self
              href: /clinicalRepository/utilization/detail/cac68a83-2f9b-4e45-859f-1163581edf1e?sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=100
              uri: /clinicalRepository/utilization/detail/cac68a83-2f9b-4e45-859f-1163581edf1e?sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=100
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.repository.container+json
            - method: GET
              rel: collection
              href: /clinicalRepository/utilization/detail/cac68a83-2f9b-4e45-859f-1163581edf1e
              uri: /clinicalRepository/utilization/detail/cac68a83-2f9b-4e45-859f-1163581edf1e
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.repository.container+json
          name: items
          accept: application/vnd.sas.clinical.repository.container+json
          start: 0
          count: 2
          items:
            - version: 1
              createdBy: sastest1
              creationTimeStamp: 2023-09-15T15:41:22Z
              modifiedBy: sastest1
              modifiedTimeStamp: 2023-09-28T19:43:17Z
              id: 16edf3c1-b383-4649-9e34-8e153b111f1a
              typeId: folder
              createdByDisplayName: SAS Test User 1 (sastest1)
              modifiedByDisplayName: SAS Test User 1 (sastest1)
              primaryType: FOLDER
              name: folder1
              location: /BU1
              path: /BU1/folder1
              size: 1420
              propertiesModifiedTimeStamp: 2023-09-15T15:41:22Z
              propertiesModifiedBy: sastest1
              propertiesModifiedByDisplayName: SAS Test User 1 (sastest1)
              state: ACTIVE
              owner: sastest1
              ownerDisplayName: SAS Test User 1 (sastest1)
              defaultOwner: sastest1
              defaultOwnerDisplayName: SAS Test User 1 (sastest1)
            - version: 1
              createdBy: sastest1
              creationTimeStamp: 2023-09-13T13:35:34Z
              modifiedBy: sastest1
              modifiedTimeStamp: 2023-09-13T15:01:35Z
              id: 4437483c-dc7f-4512-986e-cde49d97d507
              typeId: therapeuticarea
              createdByDisplayName: SAS Test User 1 (sastest1)
              modifiedByDisplayName: SAS Test User 1 (sastest1)
              primaryType: CONTEXT
              name: ta1
              location: /BU1
              path: /BU1/ta1
              size: 5120000
              propertiesModifiedTimeStamp: 2023-09-13T13:35:34Z
              propertiesModifiedBy: sastest1
              propertiesModifiedByDisplayName: SAS Test User 1 (sastest1)
              state: ACTIVE
              owner: sastest1
              ownerDisplayName: SAS Test User 1 (sastest1)
              defaultOwner: sastest1
              defaultOwnerDisplayName: SAS Test User 1 (sastest1)
          limit: 100
          version: 2
    roleMembersCollection:
      title: Role Members
      description: The schema for a collection of role members.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/principal"
      example:
        value:
          links:
            - method: GET
              rel: self
              href: /clinicalRepository/roles/06dd9aaf-cbbd-4093-911a-8d8fa512ca01/members?sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=10
              uri: /clinicalRepository/roles/06dd9aaf-cbbd-4093-911a-8d8fa512ca01/members?sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=10
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.principal+json
            - method: GET
              rel: collection
              href: /clinicalRepository/roles/06dd9aaf-cbbd-4093-911a-8d8fa512ca01/members
              uri: /clinicalRepository/roles/06dd9aaf-cbbd-4093-911a-8d8fa512ca01/members
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.principal+json
          name: members
          accept: application/vnd.sas.clinical.principal+json
          start: 0
          count: 2
          items:
            - version: 1
              id: sastest3
              typeId: user
              name: SAS Test User 3
              displayName: SAS Test User 3 (sastest3)
            - version: 1
              id: 7f091359-36f4-4c7c-bb47-bd1f59d5af88
              typeId: group
              name: group A
              displayName: group A (Organization)
              contextId: 8b10535a-2515-441f-a69c-00b62c6a45b2
              contextTypeId: organization
          limit: 10
          version: 2
    groupCandidateCollection:
      title: Group Candidate Members
      description: The schema for a collection of candidate group members.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/principal"
      example:
        value:
          links:
            - method: GET
              rel: self
              href: /clinicalRepository/groups/8b10535a-2515-441f-a69c-00b62c6a45b2/members/candidates?filter=not(startsWith(typeId,%20'sas'))&sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=100
              uri: /clinicalRepository/groups/8b10535a-2515-441f-a69c-00b62c6a45b2/members/candidates?filter=not(startsWith(typeId,%20'sas'))&sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=100
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.principal+json
            - method: GET
              rel: collection
              href: /clinicalRepository/groups/8b10535a-2515-441f-a69c-00b62c6a45b2/members/candidates
              uri: /clinicalRepository/groups/8b10535a-2515-441f-a69c-00b62c6a45b2/members/candidates
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.principal+json
          name: members
          accept: application/vnd.sas.clinical.principal+json
          start: 0
          count: 4
          items:
            - version: 1
              id: 7f091359-36f4-4c7c-bb47-bd1f59d5af88
              typeId: group
              name: group A
              displayName: group A (Organization)
              contextId: 8b10535a-2515-441f-a69c-00b62c6a45b2
              contextTypeId: organization
            - version: 1
              id: 48a278d6-5984-45b9-9ff3-5e8cd631d772
              typeId: group
              name: group B
              displayName: group B (Organization)
              contextId: 8b10535a-2515-441f-a69c-00b62c6a45b2
              contextTypeId: organization
            - version: 1
              id: sastest1
              typeId: user
              name: SAS Test User 1
              displayName: SAS Test User 1 (sastest1)
            - version: 1
              id: sastest2
              typeId: user
              name: SAS Test User 2
              displayName: SAS Test User 2 (sastest2)
          limit: 100
          version: 2
    roleCandidateCollection:
      title: Role Candidate Members
      description: The schema for a collection of candidate role members.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/principal"
      example:
        value:
          links:
            - method: GET
              rel: self
              href: /clinicalRepository/roles/06dd9aaf-cbbd-4093-911a-8d8fa512ca01/members/candidates?sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=10
              uri: /clinicalRepository/roles/06dd9aaf-cbbd-4093-911a-8d8fa512ca01/members/candidates?sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=10
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.principal+json
            - method: GET
              rel: collection
              href: /clinicalRepository/roles/06dd9aaf-cbbd-4093-911a-8d8fa512ca01/members/candidates
              uri: /clinicalRepository/roles/06dd9aaf-cbbd-4093-911a-8d8fa512ca01/members/candidates
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.principal+json
          name: members
          accept: application/vnd.sas.clinical.principal+json
          start: 0
          count: 4
          items:
            - version: 1
              id: 7f091359-36f4-4c7c-bb47-bd1f59d5af88
              typeId: group
              name: group A
              displayName: group A (Organization)
              contextId: 8b10535a-2515-441f-a69c-00b62c6a45b2
              contextTypeId: organization
            - version: 1
              id: 48a278d6-5984-45b9-9ff3-5e8cd631d772
              typeId: group
              name: group B
              displayName: group B (Organization)
              contextId: 8b10535a-2515-441f-a69c-00b62c6a45b2
              contextTypeId: organization
            - version: 1
              id: sastest1
              typeId: user
              name: SAS Test User 1
              displayName: SAS Test User 1 (sastest1)
            - version: 1
              id: sastest2
              typeId: user
              name: SAS Test User 2
              displayName: SAS Test User 2 (sastest2)
          limit: 100
          version: 2
    candidateMembersCollection:
      title: Context Member Candidates
      description: Collection of candidate context member principals.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/principal"
      example:
        value:
          links:
            - method: GET
              rel: self
              href: /clinicalRepository/memberships/8b10535a-2515-441f-a69c-00b62c6a45b2/members/candidates?filter=not(startsWith(typeId,%20'sas'))&sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=100
              uri: /clinicalRepository/memberships/8b10535a-2515-441f-a69c-00b62c6a45b2/members/candidates?filter=not(startsWith(typeId,%20'sas'))&sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=100
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.principal+json
            - method: GET
              rel: collection
              href: /clinicalRepository/memberships/8b10535a-2515-441f-a69c-00b62c6a45b2/members/candidates
              uri: /clinicalRepository/memberships/8b10535a-2515-441f-a69c-00b62c6a45b2/members/candidates
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.principal+json
          name: members
          accept: application/vnd.sas.clinical.principal+json
          start: 0
          count: 4
          items:
            - version: 1
              id: 7f091359-36f4-4c7c-bb47-bd1f59d5af88
              typeId: group
              name: group A
              displayName: group A (Organization)
              contextId: 8b10535a-2515-441f-a69c-00b62c6a45b2
              contextTypeId: organization
            - version: 1
              id: 48a278d6-5984-45b9-9ff3-5e8cd631d772
              typeId: group
              name: group B
              displayName: group B (Organization)
              contextId: 8b10535a-2515-441f-a69c-00b62c6a45b2
              contextTypeId: organization
            - version: 1
              id: sastest1
              typeId: user
              name: SAS Test User 1
              displayName: SAS Test User 1 (sastest1)
            - version: 1
              id: sastest2
              typeId: user
              name: SAS Test User 2
              displayName: SAS Test User 2 (sastest2)
          limit: 100
          version: 2
    groupMembersCollection:
      title: Group Members
      description: Collection of group member principals.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/principal"
      example:
        value:
          links:
            - method: GET
              rel: self
              href: /clinicalRepository/groups/8b10535a-2515-441f-a69c-00b62c6a45b2/members?filter=not(startsWith(typeId,%20'sas'))&sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=100
              uri: /clinicalRepository/groups/8b10535a-2515-441f-a69c-00b62c6a45b2/members?filter=not(startsWith(typeId,%20'sas'))&sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=100
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.principal+json
            - method: GET
              rel: collection
              href: /clinicalRepository/groups/8b10535a-2515-441f-a69c-00b62c6a45b2/members
              uri: /clinicalRepository/groups/8b10535a-2515-441f-a69c-00b62c6a45b2/members
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.principal+json
          name: members
          accept: application/vnd.sas.clinical.principal+json
          start: 0
          count: 4
          items:
            - version: 1
              id: 7f091359-36f4-4c7c-bb47-bd1f59d5af88
              typeId: group
              name: group A
              displayName: group A (Organization)
              contextId: 8b10535a-2515-441f-a69c-00b62c6a45b2
              contextTypeId: organization
            - version: 1
              id: 48a278d6-5984-45b9-9ff3-5e8cd631d772
              typeId: group
              name: group B
              displayName: group B (Organization)
              contextId: 8b10535a-2515-441f-a69c-00b62c6a45b2
              contextTypeId: organization
            - version: 1
              id: sastest1
              typeId: user
              name: SAS Test User 1
              displayName: SAS Test User 1 (sastest1)
            - version: 1
              id: sastest2
              typeId: user
              name: SAS Test User 2
              displayName: SAS Test User 2 (sastest2)
          limit: 100
          version: 2
    membersCollection:
      title: Context Members
      description: The schema for a collection of principals.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/principal"
      example:
        value:
          links:
            - method: GET
              rel: self
              href: /clinicalRepository/memberships/8b10535a-2515-441f-a69c-00b62c6a45b2/members?filter=not(startsWith(typeId,%20'sas'))&sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=100
              uri: /clinicalRepository/memberships/8b10535a-2515-441f-a69c-00b62c6a45b2/members?filter=not(startsWith(typeId,%20'sas'))&sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=100
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.principal+json
            - method: GET
              rel: collection
              href: /clinicalRepository/memberships/8b10535a-2515-441f-a69c-00b62c6a45b2/members
              uri: /clinicalRepository/memberships/8b10535a-2515-441f-a69c-00b62c6a45b2/members
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.principal+json
          name: members
          accept: application/vnd.sas.clinical.principal+json
          start: 0
          count: 4
          items:
            - version: 1
              id: 7f091359-36f4-4c7c-bb47-bd1f59d5af88
              typeId: group
              name: group A
              displayName: group A (Organization)
              contextId: 8b10535a-2515-441f-a69c-00b62c6a45b2
              contextTypeId: organization
            - version: 1
              id: 48a278d6-5984-45b9-9ff3-5e8cd631d772
              typeId: group
              name: group B
              displayName: group B (Organization)
              contextId: 8b10535a-2515-441f-a69c-00b62c6a45b2
              contextTypeId: organization
            - version: 1
              id: sastest1
              typeId: user
              name: SAS Test User 1
              displayName: SAS Test User 1 (sastest1)
            - version: 1
              id: sastest2
              typeId: user
              name: SAS Test User 2
              displayName: SAS Test User 2 (sastest2)
          limit: 100
          version: 2
    groupCollection:
      title: Groups
      description: The schema for a collection of groups.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/group"
      example:
        value:
          links:
            - method: GET
              rel: self
              href: /clinicalRepository/groups?sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=10
              uri: /clinicalRepository/groups?sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=10
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.group+json
            - method: GET
              rel: collection
              href: /clinicalRepository/groups
              uri: /clinicalRepository/groups
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.group+json
          name: groups
          accept: application/vnd.sas.clinical.group+json
          start: 0
          count: 2
          items:
            - version: 1
              createdBy: sastest1
              creationTimeStamp: 2023-09-28T04:16:51.079000Z
              modifiedBy: sastest1
              modifiedTimeStamp: 2023-09-28T04:16:51.079000Z
              id: 89f8713d-682e-449a-903c-896bc35ef3aa
              typeId: group
              createdByDisplayName: SAS Test User 1 (sastest1)
              modifiedByDisplayName: SAS Test User 1 (sastest1)
              name: Test Group 1
              description: Remote Test Group
              contextId: 35f9a2ed-88ab-4f11-95cd-70a262df31e5
              contextTypeId: organization
            - version: 1
              createdBy: sastest1
              creationTimeStamp: 2023-09-28T04:16:56.029000Z
              modifiedBy: sastest1
              modifiedTimeStamp: 2023-09-28T04:16:56.029000Z
              id: f519a642-cc50-4abc-a85c-b147e4dd715e
              typeId: group
              createdByDisplayName: SAS Test User 1 (sastest1)
              modifiedByDisplayName: SAS Test User 1 (sastest1)
              name: Test Group 2
              contextId: 35f9a2ed-88ab-4f11-95cd-70a262df31e5
              contextTypeId: organization
          limit: 10
          version: 2
    group:
      title: Group
      description: A collection of users and groups.
      properties:
        version:
          description: The version of the representation. This is version 1.
          type: number
        id:
          description: The unique identifier of the group.
          type: string
        name:
          description: The name of the group.
          type: string
        description:
          description: The description of the group.
          type: string
          nullable: true
        contextId:
          description: >
            The identifier of the context that is associated with the group.
          type: string
        contextTypeId:
          description: >
            The type identifier of the context that is associated with the group.
          type: string
        creationTimeStamp:
          description: The date and time the group was created.
          type: string
        createdBy:
          description: The identifier of the user who created the group.
          type: string
        createdByDisplayName:
          description: The readable full display name for the user who created the group.
          type: string
        modifiedTimeStamp:
          description: The date and time the group was last modified.
          type: string
        modifiedBy:
          description: The identifier of the user who modified the group.
          type: string
        modifiedByDisplayName:
          description: The readable full display name for the user who modified the group.
          type: string
      example:
        value:
          version: 1
          createdBy: sastest1
          creationTimeStamp: 2023-09-28T04:16:51.079000Z
          modifiedBy: sastest1
          modifiedTimeStamp: 2023-09-28T04:16:51.079000Z
          id: 89f8713d-682e-449a-903c-896bc35ef3aa
          typeId: group
          createdByDisplayName: SAS Test User 1 (sastest1)
          modifiedByDisplayName: SAS Test User 1 (sastest1)
          name: Test Group 1
          description: Remote Test Group
          contextId: 35f9a2ed-88ab-4f11-95cd-70a262df31e5
          contextTypeId: organization
    membersUpdate:
      title: Members Update
      description: Specification for updating members.
      properties:
        version:
          title: Version
          description: The version of the representation. This is version 1.
          type: number
          example: 1
        addMembers:
          title: Add Members
          description: The principal identifiers to be added.
          type: array
          items:
            $ref: "#/components/schemas/principalIdentity"
        removeMembers:
          title: Remove Members
          description: The principal identifiers to be removed.
          type: array
          items:
            $ref: "#/components/schemas/principalIdentity"
      example:
        value:
          version: 1
          addMembers:
            - version: 1
              id: b87c3cd8-1c17-4179-8da6-5179c5bd792d
              typeId: group
            - version: 1
              id: sastest1
              typeId: user
          removeMembers:
            - version: 1
              id: 09b70fca-0c27-4266-8b6a-20152512bdea
              typeId: group
            - version: 1
              id: sastest2
              typeId: user
    membership:
      title: Membership
      description: A context membership in the system.
      properties:
        version:
          description: The version of the representation. This is version 1.
          type: number
        id:
          description: The unique identifier of the context with which this membership is associated.
          type: string
        typeId:
          description: The type identifier.
          type: string
        contextTypeId:
          description: The type identifier of the context that is associated with the membership.
          type: string
        creationTimeStamp:
          description: The date and time the context membership was created.
          type: string
        createdBy:
          description: The identifier of the user who created the context membership.
          type: string
        createdByDisplayName:
          description: The readable full display name for the user who created the context membership.
          type: string
        modifiedTimeStamp:
          description: The date and time the context membership was last modified.
          type: string
        modifiedBy:
          description: The identifier of the user who modified the context membership.
          type: string
        modifiedByDisplayName:
          description: The readable full display name for the user who modified the context membership.
          type: string
      example:
        value:
          version: 1
          id: 8646b35d-5ee5-43cb-860d-12f66c0e7e56
          typeId: membership
          contextTypeId: project
          createdBy: sastest1
          creationTimeStamp: 2023-09-28T01:15:49.143000Z
          createdByDisplayName: SAS Test User 1 (sastest1)
          modifiedBy: sastest1
          modifiedTimeStamp: 2023-09-28T01:15:49.143000Z
          modifiedByDisplayName: SAS Test User 1 (sastest1)
    activeUserCollection:
      title: Active Users
      description: The schema for a collection of active users.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/user"
      example:
        value:
          links:
            - method: GET
              rel: self
              href: /clinicalRepository/users/active?sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=10
              uri: /clinicalRepository/users/active?sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=10
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.user+json
            - method: GET
              rel: collection
              href: /clinicalRepository/users/active
              uri: /clinicalRepository/users/active
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.user+json
          name: users
          accept: application/vnd.sas.clinical.user+json
          start: 0
          count: 2
          items:
            - version: 1
              id: sastest1
              typeId: user
              name: SAS Test User 1
              modifiedTimeStamp: 2023-08-28T23:35:35.731000Z
              creationTimeStamp: 2023-08-28T23:35:35.731000Z
              uid: 0
              gid: 0
              providerId: ldap
              email: sas.user1@sas.com
              state: ACTIVE
            - version: 1
              id: sastest2
              typeId: user
              name: SAS Test User 2
              modifiedTimeStamp: 2023-08-28T23:35:35.339000Z
              creationTimeStamp: 2023-08-28T23:35:35.339000Z
              uid: 0
              gid: 0
              providerId: ldap
              email: sas.user2@sas.com
              state: ACTIVE
          limit: 10
          version: 2
    userCollection:
      title: Users
      description: The schema for a collection of users.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/user"
      example:
        value:
          links:
            - method: GET
              rel: self
              href: /clinicalRepository/users?sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=10
              uri: /clinicalRepository/users?sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=10
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.user+json
            - method: GET
              rel: collection
              href: /clinicalRepository/users
              uri: /clinicalRepository/users
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.user+json
          name: users
          accept: application/vnd.sas.clinical.user+json
          start: 0
          count: 2
          items:
            - version: 1
              id: sastest1
              typeId: user
              name: SAS Test User 1
              modifiedTimeStamp: 2023-08-28T23:35:35.731000Z
              creationTimeStamp: 2023-08-28T23:35:35.731000Z
              uid: 0
              gid: 0
              providerId: ldap
              email: sas.user1@sas.com
              state: ACTIVE
            - version: 1
              id: sastest2
              typeId: user
              name: SAS Test User 2
              modifiedTimeStamp: 2023-08-28T23:35:35.339000Z
              creationTimeStamp: 2023-08-28T23:35:35.339000Z
              uid: 0
              gid: 0
              providerId: ldap
              email: sas.user2@sas.com
              state: ACTIVE
          limit: 10
          version: 2
    recyclebinItemCollection:
      title: Recycle Bin Items
      description: The schema for a collection of recycle bin items.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/recyclebinItem"
      example:
        value:
          links:
            - method: GET
              rel: self
              href: /clinicalRepository/recyclebin/items?sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=10
              uri: /clinicalRepository/recyclebin/items?sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=10
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.recyclebin.item+json
            - method: GET
              rel: collection
              href: /clinicalRepository/recyclebin/items
              uri: /clinicalRepository/recyclebin/items
              type: application/vnd.sas.collection
              itemType: application/vnd.sas.clinical.recyclebin.item+json
          name: items
          accept: application/vnd.sas.clinical.recyclebin.item+json
          start: 0
          count: 2
          items:
            - version: 1
              id: c4249df8-f638-43c0-99b9-1064bd7e9c54
              typeId: file
              name: file1.txt
              location: /Org/ProjectA/Files
              size: 35
              fileSize: 35
              deletedBy: sastest1
              signingStatus: CURRENT
              deletedByDisplayName: SAS Test User 1 (sastest1)
              deletedTimeStamp: 2023-09-23T21:38:47Z
              creationTimeStamp: 2023-09-23T21:38:44Z
              createdBy: sastest1
              createdByDisplayName: SAS Test User 1 (sastest1)
            - version: 1
              id: 6e93f307-8cb8-4140-8204-b20ebc58033c
              typeId: file
              name: file2.txt
              location: /Org/ProjectA/Files
              size: 35
              fileSize: 35
              deletedBy: sastest1
              signingStatus: CURRENT
              deletedByDisplayName: SAS Test User 1 (sastest1)
              deletedTimeStamp: 2023-09-23T21:38:51Z
              creationTimeStamp: 2023-09-23T21:38:49Z
              createdBy: sastest1
              createdByDisplayName: SAS Test User 1 (sastest1)
          limit: 10
          version: 2
    workflowTaskSummary:
      title: Clinical Task Summary
      description: The schema for a clinical task summary.
      properties:
        version:
          description: The version of the representation. This is version 1.
          type: number
        id:
          description: The unique identifier for the clinical task.
          type: string
        name:
          description: The name of the clinical task.
          type: string
        description:
          description: The description of the clinical task.
          type: string
        elementName:
          description: The name of the clinical task as defined in the clinical workflow definition.
          type: string
        elementId:
          description: The identifier for the clinical workflow definition element this task represents.
          type: string
        contextId:
          description: The identifier for the context that is associated with the clinical workflow.
          type: string
        contextPath:
          description: The path of the context that is associated with the clinical workflow.
          type: string
        workflowId:
          description: The identifier for the clinical workflow with which this task is associated.
          type: string
        workflowName:
          description: The name of the clinical workflow with which this task is associated.
          type: string
        assigneeId:
          description: The identifier for the user to whom this clinical task is assigned.
          type: string
        assigneeDisplayName:
          description: The readable full display name for the user to whom this clinical task is assigned.
          type: string
        startedTimeStamp:
          description: The date and time the clinical task was started.
          type: string
        priority:
          description: The priority of the clinical task.
          type: string
          enum:
            - ALERT
            - HIGH
            - MEDIUM
            - LOW
        taskDueTimeStamp:
          description: The date and time the clinical task is due.
          type: string
        claimedTimeStamp:
          description: The date and time the clinical task was assigned.
          type: string
        creationTimeStamp:
          description: The date and time the clinical task was created.
          type: string
        assignmentStatus:
          description: The identifier for the user who created the clinical workflow.
          type: string
          enum:
            - ASSIGNED
            - STARTED
            - UNASSIGNED
      example:
        value:
          version: 1
          id: WF195a938b-c6c4-464f-8999-d092b513edd1
          name: Data setup
          elementId: data_setup
          contextId: 32a2a9fe-ba73-42d6-a9cd-1dda251cf441
          contextTypeId: organization
          contextPath: /Org
          workflowId: 30ac3aee-b128-4b87-8c06-e1a68a4486ee
          workflowName: Data Validation
          assigneeId: sastest1
          assigneeDisplayName: SAS Test User 1 (sastest1)
          priority: LOW
          taskDueTimeStamp: 2025-09-30T21:43:11.151Z
          creationTimeStamp: 2025-09-30T17:43:11.169Z
    workflowPatchRequestBody:
      title: Update Clinical Workflow
      description: Specifies the attributes and values to update the clinical workflow.
      properties:
        attributes:
          type: object
          description: Specifies the attributes and values to update.  See the example for details.
      example:
        value:
          name: MyNewWorkflowName
          description: My new clinical workflow description.
          owner: testuser
    task:
      title: Clinical Task
      description: The schema for a clinical task with any supporting details.
      allOf:
        - $ref: "#/components/schemas/workflowTaskSummary"
        - type: object
          properties:
            candidates:
              description: Candidates for the clinical task.
              type: array
              items:
                $ref: "#/components/schemas/principal"
            prompts:
              description: Prompts for the clinical task.
              type: array
            assignmentHistory:
              description: The assignment history for the clinical task.
              type: array
              items:
                $ref: "#/components/schemas/userTaskAssignment"
      example:
        value:
          version: 1
          id: WF195a938b-c6c4-464f-8999-d092b513edd1
          name: Data setup
          elementId: data_setup
          contextId: 32a2a9fe-ba73-42d6-a9cd-1dda251cf441
          contextTypeId: organization
          contextPath: /Org
          workflowId: 30ac3aee-b128-4b87-8c06-e1a68a4486ee
          workflowName: Data Validation
          assigneeId: sastest1
          assigneeDisplayName: SAS Test User 1 (sastest1)
          priority: LOW
          taskDueTimeStamp: 2025-09-30T21:43:11.151Z
          creationTimeStamp: 2025-09-30T17:43:11.169Z
    taskCollection:
      title: Clinical Tasks
      description: The schema for a collection of clinical tasks.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/workflowTaskSummary"
      example:
        value:
          name: clinicalTasks
          accept: application/vnd.sas.clinical.workflow.task.summary+json
          start: 0
          count: 2
          items:
            - version: 1
              id: WF195a938b-c6c4-464f-8999-d092b513edd1
              name: Data setup
              elementId: WF8BD8F378-EEBF-47A5-B2E5-AA4C34FFEC1C
              contextId: 32a2a9fe-ba73-42d6-a9cd-1dda251cf441
              contextTypeId: organization
              contextPath: /Org
              workflowId: 30ac3aee-b128-4b87-8c06-e1a68a4486ee
              workflowName: Data Validation
              assigneeId: sastest1
              assigneeDisplayName: SAS Test User 1 (sastest1)
              priority: LOW
              taskDueTimeStamp: 2025-09-30T21:43:11.151Z
              creationTimeStamp: 2025-09-30T17:43:11.169Z
            - version: 1
              id: WF65c92cd6-f16f-4339-9d8a-42dc5d17f0cb
              name: Data cleaning
              elementId: WFA359E49C-C88A-43CB-AA26-BABA1ED8D7A8
              contextId: 32a2a9fe-ba73-42d6-a9cd-1dda251cf441
              contextTypeId: organization
              contextPath: /Org
              workflowId: 3b68ab65-f831-4b2b-b0c9-bcdadd1f62ff
              workflowName: Data Clean Flow
              assigneeId: sastest1
              assigneeDisplayName: SAS Test User 1 (sastest1)
              priority: MEDIUM
              creationTimeStamp: 2025-09-30T17:46:12.671Z
    userTaskUpdate:
      title: Update User Task
      description: The schema for updating a single user task.
      properties:
        name:
          description: The name to set for the user task.
          type: string
        description:
          description: The description to set for the user task.
          type: string
        assigneeId:
          description: The identifier for the assignee to set for the user task.
          type: string
        priority:
          description: >
            The priority to set for the user task. Possible values are 'ALERT',  'HIGH', 'MEDIUM', and 'LOW'.
          type: string
        hoursWorked:
          description: >
            The hours worked for the current assignee. If the assignee is changed during the update,  this value is stored in the associated assignment history.
          type: number
          format: double
        taskDueTimeStamp:
          description: The due date to set for the clinical task.
          type: string
          format: date-time
        candidates:
          description: The IDs for the candidates of the clinical task.
          type: array
          items:
            type: string
        completionData:
          description: Specifies the names and values of the clinical workflow variables to update.
          type: array
          items:
            $ref: "#/components/schemas/workflowVariableValue"
      example:
        value:
          name: User Task A
          description: The first user task in the clinical workflow.
          assigneeId: sastest1
          priority: HIGH
          hoursWorked: 10.5
          dueDate: 2025-10-12T16:22:17
          candidates:
            - sastest1
            - sastest3
          completionData:
            - version: 1
              name: startBool
              value: "true"
            - version: 1
              name: startEnum
              value: Choice1
            - version: 1
              name: startDate
              value: 2025-04-21T19:27:45.000Z
    userTaskAssignment:
      title: User Task Assignment
      description: The schema for a single user task assignment.
      properties:
        id:
          description: The unique identifier for the clinical task assignment.
          type: string
        taskId:
          description: The identifier for the associated clinical task.
          type: string
        elementId:
          description: The identifier for the associated clinical workflow element.
          type: string
        workflowId:
          description: The identifier for the associated clinical workflow.
          type: string
        assigneeId:
          description: The identifier for the associated assignee.
          type: string
        assigneeDisplayName:
          description: The display name for the associated assignee.
          type: string
        assignedTimeStamp:
          description: The date and time the clinical task was assigned.
          type: string
        startedTimeStamp:
          description: The date and time the clinical task was started.
          type: string
        hoursWorked:
          description: The number of hours worked during this assignment.
          type: number
      example:
        value:
          id: b0820e8f-34a9-4bd7-8014-44c48c8b7f37
          taskId: WF11e55b3b-3beb-4544-9d58-703951458471
          elementId: WF94356662-C2A9-4DDC-B2AC-A3F6CE79CBB2
          workflowId: fba5920c-46b2-4821-8fbd-70cc21486dcd
          assigneeId: sastest1
          assigneeDisplayName: SAS Test User 1 (sastest1)
          assignedTimeStamp: 2025-10-10T13:39:32.130-0400
          startedTimeStamp: 2025-10-10T13:40:28.733-0400
          hoursWorked: 7
    taskDashboardSummary:
      title: Clinical Task Dashboard Summary
      description: The schema for a clinical task dashboard summary counts for the current user.
      allOf:
        - $ref: "#/components/schemas/taskDashboardSummary"
        - type: object
          properties:
            totalTasks:
              description: Total count of all clinical tasks for the current user.
              type: integer
            assignedTasks:
              description: Total count of clinical tasks assigned to the current user.
              type: integer
            startedTasks:
              description: Total count of clinical tasks started by the current user.
              type: integer
            unassignedTasks:
              description: Total count of unassigned clinical tasks of which the current user is a participant.
              type: integer
      example:
        value:
          version: 1
          totalTasks: 39
          assignedTasks: 12
          startedTasks: 18
          unassignedTasks: 9
    workflowDefinition:
      title: Clinical Workflow Definition
      description: The schema for a clinical workflow definition.
      properties:
        version:
          description: The version of the representation. This is version 1.
          type: number
        id:
          description: The unique identifier for the clinical workflow definition.
          type: string
        name:
          description: The name of the clinical workflow definition.
          type: string
        description:
          description: The description of the clinical workflow definition.
          type: string
        definitionVersion:
          description: The version of the clinical workflow definition.
          type: number
        modifiedTimeStamp:
          description: The date and time the clinical workflow definition was last modified.
          type: string
        modifiedBy:
          description: The identifier for the user who modified the clinical workflow definition.
          type: string
        comment:
          description: The comment associated with this version of the clinical workflow definition.
          type: string
      example:
        value:
          version: 1
          id: WFE8A2E824-9BD8-42E5-8252-E3DF3E75FEB5
          name: Workflow_Multiple_Tasks
          description: Multiple tasks with process data.
          definitionVersion: 1
          modifiedBy: sastest1
          modifiedTimeStamp: 2026-02-27T15:46:11.655Z
    workflow:
      title: Clinical Workflow
      description: The schema for a clinical workflow.
      properties:
        version:
          description: The version of the representation. This is version 1.
          type: number
        id:
          description: The unique identifier for the clinical workflow.
          type: string
        name:
          description: The name of the clinical workflow.
          type: string
        description:
          description: The description of the clinical workflow.
          type: string
        typeId:
          description: The type identifier for the clinical workflow.
          type: string
        contextId:
          description: The identifier for the context that is associated with the clinical workflow.
          type: string
        contextTypeId:
          description: The type identifier of the context that is associated with the clinical workflow.
          type: string
        contextPath:
          description: The path of the context that is associated with the clinical workflow.
          type: string
        definitionId:
          description: The identifier for the clinical workflow definition.
          type: string
        definitionVersion:
          description: The version of the clinical workflow definition.
          type: number
        definitionName:
          description: The name of the clinical workflow definition.
          type: string
        creationTimeStamp:
          description: The date and time the clinical workflow was created.
          type: string
        createdBy:
          description: The identifier for the user who created the clinical workflow.
          type: string
        createdByDisplayName:
          description: The readable full display name for the user who created the clinical workflow.
          type: string
        modifiedTimeStamp:
          description: The date and time the clinical workflow was last modified.
          type: string
        modifiedBy:
          description: The identifier for the user who modified the clinical workflow.
          type: string
        modifiedByDisplayName:
          description: The readable full display name for the user who modified the clinical workflow.
          type: string
        owner:
          description: The identifier for the user who owns the clinical workflow.
          type: string
        ownerDisplayName:
          description: The readable full display name for the user who owns the clinical workflow.
          type: string
        status:
          type: string
          description: The status of the clinical workflow.
          enum:
            - NOT_STARTED
            - ACTIVE
            - SUSPENDED
            - COMPLETED
      example:
        value:
          version: 1
          createdBy: sastest1
          creationTimeStamp: 2025-09-30T18:12:50.026Z
          modifiedBy: sastest1
          modifiedTimeStamp: 2025-09-30T18:12:50.026Z
          id: 4e91d7f7-b926-4c87-bd60-cf380a2e9d99
          typeId: clinicalWorkflow
          createdByDisplayName: SAS Test User 1 (sastest1)
          modifiedByDisplayName: SAS Test User 1 (sastest1)
          name: jobWorkflow
          contextId: 9848b115-388f-43d7-a714-47771b401d10
          contextTypeId: organization
          contextPath: /Org
          definitionId: WF9344F872-E3B7-4D7A-A7F1-9EF925A4DB76
          definitionVersion: 1
          definitionName: Run Clinical Job and Wait for Completion
          owner: sastest1
          ownerDisplayName: SAS Test User 1 (sastest1)
          status: NOT_STARTED
    workflowDefinitionCollection:
      title: Clinical Workflow Definitions
      description: The schema for a collection of clinical workflow definitions.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/workflowDefinition"
      example:
        value:
          name: definitions
          accept: application/vnd.sas.clinical.workflow.definition+json
          start: 0
          count: 3
          items:
            - version: 1
              id: WF8259FD33-26F6-4AF5-BF79-377E42123FBD
              name: WorkflowDefinition1
              definitionVersion: 1
              modifiedBy: sastest1
              modifiedTimeStamp: 2026-01-26T19:07:51.153Z
            - version: 1
              id: WF328A7474-D416-4D68-A683-AA2EAA9A38EE
              name: WorkflowDefinition2
              description: User task to notification task
              definitionVersion: 1
              modifiedBy: sastest1
              modifiedTimeStamp: 2026-02-27T15:46:17.039Z
            - version: 1
              id: WF14F99D9C-1ED9-4827-A794-4CDCD7ACC6E1
              name: WorkflowDefinition3
              definitionVersion: 1
              modifiedBy: sastest1
              modifiedTimeStamp: 2026-01-26T19:07:51.728Z
          limit: 1000
          version: 2
    workflowCollection:
      title: Clinical Workflows
      description: The schema for a collection of clinical workflows.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/workflow"
      example:
        value:
          name: clinicalWorkflows
          accept: application/vnd.sas.clinical.workflow+json
          start: 0
          count: 3
          items:
            - version: 1
              createdBy: sastest1
              creationTimeStamp: 2025-09-30T18:12:50.026Z
              modifiedBy: sastest1
              modifiedTimeStamp: 2025-09-30T18:12:50.026Z
              id: 4e91d7f7-b926-4c87-bd60-cf380a2e9d99
              typeId: clinicalWorkflow
              createdByDisplayName: SAS Test User 1 (sastest1)
              modifiedByDisplayName: SAS Test User 1 (sastest1)
              name: jobWorkflow
              contextId: 9848b115-388f-43d7-a714-47771b401d10
              contextType: organization
              contextPath: /Org
              definitionId: WF9344F872-E3B7-4D7A-A7F1-9EF925A4DB76
              definitionVersion: 1
              definitionName: Run Clinical Job and Wait for Completion
              owner: sastest1
              ownerDisplayName: SAS Test User 1 (sastest1)
              status: NOT_STARTED
            - version: 1
              createdBy: sastest1
              creationTimeStamp: 2025-09-30T18:20:41.275Z
              modifiedBy: sastest1
              modifiedTimeStamp: 2025-09-30T18:20:41.275Z
              id: d14d1f34-e086-40c4-9922-613c0a006ef1
              typeId: clinicalWorkflow
              createdByDisplayName: SAS Test User 1 (sastest1)
              modifiedByDisplayName: SAS Test User 1 (sastest1)
              name: simpleFlow1
              contextId: 9848b115-388f-43d7-a714-47771b401d10
              contextType: organization
              contextPath: /Org
              definitionId: WF3E1BE1B1-3D96-4794-A9BE-C7F74B43F34E
              definitionVersion: 1
              definitionName: SimpleUserFlow1
              owner: sastest1
              ownerDisplayName: SAS Test User 1 (sastest1)
              status: NOT_STARTED
            - version: 1
              createdBy: sastest1
              creationTimeStamp: 2025-09-30T18:11:17.916Z
              modifiedBy: sastest1
              modifiedTimeStamp: 2025-09-30T18:11:17.916Z
              id: dbd170c2-ab29-4977-aee8-ec892755b7f7
              typeId: clinicalWorkflow
              createdByDisplayName: SAS Test User 1 (sastest1)
              modifiedByDisplayName: SAS Test User 1 (sastest1)
              name: testAllWorkflow
              contextId: 9848b115-388f-43d7-a714-47771b401d10
              contextType: project
              contextPath: /Org/project1
              definitionId: WFf90bb6f7-88a6-44b0-9214-8cccad30a51b
              definitionVersion: 1
              definitionName: TestAllNodes
              owner: sastest1
              ownerDisplayName: SAS Test User 1 (sastest1)
              status: NOT_STARTED
          limit: 1000
          version: 2
    workflowCurrentElementCollection:
      title: Current Clinical Workflow Elements
      description: The schema for a collection of clinical workflow elements that have been activated.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/workflowCurrentElementBase"
      example:
        value:
          name: clinicalFlowElements
          accept: application/vnd.sas.clinical.workflow.elements+json
          start: 0
          count: 5
          items:
            - version: 1
              id: WF41955d70-7fc3-4ec1-8f2d-2d8191fe5762
              type: USERTASK
              elementName: User task
              elementId: WFA359E49C-C88A-43CB-AA26-BABA1ED8D7A8
              elementType: USER_TASK
              creationTimeStamp: 2026-02-24T21:10:01.356Z
              workflowStatus: ACTIVE
              name: User task
              contextId: 4ad3c142-0e6e-4ff7-bd3d-2d38261671c1
              contextPath: /org
              contextTypeId: organization
              workflowId: f05a3a94-0d97-4e13-9a67-bf296d64dd8c
              workflowName: 23feb_allElements_1
              assigneeId: sastest1
              assigneeDisplayName: SAS Test User 1 (sastest1)
              priority: HIGH
              taskDueTimeStamp: 2026-03-05T19:17:00.000Z
              assignedTimeStamp: 2026-02-24T21:10:02.874Z
              assignmentStatus: ASSIGNED
              hoursWorked: 0
            - version: 1
              id: WF7e8fe2a6-29dd-472e-bfb6-840d51a1e68d
              type: TIMEREVENT
              elementName: Intermediate timer1
              elementId: WFB415DDBB-C35D-45F7-8A26-4624256BD76F
              elementType: TIMER_INTERMEDIATE_CATCH_EVENT
              workflowStatus: ACTIVE
              dueDateTimeStamp: 2026-02-28T16:02:00.000Z
            - version: 1
              id: WFabf7b0dc-dc19-477b-8970-463e6a1e0a69
              type: TIMEREVENT
              elementName: Intermediate timer2
              elementId: WF9221DA57-7A25-499A-9515-9638DC3E958B
              elementType: TIMER_INTERMEDIATE_CATCH_EVENT
              workflowStatus: ACTIVE
              dueDateTimeStamp: 2026-02-24T21:55:01.683Z
            - version: 1
              id: WF0fe841e7-0afc-4cf1-8685-aecc2b8c1545
              type: SIGNALEVENT
              elementName: Intermediate signal1
              elementId: WF4B856C82-C95B-41F7-A38F-D6FADE19C77B
              elementType: SIGNAL_INTERMEDIATE_CATCH_EVENT
              creationTimeStamp: 2026-02-24T21:10:00.616Z
              workflowStatus: ACTIVE
              signalName: repositoryFilePut1
              locations:
                - /uploadMe/*
            - version: 1
              id: WF7245cbf7-f649-4b67-ae34-cf02c6643f68
              type: SIGNALEVENT
              elementName: Intermediate signal2
              elementId: WF554C2F4B-1B46-4669-AAD7-B61886AD1DDA
              elementType: SIGNAL_INTERMEDIATE_CATCH_EVENT
              creationTimeStamp: 2026-02-24T21:10:00.652Z
              workflowStatus: ACTIVE
              signalName: repositoryFilePut2
              locations:
                - /org/folder1/*
    workflowCompletedElementCollection:
      title: Completed Clinical Workflow Elements
      description: The schema for a collection of completed clinical workflow elements.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/workflowCommonCompletedElement"
      example:
        value:
          name: elements
          accept: application/vnd.sas.clinical.workflow.completed.element
          start: 0
          count: 2
          items:
            - version: 1
              id: WFd3636ad1-7a97-47d1-9abd-7c4fa3f18e21
              workflowId: 7e37b1e6-24c2-48bf-92f2-25dc92ead9c0
              workflowName: HLSCRC-14736-1
              elementId: WF9EAC4E5F-2982-47D2-A3A2-29135D3D4C7B
              elementName: User task
              elementType: USER_TASK
              type: USERTASK
              completedBy: sastest1
              completedByDisplayName: SAS Test User 1 (sastest1)
              creationTimeStamp: 2026-02-17T16:06:19.859Z
              completedTimeStamp: 2026-02-17T16:07:59.346Z
              completionState: COMPLETED_SUCCESSFUL
              name: User task
              priority: MEDIUM
              assigneeId: sastest1
              assigneeDisplayName: SAS Test User 1 (sastest1)
              assignedTimeStamp: 2026-02-17T16:06:19.941Z
              startedTimeStamp: 2026-02-17T16:07:30.929Z
              totalHoursWorked: 0
            - version: 1
              id: WF7cb8719e-aece-459b-8362-272bb94868d8
              workflowId: WF2fb3f5f3-84ed-405b-9d24-5514e668b278
              workflowName: catest_SequentialNotifications
              elementId: WF4D5E5ADA-FB1D-44A7-A73B-D977C7D75A1E
              elementName: Call activity1
              elementType: NOTIFICATION_TASK
              type: NOTIFICATION
              completedBy: sastest1
              completedByDisplayName: SAS Test User 1 (sastest1)
              creationTimeStamp: 2026-02-23T16:43:17.733Z
              completedTimeStamp: 2026-02-23T16:43:20.931Z
              completionStatus: Clinical task completed and notification sent.
              completionState: COMPLETED_SUCCESSFUL
              message: "1"
              bccRecipients:
                - version: 1
                  id: sastest1
                  typeId: user
                  name: SAS Test User 1
                  displayName: SAS Test User 1 (sastest1)
          limit: 2
          version: 2
    workflowElementCollection:
      title: Clinical Workflow Elements
      description: The schema for a collection of clinical workflow elements.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              items:
                $ref: "#/components/schemas/workflowElementBase"
      example:
        value:
          name: elements
          accept: application/vnd.sas.clinical.workflow.elementdefinition+json
          start: 0
          count: 8
          items:
            - version: 1
              workflowId: f05a3a94-0d97-4e13-9a67-bf296d64dd8c
              elementId: WFA359E49C-C88A-43CB-AA26-BABA1ED8D7A8
              elementName: User task
              elementType: USER_TASK
              type: USERTASK
              name: User task
              dueTimeStamp: 2026-03-05T19:17:00.000Z
              priority: MEDIUM
              assigneeId: sastest1
              assigneeDisplayName: SAS Test User 1 (sastest1)
              candidates:
                - version: 1
                  id: sastest1
                  typeId: user
                  name: SAS Test User 1
                  displayName: SAS Test User 1 (sastest1)
                - version: 1
                  id: sastest2
                  typeId: user
                  name: SAS Test User 2
                  displayName: SAS Test User 2 (sastest2)
                - version: 1
                  id: sastest3
                  typeId: user
                  name: SAS Test User 3
                  displayName: SAS Test User 3 (sastest3)
            - version: 1
              workflowId: f05a3a94-0d97-4e13-9a67-bf296d64dd8c
              elementId: WFB415DDBB-C35D-45F7-8A26-4624256BD76F
              elementName: Intermediate timer1
              elementType: TIMER_INTERMEDIATE_CATCH_EVENT
              summaryDetails: 2026-02-28T16:02:00.000Z
              type: TIMEREVENT
              timerType: DURATION
              timerTimeStamp: 2026-02-28T16:02:00.000Z
              valueType: TIMESTAMP
            - version: 1
              workflowId: f05a3a94-0d97-4e13-9a67-bf296d64dd8c
              elementId: WF21B84E29-F2E8-4B38-BE1E-FD2582A9B9DB
              elementName: Wait job
              elementType: SYSTEM_JOB_EXEC
              summaryDetails: simple_with_parameters.cjob
              type: JOBTASK
              jobPath: /org/simple_with_parameters.cjob
              jobName: simple_with_parameters.cjob
              jobLocation: /org
              jobVersion: "1.3"
              parameters:
                - version: 1
                  useDefault: false
                  name: folder_param2
                  value:
                    path: /org/inputOutputDataSets
                    includeSubfolders: false
                  type: FOLDER
                - version: 1
                  useDefault: false
                  name: date_param2
                  value: 2026-04-11T18:56:43.000Z
                  type: DATE
            - version: 1
              workflowId: f05a3a94-0d97-4e13-9a67-bf296d64dd8c
              elementId: WF9221DA57-7A25-499A-9515-9638DC3E958B
              elementName: Intermediate timer2
              elementType: TIMER_INTERMEDIATE_CATCH_EVENT
              summaryDetails: PT30M
              type: TIMEREVENT
              timerType: DURATION
              timerDuration: PT30M
              valueType: DURATION
            - version: 1
              workflowId: f05a3a94-0d97-4e13-9a67-bf296d64dd8c
              elementId: WFFB513DFF-6C99-438D-9CF6-2AA9DEE2C2F8
              elementName: Notification
              elementType: NOTIFICATION_TASK
              summaryDetails: Clinical Notification
              type: NOTIFICATION
              notificationTemplate: Clinical Notification
              recipientsFromTask: false
              toRecipient:
                version: 1
                id: sasadm
                typeId: user
                name: SAS Administrator
                displayName: SAS Administrator (sasadm)
              bccRecipients: []
              subject: ""
              message: ""
            - version: 1
              workflowId: f05a3a94-0d97-4e13-9a67-bf296d64dd8c
              elementId: WF554C2F4B-1B46-4669-AAD7-B61886AD1DDA
              elementName: Intermediate signal2
              elementType: SIGNAL_INTERMEDIATE_CATCH_EVENT
              type: SIGNALEVENT
              signalName: repositoryFilePut2
              locations:
                - /org/folder1/*
                - /org/folder2/*
            - version: 1
              workflowId: f05a3a94-0d97-4e13-9a67-bf296d64dd8c
              elementId: WF4B856C82-C95B-41F7-A38F-D6FADE19C77B
              elementName: Intermediate signal1
              elementType: SIGNAL_INTERMEDIATE_CATCH_EVENT
              type: SIGNALEVENT
              signalName: repositoryFilePut1
            - version: 1
              workflowId: f05a3a94-0d97-4e13-9a67-bf296d64dd8c
              elementId: WFD99B5FDE-E5EB-45A2-A969-4EFE2F899196
              elementName: No wait job
              elementType: SYSTEM_JOB_EXEC_NO_WAIT
              type: JOBTASK
          limit: 8
          version: 2
    workflowVariable:
      title: Clinical Workflow Variable
      description: The information for a single clinical workflow variable.
      properties:
        version:
          description: The version of the representation. This is version 1.
          type: number
        id:
          description: The identifier for the associated prompt.
          type: string
        label:
          description: The label of the associated prompt.
          type: string
        name:
          description: The name of the variable.
          type: string
        type:
          description: The type of clinical workflow variable. Supported variable types include String, DateTime, Boolean, Decimal, and Integer.
          type: string
        value:
          description: The value of the variable. If an override has not been specified then this is the default value from the clinical workflow definition.
          type: string
        selectionOptions:
          description: The map of selection options for a clinical workflow variable with specified value choices.
          type: object
        required:
          description: Indicates whether the clinical workflow variable is required to activate the clinical workflow.
          type: boolean
    workflowVariableValue:
      title: Clinical Workflow Variable Value
      description: The information for updating a single clinical workflow variable.
      properties:
        name:
          description: The name of the workflow variable to update.
          type: string
        value:
          description: >
            The value that will be used to update the current variable value. When updating a variable that has  selection options, specify the option key instead of the expected value. The associated option  value is then stored and used.
          type: string
    workflowVariablesPatchRequestBody:
      title: Update Clinical Workflow Variables Request Body
      description: Specifies the names and values of the clinical workflow variables to update.
      type: array
      items:
        $ref: "#/components/schemas/workflowVariableValue"
    workflowCreateRequestBody:
      title: Create Clinical Workflow Request Body
      description: Information to provide in the request body to create a clinical workflow.
      properties:
        version:
          description: The version of the representation. This is version 1.
          type: number
        name:
          description: The name of the group.
          type: string
        contextId:
          description: The unique identifier for the context in which to create the clinical workflow.
          type: string
        definitionId:
          description: >
            The identifier for the clinical workflow definition from which to create the clinical workflow.
          type: string
        description:
          description: The description of the clinical workflow.
          type: string
      example:
        value:
          version: 1
          name: testClinicalWorkflow
          contextId: 9848b115-388f-43d7-a714-47771b401d10
          definitionId: WF3E1BE1B1-3D96-4794-A9BE-C7F74B43F34E
          description: my new wf
    workflowCommonElementSetup:
      title: Get Clinical Workflow Element Setup Details
      description: Details for the clinical workflow definition elements and the associated clinical setup data
      properties:
        workflowId:
          type: string
          description: The clinical workflow id
        elementId:
          type: string
          description: Unique identifier for the clinical workflow element in the clinical workflow definition.
        elementName:
          type: string
          description: The name of the element in the clinical workflow definition.
        elementType:
          type: string
          description: The display type of the element.
          enum:
            - USER_TASK
            - TIMER_INTERMEDIATE_CATCH_EVENT
            - SIGNAL_INTERMEDIATE_CATCH_EVENT
            - NOTIFICATION_TASK
            - SYSTEM_JOB_EXEC
            - SYSTEM_JOB_EXEC_NO_WAIT
        type:
          type: string
          description: The functional type of the element.
          enum:
            - USERTASK
            - NOTIFICATION
            - TIMEREVENT
            - SIGNALEVENT
            - JOBTASK
        description:
          type: string
          description: "The element description from the clinical workflow definition. Note: Can be overridden for user tasks."
        version:
          type: integer
          description: The object version.
          format: int32
      example:
        value:
          version: 1
          workflowId: 319d8eb4-ea1b-493b-8ccd-c5c110481b94
          elementId: WF5471E2F8-1E26-47F6-ABC8-BD55F855F2B8
          elementName: UserTask1
          elementType: USER_TASK
          type: USERTASK
          description: A test description
    workflowUserTaskSetup:
      title: User Task Setup Details
      description: Details of the setup information for user tasks in a clinical workflow.
      allOf:
        - $ref: "#/components/schemas/workflowCommonElementSetup"
        - type: object
          properties:
            name:
              type: string
              description: The override value of the element name.
            description:
              type: string
              description: The description for the clinical task.
            dueDateDuration:
              type: string
              description: The duration for the clinical task.
            dueTimeStamp:
              type: string
              description: The due date for the clinical task.
            priority:
              type: string
              description: The priority of the clinical task.
              enum:
                - LOW
                - MEDIUM
                - HIGH
                - ALERT
            assigneeId:
              type: string
              description: User ID for the requested task assignee.
            candidates:
              type: array
              items:
                $ref: "#/components/schemas/principalIdentity"
              description: The candidates to work on the clinical task.
      example:
        value:
          version: 1
          workflowId: f05a3a94-0d97-4e13-9a67-bf296d64dd8c
          elementId: WFA359E49C-C88A-43CB-AA26-BABA1ED8D7A8
          elementName: User task
          elementType: USER_TASK
          type: USERTASK
          priority: LOW
          description: Test user task description.
          name: User task
          dueDateDuration: P2D
          assigneeId: sastest1
          assigneeDisplayName: SAS Test User 1 (sastest1)
          candidates:
            - version: 1
              id: sastest2
              typeId: user
            - version: 1
              id: sastest3
              typeId: user
    workflowTimerSetup:
      title: Timer Event Setup Details
      description: Details of the setup information for timer events in a clinical workflow.
      allOf:
        - $ref: "#/components/schemas/workflowCommonElementSetup"
        - type: object
          properties:
            timerType:
              type: string
              description: The type of the timer (DATE or DURATION).
              enum:
                - DATE
                - DURATION
            valueType:
              type: string
              description: The type of the timer value (TIMESTAMP or DURATION).
              enum:
                - TIMESTAMP
                - DURATION
            timerDate:
              type: string
              description: "The absolute time that the timer will fire. Note: This value cannot be set if timerType = DURATION."
            timerDuration:
              type: string
              description: "The period of time before the timer fires in ISO 8601 duration format. Note: This value cannot be set if timerType = DATE."
      example:
        value:
          version: 1
          workflowId: f05a3a94-0d97-4e13-9a67-bf296d64dd8c
          elementId: WF9221DA57-7A25-499A-9515-9638DC3E958B
          elementName: Intermediate timer2
          elementType: TIMER_INTERMEDIATE_CATCH_EVENT
          type: TIMEREVENT
          timerType: DURATION
          timerDuration: PT10M
          valueType: DURATION
    workflowSignalEventSetup:
      title: Signal Event Details
      description: Details for a signal event in a clinical workflow.
      allOf:
        - $ref: "#/components/schemas/workflowCommonElementSetup"
        - type: object
          properties:
            signalName:
              type: string
              description: The signal reference name for the signal event.
            locations:
              type: array
              description: The locations that can trigger the signal event.
              items:
                type: string
      example:
        value:
          version: 1
          workflowId: f05a3a94-0d97-4e13-9a67-bf296d64dd8c
          elementId: WF4B856C82-C95B-41F7-A38F-D6FADE19C77B
          elementName: Intermediate signal1
          elementType: SIGNAL_INTERMEDIATE_CATCH_EVENT
          type: SIGNALEVENT
          locations:
            - /org/folder1/*
            - /org/folder2/*
          signalName: repositoryFilePut1
    workflowNotificationSetup:
      title: Notification Details
      description: Details for a notification task in a clinical workflow.
      allOf:
        - $ref: "#/components/schemas/workflowCommonElementSetup"
        - type: object
          properties:
            notificationTemplate:
              type: string
              description: The notification template for this notification. Always Clinical Notification.
            subject:
              type: string
              description: The subject of the notification email.
            content:
              type: string
              description: The content of the notification email.
            toRecipient:
              type: string
              description: The default recipient for clinical notifications. This is a configured value that is applied to all notifications.
            bccRecipients:
              type: array
              description: The recipients for the notification.
              items:
                $ref: "#/components/schemas/principal"
      example:
        value:
          version: 1
          workflowId: f05a3a94-0d97-4e13-9a67-bf296d64dd8c
          elementId: WFFB513DFF-6C99-438D-9CF6-2AA9DEE2C2F8
          elementName: Notification
          elementType: NOTIFICATION_TASK
          summaryDetails: Clinical Notification
          type: NOTIFICATION
          notificationTemplate: Clinical Notification
          recipientsFromTask: false
          toRecipient:
            version: 1
            id: sasadm
            typeId: user
            name: SAS Administrator
            displayName: SAS Administrator (sasadm)
          bccRecipients: []
          subject: Important Notice
          message: System down
    workflowJobSetup:
      title: Clinical Job Task Setup Details
      description: Details of the setup information for clinical jobs in a clinical workflow.
      allOf:
        - $ref: "#/components/schemas/workflowCommonElementSetup"
        - type: object
          properties:
            jobPath:
              type: string
              description: The full path to the clinical job.
            jobName:
              type: string
              description: The name of the clinical job.
            jobLocation:
              type: string
              description: The location of the clinical job.
            jobVersion:
              type: string
              description: The version of the clinical job.
            parameters:
              type: array
              description: The parameters defined in the clinical job.
              items:
                $ref: "#/components/schemas/clinicalJobParameter"
      example:
        value:
          elementId: WF21B84E29-F2E8-4B38-BE1E-FD2582A9B9DB
          workflowId: f05a3a94-0d97-4e13-9a67-bf296d64dd8c
          elementType: SYSTEM_JOB_EXEC
          type: JOBTASK
          jobPath: /org/simple_with_parameters.cjob
          jobName: simple_with_parameters.cjob
          jobLocation: /org
          jobDescription: job task description
          jobVersion: ""
          parameters:
            - version: 1
              useDefault: false
              name: folder_param2
              value:
                path: /org/inputOutputDataSets
                includeSubfolders: false
              type: FOLDER
            - version: 1
              useDefault: false
              name: date_param2
              value: 2026-04-11T18:56:43.000Z
    clinicalJobParameter:
      title: Clinical Job Parameter
      type: object
      description: Parameter for passing values to a clinical job.
      properties:
        version:
          description: The version of the representation. This is version 1.
          type: number
        name:
          description: The name of the clinical job parameter.
          type: string
        type:
          description: The type of clinical job parameter.
          type: string
          enum:
            - CHARACTER
            - CHARACTER_MASKED
            - NUMERIC
            - DATE
            - FOLDER
            - FILE
        useDefault:
          type: boolean
          description: Indicates whether the parameter is set to the default value from the clinical job definition or if the value is overridden for the clinical workflow execution.
        defaultValue:
          description: The default value of the parameter.
          type: object
    workflowCurrentElementBase:
      title: Base Current Clinical Workflow Element
      description: Common properties for all current workflow elements.
      properties:
        id:
          type: string
          description: The identifier of the active instance of this clinical workflow element.
        workflowId:
          type: string
          description: The identifier of the clinical workflow.
        elementId:
          type: string
          description: Unique id of the workflow element in the workflow definition.
        elementName:
          type: string
          description: The name of the element in the workflow definition.
        elementType:
          type: string
          description: The display type of the element.
          enum:
            - USER_TASK
            - TIMER_INTERMEDIATE_CATCH_EVENT
            - SIGNAL_INTERMEDIATE_CATCH_EVENT
            - NOTIFICATION_TASK
            - SYSTEM_JOB_EXEC
            - SYSTEM_JOB_EXEC_NO_WAIT
        type:
          type: string
          description: The functional type of the element.
          enum:
            - USERTASK
            - TIMEREVENT
            - SIGNALEVENT
            - NOTIFICATION
            - JOBTASK
        description:
          type: string
          description: "The element description from the workflow definition. Note: Can be overridden for user tasks."
        creationTimeStamp:
          type: string
          description: The date and time this instance of the clinical workflow element was created.
        workflowStatus:
          type: string
          description: The status of the clinical workflow.
          enum:
            - NOT_STARTED
            - ACTIVE
            - SUSPENDED
            - COMPLETED
        version:
          type: integer
          description: The object version.
          format: int32
      example:
        value:
          version: 1
          id: WFb1afdf95-dfcc-4102-8a03-a8b8057495c3
          type: clinicalTask
          elementName: User task1
          elementId: WFA359E49C-C88A-43CB-AA26-BABA1ED8D7A8
          elementType: USER_TASK
          description: 1st task description set in definition
          creationTimeStamp: 2025-11-07T21:09:57.339Z
          workflowStatus: ACTIVE
    workflowElementBase:
      title: Base Clinical Workflow Element
      description: Details of the base element common to all clinical workflow elements.
      properties:
        workflowId:
          type: string
          description: The identifier of the clinical workflow.
        elementId:
          type: string
          description: Unique id of the workflow element in the clinical workflow definition.
        elementName:
          type: string
          description: The name of the element in the clinical workflow definition.
        summaryDetails:
          type: string
          description: A brief summary of details defined in the element.
        elementType:
          type: string
          description: The display type of the element.
          enum:
            - USER_TASK
            - TIMER_INTERMEDIATE_CATCH_EVENT
            - SIGNAL_INTERMEDIATE_CATCH_EVENT
            - NOTIFICATION_TASK
            - SYSTEM_JOB_EXEC
            - SYSTEM_JOB_EXEC_NO_WAIT
        type:
          type: string
          description: The functional type of the element.
          enum:
            - USERTASK
            - TIMEREVENT
            - SIGNALEVENT
            - NOTIFICATION
            - JOBTASK
        description:
          type: string
          description: "The element description from the clinical workflow definition. Note: The value can be overridden for user tasks."
        version:
          type: integer
          description: The object version.
          format: int32
      example:
        value:
          version: 1
          id: WFb1afdf95-dfcc-4102-8a03-a8b8057495c3
          type: clinicalTask
          elementName: User task1
          elementId: WFA359E49C-C88A-43CB-AA26-BABA1ED8D7A8
          elementType: USER_TASK
          description: 1st task description set in definition
          creationTimeStamp: 2025-11-07T21:09:57.339Z
          workflowStatus: ACTIVE
          name: User task1
          contextId: bc53d480-90f9-4094-a512-7fd49928f22f
          contextPath: /RemoteClinicalWorkflowTest
          contextTypeId: organization
          workflowId: 38e41a27-35f3-4cf5-bd7f-fa804499705c
          workflowName: testWorkflow
          priority: MEDIUM
          assignmentStatus: UNASSIGNED
          hoursWorked: 0
    userTaskUpdateAssignment:
      title: User Task Update Assignment
      description: The schema for a single user task assignment update.
      properties:
        assigneeId:
          description: The identifier for the new assignee.
          type: string
        hoursWorked:
          description: The number of hours worked, which is to be updated during this assignment.
          type: number
        taskName:
          description: The name of the associated user task.
          type: string
      example:
        value:
          assigneeId: sastest1
          hoursWorked: 7
          taskName: testTask
    userTaskComplete:
      title: Complete User Task
      description: Details to complete a user task.
      properties:
        comment:
          description: The completion comment.
          type: string
        hoursWorked:
          description: The number of hours worked, which is to be updated during clinical task completion.
          type: number
        completionData:
          description: The data values that are to be updated during clinical task completion.
          type: array
          items:
            $ref: "#/components/schemas/userTaskAssignment"
      example:
        value:
          comment: Clinical task completed without issues
          hoursWorked: 7
          completionData:
            - version: 1
              name: startBool
              value: true
            - version: 1
              name: startEnum
              value: Choice1
            - version: 1
              name: startDate
              value: 2025-04-21T19:27:45Z
    workflowItemDescriptor:
      title: Clinical Workflow Item Descriptor
      description: An item related to clinical workflows.
      properties:
        name:
          description: The name of the item.
          type: string
        id:
          description: The identifier for the item.
          type: string
      example:
        value:
          name: TestTaskOne
          id: WFb1a
    workflowCommonCompletedElement:
      title: Get Clinical Workflow Completed Element Summary
      description: Completion history for a clinical workflow. Provides a summary for user tasks and full details for timers, notifications, clinical job tasks, and signal events.
      properties:
        id:
          type: string
          description: Unique identifier for the completed element in the clinical workflow.
        workflowId:
          type: string
          description: The clinical workflow identifier.
        workflowName:
          type: string
          description: The name of the clinical workflow.
        elementId:
          type: string
          description: Unique identifier for the element in the clinical workflow definition.
        elementName:
          type: string
          description: The name of the element in the clinical workflow definition.
        description:
          type: string
          description: The element description from the clinical workflow definition. Might have been overridden for user tasks.
        elementType:
          type: string
          description: The display type of the element.
          enum:
            - USER_TASK
            - TIMER_INTERMEDIATE_CATCH_EVENT
            - SIGNAL_INTERMEDIATE_CATCH_EVENT
            - NOTIFICATION_TASK
            - SYSTEM_JOB_EXEC
            - SYSTEM_JOB_EXEC_NO_WAIT
        type:
          type: string
          description: The functional type of the element.
          enum:
            - USERTASK
            - NOTIFICATION
            - TIMEREVENT
            - SIGNALEVENT
            - JOBTASK
        completedBy:
          type: string
          description: User identifier for the user responsible for completing this instance of the clinical workflow element.
        completedByDisplayName:
          type: string
          description: Display name of the user responsible for completing this instance of the clinical workflow element.
        creationTimeStamp:
          type: string
          description: The date and time this instance of the clinical workflow element was created.
        completedTimeStamp:
          type: string
          description: The date and time this instance of the clinical workflow element was completed.
        completionState:
          type: string
          description: The state of the action that was completed.
          enum:
            - COMPLETED_SUCCESSFUL
            - COMPLETED_PROGRAM_ERRORS
            - COMPLETED_CHECKIN_ERROR
            - COMPLETED_PROGRAM_ERRORS_CHECKIN_ERROR
            - COMPLETED_FAILED
            - COMPLETED_CANCELED
            - COMPLETED_PROGRAM_WARNINGS
            - COMPLETED_PROGRAM_WARNINGS_CHECKIN_ERROR
            - SETUP_NOT_ENTERED
            - WORKFLOW_OWNER_ACCOUNT_ERROR
            - NO_VALID_RECIPIENTS
            - UNKNOWN
        completionStatus:
          type: string
          description: A descriptive status of how the element completed.
        version:
          type: integer
          description: The object version.
          format: int32
      example:
        value:
          count: 2
          items:
            - version: 1
              id: WF81f9b511-1e5f-4c0e-b123-64085bb34705
              workflowId: 032e99e6-45ce-4b08-b4e6-a7f655dc153a
              workflowName: testCompleteLoop3dccbb59-f7a4-4f70-8b85-537a1707bc64
              elementId: WFF3C85865-9E12-4228-84F9-F5CDCC67235E
              elementName: First User Task
              elementType: USER_TASK
              type: USERTASK
              completedBy: sastest1
              completedByDisplayName: SAS Test User 1 (sastest1)
              creationTimeStamp: 2025-12-03T19:12:34.271Z
              completedTimeStamp: 2025-12-03T19:13:07.919Z
              completionState: COMPLETED_SUCCESSFUL
              name: First User Task - run 2
              dueDate: 2025-12-03T21:12:33.870Z
              priority: LOW
              assigneeId: sastest1
              assigneeDisplayName: SAS Test User 1 (sastest1)
              completionComment: Comment for loop 2
              assignedTimeStamp: 2025-12-03T19:12:59.798Z
              startedTimeStamp: 2025-12-03T19:13:04.329Z
              totalHoursWorked: 8
            - version: 1
              id: WF36810a16-2b64-4b3e-9c19-7d275fac765f
              workflowId: 032e99e6-45ce-4b08-b4e6-a7f655dc153a
              workflowName: testCompleteLoop3dccbb59-f7a4-4f70-8b85-537a1707bc64
              elementId: WF581528B2-1FCF-4D4A-9FD7-33D3A692E314
              elementName: Intermediate timer
              elementType: TIMER_INTERMEDIATE_CATCH_EVENT
              type: TIMEREVENT
              completedBy: <system>
              completedByDisplayName: Internal System Account (<system>)
              creationTimeStamp: 2025-12-03T19:13:11.461Z
              completedTimeStamp: 2025-12-03T19:13:33.941Z
              completionState: COMPLETED_SUCCESSFUL
            - version: 1
              id: WF7572e32e-2781-4bed-95da-53f1d99f27ed
              workflowId: WF22550a63-1b09-466a-b053-e1d930a4fd8b
              workflowName: UserNoteTimerLoop
              elementId: WFBBDF3CA4-8B51-421B-AD25-3F35F7BC3F29
              elementName: Call activity
              elementType: NOTIFICATION_TASK
              type: NOTIFICATION
              completedBy: sastest1
              completedByDisplayName: SAS Test User 1 (sastest1)
              creationTimeStamp: 2025-12-03T19:12:06.336Z
              completedTimeStamp: 2025-12-03T19:12:09.733Z
              completionState: COMPLETED_SUCCESSFUL
              subject: Notification for loop 1
              message: Notification message for loop 1
              toRecipient: sasadm
              toRecipientDisplayName: SAS Administrator (sasadm)
              bccRecipients:
                - version: 1
                  id: sastest1
                  typeId: user
                  name: SAS Test User 1
                  displayName: SAS Test User 1 (sastest1)
                - version: 1,
                  id: sastest2
                  typeId: user
                  name: SAS Test User 2
                  displayName: SAS Test User 2 (sastest2)
          version: 2
    workflowCompletedUserTaskDetail:
      title: User Task Completion Summary
      description: Summary of completed user tasks.
      allOf:
        - $ref: "#/components/schemas/workflowCommonCompletedElement"
        - type: object
          properties:
            completionData:
              type: array
              description: The variables associated with the data at the time of the clinical task completion.
              items:
                $ref: "#/components/schemas/workflowCompletionData"
            history:
              type: array
              description: The assignment history for the clinical task.
              items:
                $ref: "#/components/schemas/workflowCompletionHistory"
      example:
        value:
          version: 1
          id: WF81f9b511-1e5f-4c0e-b123-64085bb34705
          workflowId: 032e99e6-45ce-4b08-b4e6-a7f655dc153a
          workflowName: testCompleteLoop3dccbb59-f7a4-4f70-8b85-537a1707bc64
          elementId: WFF3C85865-9E12-4228-84F9-F5CDCC67235E
          elementName: First User Task
          elementType: USER_TASK
          type: USERTASK
          completedBy: sastest1
          completedByDisplayName: SAS Test User 1 (sastest1)
          creationTimeStamp: 2025-12-03T19:12:34.271Z
          completedTimeStamp: 2025-12-03T19:13:07.919Z
          completionState: COMPLETED_SUCCESSFUL
          name: First User Task - run 2
          dueDate: 2025-12-03T21:12:33.870Z
          priority: LOW
          assigneeId: sastest1
          assigneeDisplayName: SAS Test User 1 (sastest1)
          completionComment: Comment for loop 2
          assignedTimeStamp: 2025-12-03T19:12:59.798Z
          startedTimeStamp: 2025-12-03T19:13:04.329Z
          totalHoursWorked: 8
          completionData:
            - name: Continue
              type: boolean
              value: "true"
            - name: State
              type: string
              value: Ready for verification
          history:
            - version: 1
              id: 3c4e2f4f-dea2-4f5f-a4e8-7534f800bdb7
              taskId: WF819edffe-a135-42ec-9c75-915eecbffa8e
              elementId: WFF3C85865-9E12-4228-84F9-F5CDCC67235E
              workflowId: 032e99e6-45ce-4b08-b4e6-a7f655dc153a
              assigneeId: sastest1
              assigneeDisplayName: SAS Test User 1 (sastest1)
              assignedTimeStamp: 2025-12-03T19:13:57.971Z
              startedTimeStamp: 2025-12-03T19:14:02.382Z
              hoursWorked: 3.5
            - version: 1
              id: 1c52a8e2-0f8f-449c-85b9-a2159451733f
              taskId: WF819edffe-a135-42ec-9c75-915eecbffa8e
              elementId: WFF3C85865-9E12-4228-84F9-F5CDCC67235E
              workflowId: 032e99e6-45ce-4b08-b4e6-a7f655dc153a
              assigneeId: sastest2
              assigneeDisplayName: SAS Test User 2 (sastest2)
              assignedTimeStamp: 2025-12-03T19:13:50.885Z
              startedTimeStamp: 2025-12-03T19:13:55.997Z
              hoursWorked: 2.5
    workflowCompletedUserTaskSummary:
      title: User Task Completion Summary
      description: Summary of completed user tasks.
      allOf:
        - $ref: "#/components/schemas/workflowCommonCompletedElement"
        - type: object
          properties:
            name:
              type: string
              description: The override value of the element name.
            dueDate:
              type: string
              description: The due date for the clinical task in YYYY-MM-DDTHH:mm:SS format.
            priority:
              type: string
              enum:
                - LOW
                - MEDIUM
                - HIGH
            assigneeId:
              type: string
              description: User identifier for the requested clinical task assignee.
            assigneeDisplayName:
              type: string
              description: Display name of the requested clinical task assignee.
            assignedTimeStamp:
              type: string
              description: The date and time this instance of the user task was assigned.
            startedTimeStamp:
              type: string
              description: The date and time this instance of the user task was started.
            completionComment:
              type: string
              description: Comment added at completion of the user task.
            totalHoursWorked:
              description: The total hours worked on this user task.
              type: number
      example:
        value:
          version: 1
          id: WFd3636ad1-7a97-47d1-9abd-7c4fa3f18e21
          workflowId: 7e37b1e6-24c2-48bf-92f2-25dc92ead9c0
          workflowName: HLSCRC-14736-1
          elementId: WF9EAC4E5F-2982-47D2-A3A2-29135D3D4C7B
          elementName: User task
          elementType: USER_TASK
          type: USERTASK
          completedBy: sastest1
          completedByDisplayName: SAS Test User 1 (sastest1)
          creationTimeStamp: 2026-02-17T16:06:19.859Z
          completedTimeStamp: 2026-02-17T16:07:59.346Z
          completionState: COMPLETED_SUCCESSFUL
          name: User task
          dueDate: 2025-10-12T16:22:17
          priority: MEDIUM
          assigneeId: sastest1
          assigneeDisplayName: SAS Test User 1 (sastest1)
          assignedTimeStamp: 2026-02-17T16:06:19.941Z
          startedTimeStamp: 2026-02-17T16:07:30.929Z
          totalHoursWorked: 0
          completionComment: Just in time
    workflowCompletedTimerEvent:
      title: Timer Event Completion Details
      description: Completion details for clinical workflow timer events.
      allOf:
        - $ref: "#/components/schemas/workflowCommonCompletedElement"
      example:
        value:
          version: 1
          id: WF36810a16-2b64-4b3e-9c19-7d275fac765f
          workflowId: 032e99e6-45ce-4b08-b4e6-a7f655dc153a
          workflowName: testCompleteLoop3dccbb59-f7a4-4f70-8b85-537a1707bc64
          elementId: WF581528B2-1FCF-4D4A-9FD7-33D3A692E314
          elementName: Intermediate timer
          elementType: TIMER_INTERMEDIATE_CATCH_EVENT
          type: TIMEREVENT
          completedBy: <system>
          completedByDisplayName: Internal System Account (<system>)
          creationTimeStamp: 2025-12-03T19:13:11.461Z
          completedTimeStamp: 2025-12-03T19:13:33.941Z
          completionState: COMPLETED_SUCCESSFUL
    workflowCompletedSignalEvent:
      title: Signal Event Completion Details
      description: Completion details for clinical workflow signal events.
      allOf:
        - $ref: "#/components/schemas/workflowCommonCompletedElement"
        - type: object
          properties:
            signalName:
              type: string
              description: The signal reference name for the signal event.
            signaledBy:
              type: string
              description: The path of the repository file that triggered the signal event.
      example:
        value:
          version: 1
          id: WF1589f155-1dbe-4782-b18c-25f4844e36bf
          workflowId: 55093770-687e-425c-9fb3-202db65b76f1
          workflowName: testParallelSignalExecutions
          elementId: WF1F1E3A38-4B35-49C7-BC84-53ABDB1F553E
          elementName: Signal event 1
          elementType: SIGNAL_INTERMEDIATE_CATCH_EVENT
          type: SIGNALEVENT
          completedBy: <system>
          completedByDisplayName: Internal System Account (<system>)
          creationTimeStamp: 2026-02-10T15:24:00.786Z
          completedTimeStamp: 2026-02-10T15:28:36.790Z
          completionState: COMPLETED_SUCCESSFUL
          signalName: repositoryFilePut
          signaledBy: /org/newdata/test.txt
    workflowCompletedNotificationTask:
      title: Notification Completion Details
      description: Completion details for clinical workflow notifications.
      allOf:
        - $ref: "#/components/schemas/workflowCommonCompletedElement"
        - type: object
          properties:
            subject:
              type: string
              description: The subject for the notification email.
            message:
              type: string
              description: The content of the notification email.
            toRecipient:
              type: string
              description: The default recipient for clinical notifications. This is a configured value that is applied to all notifications.
            bccRecipients:
              type: array
              description: The recipients for the notification.
              items:
                $ref: "#/components/schemas/principal"
      example:
        value:
          version: 1
          id: WF7572e32e-2781-4bed-95da-53f1d99f27ed
          workflowId: WF22550a63-1b09-466a-b053-e1d930a4fd8b
          workflowName: UserNoteTimerLoop
          elementId: WFBBDF3CA4-8B51-421B-AD25-3F35F7BC3F29
          elementName: Call activity
          elementType: NOTIFICATION_TASK
          type: NOTIFICATION
          completedBy: sastest1
          completedByDisplayName: SAS Test User 1 (sastest1)
          creationTimeStamp: 2025-12-03T19:12:06.336Z
          completedTimeStamp: 2025-12-03T19:12:09.733Z
          completionState: COMPLETED_SUCCESSFUL
          subject: Notification for loop 1
          message: Notification message for loop 1
          toRecipient: sasadm
          toRecipientDisplayName: SAS Administrator (sasadm)
          bccRecipients:
            - version: 1
              id: sastest1
              typeId: user
              name: SAS Test User 1
              displayName: SAS Test User 1 (sastest1)
            - version: 1,
              id: sastest2
              typeId: user
              name: SAS Test User 2
              displayName: SAS Test User 2 (sastest2)
    workflowCompletedJobTask:
      title: Clinical Job Task Completion Details
      description: Completion details for clinical job task executions.
      allOf:
        - $ref: "#/components/schemas/workflowCommonCompletedElement"
        - type: object
          properties:
            jobPath:
              type: string
              description: The path to the clinical job.
            jobVersion:
              type: string
              description: The version of the clinical job.
            jobDescription:
              type: string
              description: The description of the clinical job.
            parameters:
              type: array
              description: The parameters defined in the clinical job.
              items:
                $ref: "#/components/schemas/clinicalJobParameter"
            runAsOwner:
              type: string
              description: The identifier for the user to run the clinical job as.
            runAsOwnerDisplayName:
              type: string
              description: The display name of the user to run the clinical job as.
      example:
        value:
          version: 1
          id: WF1569399d-869b-41e3-9037-2cb393012184
          workflowId: 22c394c2-bde1-4c77-a328-5d41b8f580b3
          workflowName: 06feb_waitJob_2
          elementId: WFC3B417BA-FD54-4669-92CB-61BC3741FDCF
          elementName: Call activity
          elementType: SYSTEM_JOB_EXEC
          type: JOBTASK
          completedBy: sastest1
          completedByDisplayName: SAS Test User 1 (sastest1)
          creationTimeStamp: 2026-02-06T18:16:26.773Z
          completedTimeStamp: 2026-02-06T18:17:12.900Z
          completionStatus: Clinical job completed successfully.
          completionState: COMPLETED_SUCCESSFUL
          jobPath: /org/testJobs/procPrint.cjob
          jobVersion: "1.0"
          parameters:
            - version: 1
              useDefault: false
              name: charParm
              value: foo
              type: CHARACTER
            - version: 1
              useDefault: false
              name: dateParm
              value: 2025-12-25T15:56:05.000Z
              type: DATE
          runAsOwner: sastest1
          runAsOwnerDisplayName: SAS Test User 1 (sastest1)
    workflowCompletionData:
      title: Clinical Workflow Completion Data
      description: The information for updating a single clinical workflow variable.
      properties:
        name:
          description: The name of the variable.
          type: string
        type:
          description: The type of clinical workflow variable. Supported variable types include String, DateTime, Boolean, Decimal, and Integer.
          type: string
        value:
          description: The value of the variable at the time of clinical task completion.
          type: string
    workflowCompletionHistory:
      title: Clinical Workflow Completion History
      description: The assignment history of the clinical task.
      properties:
        id:
          description: Unique identifier for this assignment instance.
          type: string
        taskId:
          description: The task identifier for the clinical task instance.
          type: string
        elementId:
          description: The element identifier for the clinical task in the clinical workflow instance.
          type: string
        workflowId:
          description: The identifier for the clinical workflow.
          type: string
        assigneeId:
          description: The user identifier for the user assigned to the clinical task.
          type: string
        assigneeDisplayName:
          description: The display name for the user assigned to the clinical task.
          type: string
        assignedTimeStamp:
          description: The date and time that the clinical task was assigned to the user.
          type: string
        startedTimeStamp:
          description: The date and time that the clinical task was started by the user.
          type: string
        hoursWorked:
          description: The hours worked during this assignment of the task.
          type: number
    error2:
      title: Error
      type: object
      description: The representation of an error.
      x-sas-media-type:
        name: application/vnd.sas.error
        version: 2
      required:
        - httpStatusCode
        - version
      properties:
        message:
          type: string
          description: The message for the error.
        id:
          type: string
          description: The string ID for the error.
        errorCode:
          type: integer
          description: The numeric ID for the error.
        httpStatusCode:
          type: integer
          description: The HTTP status code for the error.
        details:
          type: array
          description: Messages that provide additional details about the cause of the error.
          items:
            type: string
        remediation:
          type: string
          description: A message that describes how to resolve the error.
        errors:
          type: array
          description: Any additional errors that occurred.
          items:
            $ref: "#/components/schemas/error2"
        links:
          type: array
          description: The links that apply to the error.
          items:
            $ref: "#/components/schemas/link"
        version:
          type: integer
          description: The version number of the error representation. This representation is version 2.
    baseCollection2:
      title: Base Collection
      description: This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2)
      properties:
        name:
          type: string
          description: The name of the collection.
        start:
          type: integer
          description: The zero-based index of the first item in the collection.
          format: int64
        limit:
          type: integer
          description: The number of items that were requested for the collection.
        count:
          type: integer
          description: If populated indicates the number of items in the collection.
          format: int64
        accept:
          type: string
          description: A space-delimited list of media types from which an `Accept` header may be constructed.
        links:
          type: array
          description: The links that apply to the collection.
          items:
            $ref: "#/components/schemas/link"
        version:
          type: integer
          description: The version number of the collection representation. This representation is version 2.
    api:
      title: API
      description: The list of links to top-level resources and operations available from the root of the API.
      x-sas-media-type:
        name: application/vnd.sas.api
        version: 1
      required:
        - version
        - links
      properties:
        version:
          type: integer
          description: The version number of the API representation. This is version 1.
          minimum: 1
        links:
          description: The API's top-level links.
          type: array
          items:
            $ref: "#/components/schemas/link"
    link:
      title: Link
      type: object
      description: A link to a related operation or resource.
      required:
        - rel
      properties:
        method:
          type: string
          description: The HTTP method for the link.
        rel:
          type: string
          description: The relationship of the link to the resource.
        uri:
          type: string
          description: The relative URI for the link.
        href:
          type: string
          description: The URL for the link.
        title:
          type: string
          description: The title for the link.
        type:
          type: string
          description: The media type or link type for the link.
        itemType:
          type: string
          description: If this is a link to a container, `itemType` is the media type or link type for the items in the container.
        responseType:
          type: string
          description: The media type or link type of the response body for a `PUT`, `POST`, or `PATCH` operation.
        responseItemType:
          type: string
          description: The media type or link type of the items in the response body for a `PUT`, `POST`, or `PATCH` operation.
