openapi: 3.0.3
info:
  version: "1"
  title: Glossary
  description: >
    The Glossary API allows users to associate business terms with technology assets such as data sets and columns, documents, and business rules.
  termsOfService: https://www.sas.com/en_us/legal/copyright.html
  contact:
    name: SAS Developers
    email: devex@sas.com
    url: https://developer.sas.com
servers:
  - url: http://example.com/glossary
    description: The SAS Glossary server.
tags:
  - name: Root
    description: Contains root level resources.
  - name: Term Types
    description: Contains life cycle management resources for term types.
  - name: Terms
    description: Contains life cycle management resources for terms.
  - name: Drafts
    description: Contains life cycle management resources for draft terms.
  - name: Transfer
    description: Contains resources required by the transfer object provider contract.
paths:
  /:
    get:
      operationId: root
      summary: Get top-level resource links
      description: Returns a list of top-level resource links provided by the Glossary API.
      tags:
        - Root
      parameters:
        - name: Accept
          description: The desired representation for the response.
          in: header
          schema:
            type: string
            enum:
              - application/vnd.sas.api+json
              - application/json
            default: application/vnd.sas.api+json
      responses:
        "200":
          description: OK.
          headers:
            Content-Type:
              description: The media type of the response body.
              schema:
                type: string
          content:
            application/vnd.sas.api+json:
              schema:
                $ref: "#/paths/~1/get/responses/200/content/application~1json/schema"
              examples:
                API:
                  $ref: "#/paths/~1/get/responses/200/content/application~1json/examples/API"
            application/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:
                      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.
              examples:
                API:
                  summary: Root API response
                  description: The root response consists of a collection of links that can be used to navigate the Glossary service API.
                  value:
                    version: 1
                    links:
                      - method: GET
                        rel: termTypes
                        href: /glossary/termTypes
                        uri: /glossary/termTypes
                        type: application/vnd.sas.collection
                        itemType: application/vnd.sas.glossary.term.type
                      - method: POST
                        rel: createTermType
                        href: /glossary/termTypes
                        uri: /glossary/termTypes
                        type: application/vnd.sas.glossary.term.type
                        responseType: application/vnd.sas.glossary.term.type
                      - method: GET
                        rel: terms
                        href: /glossary/terms
                        uri: /glossary/terms
                        type: application/vnd.sas.collection
                        itemType: application/vnd.sas.glossary.term
                      - method: POST
                        rel: createTerm
                        href: /glossary/terms?publish=true
                        uri: /glossary/terms?publish=true
                        type: application/vnd.sas.glossary.term
                        responseType: application/vnd.sas.glossary.term
                      - method: POST
                        rel: importTerms
                        href: /glossary/importTerms
                        uri: /glossary/importTerms
                        type: application/vnd.sas.job.execution.job
                        responseType: application/vnd.sas.job.execution.job
                      - method: GET
                        rel: drafts
                        href: /glossary/drafts
                        uri: /glossary/drafts
                        type: application/vnd.sas.collection
                        itemType: application/vnd.sas.glossary.term.draft
                      - method: POST
                        rel: createDraft
                        href: /glossary/terms?publish=false
                        uri: /glossary/terms?publish=false
                        type: application/vnd.sas.glossary.term
                        responseType: application/vnd.sas.glossary.term
        "404":
          description: The Glossary service is not available.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/paths/~1terms/post/responses/409/content/application~1vnd.sas.error%2Bjson/schema"
              examples:
                Error - Service Unavailable:
                  summary: Error - Service Unavailable
                  description: The service is unavailable.
                  value:
                    version: 2
                    httpStatusCode: 404
                    message: Not Found
                    details: The service is unavailable.
  /termTypes:
    get:
      operationId: getTermTypes
      summary: Get term types
      description: >
        Returns a list of term types.  The items are sorted by name by default. The properties that can be used as filter and sort criteria are:
          * id
          * name
          * label
          * description
          * createdBy
          * creationTimeStamp
          * modifiedBy
          * modifiedTimeStamp
      tags:
        - Term Types
      parameters:
        - $ref: "#/paths/~1terms/get/parameters/0"
        - $ref: "#/paths/~1terms/get/parameters/1"
        - $ref: "#/paths/~1terms/get/parameters/2"
        - $ref: "#/paths/~1terms/get/parameters/3"
        - $ref: "#/paths/~1terms/get/parameters/4"
        - name: Accept-Item
          description: The desired item representation for collections.
          in: header
          schema:
            type: string
            enum:
              - application/vnd.sas.glossary.term.type.summary+json
              - application/vnd.sas.glossary.term.type+json
              - application/json
            default: application/vnd.sas.glossary.term.type.summary+json
      responses:
        "200":
          description: OK.
          headers:
            Content-Type:
              $ref: "#/paths/~1/get/responses/200/headers/Content-Type"
          content:
            application/vnd.sas.collection+json:
              schema:
                $ref: "#/components/schemas/termTypeCollection"
              examples:
                Term Type Collection:
                  $ref: "#/paths/~1termTypes/get/responses/200/content/application~1json/examples/Term%20Type%20Collection"
            application/json:
              schema:
                $ref: "#/components/schemas/termTypeCollection"
              examples:
                Term Type Collection:
                  summary: Term type collection
                  description: A list of term types.
                  value:
                    version: 2
                    accept: application/vnd.sas.glossary.term.type.summary
                    count: 1
                    start: 0
                    limit: 10
                    name: termTypes
                    items:
                      - creationTimeStamp: 0001-01-01T00:00:00Z
                        createdBy: sasuser
                        modifiedTimeStamp: 2021-10-11T00:00:00Z
                        modifiedBy: sasuser
                        id: d4671576-1de8-44e3-8ddf-fc1c17bf4134
                        links:
                          - method: GET
                            rel: self
                            href: /glossary/termTypes/d4671576-1de8-44e3-8ddf-fc1c17bf4134
                            uri: /glossary/termTypes/d4671576-1de8-44e3-8ddf-fc1c17bf4134
                            type: application/vnd.sas.glossary.term.type
                          - method: GET
                            rel: up
                            href: /glossary/termTypes
                            uri: /glossary/termTypes
                            type: application/vnd.sas.collection
                            itemType: application/vnd.sas.glossary.term.type.summary
                          - method: PUT
                            rel: update
                            href: /glossary/termTypes/d4671576-1de8-44e3-8ddf-fc1c17bf4134
                            uri: /glossary/termTypes/d4671576-1de8-44e3-8ddf-fc1c17bf4134
                            type: application/vnd.sas.glossary.term.type
                            responseType: application/vnd.sas.glossary.term.type
                          - method: DELETE
                            rel: delete
                            href: /glossary/termTypes/d4671576-1de8-44e3-8ddf-fc1c17bf4134
                            uri: /glossary/termTypes/d4671576-1de8-44e3-8ddf-fc1c17bf4134
                          - method: GET
                            rel: alternate
                            href: /glossary/termTypes/d4671576-1de8-44e3-8ddf-fc1c17bf4134
                            uri: /glossary/termTypes/d4671576-1de8-44e3-8ddf-fc1c17bf4134
                            type: application/vnd.sas.glossary.term.type.summary
                        version: 1
                        name: customType
                        label: Custom Term Type
                        description: A custom type definition.
                        usageCount: 0
                        attributeCount: 0
                    links:
                      - method: GET
                        rel: self
                        href: /glossary/termTypes?start=0&limit=10&sortBy=name
                        uri: /glossary/termTypes?start=0&limit=10&sortBy=name
                        type: application/vnd.sas.collection
                        itemType: application/vnd.sas.glossary.term.type.summary+json
                      - method: GET
                        rel: collection
                        href: /glossary/termTypes
                        uri: /glossary/termTypes
                        type: application/vnd.sas.collection
                        itemType: application/vnd.sas.glossary.term.type.summary+json
                      - method: GET
                        rel: up
                        href: /glossary
                        uri: /glossary
                        type: application/vnd.sas.api
                      - method: POST
                        rel: create
                        href: /glossary/termTypes
                        uri: /glossary/termTypes
                        type: application/vnd.sas.glossary.term.type+json
                        responseType: application/vnd.sas.glossary.term.type.summary+json
        "401":
          description: Not authenticated.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/paths/~1terms/post/responses/409/content/application~1vnd.sas.error%2Bjson/schema"
              examples:
                Error - Not Found:
                  summary: Error - Unauthorized
                  description: Unauthorized. This request requires valid authentication.
                  value:
                    version: 2
                    httpStatusCode: 401
                    message: Full authentication is required to access this resource
        "403":
          $ref: "#/paths/~1terms/post/responses/403"
        "404":
          description: The specified resource was not found.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/paths/~1terms/post/responses/409/content/application~1vnd.sas.error%2Bjson/schema"
              examples:
                Error - Not Found:
                  summary: Error - Not Found
                  description: The specified resource was not found.
                  value:
                    version: 2
                    httpStatusCode: 404
                    message: Not Found
                    details: No object was found with the ID "2b647d99-60f4-4252-adea-8ea2bd35974c".
        "406":
          description: Not Acceptable. Include an Accept header with a supported value on the request.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/paths/~1terms/post/responses/409/content/application~1vnd.sas.error%2Bjson/schema"
              examples:
                Error - Not Acceptable:
                  summary: Error - Not Acceptable
                  description: The header field "Accept" does not have a supported value.
                  value:
                    version: 2
                    httpStatusCode: 406
                    message: Not Acceptable Error
    post:
      operationId: createTermType
      summary: Create a term type
      description: Creates a term type with the given content.
      tags:
        - Term Types
      parameters:
        - name: Content-Type
          required: true
          description: The representation in the request body.
          in: header
          schema:
            type: string
            enum:
              - application/vnd.sas.glossary.term.type+json
              - application/json
        - name: Accept
          description: The desired representation for the response.
          in: header
          schema:
            type: string
            enum:
              - application/vnd.sas.glossary.term.type+json
              - application/vnd.sas.glossary.term.type.summary+json
              - application/json
            default: application/vnd.sas.glossary.term.type+json
      requestBody:
        content:
          application/vnd.sas.glossary.term.type+json:
            schema:
              $ref: "#/components/schemas/termType"
            examples:
              Term Type:
                $ref: "#/paths/~1termTypes/post/requestBody/content/application~1json/examples/Term%20Type"
          application/json:
            schema:
              $ref: "#/components/schemas/termType"
            examples:
              Term Type:
                summary: Term type
                description: A term type.
                value:
                  id: b1744b2b-b984-4454-8b65-f09873708caf
                  name: New Term Type
                  label: Term Type
                  description: A new term type
                  attributes:
                    - name: singleLineTextAttribute
                      label: A single-line text attribute
                      description: This is a description of the attribute. Single-line text attributes can be up to 4000 characters long and cannot contain newline characters.
                      required: true
                      type: single-line
                      defaultValue: This is an example of a single-line text attribute.
                    - name: multiLineTextAttribute
                      label: A multi-line text attribute
                      description: Multi-line text attributes can be up to 4000 characters.  Newline characters are allowed.
                      type: multi-line
                      defaultValue: This is an example of a multi-line text attribute\nwith\nnewline\ncharacters.
                    - name: booleanAttribute
                      label: A boolean attribute
                      description: Boolean attributes can be either "true" or "false"
                      type: boolean
                      defaultValue: "true"
                    - name: dateAttribute
                      label: A date attribute
                      description: Date attributes should be specified with the format "YYYY-MM-DD"
                      type: date
                      defaultValue: 2024-02-12
                    - name: timeAttribute
                      label: A time attribute
                      description: Time attributes should be specified with the format "hh:mm:ssZ"
                      type: time
                      defaultValue: 10:23:45Z
                    - name: dateTimeAttribute
                      label: A date-time attribute
                      description: Date-time attributes should be specified with the format "YYYY-MM-DDThh:mm:ssZ"
                      type: date-time
                      defaultValue: 2024-02-12T10:23:45Z
                    - name: singleSelectAttribute
                      label: A single-select attribute
                      description: Single-select attributes must specify at least one item in the "items" field
                      type: single-select
                      items:
                        - Item 1
                        - Item 2
                        - Item 3
                      defaultValue: Item 1
                    - name: multiSelectAttribute
                      label: A multi-select attribute
                      description: Multi-select attributes must specify at least one item in the "items" field
                      type: multi-select
                      items:
                        - Item 1
                        - Item 2
                        - Item 3
                      defaultValue: Item 1,Item 3
      responses:
        "201":
          description: >
            Created. The term type has been created.
          headers:
            Location:
              $ref: "#/paths/~1terms/post/responses/201/headers/Location"
            ETag:
              $ref: "#/paths/~1terms/post/responses/201/headers/ETag"
            Content-Type:
              $ref: "#/paths/~1/get/responses/200/headers/Content-Type"
          content:
            application/vnd.sas.glossary.term.type+json:
              schema:
                $ref: "#/components/schemas/termType"
              examples:
                Term Type:
                  $ref: "#/paths/~1termTypes/post/responses/201/content/application~1json/examples/Term%20Type"
            application/vnd.sas.glossary.term.type.summary+json:
              schema:
                $ref: "#/components/schemas/termTypeSummary"
              examples:
                Term Type Summary:
                  summary: Term type summary
                  description: A term type summary representation.
                  value:
                    creationTimeStamp: 2022-06-23T17:17:25.591Z
                    createdBy: sasuser
                    modifiedTimeStamp: 2022-06-23T17:17:25.591Z
                    modifiedBy: sasuser
                    id: b1744b2b-b984-4454-8b65-f09873708caf
                    links:
                      - method: GET
                        rel: self
                        href: /glossary/termTypes/b1744b2b-b984-4454-8b65-f09873708caf
                        uri: /glossary/termTypes/b1744b2b-b984-4454-8b65-f09873708caf
                        type: application/vnd.sas.glossary.term.type
                      - method: GET
                        rel: up
                        href: /glossary/termTypes
                        uri: /glossary/termTypes
                        type: application/vnd.sas.collection
                        itemType: application/vnd.sas.glossary.term.type.summary
                      - method: DELETE
                        rel: delete
                        href: /glossary/termTypes/b1744b2b-b984-4454-8b65-f09873708caf
                        uri: /glossary/termTypes/b1744b2b-b984-4454-8b65-f09873708caf
                      - method: PUT
                        rel: update
                        href: /glossary/termTypes/b1744b2b-b984-4454-8b65-f09873708caf
                        uri: /glossary/termTypes/b1744b2b-b984-4454-8b65-f09873708caf
                        type: application/vnd.sas.glossary.term.type
                        responseType: application/vnd.sas.glossary.term.type
                      - method: GET
                        rel: alternate
                        href: /glossary/termTypes/b1744b2b-b984-4454-8b65-f09873708caf
                        uri: /glossary/termTypes/b1744b2b-b984-4454-8b65-f09873708caf
                        type: application/vnd.sas.glossary.term.type.summary
                    version: 1
                    name: New Term Type
                    label: Term Type
                    description: A new term type
                    usageCount: 0
                    attributeCount: 0
            application/json:
              schema:
                $ref: "#/components/schemas/termType"
              examples:
                Term Type:
                  summary: Term type
                  description: A term type.
                  value:
                    creationTimeStamp: 2022-06-23T17:17:25.591Z
                    createdBy: sasuser
                    modifiedTimeStamp: 2022-06-23T17:17:25.591Z
                    modifiedBy: sasuser
                    id: b1744b2b-b984-4454-8b65-f09873708caf
                    links:
                      - method: GET
                        rel: self
                        href: /glossary/termTypes/b1744b2b-b984-4454-8b65-f09873708caf
                        uri: /glossary/termTypes/b1744b2b-b984-4454-8b65-f09873708caf
                        type: application/vnd.sas.glossary.term.type
                      - method: GET
                        rel: up
                        href: /glossary/termTypes
                        uri: /glossary/termTypes
                        type: application/vnd.sas.collection
                        itemType: application/vnd.sas.glossary.term.type.summary
                      - method: DELETE
                        rel: delete
                        href: /glossary/termTypes/b1744b2b-b984-4454-8b65-f09873708caf
                        uri: /glossary/termTypes/b1744b2b-b984-4454-8b65-f09873708caf
                      - method: PUT
                        rel: update
                        href: /glossary/termTypes/b1744b2b-b984-4454-8b65-f09873708caf
                        uri: /glossary/termTypes/b1744b2b-b984-4454-8b65-f09873708caf
                        type: application/vnd.sas.glossary.term.type
                        responseType: application/vnd.sas.glossary.term.type
                      - method: GET
                        rel: alternate
                        href: /glossary/termTypes/b1744b2b-b984-4454-8b65-f09873708caf
                        uri: /glossary/termTypes/b1744b2b-b984-4454-8b65-f09873708caf
                        type: application/vnd.sas.glossary.term.type.summary
                    version: 1
                    name: New Term Type
                    label: Term Type
                    description: A new term type
                    usageCount: 0
                    attributeCount: 0
                    attributes:
                      - name: singleLineTextAttribute
                        label: A single-line text attribute
                        description: This is a description of the attribute. Single-line text attributes can be up to 4000 characters long and cannot contain newline characters.
                        required: true
                        type: single-line
                        defaultValue: This is an example of a single-line text attribute.
                      - name: multiLineTextAttribute
                        label: A multi-line text attribute
                        description: Multi-line text attributes can be up to 4000 characters.  Newline characters are allowed.
                        type: multi-line
                        defaultValue: This is an example of a multi-line text attribute\nwith\nnewline\ncharacters.
                      - name: booleanAttribute
                        label: A boolean attribute
                        description: Boolean attributes can be either "true" or "false"
                        type: boolean
                        defaultValue: "true"
                      - name: dateAttribute
                        label: A date attribute
                        description: Date attributes should be specified with the format "YYYY-MM-DD"
                        type: date
                        defaultValue: 2024-02-12
                      - name: timeAttribute
                        label: A time attribute
                        description: Time attributes should be specified with the format "hh:mm:ssZ"
                        type: time
                        defaultValue: 10:23:45Z
                      - name: dateTimeAttribute
                        label: A date-time attribute
                        description: Date-time attributes should be specified with the format "YYYY-MM-DDThh:mm:ssZ"
                        type: date-time
                        defaultValue: 2024-02-12T10:23:45Z
                      - name: singleSelectAttribute
                        label: A single-select attribute
                        description: Single-select attributes must specify at least one item in the "items" field
                        type: single-select
                        items:
                          - Item 1
                          - Item 2
                          - Item 3
                        defaultValue: Item 1
                      - name: multiSelectAttribute
                        label: A multi-select attribute
                        description: Multi-select attributes must specify at least one item in the "items" field
                        type: multi-select
                        items:
                          - Item 1
                          - Item 2
                          - Item 3
                        defaultValue: Item 1,Item 3
        "400":
          $ref: "#/paths/~1terms/post/responses/400"
        "401":
          $ref: "#/paths/~1termTypes/get/responses/401"
        "403":
          $ref: "#/paths/~1terms/post/responses/403"
        "406":
          $ref: "#/paths/~1termTypes/get/responses/406"
        "409":
          description: A conflict has occurred; usually this means that the term type name is already in use or a term type attribute name was duplicated.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/paths/~1terms/post/responses/409/content/application~1vnd.sas.error%2Bjson/schema"
              examples:
                Error - Conflict:
                  summary: Error - Conflict
                  description: The specified name is already in use.
                  value:
                    version: 2
                    httpStatusCode: 409
                    errorCode: 76910
                    message: Conflict
                    details: A term type with the name "{name}" already exists. Please specify a different name.
        "415":
          description: Unsupported Media Type. Include a Content-Type header with a supported value in the request.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/paths/~1terms/post/responses/409/content/application~1vnd.sas.error%2Bjson/schema"
              examples:
                Error - Unsupported Media Type:
                  summary: Error - Unsupported Media Type
                  description: The header field "Content-Type" does not have a supported value.
                  value:
                    version: 2
                    httpStatusCode: 415
                    message: Unsupported Media Type
  "/termTypes/{termTypeId}":
    head:
      operationId: headersForTermType
      summary: Get the headers for a term type by its ID
      description: Returns the headers for a term type by referencing its ID.
      tags:
        - Term Types
      parameters:
        - $ref: "#/paths/~1termTypes~1%7BtermTypeId%7D/get/parameters/0"
        - name: Accept
          description: The desired representation for the response.
          in: header
          schema:
            type: string
            enum:
              - application/vnd.sas.glossary.term.type+json
              - application/vnd.sas.glossary.term.type.summary+json
              - application/json
            default: application/vnd.sas.glossary.term.type+json
      responses:
        "200":
          description: The request succeeded.
          headers:
            Content-Type:
              $ref: "#/paths/~1/get/responses/200/headers/Content-Type"
            Etag:
              $ref: "#/paths/~1terms/post/responses/201/headers/ETag"
            Last-Modified:
              $ref: "#/paths/~1terms~1%7BtermId%7D/get/responses/200/headers/Last-Modified"
        "401":
          $ref: "#/paths/~1termTypes/get/responses/401"
        "403":
          $ref: "#/paths/~1terms/post/responses/403"
        "404":
          $ref: "#/paths/~1termTypes/get/responses/404"
    get:
      operationId: getTermType
      summary: Get a term type by its ID
      description: Returns a term type by referencing its ID.
      tags:
        - Term Types
      parameters:
        - name: termTypeId
          required: true
          description: The ID of the term type.
          in: path
          schema:
            type: string
        - name: Accept
          description: The desired representation for the response.
          in: header
          schema:
            type: string
            enum:
              - application/vnd.sas.glossary.term.type+json
              - application/vnd.sas.glossary.term.type.summary+json
              - application/json
            default: application/vnd.sas.glossary.term.type+json
      responses:
        "200":
          description: The request succeeded.
          headers:
            Content-Type:
              $ref: "#/paths/~1/get/responses/200/headers/Content-Type"
            Etag:
              $ref: "#/paths/~1terms/post/responses/201/headers/ETag"
            Last-Modified:
              $ref: "#/paths/~1terms~1%7BtermId%7D/get/responses/200/headers/Last-Modified"
          content:
            application/vnd.sas.glossary.term.type+json:
              schema:
                $ref: "#/components/schemas/termType"
              examples:
                Term Type:
                  $ref: "#/paths/~1termTypes/post/responses/201/content/application~1json/examples/Term%20Type"
            application/vnd.sas.glossary.term.type.summary+json:
              schema:
                $ref: "#/components/schemas/termTypeSummary"
              examples:
                Term Type Summary:
                  $ref: "#/paths/~1termTypes/post/responses/201/content/application~1vnd.sas.glossary.term.type.summary%2Bjson/examples/Term%20Type%20Summary"
            application/json:
              schema:
                $ref: "#/components/schemas/termType"
              examples:
                Term Type:
                  $ref: "#/paths/~1termTypes/post/responses/201/content/application~1json/examples/Term%20Type"
        "400":
          $ref: "#/paths/~1terms/post/responses/400"
        "401":
          $ref: "#/paths/~1termTypes/get/responses/401"
        "403":
          $ref: "#/paths/~1terms/post/responses/403"
        "404":
          $ref: "#/paths/~1termTypes/get/responses/404"
        "406":
          $ref: "#/paths/~1termTypes/get/responses/406"
    put:
      operationId: updateTermType
      summary: Update a term type by its ID
      description: Updates a term type by referencing its ID.
      tags:
        - Term Types
      parameters:
        - $ref: "#/paths/~1termTypes~1%7BtermTypeId%7D/get/parameters/0"
        - $ref: "#/paths/~1terms~1%7BtermId%7D/put/parameters/1"
        - name: Content-Type
          required: true
          description: The representation in the request body.
          in: header
          schema:
            type: string
            enum:
              - application/vnd.sas.glossary.term.type+json
              - application/json
            default: application/vnd.sas.glossary.term.type+json
        - name: Accept
          description: The desired representation for the response.
          in: header
          schema:
            type: string
            enum:
              - application/vnd.sas.glossary.term.type+json
              - application/vnd.sas.glossary.term.type.summary+json
              - application/json
            default: application/vnd.sas.glossary.term.type+json
      requestBody:
        content:
          application/vnd.sas.glossary.term.type+json:
            schema:
              $ref: "#/components/schemas/termType"
            examples:
              Term Type:
                $ref: "#/paths/~1termTypes/post/requestBody/content/application~1json/examples/Term%20Type"
          application/json:
            schema:
              $ref: "#/components/schemas/termType"
            examples:
              Term Type:
                $ref: "#/paths/~1termTypes/post/requestBody/content/application~1json/examples/Term%20Type"
      responses:
        "200":
          description: The request succeeded.
          headers:
            Content-Type:
              $ref: "#/paths/~1/get/responses/200/headers/Content-Type"
            Etag:
              $ref: "#/paths/~1terms/post/responses/201/headers/ETag"
            Last-Modified:
              $ref: "#/paths/~1terms~1%7BtermId%7D/get/responses/200/headers/Last-Modified"
          content:
            application/vnd.sas.glossary.term.type+json:
              schema:
                $ref: "#/components/schemas/termType"
              examples:
                Term Type:
                  $ref: "#/paths/~1termTypes/post/responses/201/content/application~1json/examples/Term%20Type"
            application/vnd.sas.glossary.term.type.summary+json:
              schema:
                $ref: "#/components/schemas/termTypeSummary"
              examples:
                Term Type Summary:
                  $ref: "#/paths/~1termTypes/post/responses/201/content/application~1vnd.sas.glossary.term.type.summary%2Bjson/examples/Term%20Type%20Summary"
            application/json:
              schema:
                $ref: "#/components/schemas/termType"
              examples:
                Term Type:
                  $ref: "#/paths/~1termTypes/post/responses/201/content/application~1json/examples/Term%20Type"
        "400":
          $ref: "#/paths/~1terms/post/responses/400"
        "401":
          $ref: "#/paths/~1termTypes/get/responses/401"
        "403":
          $ref: "#/paths/~1terms/post/responses/403"
        "406":
          $ref: "#/paths/~1termTypes/get/responses/406"
        "409":
          description: A conflict has occurred; usually this means that the term type name is already in use or a term type attribute label was duplicated.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/paths/~1terms/post/responses/409/content/application~1vnd.sas.error%2Bjson/schema"
              examples:
                Error - Conflict:
                  summary: Error - Conflict
                  description: The specified name is already in use.
                  value:
                    version: 2
                    httpStatusCode: 409
                    errorCode: 76910
                    message: Conflict
                    details: A term type with the name "{name}" already exists. Please specify a different name.
        "412":
          $ref: "#/paths/~1terms~1%7BtermId%7D/put/responses/412"
        "415":
          $ref: "#/paths/~1termTypes/post/responses/415"
        "428":
          $ref: "#/paths/~1terms~1%7BtermId%7D/put/responses/428"
    delete:
      operationId: deleteTermType
      summary: Delete a term type by its ID
      description: Deletes a term type by referencing its ID.
      tags:
        - Term Types
      parameters:
        - $ref: "#/paths/~1termTypes~1%7BtermTypeId%7D/get/parameters/0"
      responses:
        "204":
          description: The request succeeded.
        "400":
          $ref: "#/paths/~1terms/post/responses/400"
        "401":
          $ref: "#/paths/~1termTypes/get/responses/401"
        "403":
          $ref: "#/paths/~1terms/post/responses/403"
  /terms:
    get:
      operationId: getTerms
      summary: Get terms
      description: >
        Returns a list of terms.  The items are sorted by name by default. The properties that can be used as filter and sort criteria are:
          * id
          * name
          * label
          * description
          * createdBy
          * creationTimeStamp
          * modifiedBy
          * modifiedTimeStamp
          * termTypeId
          * parentId
      tags:
        - Terms
      parameters:
        - name: start
          in: query
          description: The zero-based offset of first object to return. Defaults to 0.
          schema:
            type: integer
        - name: limit
          in: query
          description: Maximum number of objects to return. Defaults to 10.
          schema:
            type: integer
        - name: filter
          in: query
          description: Filter criteria for returned objects. See [Filtering in REST APIs](https://developer.sas.com/rest-apis/glossary/docs/getting-started/usage-notes#filtering).
          schema:
            type: string
            format: filter-criteria
        - name: sortBy
          in: query
          description: Sort criteria for returned objects. See [Sorting in REST APIs](https://developer.sas.com/rest-apis/glossary/docs/getting-started/usage-notes#sorting).
          schema:
            type: string
            format: sort-criteria
        - name: Accept
          in: header
          description: The desired representation for the response.
          schema:
            type: string
            enum:
              - application/vnd.sas.collection+json
              - application/json
            default: application/vnd.sas.collection+json
        - name: allowDrafts
          description: >
            This parameter allows drafts to be returned with the list of terms, provided the user making this request is a member of the Glossary.GlossaryAdministrators group. If a draft for a term exists and drafts are allowed, then the draft will be returned instead of the published term.
              * "user": Only drafts created by the current user will be included.
              * "all": All drafts will be included.
              * "none": Only published terms will be returned.
          in: query
          schema:
            type: string
            enum:
              - user
              - all
              - none
            default: user
        - name: Accept-Item
          description: The desired item representation for collections.
          in: header
          schema:
            type: string
            enum:
              - application/vnd.sas.glossary.term+json
              - application/json
            default: application/vnd.sas.glossary.term+json
      responses:
        "200":
          description: OK.
          headers:
            Content-Type:
              $ref: "#/paths/~1/get/responses/200/headers/Content-Type"
          content:
            application/vnd.sas.collection+json:
              schema:
                $ref: "#/components/schemas/termCollection"
              examples:
                Term Collection:
                  $ref: "#/paths/~1terms/get/responses/200/content/application~1json/examples/Term%20Collection"
            application/json:
              schema:
                $ref: "#/components/schemas/termCollection"
              examples:
                Term Collection:
                  summary: Term collection
                  description: A list of terms.
                  value:
                    version: 2
                    accept: application/vnd.sas.glossary.term
                    count: 2
                    start: 0
                    limit: 10
                    name: terms
                    items:
                      - creationTimeStamp: 2022-09-23T07:32:24.065Z
                        modifiedTimeStamp: 2022-09-23T07:32:24.065Z
                        id: b0cbbd32-fbc1-4f1b-b98c-8bd7a9c9f180
                        links:
                          - method: GET
                            rel: self
                            href: /glossary/terms/b0cbbd32-fbc1-4f1b-b98c-8bd7a9c9f180
                            uri: /glossary/terms/b0cbbd32-fbc1-4f1b-b98c-8bd7a9c9f180
                            type: application/vnd.sas.glossary.term
                          - method: GET
                            rel: up
                            href: /glossary/terms
                            uri: /glossary/terms
                            type: application/vnd.sas.collection
                            itemType: application/vnd.sas.glossary.term
                          - method: PUT
                            rel: update
                            href: /glossary/terms/b0cbbd32-fbc1-4f1b-b98c-8bd7a9c9f180
                            uri: /glossary/terms/b0cbbd32-fbc1-4f1b-b98c-8bd7a9c9f180
                            type: application/vnd.sas.glossary.term
                            responseType: application/vnd.sas.glossary.term
                          - method: DELETE
                            rel: delete
                            href: /glossary/terms/b0cbbd32-fbc1-4f1b-b98c-8bd7a9c9f180
                            uri: /glossary/terms/b0cbbd32-fbc1-4f1b-b98c-8bd7a9c9f180
                        version: 1
                        name: vehicle
                        label: Vehicle
                        description: A term for vehicle
                        status: Published
                        termTypeId: 9e7410b5-cebd-4830-8723-f0290c45a360
                        termTypeLabel: Default Term Type
                        definition: Vehicle Term
                        termRevision: 1
                        isDraft: false
                      - creationTimeStamp: 2022-09-23T07:32:24.065Z
                        modifiedTimeStamp: 2022-09-23T07:32:24.065Z
                        id: 77869195-3fb3-4044-820e-056047eff8bf
                        links:
                          - method: GET
                            rel: self
                            href: /glossary/terms/77869195-3fb3-4044-820e-056047eff8bf
                            uri: /glossary/terms/77869195-3fb3-4044-820e-056047eff8bf
                            type: application/vnd.sas.glossary.term
                          - method: GET
                            rel: up
                            href: /glossary/terms
                            uri: /glossary/terms
                            type: application/vnd.sas.collection
                            itemType: application/vnd.sas.glossary.term
                          - method: PUT
                            rel: update
                            href: /glossary/terms/77869195-3fb3-4044-820e-056047eff8bf
                            uri: /glossary/terms/77869195-3fb3-4044-820e-056047eff8bf
                            type: application/vnd.sas.glossary.term
                            responseType: application/vnd.sas.glossary.term
                          - method: DELETE
                            rel: delete
                            href: /glossary/terms/77869195-3fb3-4044-820e-056047eff8bf
                            uri: /glossary/terms/77869195-3fb3-4044-820e-056047eff8bf
                        version: 1
                        name: sedan
                        label: Sedan
                        description: Term for sedans
                        status: Published
                        termTypeId: 9e7410b5-cebd-4830-8723-f0290c45a360
                        termTypeLabel: Default Term Type
                        parentId: b0cbbd32-fbc1-4f1b-b98c-8bd7a9c9f180
                        definition: Sedan Term
                        termRevision: 1
                        isDraft: false
                    links:
                      - method: GET
                        rel: self
                        href: /glossary/terms?start=0&limit=10&sortBy=name
                        uri: /glossary/terms?start=0&limit=10&sortBy=name
                        type: application/vnd.sas.collection
                        itemType: application/vnd.sas.glossary.term
                      - method: GET
                        rel: collection
                        href: /glossary/terms
                        uri: /glossary/terms
                        type: application/vnd.sas.collection
                        itemType: application/vnd.sas.glossary.term
                      - method: GET
                        rel: up
                        href: /glossary
                        uri: /glossary
                        type: application/vnd.sas.api
                      - method: POST
                        rel: create
                        href: /glossary/terms
                        uri: /glossary/terms
                        type: application/vnd.sas.glossary.term
                        responseType: application/vnd.sas.glossary.term
        "404":
          $ref: "#/paths/~1/get/responses/404"
    post:
      operationId: createTerm
      summary: Create a term
      description: Creates a term with the given content.
      tags:
        - Terms
      parameters:
        - name: Content-Type
          required: true
          description: The representation in the request body.
          in: header
          schema:
            type: string
            enum:
              - application/vnd.sas.glossary.term+json
              - application/json
        - name: Accept
          description: The desired representation for the response.
          in: header
          schema:
            type: string
            enum:
              - application/vnd.sas.glossary.term+json
              - application/json
            default: application/vnd.sas.glossary.term+json
        - name: publish
          in: query
          description: The desired publish state. If true, the term will be created as a published term, otherwise, it will be created as a draft. Defaults to false.
          required: false
          schema:
            type: boolean
            default: false
      requestBody:
        content:
          application/vnd.sas.glossary.term+json:
            schema:
              $ref: "#/components/schemas/term"
            examples:
              Term:
                $ref: "#/paths/~1terms/post/requestBody/content/application~1json/examples/Term"
          application/json:
            schema:
              $ref: "#/components/schemas/term"
            examples:
              Term:
                summary: Term
                description: A term.
                value:
                  id: 5768c0e8-04d1-47d8-b5d4-2e559cc95d22
                  name: vehicle
                  label: Vehicle
                  description: A term for vehicle
                  termTypeId: 9e7410b5-cebd-4830-8723-f0290c45a360
                  parentId: 7ed5e466-0535-4a7c-8994-46e5b7d347a0
                  attributes:
                    state: NC
      responses:
        "201":
          description: Created. The term has been created.
          headers:
            Location:
              description: The location of the created object.
              schema:
                type: string
            ETag:
              description: A tag that identifies this revision of the object.
              schema:
                type: string
            Content-Type:
              $ref: "#/paths/~1/get/responses/200/headers/Content-Type"
          content:
            application/vnd.sas.glossary.term+json:
              schema:
                $ref: "#/components/schemas/term"
              examples:
                Term Type:
                  $ref: "#/paths/~1terms/post/responses/201/content/application~1json/examples/Term%20Type"
            application/json:
              schema:
                $ref: "#/components/schemas/term"
              examples:
                Term Type:
                  summary: Term
                  description: A term.
                  value:
                    creationTimeStamp: 2022-06-23T17:17:25.591Z
                    createdBy: sasuser
                    modifiedTimeStamp: 2022-06-23T17:17:25.591Z
                    modifiedBy: sasuser
                    id: 5768c0e8-04d1-47d8-b5d4-2e559cc95d22
                    links:
                      - method: GET
                        rel: self
                        href: /glossary/terms/5768c0e8-04d1-47d8-b5d4-2e559cc95d22?allowDraft=none
                        uri: /glossary/terms/5768c0e8-04d1-47d8-b5d4-2e559cc95d22?allowDraft=none
                        type: application/vnd.sas.glossary.term
                      - method: GET
                        rel: up
                        href: /glossary/terms
                        uri: /glossary/terms
                        type: application/vnd.sas.collection
                        itemType: application/vnd.sas.glossary.term
                      - method: PUT
                        rel: update
                        href: /glossary/terms/5768c0e8-04d1-47d8-b5d4-2e559cc95d22
                        uri: /glossary/terms/5768c0e8-04d1-47d8-b5d4-2e559cc95d22
                        type: application/vnd.sas.glossary.term
                        responseType: application/vnd.sas.glossary.term
                      - method: DELETE
                        rel: delete
                        href: /glossary/terms/5768c0e8-04d1-47d8-b5d4-2e559cc95d22
                        uri: /glossary/terms/5768c0e8-04d1-47d8-b5d4-2e559cc95d22
                    version: 1
                    name: vehicle
                    label: Vehicle
                    description: A term for vehicles
                    termTypeId: 9e7410b5-cebd-4830-8723-f0290c45a360
                    termTypeLabel: Default Term Type
                    parentId: 7ed5e466-0535-4a7c-8994-46e5b7d347a0
                    status: Published
                    definition: Vehicle Term
                    termRevision: 1
                    assetCount: 0
                    isDraft: false
                    attributes:
                      state: NC
        "400":
          description: Bad request (the request is not well-formed).
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/paths/~1terms/post/responses/409/content/application~1vnd.sas.error%2Bjson/schema"
              examples:
                Error - Bad Request:
                  summary: Error - Bad Request
                  description: The request could not be processed.  When available, the error response will contain additional details.
                  value:
                    version: 2
                    httpStatusCode: 400
                    errorCode: 100139
                    message: Bad Request
                    details: The request body could not be processed.
        "403":
          description: The user does not have permission to complete this request.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/paths/~1terms/post/responses/409/content/application~1vnd.sas.error%2Bjson/schema"
              examples:
                Error - Not Found:
                  summary: Error - Forbidden
                  description: The user does not have permission to complete this request.
                  value:
                    version: 2
                    httpStatusCode: 403
                    message: Forbidden
                    details: Forbidden
        "409":
          description: A conflict has occurred; usually this means that the term name is already in use.
          content:
            application/vnd.sas.error+json:
              schema:
                title: Error
                type: object
                description: The representation of an error.
                x-sas-media-type:
                  name: application/vnd.sas.error
                  version: 2
                required:
                  - httpStatusCode
                  - version
                properties:
                  message:
                    type: string
                    description: The message for the error.
                  id:
                    type: string
                    description: The string ID for the error.
                  errorCode:
                    type: integer
                    description: The numeric ID for the error.
                  httpStatusCode:
                    type: integer
                    description: The HTTP status code for the error.
                  details:
                    type: array
                    description: Messages that provide additional details about the cause of the error.
                    items:
                      type: string
                  remediation:
                    type: string
                    description: A message that describes how to resolve the error.
                  errors:
                    type: array
                    description: Any additional errors that occurred.
                    items:
                      $ref: "#/paths/~1terms/post/responses/409/content/application~1vnd.sas.error%2Bjson/schema"
                  links:
                    type: array
                    description: The links that apply to the error.
                    items:
                      $ref: "#/paths/~1/get/responses/200/content/application~1json/schema/properties/links/items"
                  version:
                    type: integer
                    description: The version number of the error representation. This representation is version 2.
              examples:
                Error - Conflict with parent:
                  summary: Error - Conflict
                  description: The specified name is already in use.
                  value:
                    version: 2
                    httpStatusCode: 409
                    errorCode: 76908
                    message: Conflict
                    details: A term can not have the same name as its parent or any of its children. Please specify a different name.
  "/terms/{termId}":
    head:
      operationId: headersForTerm
      summary: Get the headers for a term by its ID
      description: Returns the headers for a term by referencing its ID.
      tags:
        - Terms
      parameters:
        - $ref: "#/paths/~1terms~1%7BtermId%7D/get/parameters/0"
        - name: Accept
          description: The desired representation for the response.
          in: header
          schema:
            type: string
            enum:
              - application/vnd.sas.glossary.term+json
              - application/json
            default: application/vnd.sas.glossary.term+json
        - $ref: "#/paths/~1terms~1%7BtermId%7D/get/parameters/2"
      responses:
        "200":
          description: The request succeeded.
          headers:
            Content-Type:
              $ref: "#/paths/~1/get/responses/200/headers/Content-Type"
            Etag:
              $ref: "#/paths/~1terms/post/responses/201/headers/ETag"
            Last-Modified:
              $ref: "#/paths/~1terms~1%7BtermId%7D/get/responses/200/headers/Last-Modified"
        "404":
          $ref: "#/paths/~1termTypes/get/responses/404"
    get:
      operationId: getTerm
      summary: Get a term by its ID
      description: Returns a term by referencing its ID.
      tags:
        - Terms
      parameters:
        - name: termId
          required: true
          description: The ID of the term.
          in: path
          schema:
            type: string
        - name: Accept
          description: The desired representation for the response.
          in: header
          schema:
            type: string
            enum:
              - application/vnd.sas.glossary.term+json
              - application/json
            default: application/vnd.sas.glossary.term+json
        - name: allowDraft
          description: >
            If a draft for this term exists and the user making this request is a member of the Glossary.GlossaryAdministrators group, this parameter determines whether it will be returned instead of the published term.  Otherwise, the published term will be returned.
              * "user": The draft will be returned if it was created by the user making this request; otherwise, the published term will be returned.
              * "all": The draft will be returned.
              * "none": The published term will be returned.
          in: query
          schema:
            type: string
            enum:
              - user
              - all
              - none
            default: user
      responses:
        "200":
          description: The request succeeded.
          headers:
            Content-Type:
              $ref: "#/paths/~1/get/responses/200/headers/Content-Type"
            Etag:
              $ref: "#/paths/~1terms/post/responses/201/headers/ETag"
            Last-Modified:
              description: The time stamp in `EEE, dd MMM yyyy HH:mm:ss GMT` format when the object was last modified.
              schema:
                type: string
          content:
            application/vnd.sas.glossary.term+json:
              schema:
                $ref: "#/components/schemas/term"
              examples:
                Term:
                  $ref: "#/paths/~1terms/post/responses/201/content/application~1json/examples/Term%20Type"
            application/json:
              schema:
                $ref: "#/components/schemas/term"
              examples:
                Term:
                  $ref: "#/paths/~1terms/post/responses/201/content/application~1json/examples/Term%20Type"
        "404":
          $ref: "#/paths/~1termTypes/get/responses/404"
    put:
      operationId: updateTerm
      summary: Update a term by its ID
      description: Updates a term by referencing its ID.
      tags:
        - Terms
      parameters:
        - $ref: "#/paths/~1terms~1%7BtermId%7D/get/parameters/0"
        - name: If-Match
          in: header
          description: The ETag that was returned from a GET, POST, PUT, PATCH, or HEAD of this object. If the ETag does not match, the update will fail.
          required: true
          schema:
            type: string
        - name: Content-Type
          required: true
          description: The representation in the request body.
          in: header
          schema:
            type: string
            enum:
              - application/vnd.sas.glossary.term+json
              - application/json
            default: application/vnd.sas.glossary.term+json
        - name: Accept
          description: The desired representation for the response.
          in: header
          schema:
            type: string
            enum:
              - application/vnd.sas.glossary.term+json
              - application/json
            default: application/vnd.sas.glossary.term+json
      requestBody:
        content:
          application/vnd.sas.glossary.term+json:
            schema:
              $ref: "#/components/schemas/term"
            examples:
              Term:
                $ref: "#/paths/~1terms/post/requestBody/content/application~1json/examples/Term"
          application/json:
            schema:
              $ref: "#/components/schemas/term"
            examples:
              Term:
                $ref: "#/paths/~1terms/post/requestBody/content/application~1json/examples/Term"
      responses:
        "200":
          description: The request succeeded.
          headers:
            Content-Type:
              $ref: "#/paths/~1/get/responses/200/headers/Content-Type"
            Etag:
              $ref: "#/paths/~1terms/post/responses/201/headers/ETag"
            Last-Modified:
              $ref: "#/paths/~1terms~1%7BtermId%7D/get/responses/200/headers/Last-Modified"
          content:
            application/vnd.sas.glossary.term+json:
              schema:
                $ref: "#/components/schemas/term"
              examples:
                Term Type:
                  $ref: "#/paths/~1terms/post/responses/201/content/application~1json/examples/Term%20Type"
            application/json:
              schema:
                $ref: "#/components/schemas/term"
              examples:
                Term:
                  $ref: "#/paths/~1terms/post/responses/201/content/application~1json/examples/Term%20Type"
        "400":
          $ref: "#/paths/~1terms/post/responses/400"
        "403":
          $ref: "#/paths/~1terms/post/responses/403"
        "404":
          $ref: "#/paths/~1termTypes/get/responses/404"
        "409":
          description: A conflict has occurred; usually this means that the term name is already in use.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/paths/~1terms/post/responses/409/content/application~1vnd.sas.error%2Bjson/schema"
              examples:
                Error - Conflict with parent:
                  summary: Error - Conflict
                  description: The specified name is already in use.
                  value:
                    version: 2
                    httpStatusCode: 409
                    errorCode: 76908
                    message: Conflict
                    details: A term can not have the same name as its parent or any of its children. Please specify a different name.
        "412":
          description: Precondition failed. The target has changed since it was last fetched.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/paths/~1terms/post/responses/409/content/application~1vnd.sas.error%2Bjson/schema"
              examples:
                Error - Precondition Failed:
                  summary: Error - Precondition Failed
                  description: The object has changed since it was last fetched.
                  value:
                    version: 2
                    httpStatusCode: 412
                    message: >
                      The header field "If-Match" has a value that is different from

                      the entity tag for the resource. (The specified values are

                      "W/"1668615996285000000"" and "W/"1668802105130000000"",

                      respectively.)
        "428":
          description: Precondition required. Include an If-Match header with the request.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/paths/~1terms/post/responses/409/content/application~1vnd.sas.error%2Bjson/schema"
              examples:
                Error - Precondition Required:
                  summary: Error - Precondition Required
                  description: An If-Match header is required for this request.
                  value:
                    version: 2
                    httpStatusCode: 428
                    message: The header field "If-Match" is missing or does not have a value.
                    remediation: Specify the resource's entity tag.
    delete:
      operationId: deleteTerm
      summary: Delete a term by its ID
      description: Deletes a term by referencing its ID.
      tags:
        - Terms
      parameters:
        - $ref: "#/paths/~1terms~1%7BtermId%7D/get/parameters/0"
      responses:
        "204":
          description: The request succeeded.
        "403":
          $ref: "#/paths/~1terms/post/responses/403"
  "/terms/{termId}/draft":
    head:
      operationId: headersForDraft
      summary: Get the headers for a draft term by its ID
      description: Returns the headers for a draft term by referencing its ID.
      tags:
        - Terms
      parameters:
        - $ref: "#/paths/~1terms~1%7BtermId%7D/get/parameters/0"
        - name: Accept
          description: The desired representation for the response.
          in: header
          schema:
            type: string
            enum:
              - application/vnd.sas.glossary.term+json
              - application/json
            default: application/vnd.sas.glossary.term+json
      responses:
        "200":
          description: The request succeeded.
          headers:
            Content-Type:
              $ref: "#/paths/~1/get/responses/200/headers/Content-Type"
            Etag:
              $ref: "#/paths/~1terms/post/responses/201/headers/ETag"
            Last-Modified:
              $ref: "#/paths/~1terms~1%7BtermId%7D/get/responses/200/headers/Last-Modified"
        "404":
          $ref: "#/paths/~1termTypes/get/responses/404"
    post:
      operationId: createDraftFromTerm
      summary: Create a draft from a published term
      description: Creates a draft term from a published term with the specified ID and the given content.
      tags:
        - Terms
      parameters:
        - $ref: "#/paths/~1terms~1%7BtermId%7D/get/parameters/0"
        - name: Content-Type
          required: true
          description: The representation in the request body.
          in: header
          schema:
            type: string
            enum:
              - application/vnd.sas.glossary.term+json
              - application/json
            default: application/vnd.sas.glossary.term+json
        - name: Accept
          description: The desired representation for the response.
          in: header
          schema:
            type: string
            enum:
              - application/vnd.sas.glossary.term+json
              - application/json
            default: application/vnd.sas.glossary.term+json
      requestBody:
        content:
          application/vnd.sas.glossary.term+json:
            schema:
              $ref: "#/components/schemas/term"
            examples:
              Term:
                $ref: "#/paths/~1terms~1%7BtermId%7D~1draft/post/requestBody/content/application~1json/examples/Term"
          application/json:
            schema:
              $ref: "#/components/schemas/term"
            examples:
              Term:
                summary: Draft
                description: A draft.
                value:
                  id: 5768c0e8-04d1-47d8-b5d4-2e559cc95d22
                  termTypeId: 9e7410b5-cebd-4830-8723-f0290c45a360
                  parentId: 7ed5e466-0535-4a7c-8994-46e5b7d347a0
                  name: vehicle
                  label: Vehicle
                  definition: Vehicle
                  description: A term for vehicle
                  attributes:
                    informationPolicy: Internal Use
                    classification: Automotive Division
      responses:
        "201":
          description: Created. The draft term has been created.
          headers:
            Location:
              $ref: "#/paths/~1terms/post/responses/201/headers/Location"
            Content-Type:
              $ref: "#/paths/~1/get/responses/200/headers/Content-Type"
          content:
            application/vnd.sas.glossary.term+json:
              schema:
                $ref: "#/components/schemas/term"
              examples:
                Draft:
                  $ref: "#/paths/~1terms~1%7BtermId%7D~1draft/get/responses/200/content/application~1json/examples/Draft"
            application/json:
              schema:
                $ref: "#/components/schemas/term"
              examples:
                Draft:
                  $ref: "#/paths/~1terms~1%7BtermId%7D~1draft/get/responses/200/content/application~1json/examples/Draft"
        "400":
          $ref: "#/paths/~1terms/post/responses/400"
        "403":
          $ref: "#/paths/~1terms/post/responses/403"
        "409":
          description: A conflict has occurred; usually this means that the term name is already in use.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/paths/~1terms/post/responses/409/content/application~1vnd.sas.error%2Bjson/schema"
              examples:
                Error - Conflict with parent:
                  summary: Error - Conflict
                  description: The specified name is already in use.
                  value:
                    version: 2
                    httpStatusCode: 409
                    errorCode: 76908
                    message: Conflict
                    details: A term can not have the same name as its parent or any of its children. Please specify a different name.
    get:
      operationId: getDraft
      summary: Get a draft term by its ID
      description: Returns a draft term by referencing its ID.
      tags:
        - Terms
      parameters:
        - $ref: "#/paths/~1terms~1%7BtermId%7D/get/parameters/0"
        - name: Accept
          description: The desired representation for the response.
          in: header
          schema:
            type: string
            enum:
              - application/vnd.sas.glossary.term+json
              - application/json
            default: application/vnd.sas.glossary.term+json
      responses:
        "200":
          description: The request succeeded.
          headers:
            Content-Type:
              $ref: "#/paths/~1/get/responses/200/headers/Content-Type"
            Etag:
              $ref: "#/paths/~1terms/post/responses/201/headers/ETag"
            Last-Modified:
              $ref: "#/paths/~1terms~1%7BtermId%7D/get/responses/200/headers/Last-Modified"
          content:
            application/vnd.sas.glossary.term+json:
              schema:
                $ref: "#/components/schemas/term"
              examples:
                Draft:
                  $ref: "#/paths/~1terms~1%7BtermId%7D~1draft/get/responses/200/content/application~1json/examples/Draft"
            application/json:
              schema:
                $ref: "#/components/schemas/term"
              examples:
                Draft:
                  summary: Draft
                  description: A draft.
                  value:
                    creationTimeStamp: 2022-06-23T17:17:25.591Z
                    createdBy: sasuser
                    modifiedTimeStamp: 2022-06-23T17:17:25.591Z
                    modifiedBy: sasuser
                    id: 5768c0e8-04d1-47d8-b5d4-2e559cc95d22
                    links:
                      - method: GET
                        rel: self
                        href: /glossary/terms/5768c0e8-04d1-47d8-b5d4-2e559cc95d22/draft
                        uri: /glossary/terms/5768c0e8-04d1-47d8-b5d4-2e559cc95d22/draft
                        type: application/vnd.sas.glossary.term
                      - method: GET
                        rel: up
                        href: /glossary/terms
                        uri: /glossary/terms
                        type: application/vnd.sas.collection
                        itemType: application/vnd.sas.glossary.term
                      - method: PUT
                        rel: update
                        href: /glossary/terms/5768c0e8-04d1-47d8-b5d4-2e559cc95d22/draft
                        uri: /glossary/terms/5768c0e8-04d1-47d8-b5d4-2e559cc95d22/draft
                        type: application/vnd.sas.glossary.term
                        responseType: application/vnd.sas.glossary.term
                      - method: DELETE
                        rel: delete
                        href: /glossary/terms/5768c0e8-04d1-47d8-b5d4-2e559cc95d22/draft
                        uri: /glossary/terms/5768c0e8-04d1-47d8-b5d4-2e559cc95d22/draft
                    version: 1
                    name: vehicle
                    label: Vehicle
                    description: A term for vehicles
                    termTypeId: 9e7410b5-cebd-4830-8723-f0290c45a360
                    termTypeLabel: Default Term Type
                    parentId: 7ed5e466-0535-4a7c-8994-46e5b7d347a0
                    status: None
                    definition: Vehicle Term
                    termRevision: 1
                    assetCount: 0
                    isDraft: true
                    attributes:
                      state: NC
        "404":
          $ref: "#/paths/~1termTypes/get/responses/404"
    put:
      operationId: updateDraft
      summary: Update a draft term by its ID
      description: Updates a draft term by referencing its ID.
      tags:
        - Terms
      parameters:
        - $ref: "#/paths/~1terms~1%7BtermId%7D/get/parameters/0"
        - $ref: "#/paths/~1terms~1%7BtermId%7D/put/parameters/1"
        - name: Content-Type
          required: true
          description: The representation in the request body.
          in: header
          schema:
            type: string
            enum:
              - application/vnd.sas.glossary.term+json
              - application/json
            default: application/vnd.sas.glossary.term+json
        - name: Accept
          description: The desired representation for the response.
          in: header
          schema:
            type: string
            enum:
              - application/vnd.sas.glossary.term+json
              - application/json
            default: application/vnd.sas.glossary.term+json
      requestBody:
        content:
          application/vnd.sas.glossary.term+json:
            schema:
              $ref: "#/components/schemas/term"
            examples:
              Term:
                $ref: "#/paths/~1terms/post/requestBody/content/application~1json/examples/Term"
          application/json:
            schema:
              $ref: "#/components/schemas/term"
            examples:
              Term:
                $ref: "#/paths/~1terms/post/requestBody/content/application~1json/examples/Term"
      responses:
        "200":
          description: The request succeeded.
          headers:
            Content-Type:
              $ref: "#/paths/~1/get/responses/200/headers/Content-Type"
            Etag:
              $ref: "#/paths/~1terms/post/responses/201/headers/ETag"
            Last-Modified:
              $ref: "#/paths/~1terms~1%7BtermId%7D/get/responses/200/headers/Last-Modified"
          content:
            application/vnd.sas.glossary.term+json:
              schema:
                $ref: "#/components/schemas/term"
              examples:
                Term Type:
                  $ref: "#/paths/~1terms/post/responses/201/content/application~1json/examples/Term%20Type"
            application/json:
              schema:
                $ref: "#/components/schemas/term"
              examples:
                Term:
                  $ref: "#/paths/~1terms/post/responses/201/content/application~1json/examples/Term%20Type"
        "400":
          $ref: "#/paths/~1terms/post/responses/400"
        "403":
          $ref: "#/paths/~1terms/post/responses/403"
        "404":
          $ref: "#/paths/~1termTypes/get/responses/404"
        "409":
          description: A conflict has occurred; usually this means that the draft name is already in use.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/paths/~1terms/post/responses/409/content/application~1vnd.sas.error%2Bjson/schema"
              examples:
                Error - Conflict with parent:
                  summary: Error - Conflict
                  description: The specified name is already in use.
                  value:
                    version: 2
                    httpStatusCode: 409
                    errorCode: 76908
                    message: Conflict
                    details: A term can not have the same name as its parent or any of its children. Please specify a different name.
        "412":
          $ref: "#/paths/~1terms~1%7BtermId%7D/put/responses/412"
        "428":
          $ref: "#/paths/~1terms~1%7BtermId%7D/put/responses/428"
    delete:
      operationId: deleteDraft
      summary: Delete a draft term by its ID
      description: Deletes a draft term by referencing its ID.
      tags:
        - Terms
      parameters:
        - $ref: "#/paths/~1terms~1%7BtermId%7D/get/parameters/0"
      responses:
        "204":
          description: The request succeeded.
        "403":
          $ref: "#/paths/~1terms/post/responses/403"
        "404":
          $ref: "#/paths/~1termTypes/get/responses/404"
  /importTerms:
    post:
      operationId: importTerms
      summary: Import terms via CSV
      description: >
        Imports terms from a CSV File. The CSV should be uploaded as a multipart value under the key "termCSV". Additionally, the multipart key "updateExisting" can be set to true if the import should overwrite existing terms. This request will return a job that can be polled for status and results.
      tags:
        - Terms
      parameters:
        - name: Content-Type
          required: true
          description: The representation for the CSV file.
          in: header
          schema:
            type: string
            enum:
              - multipart/form-data
            default: multipart/form-data
        - name: Accept
          description: >
            The desired representation for the response. The response is either a job or an error if there was an issue processing the job request.
          in: header
          schema:
            type: string
            enum:
              - application/vnd.sas.job.execution.job+json
              - application/json
            default: application/vnd.sas.job.execution.job+json
      responses:
        "202":
          description: The request is accepted.
          headers:
            Content-Type:
              $ref: "#/paths/~1/get/responses/200/headers/Content-Type"
          content:
            application/vnd.sas.job.execution.job+json:
              schema:
                $ref: "#/paths/~1importTerms/post/responses/202/content/application~1json/schema"
              examples:
                Import Job Response:
                  $ref: "#/paths/~1importTerms/post/responses/202/content/application~1json/examples/Import%20Job%20Response"
            application/json:
              schema:
                title: Job
                description: The execution job.
                x-sas-media-type:
                  name: application/vnd.sas.job.execution.job
                  version: 4
                required:
                  - id
                properties:
                  version:
                    type: integer
                    description: The version number of the representation. The current version is 4.
                  id:
                    type: string
                    description: The unique identifier that is generated by the API.
                  state:
                    type: string
                    description: 'The current state of the job. Valid values: pending, running, canceled, completed, failed, timedOut. Also see "stateDetails".'
                  stateDetails:
                    type: string
                    description: This member supplements the "state" member by providing an hint that additional information is available. It is a hint and not the actual information. The purpose of this member is for providers to provide a hint, where applicable, about the state set and for that hint to be used by components which convey state information to clients. It should be set in conjunction with "state".
                  results:
                    type: object
                    description: The output of the job execution as a map<string, string>.
                  error:
                    $ref: "#/paths/~1terms/post/responses/409/content/application~1vnd.sas.error%2Bjson/schema"
                  jobRequest:
                    title: Job Request
                    description: A job request.
                    x-sas-media-type:
                      name: application/vnd.sas.job.execution.job.request
                      version: 3
                    required:
                      - id
                    type: object
                    properties:
                      version:
                        type: integer
                        description: The version number of the representation. The current version is 3.
                      id:
                        type: string
                        description: The unique identifier for the job request. This is only required for a persisted job request.
                      name:
                        type: string
                        description: The name of the job request.
                      description:
                        type: string
                        description: The description of the job request.
                      creationTimeStamp:
                        description: The timestamp for when the job request was created, in the format of `YYYY-MM-DDThh:mm:ss.sssZ`.  This is set only on a persisted job request.
                        type: string
                      modifiedTimeStamp:
                        description: The timestamp for when the job request was last modified, in the format of `YYYY-MM-DDThh:mm:ss.sssZ`.  This is set only on a persisted job request.
                        type: string
                      createdBy:
                        description: The ID of the user that created the job request.  This is set only on a persisted job request.
                        type: string
                      modifiedBy:
                        description: The ID of the user that last modified the job request.  This is set only on a persisted job request.
                        type: string
                      jobDefinitionUri:
                        type: string
                        description: The URI of the job definition that is to be executed.  Either the `jobDefinitionUri` or the `jobDefinition` property must be set in a job request submitted to Job Execution service for execution.
                      jobDefinition:
                        title: Job Definition
                        description: The job definition.
                        type: object
                        x-sas-media-type:
                          name: application/vnd.sas.job.definition
                          version: 2
                        required:
                          - code
                        properties:
                          version:
                            type: integer
                            description: The version of the resource. This version is 2.
                          id:
                            type: string
                            description: The unique ID of the resource that is generated by the API.
                          name:
                            type: string
                            description: The name of the job. The maximum length is 100.
                          description:
                            type: string
                            description: A description of the job. The maximum length is 1000.
                            x-sas-attributes:
                              since: "2"
                          type:
                            type: string
                            description: The type of job. This property determines the execution provider that executes this job. The maximum length is 250.
                          code:
                            type: string
                            description: Execution provider specific code to be executed.
                          parameters:
                            type: array
                            description: An array of input parameters to be collected when executing this job definition.
                            items:
                              title: Job Definition Parameter
                              type: object
                              description: The job definition parameter.
                              required:
                                - name
                              properties:
                                version:
                                  type: integer
                                  description: The version of the resource. This version is 1.
                                name:
                                  type: string
                                  description: The name of the parameter. The maximum length is 100.
                                type:
                                  type: string
                                  description: The type of the parameter (TABLE, NUMERIC, DATE, CHARACTER). The maximum length is 20.
                                label:
                                  type: string
                                  description: The display value for the name of this parameter. The maximum length is 250.
                                required:
                                  type: boolean
                                  description: Specifies if the parameter is required for execution.
                                defaultValue:
                                  type: string
                                  description: The default value for this parameter, if one is not specified at execution time.
                          properties:
                            type: array
                            description: An array of name/value pairs needed to execute a job definition. The maximum length of a name is 100.
                            items:
                              title: Property
                              description: A pair consisting of a string name and a string value. This is an element of `application/vnd.sas.properties`
                              required:
                                - name
                                - value
                              properties:
                                name:
                                  type: string
                                  description: The property name.
                                value:
                                  type: string
                                  description: The property value.
                          createdBy:
                            type: string
                            description: The user that created this job.
                          modifiedBy:
                            type: string
                            description: The user that modified this job.
                          creationTimeStamp:
                            type: string
                            description: "The formatted timestamp when the job was created, in the following format: yyyy-mm-ddThh:mm:ssZ."
                          modifiedTimeStamp:
                            type: string
                            description: "The formatted timestamp when the job was modified, in the following format: yyyy-mm-ddThh:mm:ssZ."
                          links:
                            type: array
                            description: An array of link objects
                            items:
                              $ref: "#/paths/~1/get/responses/200/content/application~1json/schema/properties/links/items"
                      expiresAfter:
                        type: string
                        description: The duration of time (in <a href="https://www.w3.org/TR/xmlschema-2/#duration" target="_blank">W3C XML duration format</a>) after the completion of the job when the job should be deleted by the Job Execution service. If a value is specified for this property, it overrides any value specified by the provider's `/commons/settings` endpoint for the job request.<p>For a job request that is embedded in the `application/vnd.sas.job.execution.job` media type, if a value is not already set for the `expiresAfter` property, the value is set by the Job Execution service to the provider's value, if one exists.
                      arguments:
                        type: object
                        description: The values of the arguments in the format map<string, string> that contains name value pairs (map<name, value>). Values can be supplied for parameters not defined in the job definition. The maximum name length is 100.<p>Hibernate does not persist a map entry with a null value. Therefore, a persisted Job Request will not contain any such entries.<p>For a job request that is embedded in the 'application/vnd.sas.job.execution.job' media type, this value is set by the Job Execution service and contains the complete set of arguments that are to be used in the execution by the provider. Arguments that already exist in the original job request are left unchanged. If there are arguments in the job definition that do not exist in the original job request arguments map, those arguments and any default values, including null values, are added to the arguments map. However, since the Job object is persisted before being sent to the provider, no entries for such null-value arguments in the Job are sent to the provider (because of the Hibernate behavior of not persisting map/collection entries with null values). The Job Execution service also guarantees that any required argument has an associated non-null value.
                      properties:
                        type: object
                        description: The value of properties in the format of (map<string, string>) that contains name value pairs (map<name, value>). The maximum name length is 100.
                        additionalProperties:
                          type: string
                      createdByApplication:
                        type: string
                        description: The application that created the job request. The value is typically from the spring.application.name property. The value is used as the "creator" in the routing key of the Job State Change events, and if it is not present in the job request the value "jobExecution" is used. Valid characters are [a-zA-Z0-9] and the hyphen. The maximum length is 64.
                      links:
                        type: array
                        description: The links that are associated with the job request.
                        items:
                          $ref: "#/paths/~1/get/responses/200/content/application~1json/schema/properties/links/items"
                  heartbeatInterval:
                    type: integer
                    format: int32
                    description: The interval in seconds that the `heartbeatTimeStamp` should be updated by the provider or the job times out. This is 0 if there is no heartbeat.
                  heartbeatTimeStamp:
                    description: The timestamp for when the last heartbeat was received, in the format of `YYYY-MM-DDThh:mm:ss.sssZ`.
                    type: string
                  creationTimeStamp:
                    description: The timestamp for when the job was created, in the format of `YYYY-MM-DDThh:mm:ss.sssZ`.
                    type: string
                  modifiedTimeStamp:
                    description: The timestamp for when the job was last modified, in the format of `YYYY-MM-DDThh:mm:ss.sssZ`.
                    type: string
                  endTimeStamp:
                    description: The timestamp for when the state of the job changed to completed or failed, in the format of `YYYY-MM-DDThh:mm:ss.sssZ`.
                    type: string
                  elapsedTime:
                    description: If the job has ended, the value is the difference between the `endTimeStamp` and the `creationTimeStamp`. If the job has not ended, the value is the difference between the time that this representation was created and the `creationTimeStamp`. The units are in milliseconds. A value of -1 is returned, if a value is not set for the `creationTimeStamp`.
                    type: number
                  logLocation:
                    description: The URI for the log, if one exists.  The provider may provide additional information.
                    type: string
                  expirationTimeStamp:
                    description: The timestamp for when the job expires and will be deleted by the Job Execution service, in the format of `YYYY-MM-DDThh:mm:ss.sssZ`. This is set by the service after the job has completed based on the value of the `expiresAfter` member of the job request.
                    type: string
                  createdBy:
                    description: The ID of the user that created or submitted the job.
                    type: string
                  modifiedBy:
                    description: The ID of the user that last modified the job.
                    type: string
                  submittedByApplication:
                    description: 'Value of the query parameter "submitter" on the POST endpoints to submit a job. If the query parameter is not present, the createdByApplication value from the embedded JobRequest is used. The createdByApplication value in the embedded JobRequest that is used is the same as what was in the submitted job request if one was present; if not the value "jobExecution" is used. The submittedByApplication value is used as the "submitter" in the routing routing key of Job State Change events. Only characters in the set [a-zA-Z0-9] and dash are valid for submitter. Max length: 64'
                    type: string
                  links:
                    type: array
                    description: The links that are associated with the job.
                    items:
                      $ref: "#/paths/~1/get/responses/200/content/application~1json/schema/properties/links/items"
              examples:
                Import Job Response:
                  summary: Term import response
                  description: Term imports run asynchronously via a Job Execution Service (JES) job. The 'state' field can be monitored to determine when the job completes.
                  value:
                    createdBy: sasuser
                    modifiedBy: sasuser
                    version: 4
                    id: 80520af5-af95-4e50-b7e6-36dfb8622c06
                    state: running
                    heartbeatInterval: 30
                    heartbeatTimeStamp: 2023-10-30T14:10:37.325Z
                    elapsedTime: 273
                    submittedByApplication: catalog
                    links:
                      - method: GET
                        rel: self
                        href: /jobExecution/jobs/80520af5-af95-4e50-b7e6-36dfb8622c06
                        uri: /jobExecution/jobs/80520af5-af95-4e50-b7e6-36dfb8622c06
                        type: application/vnd.sas.job.execution.job
                      - method: GET
                        rel: state
                        href: /jobExecution/jobs/80520af5-af95-4e50-b7e6-36dfb8622c06/state
                        uri: /jobExecution/jobs/80520af5-af95-4e50-b7e6-36dfb8622c06/state
                        type: text/plain
                      - method: PUT
                        rel: update
                        href: /jobExecution/jobs/80520af5-af95-4e50-b7e6-36dfb8622c06
                        uri: /jobExecution/jobs/80520af5-af95-4e50-b7e6-36dfb8622c06
                        type: application/vnd.sas.job.execution.job
                        responseType: application/vnd.sas.job.execution.job
                      - method: DELETE
                        rel: delete
                        href: /jobExecution/jobs/80520af5-af95-4e50-b7e6-36dfb8622c06
                        uri: /jobExecution/jobs/80520af5-af95-4e50-b7e6-36dfb8622c06
                      - method: PUT
                        rel: updateState
                        href: /jobExecution/jobs/80520af5-af95-4e50-b7e6-36dfb8622c06/state
                        uri: /jobExecution/jobs/80520af5-af95-4e50-b7e6-36dfb8622c06/state
                        type: text/plain
                      - method: POST
                        rel: updateHeartbeatTimeStamp
                        href: /jobExecution/jobs/80520af5-af95-4e50-b7e6-36dfb8622c06/heartbeatTimeStamp
                        uri: /jobExecution/jobs/80520af5-af95-4e50-b7e6-36dfb8622c06/heartbeatTimeStamp
                        type: text/plain
                    jobRequest:
                      version: 3
                      name: CSV Term Import
                      description: Import terms Via CSV
                      expiresAfter: PT168H
                      createdByApplication: catalog
                      jobDefinition:
                        version: 2
                        name: termImport
                        type: CATALOG
                        code: 591648c8-99a0-4c44-ba42-def75507dc7c
                    creationTimeStamp: 2023-10-30T14:10:36.963Z
                    modifiedTimeStamp: 2023-10-30T14:10:37.33Z
        "400":
          $ref: "#/paths/~1terms/post/responses/400"
        "401":
          $ref: "#/paths/~1termTypes/get/responses/401"
        "403":
          $ref: "#/paths/~1terms/post/responses/403"
        "406":
          $ref: "#/paths/~1termTypes/get/responses/406"
components:
  schemas:
    termType:
      title: Term Type
      description: Information about a term type.
      type: object
      required:
        - id
        - name
      allOf:
        - type: object
          properties:
            id:
              type: string
              description: The unique identity of this term type; this attribute is immutable after creation.
            creationTimeStamp:
              type: string
              description: The date and time this object was created, in the format of YYYY-MM-DDThh:mm:ss.sssZ. The value is ignored on input.
              format: date-time
              readOnly: true
            modifiedTimeStamp:
              type: string
              description: The date and time this object was last modified, in the format of YYYY-MM-DDThh:mm:ss.sssZ. The value is ignored on input.
              format: date-time
              readOnly: true
            createdBy:
              type: string
              description: The identity that created this object. The value is ignored on input.
              readOnly: true
            modifiedBy:
              type: string
              description: The identity that modified this object last. The value is ignored on input.
              readOnly: true
            version:
              type: integer
              description: The version of the media type.
              readOnly: true
            name:
              type: string
              description: >
                The name of the term type; the maximum length is 100. The name must be unique (case-insensitive) among all term types.
            label:
              type: string
              description: A label for the term type; the maximum length is 100.
            description:
              type: string
              description: A description for the term type; the maximum length is 1000.
            baseType:
              description: The term type name this type is based upon if applicable.
              type: string
            usageCount:
              description: The number of terms associated with the given term type.
              type: integer
              readOnly: true
            attributeCount:
              description: The number of attributes defined by the given term type.
              type: integer
              readOnly: true
        - type: object
          properties:
            attributes:
              type: array
              description: An ordered list of attributes.
              items:
                $ref: "#/components/schemas/termTypeAttributes"
    termTypeSummary:
      title: Term Type Summary
      description: Summary information about a term type.
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
          description: The unique identity of this term type; this attribute is immutable after creation.
        creationTimeStamp:
          type: string
          description: The date and time this object was created, in the format of YYYY-MM-DDThh:mm:ss.sssZ. The value is ignored on input.
          format: date-time
          readOnly: true
        modifiedTimeStamp:
          type: string
          description: The date and time this object was last modified, in the format of YYYY-MM-DDThh:mm:ss.sssZ. The value is ignored on input.
          format: date-time
          readOnly: true
        createdBy:
          type: string
          description: The identity that created this object. The value is ignored on input.
          readOnly: true
        modifiedBy:
          type: string
          description: The identity that modified this object last. The value is ignored on input.
          readOnly: true
        version:
          type: integer
          description: The version of the media type.
          readOnly: true
        name:
          type: string
          description: >
            The name of the term type; the maximum length is 100. The name must be unique (case-insensitive) among all term types.
        label:
          type: string
          description: A label for the term type; the maximum length is 100.
        description:
          type: string
          description: A description for the term type; the maximum length is 1000.
        baseType:
          description: The term type name this type is based upon if applicable.
          type: string
        usageCount:
          description: The number of terms associated with the given term type.
          type: integer
          readOnly: true
        attributeCount:
          description: The number of attributes defined by the given term type.
          type: integer
          readOnly: true
    termTypeCollection:
      title: Term Type Collection
      description: A collection of term types.
      type: object
      allOf:
        - $ref: "#/components/schemas/termCollection/allOf/0"
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              description: An array that contains a collection of term type or term type summary representations.
              items:
                anyOf:
                  - $ref: "#/components/schemas/termTypeSummary"
                  - $ref: "#/components/schemas/termType"
    termTypeAttributes:
      type: object
      description: An attribute object.
      required:
        - name
        - label
        - type
      properties:
        name:
          description: >
            The name of the attribute. The name must be unique (case-insensitive) within the set of attribute names for the term type. The maximum length is 63. Once the attribute name is set it cannot change, but the label property may be updated on an existing attribute.
          type: string
        type:
          description: The type of attribute. This determines which types of values are appropriate for this attribute.
          type: string
          enum:
            - single-line
            - multi-line
            - single-select
            - multi-select
            - boolean
            - date
            - time
            - date-time
        label:
          description: >
            A label used for displaying this attribute to a user. The label must be unique (case-insensitive) within the set of attributes for the term type. The maximum length is 100.
          type: string
        description:
          description: A description of this attribute. The maximum length is 140.
          type: string
        hidden:
          description: A true value indicates this attribute should be hidden when the term is rendered in the user interface.
          type: boolean
        inherited:
          description: A read-only boolean indicating whether this attribute was inherited by an ancestor term type.
          type: boolean
          readOnly: true
        required:
          description: A true value indicates the attribute is required.
          type: boolean
        editorOptions:
          description: A collection of key/value pairs that are used to specify optional properties for the editor controls that correspond to the various attribute types.
          type: object
        items:
          description: A list of possible values for the attribute; required when type is single-select or multi-select.
          type: array
          items:
            description: A possible value for the attribute. The maximum length is 100.
            type: string
        defaultValue:
          description: >
            The default value for the attribute. The default value must be present in the items list when items is specified. Multiple default values, where applicable, will be represented by comma separated values. Values containing one or more commas must be wrapped in quotation marks. Quotation marks must be doubled. The format for attributes of type "date" should be "YYYY-MM-DD". The format for attributes of type "time" should be "hh:mm:ssZ". The format for attributes of type "date-time" should be "YYYY-MM-DDThh:mm:ssZ". Boolean values should be either "true" or "false".
          type: string
    term:
      title: Term
      description: Information about a term
      type: object
      required:
        - name
        - termTypeId
      properties:
        id:
          type: string
          description: The unique identity of this term. Immutable after creation.
        name:
          type: string
          description: The name of the term; the maximum length is 100. The name must be unique (case-insensitive) among all terms and drafts that share the same parentId. Also, a term must not have the same name as its parent. Backslashes are not allowed.
        label:
          type: string
          description: A label for the term; the maximum length is 100.
        description:
          type: string
          description: A description for the term; the maximum length is 1000.
        status:
          type: string
          readOnly: true
          description: A value to indicate if the term has been published.
        termTypeId:
          type: string
          description: ID of the term type.  Immutable after creation.
        termTypeLabel:
          type: string
          description: The label of the term type, or the name if the label is empty.
          readOnly: true
        parentId:
          type: string
          description: ID of the parent term. This is immutable for drafts of published terms.
        definition:
          type: string
          description: A definition for the term.
        termRevision:
          type: integer
          description: The current revision of the term.
          readOnly: true
        assetCount:
          type: integer
          description: The number of assets assigned to this term.
          readOnly: true
        isDraft:
          type: boolean
          description: A value to determine if the term is a draft.
        creationTimeStamp:
          type: string
          description: The date and time this object was created, in the format of YYYY-MM-DDThh:mm:ss.sssZ. The value is ignored on input.
          format: date-time
          readOnly: true
        modifiedTimeStamp:
          type: string
          description: The date and time this object was last modified, in the format of YYYY-MM-DDThh:mm:ss.sssZ. The value is ignored on input.
          format: date-time
          readOnly: true
        createdBy:
          type: string
          description: The identity that created this object. The value is ignored on input.
          readOnly: true
        modifiedBy:
          type: string
          description: the identity that modified this object last. The value is ignored on input.
          readOnly: true
        version:
          type: integer
          description: The version of the media type.
          readOnly: true
        attributes:
          type: object
          additionalProperties: true
          description: A map of key/value pairs representing attributes for the term; the keys are strings and the values are objects.
    termCollection:
      title: Term Collection
      description: A collection of terms.
      type: object
      allOf:
        - title: Base Collection
          description: This is a base schema used to define paginated collections of resources. This base schema is extended by other schemas in APIs by adding an 'items' array property. These extensions define the application/vnd.sas.collection media type (version 2)
          properties:
            name:
              type: string
              description: The name of the collection.
            start:
              type: integer
              description: The zero-based index of the first item in the collection.
              format: int64
            limit:
              type: integer
              description: The number of items that were requested for the collection.
            count:
              type: integer
              description: If populated indicates the number of items in the collection.
              format: int64
            accept:
              type: string
              description: A space-delimited list of media types from which an `Accept` header may be constructed.
            links:
              type: array
              description: The links that apply to the collection.
              items:
                $ref: "#/paths/~1/get/responses/200/content/application~1json/schema/properties/links/items"
            version:
              type: integer
              description: The version number of the collection representation. This representation is version 2.
        - type: object
          required:
            - items
          properties:
            items:
              type: array
              description: An array that contains definition resources.
              items:
                $ref: "#/components/schemas/term"
