openapi: 3.0.3
info:
  version: "1"
  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.
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:
                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/auditEntry/allOf/0/properties/links/items"
              examples:
                api:
                  summary: Links to the API resources
                  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
            application/json:
              schema:
                $ref: "#/paths/~1/get/responses/200/content/application~1vnd.sas.api%2Bjson/schema"
              examples:
                api:
                  $ref: "#/paths/~1/get/responses/200/content/application~1vnd.sas.api%2Bjson/examples/api"
        "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:
        - name: start
          in: query
          description: 0-based offset of the first type to return. Defaults to 0.
          schema:
            type: integer
          example: 10
        - 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
        - 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')
        - 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
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.collection:
              schema:
                description: The schema for a list of summary audit entries.
                allOf:
                  - $ref: "#/paths/~1actionstatus/get/responses/200/content/application~1vnd.sas.collection/schema/allOf/0"
                  - type: object
                    properties:
                      items:
                        type: array
                        description: The array of audit entries.
                        items:
                          $ref: "#/components/schemas/auditEntry/allOf/0"
              examples:
                getAuditEntries:
                  summary: Get audit summary entries
                  description: Returns a collection of audit summary entries
                  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
            application/json:
              schema:
                $ref: "#/paths/~1audit~1entries/get/responses/200/content/application~1vnd.sas.collection/schema"
              examples:
                getAuditEntries:
                  $ref: "#/paths/~1audit~1entries/get/responses/200/content/application~1vnd.sas.collection/examples/getAuditEntries"
  "/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:
                title: Audit Entry
                description: The schema for an audit history record with any supporting details.
                allOf:
                  - $ref: "#/components/schemas/auditEntry/allOf/0"
                  - type: object
                    properties:
                      details:
                        description: Additional information about the action. Included only when a single entry is requested.
                        type: array
                        items:
                          $ref: "#/components/schemas/auditEntry/allOf/1/properties/details/items"
              examples:
                getAuditEntry:
                  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
            application/json:
              schema:
                $ref: "#/paths/~1audit~1entries~1%7BentryId%7D/get/responses/200/content/application~1vnd.sas.clinical.audit.entry/schema"
              examples:
                getAuditEntry:
                  $ref: "#/paths/~1audit~1entries~1%7BentryId%7D/get/responses/200/content/application~1vnd.sas.clinical.audit.entry/examples/getAuditEntry"
        "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: "#/paths/~1audit~1entries/get/parameters/0"
        - $ref: "#/paths/~1audit~1entries/get/parameters/1"
        - 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
      responses:
        "200":
          description: OK.
          content:
            application/vnd.sas.collection:
              schema:
                description: The schema for a list of audit actions.
                allOf:
                  - $ref: "#/paths/~1actionstatus/get/responses/200/content/application~1vnd.sas.collection/schema/allOf/0"
                  - type: object
                    properties:
                      items:
                        type: array
                        description: The array of audit actions.
                        items:
                          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
              examples:
                getAuditActions:
                  summary: Get audit actions
                  description: Returns a collection of audit actions
                  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
            application/json:
              schema:
                $ref: "#/paths/~1audit~1actions/get/responses/200/content/application~1vnd.sas.collection/schema"
              examples:
                getAuditActions:
                  $ref: "#/paths/~1audit~1actions/get/responses/200/content/application~1vnd.sas.collection/examples/getAuditActions"
  /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> 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: getContentsByFilter
      parameters:
        - $ref: "#/paths/~1repository~1files/get/parameters/0"
        - 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
      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:
              title: Search
              description: This representation is used when specifying a filter for batch operations.
              allOf:
                - type: object
                  properties:
                    filter:
                      description: The filter to retrieve the repository files(s) to sign.
                      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
            examples:
              searchRequest:
                description: Example request body for search.
                value:
                  version: 1
                  filter: and(startsWith(path,'/P21-001/PROJ-001/results/'),eq(name,'report*'))
                  text: penicillin
          application/json:
            schema:
              $ref: "#/paths/~1repository~1files~1content/post/requestBody/content/application~1vnd.sas.clinical.search/schema"
            examples:
              searchRequest:
                $ref: "#/paths/~1repository~1files~1content/post/requestBody/content/application~1vnd.sas.clinical.search/examples/searchRequest"
      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
      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: "#/paths/~1audit~1entries/get/parameters/0"
        - $ref: "#/paths/~1audit~1entries/get/parameters/1"
        - 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:
                description: The schema for a collection of repository items, which can be containers or files.
                allOf:
                  - $ref: "#/paths/~1actionstatus/get/responses/200/content/application~1vnd.sas.collection/schema/allOf/0"
                  - type: object
                    properties:
                      items:
                        type: array
                        description: The array of repository items.
                        items:
                          $ref: "#/components/schemas/repositoryContainer/allOf/0"
              examples:
                getRepositoryFilesByContentFilter:
                  summary: Get repository items.
                  description: Returns a collection of repository items.
                  value:
                    links:
                      - method: GET
                        rel: self
                        href: /clinicalRepository/repository/items?filter=and(like(name,'test*'),like(location,'/Sarah%20BU'))&sortBy=name:ascending:primary,name:descending:secondary&start=0&limit=100
                        uri: /clinicalRepository/repository/items?filter=and(like(name,'test*'),like(location,'/Sarah%20BU'))&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: /Sarah BU
                        path: /Sarah 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: /Sarah BU
                        path: /Sarah 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
            application/json:
              schema:
                $ref: "#/paths/~1repository~1items/get/responses/200/content/application~1vnd.sas.clinical.limited.collection/schema"
              examples:
                getRepositoryFilesByContentFilter:
                  $ref: "#/paths/~1repository~1items/get/responses/200/content/application~1vnd.sas.clinical.limited.collection/examples/getRepositoryFilesByContentFilter"
  "/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:
        - name: itemId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the repository item.
          example: d6eefec9-dcc2-4574-8af8-69897038d9c5
      responses:
        "200":
          description: OK
          headers:
            ETag:
              description: The E-tag for response
              schema:
                type: string
            Last-Modified:
              description: The time at which the resource was last updated.
              schema:
                type: string
          content:
            application/vnd.sas.clinical.repository.item:
              schema:
                $ref: "#/components/schemas/repositoryContainer/allOf/0"
              examples:
                repositoryContext:
                  summary: An example of getting a repository item that is a context
                  description: Returns 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)
                    defaultOwner: sastest1
                    defaultOwnerDisplayName: SAS Test User 1 (sastest1)
                    defaultMajorVersionLimit: 5
                    defaultMinorVersionLimit: 10
                repositoryFolder:
                  summary: An example of getting a repository item that is a folder.
                  description: Returns 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
                    owner: sastest1
                    ownerDisplayName: SAS Test User 1 (sastest1)
                    defaultOwner: sastest1
                    defaultOwnerDisplayName: SAS Test User 1 (sastest1)
                repositoryFile:
                  summary: An example of getting a repository item that is a file.
                  description: Returns 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)
                    contentType: application/x-sas-data
                    locked: true
                    signingStatus: NONE
                    versioned: false
                    fileVersion: "-"
                    fileSize: 5120
            application/json:
              schema:
                $ref: "#/components/schemas/repositoryContainer/allOf/0"
              examples:
                repositoryContext:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/content/application~1vnd.sas.clinical.repository.item/examples/repositoryContext"
                repositoryFolder:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/content/application~1vnd.sas.clinical.repository.item/examples/repositoryFolder"
                repositoryFile:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/content/application~1vnd.sas.clinical.repository.item/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:
        - name: itemId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the repository item.
          example: d6eefec9-dcc2-4574-8af8-69897038d9c5
      responses:
        "200":
          description: OK - the repository item exists.
          headers:
            $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/headers"
        "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:
        - name: itemId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the repository item.
          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 repository item to update.
        content:
          application/json:
            schema:
              type: object
              additionalProperties:
                type: string
            examples:
              RepositoryFile:
                value:
                  name: MyNewFileName
                  description: My new file description.
                  minorVersionLimit: "5"
                  majorVersionLimit: "10"
              RepositoryContainer:
                value:
                  name: MyNewContainerName
                  description: My new container description.
                  defaultMinorVersionLimit: "3"
                  defaultMajorVersionLimit: "7"
      responses:
        "200":
          description: OK - the repository item was updated.
          headers:
            $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/headers"
          content:
            application/vnd.sas.clinical.repository.item':
              schema:
                $ref: "#/components/schemas/repositoryContainer/allOf/0"
              examples:
                repositoryContext:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/content/application~1vnd.sas.clinical.repository.item/examples/repositoryContext"
            application/json:
              schema:
                $ref: "#/components/schemas/repositoryContainer/allOf/0"
              examples:
                repositoryContext:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/content/application~1vnd.sas.clinical.repository.item/examples/repositoryContext"
        "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: "#/paths/~1actionstatus/post/responses/200/content/application~1vnd.sas.collection/schema/allOf/1/properties/items/items"
              examples:
                json:
                  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
        "428":
          description: The request headers did not include a `If-Match` precondition.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/paths/~1actionstatus/post/responses/200/content/application~1vnd.sas.collection/schema/allOf/1/properties/items/items"
              examples:
                json:
                  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
    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:
        - name: itemId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the repository item.
          example: d6eefec9-dcc2-4574-8af8-69897038d9c5
        - 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:
        - name: itemId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the repository item.
          example: d6eefec9-dcc2-4574-8af8-69897038d9c5
        - 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.
        - $ref: "#/paths/~1audit~1entries/get/parameters/0"
        - $ref: "#/paths/~1audit~1entries/get/parameters/1"
        - $ref: "#/paths/~1repository~1items/get/parameters/2"
        - $ref: "#/paths/~1repository~1items/get/parameters/3"
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/paths/~1repository~1items/get/responses/200/content/application~1vnd.sas.clinical.limited.collection/schema"
              examples:
                getRepositoryFilesByContentFilter:
                  summary: Get the children of the specified repository item.
                  description: Returns a collection of repository items.
                  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
                        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
                        signingStatus: NONE
                        versioned: false
                        fileVersion: "-"
                        fileSize: 0
                    limit: 100
                    version: 2
            application/json:
              schema:
                $ref: "#/paths/~1repository~1items/get/responses/200/content/application~1vnd.sas.clinical.limited.collection/schema"
              examples:
                getRepositoryFilesByContentFilter:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D~1children/get/responses/200/content/application~1vnd.sas.collection/examples/getRepositoryFilesByContentFilter"
        "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:
        - name: itemId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the repository item.
          example: d6eefec9-dcc2-4574-8af8-69897038d9c5
        - 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.
        - $ref: "#/paths/~1audit~1entries/get/parameters/0"
        - $ref: "#/paths/~1audit~1entries/get/parameters/1"
        - $ref: "#/paths/~1repository~1items/get/parameters/2"
        - $ref: "#/paths/~1repository~1items/get/parameters/3"
      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 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:
            $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/headers"
          content:
            application/vnd.sas.clinical.repository.item:
              schema:
                title: Repository Container
                description: The representation of a repository container.
                allOf:
                  - $ref: "#/components/schemas/repositoryContainer/allOf/0"
                  - 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.
              examples:
                repositoryContext:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/content/application~1vnd.sas.clinical.repository.item/examples/repositoryContext"
                repositoryFolder:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/content/application~1vnd.sas.clinical.repository.item/examples/repositoryFolder"
            application/json:
              schema:
                $ref: "#/paths/~1repository~1items~1%7BitemId%7D~1children/post/responses/201/content/application~1vnd.sas.clinical.repository.item/schema"
              examples:
                repositoryContext:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/content/application~1vnd.sas.clinical.repository.item/examples/repositoryContext"
                repositoryFolder:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/content/application~1vnd.sas.clinical.repository.item/examples/repositoryFolder"
        "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:
        - name: itemId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the repository item.
          example: d6eefec9-dcc2-4574-8af8-69897038d9c5
        - 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:
        - name: itemId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the repository item.
          example: d6eefec9-dcc2-4574-8af8-69897038d9c5
        - 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: 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:
            $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/headers"
          content:
            application/vnd.sas.clinical.repository.item:
              schema:
                $ref: "#/components/schemas/repositoryContainer/allOf/0"
              examples:
                repositoryContext:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/content/application~1vnd.sas.clinical.repository.item/examples/repositoryContext"
                repositoryFolder:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/content/application~1vnd.sas.clinical.repository.item/examples/repositoryFolder"
                repositoryFile:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/content/application~1vnd.sas.clinical.repository.item/examples/repositoryFile"
            application/json:
              schema:
                $ref: "#/components/schemas/repositoryContainer/allOf/0"
              examples:
                repositoryContext:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/content/application~1vnd.sas.clinical.repository.item/examples/repositoryContext"
                repositoryFolder:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/content/application~1vnd.sas.clinical.repository.item/examples/repositoryFolder"
                repositoryFile:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/content/application~1vnd.sas.clinical.repository.item/examples/repositoryFile"
        "400":
          description: Bad Request
        "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:
                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/permissions/properties/owner"
                  entries:
                    description: The set of permission entries.
                    type: array
                    items:
                      $ref: "#/components/schemas/permissions/properties/entries/items"
                  ownerPropagation:
                    description: >
                      Specifies whether the default owner is the creator or a specific user. This applies only when the 'current' property is 'false'.
                    type: string
                    enum:
                      - CREATOR
                      - USER
              examples:
                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:
                  summary: An example of default repository item permissions
                  description: An example representation of default permissions, which applies only to containers such as contexts or folders.
                  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
            application/json:
              schema:
                $ref: "#/paths/~1repository~1items~1%7BitemId%7D~1permissions/get/responses/200/content/application~1vnd.sas.clinical.permissions/schema"
              examples:
                currentPermissions:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D~1permissions/get/responses/200/content/application~1vnd.sas.clinical.permissions/examples/currentPermissions"
                defaultPermissions:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D~1permissions/get/responses/200/content/application~1vnd.sas.clinical.permissions/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:
        - name: itemId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the repository item.
          example: d6eefec9-dcc2-4574-8af8-69897038d9c5
        - 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:
        - 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 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:
              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/permissionsEntryPropagation/properties/principal"
                updates:
                  description: The set of existing permissions entries to update in the permissions list.
                  type: array
                  items:
                    $ref: "#/components/schemas/permissionsUpdate/properties/updates/items"
                additions:
                  description: The set of permission entries to add to the permissions list.
                  type: array
                  items:
                    $ref: "#/components/schemas/permissionsUpdate/properties/updates/items"
          application/json:
            schema:
              $ref: "#/paths/~1repository~1items~1%7BitemId%7D~1permissions/patch/requestBody/content/application~1vnd.sas.clinical.permissions.update/schema"
      responses:
        "200":
          description: The request succeeded and the specified repository item permissions have been updated.
          content:
            application/vnd.sas.clinical.permissions:
              schema:
                $ref: "#/paths/~1repository~1items~1%7BitemId%7D~1permissions/get/responses/200/content/application~1vnd.sas.clinical.permissions/schema"
              examples:
                currentPermissions:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D~1permissions/get/responses/200/content/application~1vnd.sas.clinical.permissions/examples/currentPermissions"
                defaultPermissions:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D~1permissions/get/responses/200/content/application~1vnd.sas.clinical.permissions/examples/defaultPermissions"
            application/json:
              schema:
                $ref: "#/paths/~1repository~1items~1%7BitemId%7D~1permissions/get/responses/200/content/application~1vnd.sas.clinical.permissions/schema"
              examples:
                currentPermissions:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D~1permissions/get/responses/200/content/application~1vnd.sas.clinical.permissions/examples/currentPermissions"
                defaultPermissions:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D~1permissions/get/responses/200/content/application~1vnd.sas.clinical.permissions/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:
        - 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 (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/permissions/properties/owner"
              examples:
                owner:
                  summary: Response example for a repository item owner
                  value:
                    version: 1
                    id: dbdbef7d-dbdb-49c3-a154-fb41c261b802
                    typeId: user
                    name: SAS Test User 1
                    displayName: SAS Test User 1 (sastest1)
            application/json:
              schema:
                $ref: "#/components/schemas/permissions/properties/owner"
              examples:
                owner:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D~1owner/get/responses/200/content/application~1vnd.sas.clinical.principal/examples/owner"
    head:
      tags:
        - Repository
      summary: Determine whether the specified repository item owner exists
      description: Determines whether the specified repository item owner exists.
      operationId: headersForOwner
      parameters:
        - name: itemId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the repository item.
          example: d6eefec9-dcc2-4574-8af8-69897038d9c5
        - 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:
        - name: itemId
          in: path
          schema:
            type: string
          required: true
          description: The unique identifier for the repository item.
        - 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/permissions/properties/owner"
              examples:
                owner:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D~1owner/get/responses/200/content/application~1vnd.sas.clinical.principal/examples/owner"
            application/json:
              schema:
                $ref: "#/components/schemas/permissions/properties/owner"
              examples:
                owner:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D~1owner/get/responses/200/content/application~1vnd.sas.clinical.principal/examples/owner"
        "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:
                description: The schema for a collection of repository file versions.
                allOf:
                  - $ref: "#/paths/~1actionstatus/get/responses/200/content/application~1vnd.sas.collection/schema/allOf/0"
                  - type: object
                    properties:
                      items:
                        type: array
                        description: The array of repository file versions.
                        items:
                          $ref: "#/paths/~1repository~1items~1%7BfileId%7D~1versions~1%7BfileVersion%7D/get/responses/200/content/application~1vnd.sas.version/schema"
              examples:
                getVersions:
                  description: Example response for getting repository file versions.
                  value:
                    links:
                      - method: GET
                        rel: self
                        href: /clinicalRepository/repository/items/a76f30da-5662-4456-9689-7664de187395/versions?start=0&limit=4
                        uri: /clinicalRepository/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: /clinicalRepository/repository/items/a76f30da-5662-4456-9689-7664de187395/versions
                        uri: /clinicalRepository/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
            application/json:
              schema:
                $ref: "#/paths/~1repository~1items~1%7BfileId%7D~1versions/get/responses/200/content/application~1vnd.sas.collection/schema"
              examples:
                getVersions:
                  $ref: "#/paths/~1repository~1items~1%7BfileId%7D~1versions/get/responses/200/content/application~1vnd.sas.collection/examples/getVersions"
  "/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.version:
              schema:
                title: Version
                description: The version item
                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 for the user who created the item.
                  creationTimeStamp:
                    description: The date on which the version was created.
                    type: string
                  latest:
                    description: Shows whether this is the latest file version.
                    type: boolean
                  size:
                    description: The size of the file version in bytes.
                    type: number
                  signed:
                    description: Shows whether the version has been signed.
                    type: boolean
              examples:
                repositoryVersion:
                  description: Repository file representation.
                  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
            application/vnd.sas.clinical.repository.file:
              schema:
                $ref: "#/components/schemas/repositoryContainer/allOf/0"
              examples:
                repositoryFile:
                  $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/content/application~1vnd.sas.clinical.repository.item/examples/repositoryFile"
            application/json:
              schema:
                $ref: "#/paths/~1repository~1items~1%7BfileId%7D~1versions~1%7BfileVersion%7D/get/responses/200/content/application~1vnd.sas.version/schema"
              examples:
                repositoryVersion:
                  $ref: "#/paths/~1repository~1items~1%7BfileId%7D~1versions~1%7BfileVersion%7D/get/responses/200/content/application~1vnd.sas.version/examples/repositoryVersion"
  "/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:
            $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/headers"
          content:
            application/vnd.sas.clinical.membership:
              schema:
                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
              examples:
                membership:
                  summary: Membership representation
                  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)
            application/json:
              schema:
                $ref: "#/paths/~1memberships~1%7BmembershipId%7D/get/responses/200/content/application~1vnd.sas.clinical.membership/schema"
              examples:
                membership:
                  $ref: "#/paths/~1memberships~1%7BmembershipId%7D/get/responses/200/content/application~1vnd.sas.clinical.membership/examples/membership"
    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:
            $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/headers"
        "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: "#/paths/~1audit~1entries/get/parameters/0"
        - $ref: "#/paths/~1audit~1entries/get/parameters/1"
        - 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:
                description: The schema for a collection of principals.
                allOf:
                  - $ref: "#/paths/~1actionstatus/get/responses/200/content/application~1vnd.sas.collection/schema/allOf/0"
                  - type: object
                    properties:
                      items:
                        type: array
                        description: The array of principals.
                        items:
                          $ref: "#/components/schemas/permissions/properties/owner"
              examples:
                getAssignedMembers:
                  summary: Collection of context member principals
                  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
            application/json:
              schema:
                $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members/get/responses/200/content/application~1vnd.sas.collection/schema"
              examples:
                getAssignedMembers:
                  $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members/get/responses/200/content/application~1vnd.sas.collection/examples/getAssignedMembers"
    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:
              title: Members Update
              description: The specification for updating members.
              properties:
                version:
                  description: The version of the representation. This is version 1.
                  type: number
                  example: 1
                addMembers:
                  description: The principal identifiers to be added.
                  type: array
                  items:
                    $ref: "#/components/schemas/permissionsEntryPropagation/properties/principal"
                removeMembers:
                  description: The principal identifiers to be removed.
                  type: array
                  items:
                    $ref: "#/components/schemas/permissionsEntryPropagation/properties/principal"
            examples:
              membersUpdate:
                description: Example request body for updating members.
                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
          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: "#/paths/~1memberships~1%7BmembershipId%7D~1members/patch/requestBody/content/application~1vnd.sas.clinical.members.update/schema"
            examples:
              membersUpdate:
                $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members/patch/requestBody/content/application~1vnd.sas.clinical.members.update/examples/membersUpdate"
      responses:
        "200":
          description: The request succeeded and the specified context members were updated.
          headers:
            $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/headers"
          content:
            application/vnd.sas.clinical.membership:
              schema:
                $ref: "#/paths/~1memberships~1%7BmembershipId%7D/get/responses/200/content/application~1vnd.sas.clinical.membership/schema"
              examples:
                membership:
                  $ref: "#/paths/~1memberships~1%7BmembershipId%7D/get/responses/200/content/application~1vnd.sas.clinical.membership/examples/membership"
            application/json:
              schema:
                $ref: "#/paths/~1memberships~1%7BmembershipId%7D/get/responses/200/content/application~1vnd.sas.clinical.membership/schema"
              examples:
                membership:
                  $ref: "#/paths/~1memberships~1%7BmembershipId%7D/get/responses/200/content/application~1vnd.sas.clinical.membership/examples/membership"
        "400":
          description: Bad Request
        "412":
          $ref: "#/paths/~1repository~1items~1%7BitemId%7D/patch/responses/412"
        "428":
          $ref: "#/paths/~1repository~1items~1%7BitemId%7D/patch/responses/428"
  "/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: "#/paths/~1audit~1entries/get/parameters/0"
        - $ref: "#/paths/~1audit~1entries/get/parameters/1"
        - 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
        - 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')
      responses:
        "200":
          description: The request succeeded and the specified context candidate members are returned.
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members/get/responses/200/content/application~1vnd.sas.collection/schema"
              examples:
                candidateMembers:
                  summary: Collection of candidate context member principals
                  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
            application/json:
              schema:
                $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members/get/responses/200/content/application~1vnd.sas.collection/schema"
              examples:
                candidateMembers:
                  $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members~1candidates/get/responses/200/content/application~1vnd.sas.collection/examples/candidateMembers"
  /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: "#/paths/~1audit~1entries/get/parameters/0"
        - $ref: "#/paths/~1audit~1entries/get/parameters/1"
        - 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:
                description: The schema for a collection of roles.
                allOf:
                  - $ref: "#/paths/~1actionstatus/get/responses/200/content/application~1vnd.sas.collection/schema/allOf/0"
                  - type: object
                    properties:
                      items:
                        type: array
                        description: The array of roles.
                        items:
                          $ref: "#/paths/~1roles/post/responses/201/content/application~1vnd.sas.clinical.role/schema"
              examples:
                getRoles:
                  summary: Example of a collection of roles
                  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
            application/json:
              schema:
                $ref: "#/paths/~1roles/get/responses/200/content/application~1vnd.sas.collection/schema"
              examples:
                getRoles:
                  $ref: "#/paths/~1roles/get/responses/200/content/application~1vnd.sas.collection/examples/getRoles"
    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:
            $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/headers"
          content:
            application/vnd.sas.clinical.role:
              schema:
                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
              examples:
                role:
                  description: Role representation.
                  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
            application/json:
              schema:
                $ref: "#/paths/~1roles/post/responses/201/content/application~1vnd.sas.clinical.role/schema"
              examples:
                role:
                  $ref: "#/paths/~1roles/post/responses/201/content/application~1vnd.sas.clinical.role/examples/role"
        "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: "#/paths/~1roles/get/responses/200/content/application~1vnd.sas.collection/schema"
              examples:
                getUnassignedRoles:
                  summary: Example of a collection of unassigned roles
                  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
            application/json:
              schema:
                $ref: "#/paths/~1roles/get/responses/200/content/application~1vnd.sas.collection/schema"
              examples:
                getUnassignedRoles:
                  $ref: "#/paths/~1roles~1unassigned/get/responses/200/content/application~1vnd.sas.collection/examples/getUnassignedRoles"
  /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: "#/paths/~1actionstatus/post/requestBody"
      responses:
        "201":
          description: One or more inherited roles were created at the current context.
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/paths/~1roles/get/responses/200/content/application~1vnd.sas.collection/schema"
              examples:
                roles:
                  $ref: "#/paths/~1roles/get/responses/200/content/application~1vnd.sas.collection/examples/getRoles"
            application/json:
              schema:
                $ref: "#/paths/~1roles/get/responses/200/content/application~1vnd.sas.collection/schema"
              examples:
                roles:
                  $ref: "#/paths/~1roles/get/responses/200/content/application~1vnd.sas.collection/examples/getRoles"
        "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:
            $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/headers"
          content:
            application/vnd.sas.clinical.role:
              schema:
                $ref: "#/paths/~1roles/post/responses/201/content/application~1vnd.sas.clinical.role/schema"
              examples:
                role:
                  $ref: "#/paths/~1roles/post/responses/201/content/application~1vnd.sas.clinical.role/examples/role"
            application/json:
              schema:
                $ref: "#/paths/~1roles/post/responses/201/content/application~1vnd.sas.clinical.role/schema"
              examples:
                role:
                  $ref: "#/paths/~1roles/post/responses/201/content/application~1vnd.sas.clinical.role/examples/role"
        "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:
            $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/headers"
        "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:
            $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/headers"
          content:
            application/vnd.sas.clinical.role:
              schema:
                $ref: "#/paths/~1roles/post/responses/201/content/application~1vnd.sas.clinical.role/schema"
              examples:
                role:
                  $ref: "#/paths/~1roles/post/responses/201/content/application~1vnd.sas.clinical.role/examples/role"
            application/json:
              schema:
                $ref: "#/paths/~1roles/post/responses/201/content/application~1vnd.sas.clinical.role/schema"
              examples:
                role:
                  $ref: "#/paths/~1roles/post/responses/201/content/application~1vnd.sas.clinical.role/examples/role"
        "400":
          description: Bad request
        "404":
          description: Not found - the role could not be found.
        "412":
          $ref: "#/paths/~1repository~1items~1%7BitemId%7D/patch/responses/412"
        "428":
          $ref: "#/paths/~1repository~1items~1%7BitemId%7D/patch/responses/428"
    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: "#/paths/~1audit~1entries/get/parameters/0"
        - $ref: "#/paths/~1audit~1entries/get/parameters/1"
        - $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members/get/parameters/5"
        - $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members/get/parameters/4"
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members/get/responses/200/content/application~1vnd.sas.collection/schema"
              examples:
                getRoleMembers:
                  summary: Collection of role member principals
                  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
            application/json:
              schema:
                $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members/get/responses/200/content/application~1vnd.sas.collection/schema"
              examples:
                getRoleMembers:
                  $ref: "#/paths/~1roles~1%7BroleId%7D~1members/get/responses/200/content/application~1vnd.sas.collection/examples/getRoleMembers"
        "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: "#/paths/~1memberships~1%7BmembershipId%7D~1members/patch/requestBody/content/application~1vnd.sas.clinical.members.update/schema"
            examples:
              membersUpdate:
                $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members/patch/requestBody/content/application~1vnd.sas.clinical.members.update/examples/membersUpdate"
          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: "#/paths/~1memberships~1%7BmembershipId%7D~1members/patch/requestBody/content/application~1vnd.sas.clinical.members.update/schema"
            examples:
              membersUpdate:
                $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members/patch/requestBody/content/application~1vnd.sas.clinical.members.update/examples/membersUpdate"
      responses:
        "200":
          description: OK - the role was updated
          headers:
            $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/headers"
          content:
            application/vnd.sas.clinical.role:
              schema:
                $ref: "#/paths/~1roles/post/responses/201/content/application~1vnd.sas.clinical.role/schema"
              examples:
                role:
                  $ref: "#/paths/~1roles/post/responses/201/content/application~1vnd.sas.clinical.role/examples/role"
            application/json:
              schema:
                $ref: "#/paths/~1roles/post/responses/201/content/application~1vnd.sas.clinical.role/schema"
              examples:
                role:
                  $ref: "#/paths/~1roles/post/responses/201/content/application~1vnd.sas.clinical.role/examples/role"
        "400":
          description: Bad Request
        "404":
          description: The role could not be found.
        "412":
          $ref: "#/paths/~1repository~1items~1%7BitemId%7D/patch/responses/412"
        "428":
          $ref: "#/paths/~1repository~1items~1%7BitemId%7D/patch/responses/428"
  "/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: "#/paths/~1audit~1entries/get/parameters/0"
        - $ref: "#/paths/~1audit~1entries/get/parameters/1"
        - $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members/get/parameters/4"
        - $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members/get/parameters/5"
      responses:
        "200":
          description: The request succeeded and the specified role candidate members are returned.
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members/get/responses/200/content/application~1vnd.sas.collection/schema"
              examples:
                roleCandidateMembers:
                  summary: Collection of role member principals
                  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
            application/json:
              schema:
                $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members/get/responses/200/content/application~1vnd.sas.collection/schema"
              examples:
                roleCandidateMembers:
                  $ref: "#/paths/~1roles~1%7BroleId%7D~1members~1candidates/get/responses/200/content/application~1vnd.sas.collection/examples/roleCandidateMembers"
  "/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:
                description: The schema for a collection of privileges.
                allOf:
                  - $ref: "#/paths/~1actionstatus/get/responses/200/content/application~1vnd.sas.collection/schema/allOf/0"
                  - type: object
                    properties:
                      items:
                        type: array
                        description: The array of privileges.
                        items:
                          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
              examples:
                getRoles:
                  summary: Example of a collection of role privileges
                  value:
                    links:
                      - method: GET
                        rel: self
                        href: /clinicalRepository/roles/a49c7de3-978b-4c73-9aac-ef78be80991c/privileges?start=0&limit=10
                        uri: /clinicalRepository/roles/a49c7de3-978b-4c73-9aac-ef78be80991c/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/a49c7de3-978b-4c73-9aac-ef78be80991c/privileges
                        uri: /clinicalRepository/roles/a49c7de3-978b-4c73-9aac-ef78be80991c/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: 3
                    items:
                      - version: 1
                        id: PRIVILEGE_ENABLE_VERSIONING
                        typeId: privilege
                        name: Enable Versioning
                        description: Can enable versioning
                      - version: 1
                        id: PRIVILEGE_MANAGE_LOCKS
                        typeId: privilege
                        name: Manage Locking
                        description: Can lock and unlock files
                      - version: 1
                        id: PRIVILEGE_PERMANENTLY_DELETE
                        typeId: privilege
                        name: Permanently Delete Items
                        description: Can permanently delete items
                    limit: 10
                    version: 2
            application/json:
              schema:
                $ref: "#/paths/~1roles~1%7BroleId%7D~1privileges/get/responses/200/content/application~1vnd.sas.collection/schema"
              examples:
                getRoles:
                  $ref: "#/paths/~1roles~1%7BroleId%7D~1privileges/get/responses/200/content/application~1vnd.sas.collection/examples/getRoles"
        "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:
              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
            examples:
              updatePrivileges:
                description: Example request body for updating role privileges.
                value:
                  version: 1
                  addPrivileges:
                    - PRIVILEGE_MANAGE_MEMBERSHIP
                    - PRIVILEGE_SIGN_FILE
                  removePrivileges:
                    - PRIVILEGE_ENABLE_VERSIONING
                    - PRIVILEGE_MANAGE_VERSIONING
          application/json:
            schema:
              $ref: "#/paths/~1roles~1%7BroleId%7D~1privileges/patch/requestBody/content/application~1vnd.sas.clinical.privileges.update/schema"
            examples:
              updatePrivileges:
                $ref: "#/paths/~1roles~1%7BroleId%7D~1privileges/patch/requestBody/content/application~1vnd.sas.clinical.privileges.update/examples/updatePrivileges"
      responses:
        "200":
          description: OK - the role was updated.
          content:
            application/vnd.sas.clinical.role:
              schema:
                $ref: "#/paths/~1roles/post/responses/201/content/application~1vnd.sas.clinical.role/schema"
              examples:
                role:
                  $ref: "#/paths/~1roles/post/responses/201/content/application~1vnd.sas.clinical.role/examples/role"
            application/json:
              schema:
                $ref: "#/paths/~1roles/post/responses/201/content/application~1vnd.sas.clinical.role/schema"
              examples:
                role:
                  $ref: "#/paths/~1roles/post/responses/201/content/application~1vnd.sas.clinical.role/examples/role"
        "400":
          description: Bad request
        "404":
          description: The role could not be found.
        "412":
          $ref: "#/paths/~1repository~1items~1%7BitemId%7D/patch/responses/412"
        "428":
          $ref: "#/paths/~1repository~1items~1%7BitemId%7D/patch/responses/428"
  /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: "#/paths/~1roles~1%7BroleId%7D~1privileges/get/responses/200/content/application~1vnd.sas.collection/schema"
              examples:
                getRoles:
                  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
            application/json:
              schema:
                $ref: "#/paths/~1roles~1%7BroleId%7D~1privileges/get/responses/200/content/application~1vnd.sas.collection/schema"
              examples:
                getRoles:
                  $ref: "#/paths/~1roles~1privileges/get/responses/200/content/application~1vnd.sas.collection/examples/getRoles"
  /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:
                description: The schema for a collection of types.
                allOf:
                  - $ref: "#/paths/~1actionstatus/get/responses/200/content/application~1vnd.sas.collection/schema/allOf/0"
                  - type: object
                    properties:
                      items:
                        type: array
                        description: The array of types.
                        items:
                          $ref: "#/paths/~1types~1%7BtypeId%7D/get/responses/200/content/application~1vnd.sas.clinical.type/schema"
              examples:
                types:
                  summary: Type collection
                  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
            application/json:
              schema:
                $ref: "#/paths/~1types/get/responses/200/content/application~1vnd.sas.collection/schema"
              examples:
                types:
                  $ref: "#/paths/~1types/get/responses/200/content/application~1vnd.sas.collection/examples/types"
  "/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:
                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:
                      $ref: "#/components/schemas/type/properties/attributeDefinitions/items"
                  allowableChildTypes:
                    description: The list of allowable child types for the type.
                    type: array
                    items:
                      type: string
              examples:
                type:
                  summary: Type representation
                  value:
                    version: 1
                    id: name
                    name: Name
                    attributeType: STRING
                    required: true
                    searchable: true
            application/json:
              schema:
                $ref: "#/paths/~1types~1%7BtypeId%7D/get/responses/200/content/application~1vnd.sas.clinical.type/schema"
              examples:
                type:
                  $ref: "#/paths/~1types~1%7BtypeId%7D/get/responses/200/content/application~1vnd.sas.clinical.type/examples/type"
    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: "#/paths/~1audit~1entries/get/parameters/0"
        - $ref: "#/paths/~1audit~1entries/get/parameters/1"
        - $ref: "#/paths/~1roles/get/parameters/3"
        - $ref: "#/paths/~1roles/get/parameters/4"
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.collection:
              schema:
                description: The schema for a collection of groups.
                allOf:
                  - $ref: "#/paths/~1actionstatus/get/responses/200/content/application~1vnd.sas.collection/schema/allOf/0"
                  - type: object
                    properties:
                      items:
                        type: array
                        description: The array of groups.
                        items:
                          $ref: "#/paths/~1groups/post/responses/201/content/application~1vnd.sas.clinical.group/schema"
              examples:
                groups:
                  summary: Collection of groups
                  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
            application/json:
              schema:
                $ref: "#/paths/~1groups/get/responses/200/content/application~1vnd.sas.collection/schema"
              examples:
                groups:
                  $ref: "#/paths/~1groups/get/responses/200/content/application~1vnd.sas.collection/examples/groups"
        "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:
            $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/headers"
          content:
            application/vnd.sas.clinical.group:
              schema:
                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
              examples:
                group:
                  summary: Example group representation
                  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
            application/json:
              schema:
                $ref: "#/paths/~1groups/post/responses/201/content/application~1vnd.sas.clinical.group/schema"
              examples:
                group:
                  $ref: "#/paths/~1groups/post/responses/201/content/application~1vnd.sas.clinical.group/examples/group"
        "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:
            $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/headers"
          content:
            application/vnd.sas.clinical.group+json:
              schema:
                $ref: "#/paths/~1groups/post/responses/201/content/application~1vnd.sas.clinical.group/schema"
              examples:
                group:
                  $ref: "#/paths/~1groups/post/responses/201/content/application~1vnd.sas.clinical.group/examples/group"
            application/json:
              schema:
                $ref: "#/paths/~1groups/post/responses/201/content/application~1vnd.sas.clinical.group/schema"
              examples:
                group:
                  $ref: "#/paths/~1groups/post/responses/201/content/application~1vnd.sas.clinical.group/examples/group"
        "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:
            $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/headers"
        "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:
            $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/headers"
          content:
            application/vnd.sas.clinical.group:
              schema:
                $ref: "#/paths/~1groups/post/responses/201/content/application~1vnd.sas.clinical.group/schema"
              examples:
                group:
                  $ref: "#/paths/~1groups/post/responses/201/content/application~1vnd.sas.clinical.group/examples/group"
            application/json:
              schema:
                $ref: "#/paths/~1groups/post/responses/201/content/application~1vnd.sas.clinical.group/schema"
              examples:
                group:
                  $ref: "#/paths/~1groups/post/responses/201/content/application~1vnd.sas.clinical.group/examples/group"
        "400":
          description: Bad Request
        "404":
          description: The group could not be found.
        "409":
          description: The group already exists.
        "412":
          $ref: "#/paths/~1repository~1items~1%7BitemId%7D/patch/responses/412"
        "428":
          $ref: "#/paths/~1repository~1items~1%7BitemId%7D/patch/responses/428"
    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: "#/paths/~1audit~1entries/get/parameters/0"
        - $ref: "#/paths/~1audit~1entries/get/parameters/1"
        - $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members/get/parameters/5"
        - $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members/get/parameters/4"
      responses:
        "200":
          description: OK
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members/get/responses/200/content/application~1vnd.sas.collection/schema"
              examples:
                getMembers:
                  summary: Collection of group member principals
                  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
            application/json:
              schema:
                $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members/get/responses/200/content/application~1vnd.sas.collection/schema"
              examples:
                getMembers:
                  $ref: "#/paths/~1groups~1%7BgroupId%7D~1members/get/responses/200/content/application~1vnd.sas.collection/examples/getMembers"
        "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: "#/paths/~1memberships~1%7BmembershipId%7D~1members/patch/requestBody/content/application~1vnd.sas.clinical.members.update/schema"
            examples:
              membersUpdate:
                $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members/patch/requestBody/content/application~1vnd.sas.clinical.members.update/examples/membersUpdate"
          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: "#/paths/~1memberships~1%7BmembershipId%7D~1members/patch/requestBody/content/application~1vnd.sas.clinical.members.update/schema"
            examples:
              membersUpdate:
                $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members/patch/requestBody/content/application~1vnd.sas.clinical.members.update/examples/membersUpdate"
      responses:
        "200":
          description: OK
          headers:
            $ref: "#/paths/~1repository~1items~1%7BitemId%7D/get/responses/200/headers"
          content:
            application/vnd.sas.clinical.group:
              schema:
                $ref: "#/paths/~1groups/post/responses/201/content/application~1vnd.sas.clinical.group/schema"
              examples:
                group:
                  $ref: "#/paths/~1groups/post/responses/201/content/application~1vnd.sas.clinical.group/examples/group"
            application/json:
              schema:
                $ref: "#/paths/~1groups/post/responses/201/content/application~1vnd.sas.clinical.group/schema"
              examples:
                group:
                  $ref: "#/paths/~1groups/post/responses/201/content/application~1vnd.sas.clinical.group/examples/group"
        "400":
          description: Bad Request
        "404":
          description: The group could not be found.
        "412":
          $ref: "#/paths/~1repository~1items~1%7BitemId%7D/patch/responses/412"
        "428":
          $ref: "#/paths/~1repository~1items~1%7BitemId%7D/patch/responses/428"
  "/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: "#/paths/~1audit~1entries/get/parameters/0"
        - $ref: "#/paths/~1audit~1entries/get/parameters/1"
        - $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members~1candidates/get/parameters/3"
        - $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members~1candidates/get/parameters/4"
      responses:
        "200":
          description: The request succeeded and the specified group candidate members are returned.
          content:
            application/vnd.sas.collection:
              schema:
                $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members/get/responses/200/content/application~1vnd.sas.collection/schema"
              examples:
                getCandidates:
                  summary: Collection of candidate group member principals
                  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
            application/json:
              schema:
                $ref: "#/paths/~1memberships~1%7BmembershipId%7D~1members/get/responses/200/content/application~1vnd.sas.collection/schema"
              examples:
                getCandidates:
                  $ref: "#/paths/~1groups~1%7BgroupId%7D~1members~1candidates/get/responses/200/content/application~1vnd.sas.collection/examples/getCandidates"
components:
  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
    ifMatch:
      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"'
  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
  schemas:
    auditEntry:
      title: Audit Entry
      description: The schema for an audit history record with any supporting details.
      allOf:
        - title: Audit Entry
          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.
        - type: object
          properties:
            details:
              description: Additional information about the action. Included only when a single entry is requested.
              type: array
              items:
                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
    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
    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
    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.
        tags:
          type: array
          description: One or more strings who can be associated with the item so it can be grouped with other items.
          items: {}
    repositoryContainer:
      title: Repository Container
      description: The representation of a repository container.
      allOf:
        - 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.
            tags:
              type: array
              description: One or more strings who can be associated with the item so it can be grouped with other items.
              items: {}
        - 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.
    repositoryFile:
      title: Repository File
      description: The representation of a repository file.
      allOf:
        - $ref: "#/components/schemas/repositoryContainer/allOf/0"
        - 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.
    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
    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:
          title: Principal
          description: A user or group in the system.
          type: object
          allOf:
            - $ref: "#/components/schemas/permissionsEntryPropagation/properties/principal"
            - 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
        entries:
          description: The set of permission entries.
          type: array
          items:
            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/permissions/properties/owner"
              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
        ownerPropagation:
          description: >
            Specifies whether the default owner is the creator or a specific user. This applies only when the 'current' property is 'false'.
          type: string
          enum:
            - CREATOR
            - USER
    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/permissions/properties/owner"
        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/permissionsEntryPropagation/properties/principal"
        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/permissionsEntryPropagation/properties/principal"
        updates:
          description: The set of existing permissions entries to update in the permissions list.
          type: array
          items:
            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/permissionsEntryPropagation/properties/principal"
              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
        additions:
          description: The set of permission entries to add to the permissions list.
          type: array
          items:
            $ref: "#/components/schemas/permissionsUpdate/properties/updates/items"
    principal:
      title: Principal
      description: A user or group in the system.
      type: object
      allOf:
        - $ref: "#/components/schemas/permissionsEntryPropagation/properties/principal"
        - 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
    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
    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
    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
    version:
      title: Version
      description: The version item
      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 for the user who created the item.
        creationTimeStamp:
          description: The date on which the version was created.
          type: string
        latest:
          description: Shows whether this is the latest file version.
          type: boolean
        size:
          description: The size of the file version in bytes.
          type: number
        signed:
          description: Shows whether the version has been signed.
          type: boolean
    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
    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
    groupUpdate:
      title: Members Update
      description: The specification for updating members.
      properties:
        version:
          description: The version of the representation. This is version 1.
          type: number
          example: 1
        addMembers:
          description: The principal identifiers to be added.
          type: array
          items:
            $ref: "#/components/schemas/permissionsEntryPropagation/properties/principal"
        removeMembers:
          description: The principal identifiers to be removed.
          type: array
          items:
            $ref: "#/components/schemas/permissionsEntryPropagation/properties/principal"
    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
