openapi: 3.0.3
info:
  version: "1"
  title: Relationships
  contact:
    name: SAS Developers
    url: https://developer.sas.com
    email: devex@sas.com
  description: The Relationships API manages the storage and discovery of relationships, and the retrieval of networks of relationship data.
tags:
  - name: Root
    description: The operations for root.
  - name: Relationships Management
    description: The operations for relationships management.
  - name: Relationships Types Management
    description: The operations for relationships types management.
  - name: References Management
    description: The operations for references management.
  - name: Jobs Management
    description: The operations for jobs management.
paths:
  /:
    get:
      tags:
        - Root
      summary: Get the top-level links
      operationId: root
      description: >
        Returns a list of links to the top-level collections surfaced through this API. These top level links will include "relationships", "types", and "references". <p> <b>Authorization:</b> Any authenticated user. </p>
      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: "#/components/schemas/api"
              examples:
                API:
                  $ref: "#/components/examples/rootResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/api"
              examples:
                API:
                  $ref: "#/components/examples/rootResponse"
        "404":
          description: The service was not avaialable.
  /relationships:
    get:
      summary: Get a paginated list of relationships
      description: Returns a paginated collection of relationships. The subject(s) are specified using either the `resourceUri` or the `referenceId` query parameter. Using `resourceUri` or `referenceId` in the filter parameter can conflict with the `resourceUri` or `referenceId` query parameter. Standard paging, filtering, and sorting options are provided. The media type of the returned items in the collection is `application/vnd.sas.relationship+json`. References may also be queried using [POST /relationships#withQuery](#op:getRelationshipsWithQuery) with the query string in the request body.
      operationId: getRelationshipsQuery
      tags:
        - Relationships Management
      parameters:
        - name: resourceUri
          in: query
          description: >
            The subject or subjects for which to get relationships. Specify multiple subjects by using the `'|'` separator.
          schema:
            type: string
        - name: referenceId
          in: query
          description: >
            The ID of the subject or subjects for which to get relationships. Specify multiple subjects by using the `'|'` separator.
          schema:
            type: string
        - name: depth
          in: query
          description: >
            How deep to traverse the relationships tree. A value >1 specifies a recursive traversal through the list of related resources up to the specified depth. A value of -1 returns all relationships for all resources. The default setting is 1, which returns only direct relationships of the resource.
          schema:
            type: integer
            format: int32
            default: 1
        - name: direction
          in: query
          description: >
            The direction of the relationships to return. A relationship is defined as a resource URI "to" a related resource URI. A direction value of "from" returns relationships where the resource(s) indicated by the `resourceUri` or `referenceId` parameter is the related resource. A value of "both" returns all relationships that include the resource(s) indicated by the `resourceUri` or `referenceId` parameter.
          schema:
            type: string
        - name: start
          in: query
          required: false
          description: The 0-based start index of a paginated request.
          schema:
            type: integer
            format: int64
            default: 0
        - name: limit
          in: query
          required: false
          description: The maximum number of items to return in this request.
          schema:
            type: integer
            format: int32
            default: 10
        - name: sortBy
          in: query
          description: "The sort criteria for returned relationships. Supports the following fields in either ascending or descending order: `id`, `type`, `resourceUri`, `referenceId`, `relatedResourceUri`, `relatedReferenceId`, `source`, `modifiedTimeStamp`, `creationTimeStamp`, `createdBy`, `modifiedBy`."
          schema:
            type: string
            format: sort-criteria
            default: name
        - name: filter
          in: query
          description: 'An expression for filtering the collection. Valid expressions include `eq(member,"string")`. Allowed members: `id`, `resourceUri`, `type`, `relatedResourceUri`, `source`, `resource.type`. The `resource.type` criteria is applied to each resource and related resource. When depth > 1, the relationship type and `resource.type` criteria are applied at each level. Relationships that are filtered out for a given level are not used to search the next level.'
          schema:
            type: string
            format: filter-criteria
      responses:
        "200":
          description: Ok.
          headers:
            Content-Type:
              $ref: "#/paths/~1/get/responses/200/headers/Content-Type"
            Last-Modified:
              description: The time stamp in `EEE, dd MMM yyyy HH:mm:ss GMT` format when the relationship was last modified.
              schema:
                type: string
                format: date-time
          content:
            application/vnd.sas.collection+json:
              schema:
                $ref: "#/components/schemas/relationshipCollection"
              examples:
                API:
                  $ref: "#/components/examples/relationshipsCollectionResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/relationshipCollection"
              examples:
                API:
                  $ref: "#/components/examples/relationshipsCollectionResponse"
        "400":
          description: Bad request (the request is not well-formed).
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/BadRequestGetRel"
    post:
      summary: Add a relationship
      description: Adds a new relationship. A relationship requires a resource, a related resource and the relationship type. A resource can be specified by either a resource URI or a reference ID. The related resource can be defined by either a related resource URI or a related reference ID. Relationship uniqueness is defined by the combination of the resource and the related resource. If an invalid reference ID is provided a 404 is returned. If a reference does not exist for a resource URI a reeference will be created. When possible, additional resource information is queried and added to the reference. For resources external to the SAS system, the client should provide additional reference information. Attempting to add a relationship that already exists leaves the existing relationship unchanged.
      operationId: createRelationship
      tags:
        - Relationships Management
      requestBody:
        content:
          application/vnd.sas.relationship+json:
            schema:
              $ref: "#/components/schemas/createRelationship"
            examples:
              API:
                $ref: "#/components/examples/createRelationshipRequest"
          application/json:
            schema:
              $ref: "#/components/schemas/createRelationship"
            examples:
              API:
                $ref: "#/components/examples/createRelationshipRequest"
        description: A relationship.
        required: true
      responses:
        "201":
          description: The relationship was added.
          headers:
            Location:
              description: Location (URL) of the new relationship.
              schema:
                type: string
            ETag:
              description: The entity tag for the relationship.
              schema:
                type: string
            Last-Modified:
              description: The time stamp in `EEE, dd MMM yyyy HH:mm:ss GMT` format when the relationship was last modified.
              schema:
                type: string
                format: date-time
          content:
            application/vnd.sas.relationship+json:
              schema:
                $ref: "#/components/schemas/relationship"
              examples:
                API:
                  $ref: "#/components/examples/relationshipResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/relationship"
              examples:
                API:
                  $ref: "#/components/examples/relationshipResponse"
        "400":
          description: Bad request (the request is not well-formed).
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/BadRequestPost"
        "409":
          description: The requested object already exists.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/409ConflictResponseRel"
    patch:
      summary: Delete relationships
      operationId: patchRelationships
      description: 'Delete a list of relationships. Uses a JSON Patch body with `"op" : "remove"` on a specific relationship ID.  Clients which do not support PATCH can use POST and specify a query parameter of `?_method=PATCH`. All referenced resources must exist for the PATCH to be applied.'
      tags:
        - Relationships Management
      requestBody:
        content:
          application/json-patch:
            schema:
              $ref: "#/components/schemas/multiDeleteCollection"
            examples:
              API:
                $ref: "#/components/examples/patch"
          application/json:
            schema:
              $ref: "#/components/schemas/multiDeleteCollection"
            examples:
              API:
                $ref: "#/components/examples/patch"
        description: The relationships.
      responses:
        "204":
          description: Ok. The relationships were deleted.
        "400":
          description: Bad request (the request is not well-formed).
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/BadRequestPatch"
  "/relationships/{relationshipId}":
    head:
      summary: Check if relationship exists
      description: Returns whether or not a relationship with the specified ID exists, along with appropriate headers.
      operationId: headersForRelationship
      tags:
        - Relationships Management
      parameters:
        - name: relationshipId
          in: path
          description: The relationship ID.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Ok. The relationship exists.
          headers:
            ETag:
              description: The entity tag for the relationship.
              schema:
                type: string
            Last-Modified:
              description: The time stamp in `EEE, dd MMM yyyy HH:mm:ss GMT` format when the relationship was last modified.
              schema:
                type: string
                format: date-time
        "404":
          description: No relationship exists at the requested path.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/404NotFoundRel"
    get:
      summary: Get a relationship
      description: Returns an existing relationship.
      operationId: getRelationship
      tags:
        - Relationships Management
      parameters:
        - name: relationshipId
          in: path
          description: The relationship ID.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Ok.
          headers:
            ETag:
              description: The entity tag for the relationship.
              schema:
                type: string
            Last-Modified:
              description: The time stamp in `EEE, dd MMM yyyy HH:mm:ss GMT` format when the relationship was last modified.
              schema:
                type: string
                format: date-time
          content:
            application/vnd.sas.relationship+json:
              schema:
                $ref: "#/components/schemas/relationship"
              examples:
                API:
                  $ref: "#/components/examples/relationshipResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/relationship"
              examples:
                API:
                  $ref: "#/components/examples/relationshipResponse"
        "404":
          description: No relationship exists at the requested path.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/404NotFoundRel"
    put:
      summary: Update a relationship
      description: The PUT will fail if the ID in the body does match not the `relationshipId`. Only the `type` field can be updated.
      operationId: updateRelationship
      tags:
        - Relationships Management
      parameters:
        - name: relationshipId
          in: path
          description: The relationship ID.
          required: true
          schema:
            type: string
        - name: If-Match
          in: header
          description: The eEag that was returned from a GET, POST, or PUT of this relationship.
          schema:
            type: string
        - name: If-Unmodified-Since
          in: header
          description: The value of the `lastModified` date of the relationship.  If the relationship has been updated since this time, the update will fail.
          schema:
            type: string
      requestBody:
        content:
          application/vnd.sas.relationship+json:
            schema:
              $ref: "#/components/schemas/updateRelationship"
            examples:
              API:
                $ref: "#/components/examples/updateRelationshipRequest"
          application/json:
            schema:
              $ref: "#/components/schemas/updateRelationship"
            examples:
              API:
                $ref: "#/components/examples/updateRelationshipRequest"
        description: The relationship.
        required: true
      responses:
        "200":
          description: Ok.
          headers:
            Location:
              description: Location (URL) of the new reference.
              schema:
                type: string
            ETag:
              description: The entity tag for the reference.
              schema:
                type: string
            Last-Modified:
              description: The time stamp in `EEE, dd MMM yyyy HH:mm:ss GMT` format when the reference was last modified.
              schema:
                type: string
                format: date-time
          content:
            application/vnd.sas.relationship+json:
              schema:
                $ref: "#/components/schemas/relationship"
              examples:
                API:
                  $ref: "#/components/examples/relationshipResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/relationship"
              examples:
                API:
                  $ref: "#/components/examples/relationshipResponse"
        "400":
          description: Bad request (the request is not well-formed).
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/BadRequestPost"
        "404":
          description: No relationship exists at the requested path.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/404NotFoundRel"
        "409":
          description: A conflict exists with an existing relationship.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/409ConflictResponseRel"
        "412":
          description: Precondition failed. The target has changed since it was last fetched.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/412PreconditionFailedRel"
        "428":
          description: The request headers did not include an `If-Match` or `If-Unmodified-Since` precondition.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/428PreconditionRequiredRel"
    delete:
      summary: Remove a relationship
      description: Removes the specified relationship. This operation will not remove references even if there are no relationships which use the referenced resource.
      operationId: deleteRelationship
      tags:
        - Relationships Management
      parameters:
        - name: relationshipId
          in: path
          description: The relationship ID.
          required: true
          schema:
            type: string
      responses:
        "204":
          description: The relationship was deleted.
  /relationships#multiPost:
    post:
      summary: Update or create relationships
      description: A relationship requires a resource, a related resource, and a relationship type. A resource can be specified by either a resource URI or a reference ID. The related resource can be defined by either a related resource URI or a related reference ID. Relationship uniqueness is defined by the combination of the resource and the related resource. When the ID is provided, this operation performs a full replacement of the relationship. When no ID is provided, and the relationship is not unique, the relationship is not updated. The parameter `?onConflict=update` can be used to update existing relationships with a matching resource and related URIs. The ID field cannot be updated during this operation. The response is a collection of `application/vnd.sas.relationship` resources. When a resource creation or update fails, the collection includes an `application/vnd.sas.error` object that describes why the operation failed. If an invalid reference ID is provided a 404 is returned. If a reference does not exist for a resource URI a reeference will be created. When possible, additional resource information is queried and added to the reference. For resources external to the SAS system, the client should provide additional reference information. The media type `application/vnd.sas.collection+json` is required for this endpoint to prevent ambiguity with other POST operations to this collection.
      operationId: createOrUpdateRelationships
      tags:
        - Relationships Management
      parameters:
        - name: onConflict
          in: query
          description: How to handle conflicts when a reference already exists.
          required: false
          schema:
            type: string
            enum:
              - update
              - ignore
        - name: If-Unmodified-Since
          in: header
          description: The value of the lastModified date of the relationship.  If the relationship has been updated since this time, the update will fail.  This header is only required when the `onConflict='update'` parameter is specified, and is only applied to relationships being updated.
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/vnd.sas.collection+json:
            schema:
              $ref: "#/components/schemas/createRelationshipCollection"
            examples:
              API:
                $ref: "#/components/examples/relationshipsPostRequest"
        description: A collection of `application/vnd.sas.relationship` resources.
        required: true
      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/relationshipCollection"
              examples:
                API:
                  $ref: "#/components/examples/relationshipsPostResponse"
        "400":
          description: Bad request (the request is not well-formed).
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/BadRequestPostRel"
  /relationships#withQuery:
    post:
      summary: Get paginated list of relationships via query
      description: Returns a paginated collection of relationships. Standard paging, filtering, and sorting options are provided. The media type of the returned items in the collection is `application/vnd.sas.relationship+json`. This call is an extended GET operation and therefore idempotent.
      operationId: getRelationshipsWithQuery
      tags:
        - Relationships Management
      parameters:
        - name: start
          in: query
          required: false
          description: The 0-based start index of a paginated request.
          schema:
            type: integer
            format: int64
            default: 0
        - name: limit
          in: query
          required: false
          description: The maximum number of items to return in this request.
          schema:
            type: integer
            format: int32
            default: 10
        - name: sortBy
          in: query
          description: "The sort criteria supports the following fields in ascending or descending order: `id`, `type`, `resourceUri`, `referenceId`, `relatedResourceUri`, `relatedReferenceId`, `source`, `modifiedTimeStamp`, `creationTimeStamp`, `createdBy`, `modifiedBy`."
          schema:
            type: string
            format: sort-criteria
            default: name
      requestBody:
        content:
          application/vnd.sas.relationship.query+json:
            schema:
              $ref: "#/components/schemas/relationshipQuery"
            examples:
              API:
                $ref: "#/components/examples/relationshipsPostQueryRequest"
        description: relationshipQuery
        required: true
      responses:
        "200":
          description: Ok.
          headers:
            Content-Type:
              $ref: "#/paths/~1/get/responses/200/headers/Content-Type"
            Last-Modified:
              description: The time stamp in `EEE, dd MMM yyyy HH:mm:ss GMT` format when the relationship was last modified.
              schema:
                type: string
                format: date-time
          content:
            application/vnd.sas.collection+json:
              schema:
                $ref: "#/components/schemas/relationshipCollection"
              examples:
                API:
                  $ref: "#/components/examples/relationshipsPostQueryResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/relationshipCollection"
              examples:
                API:
                  $ref: "#/components/examples/relationshipsPostQueryResponse"
        "400":
          description: Bad request (the request is not well-formed).
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/BadRequestGetRel"
  /types:
    get:
      summary: Get relationships types
      description: Returns a collection of relationships types. The media type of the returned collection items is `application/vnd.sas.relationship.type+json`. `Accept-Language` is specified to return locale-specific labels and descriptions.
      operationId: getTypes
      tags:
        - Relationships Types Management
      parameters:
        - name: Accept-Language
          in: header
          description: The lanaguage/locale to use for localizable content.
          schema:
            type: string
        - name: start
          in: query
          description: The starting index of the first relationship type in a page.
          schema:
            type: integer
            default: 0
        - name: limit
          in: query
          description: The maximum number of types to return in this page of results. The actual number of returned types may be less if the collection has been exhausted.
          schema:
            type: integer
            default: 50
        - name: filter
          in: query
          description: "Filter criteria for returned types. Filters are supported on the following top level fields for types: `name`, `description`, `directional`, `label`, `partnerName`, `partnerDescription`, `partnerLabel`."
          schema:
            type: string
            format: filter-criteria
        - name: sortBy
          in: query
          description: "Sort returned types. The sort criteria supports the following fields in ascending or descending order: `name`, `description`, `directional`, `label`, `partnerName`, `partnerDescription`, `partnerLabel`."
          schema:
            type: string
            format: sort-criteria
            default: name
      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/typeCollection"
              examples:
                API:
                  $ref: "#/components/examples/relationshipsTypesResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/typeCollection"
              examples:
                API:
                  $ref: "#/components/examples/relationshipsTypesResponse"
        "400":
          description: Bad request (the request is not well-formed).
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/BadRequestGetType"
  "/types/{typeName}":
    get:
      summary: Get relationship type
      description: Returns information about a relationship type. The default return media type is `application/vnd.sas.relationship.type+json`. To return locale-specific labels and descriptions, specify an `Accept-Language`.
      operationId: getType
      tags:
        - Relationships Types Management
      parameters:
        - name: Accept-Language
          in: header
          description: The lanaguage/locale to use for localizable content.
          schema:
            type: string
        - name: typeName
          in: path
          description: The type name.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Ok.
          headers:
            Content-Type:
              $ref: "#/paths/~1/get/responses/200/headers/Content-Type"
          content:
            application/vnd.sas.relationship.type+json:
              schema:
                $ref: "#/components/schemas/type"
              examples:
                API:
                  $ref: "#/components/examples/relationshipsTypeResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/type"
              examples:
                API:
                  $ref: "#/components/examples/relationshipsTypeResponse"
        "404":
          description: No type exists at the requested path.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/404NotFoundType"
  /references:
    get:
      summary: Get references
      description: Returns a collection of references.  Standard paging, filtering, and sorting options are provided. The default media type of the returned items in the collection is `application/vnd.sas.relationship.reference+json`. References may also be queried using [POST /references#withQuery](#op:getReferencesWithQuery) with the query string in the request body.
      operationId: getReferences
      tags:
        - References Management
      parameters:
        - name: Accept-Item
          in: header
          description: An alternative media type that the service recognizes. Optional. If the service can not provide the media type, a 406 response is returned.
          required: false
          schema:
            type: string
            enum:
              - application/vnd.sas.summary+json
              - application/vnd.sas.relationship.reference+json
        - name: start
          in: query
          description: The starting index of the first reference in a page.
          schema:
            type: integer
            default: 0
        - name: limit
          in: query
          description: The maximum number of references to return in this page of results. The actual number of returned references may be less if the collection has been exhausted.
          schema:
            type: integer
            default: 50
        - name: filter
          in: query
          description: "Filter criteria for returned references. Filters are supported on the following top level fields for references: `id`, `name`, `resourceUri`, `type`, `source`, `analysisTimeStamp`, `modifiedTimeStamp`, `creationTimeStamp`, `createdBy`, `modifiedBy`."
          schema:
            type: string
            format: filter-criteria
        - name: sortBy
          in: query
          description: "Sort the returned resources.  The sort criteria supports the following fields in ascending or descending order: `id`, `name`, `resourceUri`, `type`, `source`, `analysisTimeStamp`, `modifiedTimeStamp`, `creationTimeStamp`, `createdBy`, `modifiedBy`."
          schema:
            type: string
            format: sort-criteria
      responses:
        "200":
          description: Ok.
          headers:
            Content-Type:
              $ref: "#/paths/~1/get/responses/200/headers/Content-Type"
            Last-Modified:
              description: The time stamp in `EEE, dd MMM yyyy HH:mm:ss GMT` format when the relationship was last modified.
              schema:
                type: string
                format: date-time
          content:
            application/vnd.sas.collection+json:
              schema:
                $ref: "#/components/schemas/referenceCollection"
              examples:
                API:
                  $ref: "#/components/examples/getReferencesResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/referenceCollection"
              examples:
                API:
                  $ref: "#/components/examples/getReferencesResponse"
        "400":
          description: Bad request (the request is not well-formed).
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/BadRequestGetRef"
    post:
      summary: Create a new reference
      description: The resource URI must be set by the client within the request body, and this URI must be unique across the entire system.
      operationId: createReference
      tags:
        - References Management
      requestBody:
        content:
          application/vnd.sas.relationship.reference+json:
            schema:
              $ref: "#/components/schemas/createReference"
            examples:
              API:
                $ref: "#/components/examples/createReferenceRequest"
          application/json:
            schema:
              $ref: "#/components/schemas/createReference"
            examples:
              API:
                $ref: "#/components/examples/createReferenceRequest"
        description: The new reference.
        required: true
      responses:
        "201":
          description: The reference was created.
          headers:
            Location:
              description: Location (URL) of the new reference.
              schema:
                type: string
            ETag:
              description: The entity tag for the reference.
              schema:
                type: string
            Last-Modified:
              description: The time stamp in `EEE, dd MMM yyyy HH:mm:ss GMT` format when the reference was last modified.
              schema:
                type: string
                format: date-time
          content:
            application/vnd.sas.relationship.reference+json:
              schema:
                $ref: "#/components/schemas/reference"
              examples:
                API:
                  $ref: "#/components/examples/createReferenceResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/reference"
              examples:
                API:
                  $ref: "#/components/examples/createReferenceResponse"
        "400":
          description: Bad request (the request is not well-formed).
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/BadRequestPost"
        "405":
          description: Method Not Allowed. The resource was not allowed to be created.
        "409":
          description: There was a conflict. A reference exists with the resource URI.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/409ConflictResponse"
    patch:
      summary: Delete references
      operationId: patchReferences
      description: 'Delete a list of references. Uses a JSON Patch body with `"op" : "remove"` on a specific reference ID.  Clients which do not support PATCH can use POST and specify a query parameter of `?_method=PATCH`. All referenced resources must exist for the PATCH to be applied.'
      tags:
        - References Management
      requestBody:
        content:
          application/json-patch:
            schema:
              $ref: "#/components/schemas/multiDeleteCollection"
            examples:
              API:
                $ref: "#/components/examples/patch"
          application/json:
            schema:
              $ref: "#/components/schemas/multiDeleteCollection"
            examples:
              API:
                $ref: "#/components/examples/patch"
        description: references
      responses:
        "204":
          description: Ok. The references were deleted.
        "400":
          description: Bad request (the request is not well-formed).
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/BadRequestPatch"
  /references#multiPost:
    post:
      summary: Update or create references
      description: >
        Updates or creates references. When the ID is provided for a reference in the collection, the operation performs a full replacement of the reference. If no ID is provided, and the resource URI is not unique in the system, the reference is not updated (the default). The parameter `?onConflict=update` can be used to update existing references with a matching resource URI. The ID field can not be updated during this operation. If the reference does not exist, one is created. The response will be a collection of `application/vnd.sas.relationship.reference` resources. If a reference creation or update fails, the collection will include an `application/vnd.sas.error` object that describes why the reference failed. The specific media type of `application/vnd.sas.collection+json` is required for this endpoint to prevent ambiguity with other POST operations to this collection.
      operationId: createOrUpdateReferences
      tags:
        - References Management
      parameters:
        - name: onConflict
          in: query
          description: How to handle conflicts when a reference already exists.
          required: false
          schema:
            type: string
            enum:
              - update
              - ignore
        - name: If-Unmodified-Since
          in: header
          description: The value of the `lastModified` date of the reference. If the reference has been updated since this time, the update will fail.  This header is required only when the `onConflict='update'` parameter is specified and is applied only to updated references.
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/vnd.sas.collection+json:
            schema:
              $ref: "#/components/schemas/createReferenceCollection"
            examples:
              API:
                $ref: "#/components/examples/createReferencesRequest"
        description: A collection of `application/vnd.sas.relationship.reference` resources.
        required: true
      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/referenceCollection"
              examples:
                API:
                  $ref: "#/components/examples/createReferencesResponse"
        "400":
          description: Bad request (the request is not well-formed).
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/BadRequestPost"
  /references#withQuery:
    post:
      summary: Get a paginated list of references
      description: Returns a paginated collection of references.  Standard paging, filtering, and sorting options are provided. The default media type of the returned items in the collection is `application/vnd.sas.relationship.reference+json`. This call is an extended GET operation and therefore idempotent. The body of the request contains the query parameters and filters to apply to the request. To find references with the content type of `table` the body of the request would be `eq(contentType, "table")`.
      operationId: getReferencesWithQuery
      tags:
        - References Management
      parameters:
        - name: Accept-Item
          in: header
          description: An alternative media type that the service recognizes. Optional. If the service can not provide the media type, a 406 response is returned.
          required: false
          schema:
            type: string
            enum:
              - application/vnd.sas.summary+json
              - application/vnd.sas.relationship.reference+json
        - name: start
          in: query
          description: The starting index of the first reference in a page.
          schema:
            type: integer
            default: 0
        - name: limit
          in: query
          description: The maximum number of references to return in this page of results. The actual number of returned references can be less if the collection has been exhausted.
          schema:
            type: integer
            default: 50
        - name: sortBy
          in: query
          description: "Sort the returned resources.  The sort criteria supports the following fields in ascending or descending order: `id`, `name`, `resourceUri`, `type`, `source`, `analysisTimeStamp`, `modifiedTimeStamp`, `creationTimeStamp`, `createdBy`, `modifiedBy`."
          schema:
            type: string
            format: sort-criteria
      requestBody:
        content:
          text/plain:
            schema:
              $ref: "#/components/schemas/filterText"
            examples:
              API:
                $ref: "#/components/examples/getReferencesWithPostRequest"
        description: "The filter criteria for returned references. Filters are supported on the following top level fields for references: `id`, `name`, `resourceUri`, `type`, `source`, `analysisTimeStamp`, `modifiedTimeStamp`, `creationTimeStamp`, `createdBy`, and `modifiedBy`."
        required: true
      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/referenceCollection"
              examples:
                API:
                  $ref: "#/components/examples/getReferencesResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/referenceCollection"
              examples:
                API:
                  $ref: "#/components/examples/getReferencesResponse"
        "400":
          description: Bad request (the request is not well-formed).
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/BadRequestGetRef"
  "/references/{referenceId}":
    get:
      summary: Get reference
      description: Returns information about a single reference based on its unique id. The default media type returned is `application/vnd.sas.relationship.reference+json`.
      operationId: getReference
      tags:
        - References Management
      parameters:
        - name: referenceId
          in: path
          description: reference id
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Ok.
          headers:
            ETag:
              description: The entity tag for the reference.
              schema:
                type: string
            Last-Modified:
              description: The time stamp in `EEE, dd MMM yyyy HH:mm:ss GMT` format when the reference was last modified.
              schema:
                type: string
                format: date-time
          content:
            application/vnd.sas.relationship.reference+json:
              schema:
                $ref: "#/components/schemas/reference"
              examples:
                API:
                  $ref: "#/components/examples/getReferenceByIdResponse"
            application/vnd.sas.summary+json:
              schema:
                $ref: "#/components/schemas/reference"
              examples:
                API:
                  $ref: "#/components/examples/getReferenceByIdResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/reference"
              examples:
                API:
                  $ref: "#/components/examples/getReferenceByIdResponse"
        "404":
          description: No reference exists at the requested path.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/404NotFoundRef"
    head:
      summary: Check if reference exists
      description: Returns whether or not a reference with the specified ID exists, along with appropriate headers.
      operationId: headersForReference
      tags:
        - References Management
      parameters:
        - name: referenceId
          in: path
          description: The reference ID.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Ok. The reference exists.
          headers:
            ETag:
              description: The entity tag for the reference.
              schema:
                type: string
            Last-Modified:
              description: The time stamp in `EEE, dd MMM yyyy HH:mm:ss GMT` format when the reference was last modified.
              schema:
                type: string
                format: date-time
        "404":
          description: No reference exists at the requested path.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/404NotFoundRef"
    put:
      summary: Update a reference
      description: Update a reference. The `resourceUri` can not be updated during this operation. The PUT will fail if the ID in the body does not match the `referenceId`.
      operationId: updateReference
      tags:
        - References Management
      parameters:
        - name: referenceId
          in: path
          description: The reference ID.
          required: true
          schema:
            type: string
        - name: If-Match
          in: header
          description: The Etag that was returned from a GET, POST, or PUT of this reference.
          schema:
            type: string
        - name: If-Unmodified-Since
          in: header
          description: The value of the lastModified date of the reference.  If the reference has been updated since this time, the update will fail.
          schema:
            type: string
      requestBody:
        content:
          application/vnd.sas.resources.reference+json:
            schema:
              $ref: "#/components/schemas/updateReference"
            examples:
              API:
                $ref: "#/components/examples/updateReferenceRequest"
          application/json:
            schema:
              $ref: "#/components/schemas/updateReference"
            examples:
              API:
                $ref: "#/components/examples/updateReferenceRequest"
        description: The reference.
        required: true
      responses:
        "200":
          description: Ok.
          headers:
            Location:
              description: The URL of the reference.
              schema:
                type: string
            ETag:
              description: The entity tag for the reference.
              schema:
                type: string
            Last-Modified:
              description: The time stamp in `EEE, dd MMM yyyy HH:mm:ss GMT` format when the reference was last modified.
              schema:
                type: string
                format: date-time
          content:
            application/vnd.sas.resources.reference+json:
              schema:
                $ref: "#/components/schemas/reference"
              examples:
                API:
                  $ref: "#/components/examples/updateReferenceResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/reference"
              examples:
                API:
                  $ref: "#/components/examples/updateReferenceResponse"
        "400":
          description: Bad request (the request is not well-formed).
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/BadRequestPost"
        "404":
          description: No reference exists at the requested path.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/404NotFoundRef"
        "412":
          description: The `If-Match` request header did not match the resource's entity tag, or the `If-Unmodified-Since` request header did not match the resource's last modified time stamp.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/412PreconditionFailedRef"
        "428":
          description: The request headers did not include an `If-Match` or `If-Unmodified-Since` precondition.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/428PreconditionRequiredRef"
    delete:
      summary: Delete a reference
      description: Deletes the specified reference and permanently removes it from the system along with the relationships which use this reference.
      operationId: deleteReference
      tags:
        - References Management
      parameters:
        - name: referenceId
          in: path
          description: The reference ID.
          required: true
          schema:
            type: string
      responses:
        "204":
          description: The reference was deleted.
  /references/referenceSources:
    get:
      summary: Get the list values for a reference source
      description: Provides a list of distinct values used for a reference source.
      operationId: getReferenceSources
      tags:
        - References Management
      parameters:
        - name: start
          in: query
          required: false
          description: The 0-based start index of a paginated request.
          schema:
            type: integer
            format: int64
            default: 0
        - name: limit
          in: query
          required: false
          description: The maximum number of items to return in this request.
          schema:
            type: integer
            format: int32
            default: 10
      responses:
        "200":
          description: Ok.  The collection returned will include an item for each distinct value present in the sytem for the reference source member.
          headers:
            Content-Type:
              $ref: "#/paths/~1/get/responses/200/headers/Content-Type"
          content:
            application/vnd.sas.collection+json:
              schema:
                $ref: "#/components/schemas/sourceValuesCollection"
              examples:
                API:
                  $ref: "#/components/examples/getReferenceSources"
            application/json:
              schema:
                $ref: "#/components/schemas/sourceValuesCollection"
              examples:
                API:
                  $ref: "#/components/examples/getReferenceSources"
        "400":
          description: Bad request (the request is not well-formed).
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/BadRequestGetRef"
  "/jobs/{jobId}":
    get:
      summary: Get a job
      description: Get a job.
      operationId: getJob
      tags:
        - Jobs Management
      parameters:
        - name: jobId
          in: path
          description: The job ID.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Ok.
          headers:
            Content-Type:
              $ref: "#/paths/~1/get/responses/200/headers/Content-Type"
          content:
            application/vnd.sas.relationship.job.load+json:
              schema:
                $ref: "#/components/schemas/loadJob"
              examples:
                API:
                  $ref: "#/components/examples/createJobResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/loadJob"
              examples:
                API:
                  $ref: "#/components/examples/createJobResponse"
        "404":
          description: No job exists at the requested path.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/404NotFoundJob"
    head:
      summary: Check if a job exists
      description: Returns whether or not a job with the specified ID exists, along with appropriate headers.
      operationId: headersForJob
      tags:
        - Jobs Management
      parameters:
        - name: jobId
          in: path
          description: The job ID.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Ok.
          headers:
            Content-Type:
              $ref: "#/paths/~1/get/responses/200/headers/Content-Type"
          content:
            application/vnd.sas.relationship.job.load+json:
              schema:
                $ref: "#/components/schemas/loadJob"
              examples:
                API:
                  $ref: "#/components/examples/createJobResponse"
            application/json:
              schema:
                $ref: "#/components/schemas/loadJob"
              examples:
                API:
                  $ref: "#/components/examples/createJobResponse"
        "404":
          description: No job exists at the requested path.
          content:
            application/vnd.sas.error+json:
              schema:
                $ref: "#/components/schemas/error2"
              examples:
                API:
                  $ref: "#/components/examples/404NotFoundJob"
    delete:
      summary: Remove a job
      description: Removes the specified job. Job will be stopped if it is running.
      operationId: deleteJob
      tags:
        - Jobs Management
      parameters:
        - name: jobId
          in: path
          description: The job ID.
          required: true
          schema:
            type: string
      responses:
        "204":
          description: The job was deleted.
  "/jobs/{jobId}/state":
    get:
      summary: Get the state of the job
      description: "Returns the state of the job: running, completed, or failed."
      operationId: getJobState
      tags:
        - Jobs Management
      parameters:
        - name: jobId
          in: path
          description: The job ID.
          required: true
          schema:
            type: string
      responses:
        "200":
          description: The state of the job.
          headers:
            Content-Type:
              $ref: "#/paths/~1/get/responses/200/headers/Content-Type"
          content:
            text/plain:
              schema:
                type: string
              example: completed
  /jobs:
    post:
      summary: Load metadata for types
      description: Loads metadata for types.
      operationId: startLoad
      tags:
        - Jobs Management
      parameters:
        - name: type
          in: query
          description: The type or types for which to load relationships. Default is all types.
          schema:
            type: string
      responses:
        "202":
          description: The request was accepted.
          headers:
            Location:
              description: The URL of the job.
              schema:
                type: string
          content:
            application/vnd.sas.relationship.job.load+json:
              schema:
                $ref: "#/components/schemas/loadJob"
              examples:
                API:
                  $ref: "#/components/examples/createJobResponse"
        "409":
          description: Unable to accept the request.
servers:
  - url: http://example.com/relationships
    description: This is an example of a base URL.
components:
  schemas:
    createReference:
      title: Create reference
      description: Used to create a single reference.
      required:
        - resourceUri
      properties:
        resourceUri:
          type: string
          description: The URI of the resource that this [reference](#model:reference) represents.
        contentType:
          type: string
          description: The type of the resource this refers to. This will be "report", or "storedprocess" or whatever type string is appropriate for the resource. The type should be registered with the types service so that services that retrieve this resource can look up the correct media type and endpoints for retrieving resources of this type. Also, it is very important that this value matches the type field of the summary representation (that is, the `application/vnd.sas.summary+json` representation).
        source:
          type: string
          description: Source for this reference. This is an indicator of the context from which the referenced resource was obtained. For a resource external to the deployment the source value is defined either by the process providing the resource inforamtion or is user-defined. For resources populated from within the deployment the default value is `sas`.
        analysisTimeStamp:
          type: string
          format: date-time
          description: Time stamp of the relationship analysis for this reference.
        creationTimeStamp:
          type: string
          format: date-time
          description: Time stamp of the creation of the referenced resource not this resource. For a resource external to the deployment, where an original time stamp is unavailable, the time stamp of the source file or the analysis time stamp will be used.
        modifiedTimeStamp:
          type: string
          format: date-time
          description: Time stamp of last modification of the referenced resource not this resource. For a resource external to the deployment, where an original time stamp is unavailable, the time stamp of the source file or the analysis time stamp will be used.
        createdBy:
          type: string
          description: The id of the user who created the referenced resource not this resource. For a resource external to the deployment, where the original user id is unavailable, the user id from the create / update request will be used.
        modifiedBy:
          type: string
          description: The id of the last user who modified the referenced resource not this resource. For a resource external to the deployment, where the original user id is unavailable, the user id from the create / update request will be used.
        name:
          type: string
          description: The name of the referenced resource.
        version:
          type: integer
          description: This media type's schema version number. This representation is version 1.
    createReferenceCollection:
      title: Create references collection
      description: A collection used to create multiple references.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          properties:
            items:
              type: array
              description: The array of `application/vnd.sas.relationship.reference` representations.
              items:
                $ref: "#/components/schemas/createReference"
    referenceCollection:
      title: References collection
      description: A collection of references.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          properties:
            items:
              type: array
              description: The array of `application/vnd.sas.relationship.reference` representations.
              items:
                anyOf:
                  - $ref: "#/components/schemas/reference"
                  - $ref: "#/components/schemas/error2"
    updateReference:
      title: Update reference resource
      description: The reference to update.
      allOf:
        - $ref: "#/components/schemas/createReference"
        - type: object
          properties:
            id:
              type: string
              description: System-assigned unique ID for this object.
    reference:
      title: Reference resource
      description: A reference contains basic information about a resource for which there is a relationship. This is the `application/vnd.sas.relationship.reference` media type.
      allOf:
        - $ref: "#/components/schemas/updateReference"
        - type: object
          properties:
            links:
              type: array
              description: Links that apply to this object.  If provider is read only,  the links will include "self", "alternate", and "relationships".  If provider is not read only, the links will include "self", "alternate", "delete", "update", and "relationships".
              items:
                $ref: "#/components/schemas/link"
    relationshipCollection:
      title: Relationships collection
      description: A collection of relationships.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          properties:
            items:
              type: array
              description: The array of `application/vnd.sas.relationship` representations.
              items:
                anyOf:
                  - $ref: "#/components/schemas/createRelationship"
                  - $ref: "#/components/schemas/error2"
    createRelationshipCollection:
      title: Create relationships collection
      description: A collection used to create multiple relationships.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          properties:
            items:
              type: array
              description: The array of `application/vnd.sas.relationship` representations.
              items:
                $ref: "#/components/schemas/createRelationship"
    createRelationship:
      title: Create relationship
      description: Used to create a single relationship.
      required:
        - resourceUri
        - relatedResourceUri
        - type
      properties:
        resourceUri:
          type: string
          description: The URI of the subject resource of this [relationship](#model:relationship).
        referenceId:
          type: string
          description: The id of the [reference](#model:reference) for the subject resource.
        type:
          type: string
          description: The id of this [relationship type](#model:type).
        relatedResourceUri:
          type: string
          description: The URI of the related resource of this [relationship](#model:relationship).
        relatedReferenceId:
          type: string
          description: The id of the [reference](#model:reference) for the related resource.
        source:
          type: string
          description: The source of this relationship. Typically the URI of the resource that manages this relationship.
        version:
          type: integer
          description: This media type's schema version number. This representation is version 1.
    updateRelationship:
      title: Update relationship resource
      description: Update relationship resource.
      allOf:
        - $ref: "#/components/schemas/createRelationship"
        - type: object
          properties:
            id:
              type: string
              description: System-assigned unique ID for this object.
    relationship:
      title: Relationship resource
      description: The connection between a subject resource and a related resource.
      allOf:
        - $ref: "#/components/schemas/updateRelationship"
        - type: object
          properties:
            creationTimeStamp:
              type: string
              format: date-time
              readOnly: true
              description: Timestamp of relationship creation.
            modifiedTimeStamp:
              type: string
              format: date-time
              readOnly: true
              description: Timestamp of last relationship modification.
            createdBy:
              type: string
              description: The id of the user who created the relationship.
            modifiedBy:
              type: string
              description: The id of the last user who modified the relationship.
            links:
              type: array
              description: Links that apply to this object.  If provider is read only,  the links will include "self".  If provider is not read only, the links will include "self", "delete", "update".
              items:
                $ref: "#/components/schemas/link"
    typeCollection:
      title: Relationship types collection
      description: A collection of relationship types.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          properties:
            items:
              type: array
              description: The array of `application/vnd.sas.relationship.type` representations.
              items:
                $ref: "#/components/schemas/type"
    type:
      title: Relationship type
      description: The nature of the connection between two resources.
      properties:
        name:
          type: string
          description: Identifier for the relationship type.
        description:
          type: string
          description: Description of the relationship type.
        label:
          type: string
          description: Label for the relationship from the subject to the target.
        partnerLabel:
          type: string
          description: Label of the relationship from the target to the subject.
        partnerDescription:
          type: string
          description: Description of the relationship from the target to the subject.
        directional:
          type: boolean
          description: Set to `true` if the role for the relationship type is depends upon the direction of the relationship. Set to `false` if the relationship is bi-directional.
        version:
          type: integer
          description: This media type's schema version number. This representation is version 1.
        links:
          type: array
          description: Links that apply to this relationship type. Includes "self".
          items:
            $ref: "#/components/schemas/link"
    sourceValuesCollection:
      title: Distinct values collection
      description: A collection of distinct source values.
      allOf:
        - $ref: "#/components/schemas/baseCollection2"
        - type: object
          properties:
            items:
              type: array
              description: The collection of source values.
              items:
                type: string
                description: The source value.
    multiDeleteCollection:
      title: Multi-delete collection
      description: A collection of resources to remove.
      type: array
      items:
        $ref: "#/components/schemas/multiDelete"
      example:
        - op: remove
          path: /873f4dd0-14b1-4aa1-85d6-178c24171de
        - op: remove
          path: /57657df4-f11b-46d7-a551-060b1605ee4e
        - op: remove
          path: /73b889d8-6a06-47df-a368-4b1e91cf39da
    multiDelete:
      title: JSONPatch document
      description: A JSONPatch document containing the path of the item to remove.
      required:
        - op
        - path
      properties:
        op:
          type: string
          description: Operation set to 'remove'.
          enum:
            - remove
        path:
          type: string
          description: The id of the resource to remove.
    relationshipQuery:
      title: Relationship query
      description: A relationship query using POST.
      properties:
        resourceUri:
          type: array
          items:
            type: string
          description: The subject or subjects for which to get relationships.
        referenceId:
          type: array
          items:
            type: string
          description: The ID of subject or subjects for which to get relationships.
        depth:
          type: integer
          description: The value used to control how deep to traverse the relationships tree. A value greater than 1 implies a recursive traversal through the list of related resources up to the specified depth. A value of -1 will result in all relationships for all resources returned. The default setting is 1, which implies only direct relationships of the resource will be returned.
        direction:
          type: string
          description: The value used to control the direction of the relationships returned. A relationship is defined as resource uri "to" related resource uri.   A value of "from" will return relationships where the resource(s) indicated by the `resourceUri` or `referenceId` parameter is the related resource. A value of "both" will return all relationships that include the resource(s) indicated by the `resourceUri` or `referenceId` parameter.
        filter:
          type: string
          description: An expression for filtering the collection. Valid expressions include eq(member,\"string\"). Allowed members are id, resourceUri, type, relatedResourceUri, source, and resource.type. The resource.type criteria is applied to each resource and related resource. When depth > 1, the relationship type and resource.type criteria are applied at each level. Relationships that are filtered out for a given level are not used to search the next level.
    loadJob:
      title: Job that loads metadata
      description: Provides the status of a relationship job.
      properties:
        id:
          type: string
          description: System-assigned unique ID for this object.
        state:
          type: string
          description: The job's state, one of running, completed, or failed.
        creationTimeStamp:
          type: string
          format: date-time
          description: Timestamp of job creation.
        endTimeStamp:
          type: string
          format: date-time
          description: Timestamp of job creation.
        version:
          type: integer
          description: This media type's schema version number. This representation is version 1.
        links:
          type: array
          description: Links that apply to this job type. Includes "self".
          items:
            $ref: "#/components/schemas/link"
    filterText:
      title: Filter text
      type: string
      format: filter-criteria
      description: The filter criteria.
    api:
      title: API
      description: The list of links to top-level resources and operations available from the root of the API.
      properties:
        links:
          description: The API's top-level links.
          items:
            $ref: "#/components/schemas/link"
          type: array
        version:
          description: The version number of the API representation. This is version 1.
          minimum: 1
          type: integer
    error2:
      title: Error
      description: The representation of an error.
      x-sas-media-type:
        name: application/vnd.sas.error
        version: 2
      required:
        - httpStatusCode
        - version
      properties:
        details:
          description: Messages that provide additional details about the cause of the error.
          items:
            type: string
          type: array
        errorCode:
          description: The numeric ID for the error.
          type: integer
        errors:
          description: Any additional errors that occurred.
          items:
            $ref: "#/components/schemas/error2"
          type: array
        httpStatusCode:
          description: The HTTP status code for the error.
          type: integer
        id:
          description: The string ID for the error.
          type: string
        links:
          description: The links that apply to the error.
          items:
            $ref: "#/components/schemas/link"
          type: array
        message:
          description: The message for the error.
          type: string
        remediation:
          description: A message that describes how to resolve the error.
          type: string
        version:
          description: The version number of the error representation. This representation is version 2.
          type: integer
    baseCollection2:
      title: Base Collection
      description: A collection of objects.
      properties:
        accept:
          description: A space-delimited list of media types from which an `Accept` header may be constructed.
          type: string
        count:
          description: If populated indicates the number of items in the collection.
          format: int64
          type: integer
        limit:
          description: The number of items that were requested for the collection.
          type: integer
        links:
          description: The links that apply to the collection.
          items:
            $ref: "#/components/schemas/link"
          type: array
        name:
          description: The name of the collection.
          type: string
        start:
          description: The zero-based index of the first item in the collection.
          format: int64
          type: integer
        version:
          description: The version number of the collection representation. This representation is version 2.
          type: integer
    link:
      title: Link
      description: A resource link.
      properties:
        href:
          description: The URL for the link.
          type: string
        itemType:
          description: If this is a link to a container, `itemType` is the media type or link type for the items in the container.
          type: string
        method:
          description: The HTTP method for the link.
          type: string
        rel:
          description: The relationship of the link to the resource.
          type: string
        responseItemType:
          description: The media type or link type of the items in the response body for a `PUT`, `POST`, or `PATCH` operation.
          type: string
        responseType:
          description: The media type or link type of the response body for a `PUT`, `POST`, or `PATCH` operation.
          type: string
        title:
          description: The title for the link.
          type: string
        type:
          description: The media type or link type for the link.
          type: string
        uri:
          description: The relative URI for the link.
          type: string
  examples:
    404NotFoundJob:
      description: The specified resource was not found.
      summary: Not found
      value:
        details:
          - "path: /relationships/jobs/c48fff9b-2802-451e-82ea-00526952dcee"
          - "correlator: a78e068d-bef1-405c-8984-d346e2881520"
        errorCode: 10600
        httpStatusCode: 404
        message: Not Found
        version: 2
    404NotFoundRef:
      description: The specified resource was not found.
      summary: Not found
      value:
        details:
          - "path: /relationships/references/c48fff9b-2802-451e-82ea-00526952dcee"
          - "correlator: a78e068d-bef1-405c-8984-d346e2881520"
        errorCode: 10600
        httpStatusCode: 404
        message: Not Found
        version: 2
    404NotFoundRel:
      description: The specified resource was not found.
      summary: Not found
      value:
        details:
          - "path: /relationships/relationships/c48fff9b-2802-451e-82ea-00526952dcee"
          - "correlator: a78e068d-bef1-405c-8984-d346e2881520"
        errorCode: 10600
        httpStatusCode: 404
        message: Not Found
        version: 2
    404NotFoundType:
      description: The specified resource was not found.
      summary: Not found
      value:
        details:
          - "path: /relationships/type/Symbol"
          - "correlator: a78e068d-bef1-405c-8984-d346e2881520"
        errorCode: 10600
        httpStatusCode: 404
        message: Not Found
        version: 2
    409ConflictResponse:
      description: The requested object already exists.
      summary: Conflict
      value:
        details:
          - A reference already exists for the resource URI "/reports/reports/7339e5a3-3857-4be0-a7c6-9e0cb214888cd".
          - "path: /relationships/references"
          - "correlator: c5290209-eaa2-45ca-af79-415a3390d999"
        errorCode: 10603
        httpStatusCode: 409
        message: Conflict
        version: 2
    409ConflictResponseRel:
      description: The requested object already exists.
      summary: Conflict
      value:
        details:
          - A relationship already exists with the specified endpoints: c40c242b-952a-4750-838a-d7559192b558.
          - "path: /relationships/relationships"
          - "correlator: c5290209-eaa2-45ca-af79-415a3390d999"
        errorCode: 10603
        httpStatusCode: 409
        message: Conflict
        version: 2
    412PreconditionFailedRef:
      description: Precondition failed. The target has changed since it was last fetched.
      summary: Precondition failed
      value:
        details:
          - "path: /relationships/references/c48fff9b-2802-451e-82ea-00526952dced"
          - "correlator: a1cb6f8c-628b-4d25-ba3f-7a0407a58e5b"
        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/\"1669132124099132000\"\" and \"W/\"1669138300986000000\"\", respectively.)
        version: 2
    412PreconditionFailedRel:
      description: Precondition failed. The target has changed since it was last fetched.
      summary: Precondition failed
      value:
        details:
          - "path: /relationships/relationships/c48fff9b-2802-451e-82ea-00526952dced"
          - "correlator: a1cb6f8c-628b-4d25-ba3f-7a0407a58e5b"
        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/\"1669132124099132000\"\" and \"W/\"1669138300986000000\"\", respectively.)
        version: 2
    428PreconditionRequiredRef:
      description: Precondition required. Include an If-Match header with the request.
      summary: Precondition required
      value:
        details:
          - "path: /relationships/references/c48fff9b-2802-451e-82ea-00526952dced"
          - "correlator: a1cb6f8c-628b-4d25-ba3f-7a0407a58e5b"
        httpStatusCode: 428
        message: The header field \"If-Match\" is missing or does not have a value.
        version: 2
    428PreconditionRequiredRel:
      description: Precondition required. Include an If-Match header with the request.
      summary: Precondition required
      value:
        details:
          - "path: /relationships/relationships/c48fff9b-2802-451e-82ea-00526952dced"
          - "correlator: a1cb6f8c-628b-4d25-ba3f-7a0407a58e5b"
        httpStatusCode: 428
        message: The header field \"If-Match\" is missing or does not have a value.
        version: 2
    BadRequestGetRef:
      description: Bad request (the request is not well-formed).
      summary: Bad request
      value:
        details:
          - The filter 'contains(id,'6293390f-8f76-4620-afc1-29a94d09fb83'' is not valid.
          - "path: /relationships/references"
          - "correlator: cfd05e5d-1b05-49a2-b9af-460c86ecc993"
        errorCode: 1104
        httpStatusCode: 400
        message: Bad Request
        version: 2
    BadRequestGetRel:
      description: Bad request (the request is not well-formed).
      summary: Bad request
      value:
        details:
          - The filter 'contains(id,'6293390f-8f76-4620-afc1-29a94d09fb83'' is not valid.
          - "path: /relationships/relationships"
          - "correlator: cfd05e5d-1b05-49a2-b9af-460c86ecc993"
        errorCode: 1104
        httpStatusCode: 400
        message: Bad Request
        version: 2
    BadRequestGetType:
      description: Bad request (the request is not well-formed).
      summary: Bad request
      value:
        details:
          - The filter 'contains(id,'6293390f-8f76-4620-afc1-29a94d09fb83'' is not valid.
          - "path: /relationships/types"
          - "correlator: cfd05e5d-1b05-49a2-b9af-460c86ecc993"
        errorCode: 1104
        httpStatusCode: 400
        message: Bad Request
        version: 2
    BadRequestPatch:
      description: Bad request (the request is not well-formed).
      summary: Bad request
      value:
        details:
          - No resource exists at the specified path.  /001bc483-2dc4-4707-860d-5107abd3e460
          - "path: /relationships/relationships"
          - "correlator: 300efa3c-68ea-4e1b-a0c6-a6310e7bf6a2"
        errorCode: 10600
        httpStatusCode: 400
        message: Bad Request
        version: 2
    BadRequestPost:
      description: Bad request (the request is not well-formed).
      summary: Bad request
      value:
        details:
          - The required field "resourceUri" is empty. Specify a valid value.
          - "path: /relationships/references"
          - "correlator: 449b1a7e-6780-445b-9ae6-23070189dd3a"
        httpStatusCode: 400
        message: Bad Request
        version: 2
    BadRequestPostRel:
      description: Bad request (the request is not well-formed).
      summary: Bad request
      value:
        details:
          - Updates are not allowed for this relationship.
          - "path: /relationships/relationships"
          - "correlator: 449b1a7e-6780-445b-9ae6-23070189dd3a"
        httpStatusCode: 400
        message: Bad Request
        version: 2
    createJobResponse:
      summary: Create load job response
      description: Create load job response.
      value:
        id: 04dc4509-f68f-4e70-903c-63b8b2fa0213
        state: running
        creationTimeStamp: 2022-11-23T17:12:15.792773Z
        endTimeStamp: 0001-01-01T00:00:00Z
        version: 1
        links:
          - method: GET
            rel: self
            href: /relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213
            uri: /relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213
            type: application/vnd.sas.relationship.job.load
          - method: GET
            rel: state
            href: /relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213/state
            uri: /relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213/state
            type: text/plain
          - method: DELETE
            rel: delete
            href: /relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213
            uri: /relationships/jobs/04dc4509-f68f-4e70-903c-63b8b2fa0213
    relationshipsPostResponse:
      summary: Relationships response
      description: Response contains created and updated representations of the request.
      value:
        version: 2
        accept: application/vnd.sas.relationship+json application/vnd.sas.error
        count: 3
        start: 0
        limit: 3
        name: items
        items:
          - version: 2
            httpStatusCode: 409
            errorCode: 10610
            message: Conflict
            details:
              - "A relationship already exists with the specified endpoints: c40c242b-952a-4750-838a-d7559192b558"
          - creationTimeStamp: 2022-11-19T02:19:16.844000Z
            createdBy: sasuser
            modifiedTimeStamp: 2022-11-19T02:19:16.844000Z
            modifiedBy: sasuser
            id: c40c242b-952a-4750-838a-d7559192b558
            links:
              - method: GET
                rel: self
                href: /relationships/relationships/c40c242b-952a-4750-838a-d7559192b558
                uri: /relationships/relationships/c40c242b-952a-4750-838a-d7559192b558
                type: application/vnd.sas.relationship
              - method: DELETE
                rel: delete
                href: /relationships/relationships/c40c242b-952a-4750-838a-d7559192b558
                uri: /relationships/relationships/c40c242b-952a-4750-838a-d7559192b558
              - method: PUT
                rel: update
                href: /relationships/relationships/c40c242b-952a-4750-838a-d7559192b558
                uri: /relationships/relationships/c40c242b-952a-4750-838a-d7559192b558
                type: application/vnd.sas.relationship
                responseType: application/vnd.sas.relationship
              - method: GET
                rel: up
                href: /relationships/relationships
                uri: /relationships/relationships
                type: application/vnd.sas.collection
                itemType: application/vnd.sas.relationship
            resourceUri: /containers/containerUri
            type: Contains
            relatedResourceUri: /items/item1Uri
            referenceId: 228dff66-0b62-4217-b686-a62ef881228a
            relatedReferenceId: cdca263d-c7b3-494c-9868-191d81699414
            version: 1
          - creationTimeStamp: 2022-11-19T02:19:16.907000Z
            createdBy: sasuser
            modifiedTimeStamp: 2022-11-19T02:19:16.907000Z
            modifiedBy: sasuser
            id: ce6a0656-c437-4ed0-9418-5a866908b53f
            links:
              - method: GET
                rel: self
                href: /relationships/relationships/ce6a0656-c437-4ed0-9418-5a866908b53f
                uri: /relationships/relationships/ce6a0656-c437-4ed0-9418-5a866908b53f
                type: application/vnd.sas.relationship
              - method: DELETE
                rel: delete
                href: /relationships/relationships/ce6a0656-c437-4ed0-9418-5a866908b53f
                uri: /relationships/relationships/ce6a0656-c437-4ed0-9418-5a866908b53f
              - method: PUT
                rel: update
                href: /relationships/relationships/ce6a0656-c437-4ed0-9418-5a866908b53f
                uri: /relationships/relationships/ce6a0656-c437-4ed0-9418-5a866908b53f
                type: application/vnd.sas.relationship
                responseType: application/vnd.sas.relationship
              - method: GET
                rel: up
                href: /relationships/relationships
                uri: /relationships/relationships
                type: application/vnd.sas.collection
                itemType: application/vnd.sas.relationship
            resourceUri: /containers/containerUri
            type: Contains
            relatedResourceUri: /items/item2Uri
            referenceId: 228dff66-0b62-4217-b686-a62ef881228a
            relatedReferenceId: 89d61f3d-f94b-47ca-9fdd-6bc1eb63c074
            version: 1
        links:
          - method: GET
            rel: self
            href: /relationships/relationships?start=0&limit=10&sortBy=id
            uri: /relationships/relationships?start=0&limit=10&sortBy=id
            type: application/vnd.sas.collection
            itemType: application/vnd.sas.relationship+json
          - method: GET
            rel: collection
            href: /relationships/relationships
            uri: /relationships/relationships
            type: application/vnd.sas.collection
            itemType: application/vnd.sas.relationship+json
          - method: POST
            rel: create
            href: /relationships/relationships
            uri: /relationships/relationships
            type: application/vnd.sas.relationship
            responseType: application/vnd.sas.relationship
    createReferencesResponse:
      summary: Create references
      description: Create references response.
      value:
        version: 2
        accept: application/vnd.sas.relationship.reference application/vnd.sas.error
        count: 2
        start: 0
        limit: 2
        name: items
        items:
          - version: 2
            httpStatusCode: 409
            errorCode: 10603
            message: Conflict
            details:
              - A reference already exists for the resource URI "/reports/reports/7339e5a3-3857-4be0-a7c6-9e0cb214888cd".
          - creationTimeStamp: 2022-11-23T16:58:18.374000Z
            createdBy: etladm
            modifiedTimeStamp: 2022-11-23T16:58:18.374000Z
            modifiedBy: etladm
            id: 1cdf57c0-cd68-44a0-8cb6-f66ac767851a
            links:
              - method: GET
                rel: self
                href: /relationships/references/1cdf57c0-cd68-44a0-8cb6-f66ac767851a
                uri: /relationships/references/1cdf57c0-cd68-44a0-8cb6-f66ac767851a
                type: application/vnd.sas.relationship.reference
              - method: GET
                rel: up
                href: /relationships/references
                uri: /relationships/references
                type: application/vnd.sas.collection
                itemType: application/vnd.sas.relationship.reference
              - method: PUT
                rel: update
                href: /relationships/references/1cdf57c0-cd68-44a0-8cb6-f66ac767851a
                uri: /relationships/references/1cdf57c0-cd68-44a0-8cb6-f66ac767851a
                type: application/vnd.sas.relationship.reference
                responseType: application/vnd.sas.relationship.reference
              - method: DELETE
                rel: delete
                href: /relationships/references/1cdf57c0-cd68-44a0-8cb6-f66ac767851a
                uri: /relationships/references/1cdf57c0-cd68-44a0-8cb6-f66ac767851a
              - method: GET
                rel: getRelationships
                href: /relationships/relationships?referenceId=1cdf57c0-cd68-44a0-8cb6-f66ac767851a
                uri: /relationships/relationships?referenceId=1cdf57c0-cd68-44a0-8cb6-f66ac767851a
                type: application/vnd.sas.collection
                responseType: application/vnd.sas.collection
                itemType: application/vnd.sas.relationship
            name: Quarter 3 results
            resourceUri: /reports/reports/85a5b46f-f9ca-4d69-8f6b-fc53bf482029
            contentType: report
            source: SAS
            analysisTimeStamp: 2022-11-23T16:58:18.374000Z
            version: 1
        links:
          - method: GET
            rel: self
            href: /relationships/references?start=0&limit=10&sortBy=name
            uri: /relationships/references?start=0&limit=10&sortBy=name
            type: application/vnd.sas.collection
            itemType: application/vnd.sas.relationship.reference application/vnd.sas.error
          - method: GET
            rel: collection
            href: /relationships/references
            uri: /relationships/references
            type: application/vnd.sas.collection
            itemType: application/vnd.sas.relationship.reference application/vnd.sas.error
          - method: POST
            rel: create
            href: /relationships/references
            uri: /relationships/references
            type: application/vnd.sas.relationship.reference
            responseType: application/vnd.sas.relationship.reference
    relationshipsPostQueryRequest:
      summary: Relationships query request
      description: Query relationships with a relationship query.
      value:
        referenceId:
          - 228dff66-0b62-4217-b686-a62ef881228a
        depth: 2
        direction: both
        filter: eq(type,'Associated')
    relationshipsTypesResponse:
      summary: Relationships types response
      description: The relationship role types available on this system.
      value:
        version: 2
        accept: application/vnd.sas.relationship.type
        count: 7
        start: 0
        limit: 10
        name: items
        items:
          - version: 1
            name: Dependent
            description: A dependency exists when an object cannot function or be defined without the related object. For example, this "job" object must have its source "table" object.
            label: Is dependent on
            directional: true
            partnerLabel: Impacts
            partnerDescription: This object impacts the other object.
            links:
              - method: GET
                rel: self
                href: /relationships/types/Dependent
                uri: /relationships/types/Dependent
                type: application/vnd.sas.relationship.type
              - method: GET
                rel: up
                href: /relationships/types
                uri: /relationships/types
                type: application/vnd.sas.relationship.type
          - version: 1
            name: Contains
            description: An application that models the structure of a top-level entity. A parent object contains another object when the contained object does not make sense or exist without the parent object. For example, a "table" object contains a "column" object.
            label: Contains
            directional: true
            partnerLabel: Is contained by
            partnerDescription: This object is contained by another object.
            links:
              - method: GET
                rel: self
                href: /relationships/types/Contains
                uri: /relationships/types/Contains
                type: application/vnd.sas.relationship.type
              - method: GET
                rel: up
                href: /relationships/types
                uri: /relationships/types
                type: application/vnd.sas.relationship.type
          - version: 1
            name: Parent
            description: This relationship describes the parent in a parent-child hierarchy.
            label: Is parent of
            directional: true
            partnerLabel: Is child of
            partnerDescription: This relationship describes the child in a parent-child hierarchy.
            links:
              - method: GET
                rel: self
                href: /relationships/types/Parent
                uri: /relationships/types/Parent
                type: application/vnd.sas.relationship.type
              - method: GET
                rel: up
                href: /relationships/types
                uri: /relationships/types
                type: application/vnd.sas.relationship.type
          - version: 1
            name: Version
            description: This relationship relates an object to a version of this object.
            label: Has a version of
            directional: true
            partnerLabel: Is version of
            partnerDescription: This object is a version of the other.
            links:
              - method: GET
                rel: self
                href: /relationships/types/Version
                uri: /relationships/types/Version
                type: application/vnd.sas.relationship.type
              - method: GET
                rel: up
                href: /relationships/types
                uri: /relationships/types
                type: application/vnd.sas.relationship.type
          - version: 1
            name: Associated
            description: This relationship describes a general association between two objects.
            label: Is associated with
            directional: false
            links:
              - method: GET
                rel: self
                href: /relationships/types/Associated
                uri: /relationships/types/Associated
                type: application/vnd.sas.relationship.type
              - method: GET
                rel: up
                href: /relationships/types
                uri: /relationships/types
                type: application/vnd.sas.relationship.type
          - version: 1
            name: Equivalent
            description: This relationship equates two objects that represent the same entity.
            label: Is equivalent to
            directional: false
            links:
              - method: GET
                rel: self
                href: /relationships/types/Equivalent
                uri: /relationships/types/Equivalent
                type: application/vnd.sas.relationship.type
              - method: GET
                rel: up
                href: /relationships/types
                uri: /relationships/types
                type: application/vnd.sas.relationship.type
          - version: 1
            name: Synonymous
            description: This relationship equates two objects that have the same connotations, implications, or reference.
            label: Is synonymous with
            directional: false
            links:
              - method: GET
                rel: self
                href: /relationships/types/Synonymous
                uri: /relationships/types/Synonymous
                type: application/vnd.sas.relationship.type
              - method: GET
                rel: up
                href: /relationships/types
                uri: /relationships/types
                type: application/vnd.sas.relationship.type
        links:
          - method: GET
            rel: self
            href: /relationships/types?start=0&limit=10&sortBy=name
            uri: /relationships/types?start=0&limit=10&sortBy=name
            type: application/vnd.sas.collection
            itemType: application/vnd.sas.relationship.type
          - method: GET
            rel: collection
            href: /relationships/types
            uri: /relationships/types
            type: application/vnd.sas.collection
            itemType: application/vnd.sas.relationship.type
          - method: GET
            rel: up
            href: /relationships
            uri: /relationships
            type: application/vnd.sas.api
    getReferencesResponse:
      summary: Get references response
      description: The collection of references requested.
      value:
        version: 2
        accept: application/vnd.sas.relationship.reference
        count: 1
        start: 0
        limit: 2
        name: items
        items:
          - creationTimeStamp: 2022-11-22T16:43:41.586000Z
            modifiedTimeStamp: 2022-11-22T16:43:41.586000Z
            id: 6293390f-8f76-4620-afc1-29a94d09fb83
            links:
              - method: GET
                rel: self
                href: /relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83
                uri: /relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83
                type: application/vnd.sas.relationship.reference
              - method: GET
                rel: up
                href: /relationships/references
                uri: /relationships/references
                type: application/vnd.sas.collection
                itemType: application/vnd.sas.relationship.reference
              - method: PUT
                rel: update
                href: /relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83
                uri: /relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83
                type: application/vnd.sas.relationship.reference
                responseType: application/vnd.sas.relationship.reference
              - method: DELETE
                rel: delete
                href: /relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83
                uri: /relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83
              - method: GET
                rel: getRelationships
                href: /relationships/relationships?referenceId=6293390f-8f76-4620-afc1-29a94d09fb83
                uri: /relationships/relationships?referenceId=6293390f-8f76-4620-afc1-29a94d09fb83
                type: application/vnd.sas.collection
                responseType: application/vnd.sas.collection
                itemType: application/vnd.sas.relationship
            name: COSTCHANGE
            resourceUri: /dataTables/dataSources/cas~fs~cas-shared-default~fs~Samples/tables/COSTCHANGE
            contentType: casTable
            source: SAS
            analysisTimeStamp: 2022-11-22T16:43:42.543000Z
            version: 1
        links:
          - method: GET
            rel: self
            href: /relationships/references?start=0&limit=2&filter=eq%28name%2C%27COSTCHANGE%27%29&sortBy=name
            uri: /relationships/references?start=0&limit=2&filter=eq%28name%2C%27COSTCHANGE%27%29&sortBy=name
            type: application/vnd.sas.collection
            itemType: application/vnd.sas.relationship.reference
          - method: GET
            rel: collection
            href: /relationships/references
            uri: /relationships/references
            type: application/vnd.sas.collection
            itemType: application/vnd.sas.relationship.reference
          - method: GET
            rel: up
            href: /relationships
            uri: /relationships
            type: application/vnd.sas.api
          - method: POST
            rel: create
            href: /relationships/references
            uri: /relationships/references
            type: application/vnd.sas.relationship.reference
            responseType: application/vnd.sas.relationship.reference
    createReferenceRequest:
      summary: Create a reference
      description: The request body to create a single reference.
      value:
        resourceUri: /reports/reports/7339e5a3-3857-4be0-a7c6-9e0cb214888cd
        contentType: report
        name: Quarter 1 results
    getReferencesWithPostRequest:
      summary: Get references request
      description: The filter for the references request.
      value: contains(name,'COSTCHANGE')
    relationshipResponse:
      summary: Relationship response
      description: A relationship.
      value:
        creationTimeStamp: 2022-11-17T09:25:04.033000Z
        modifiedTimeStamp: 2022-11-17T09:25:04.033000Z
        id: 001bc483-2dc4-4707-860d-5107abd3e460
        links:
          - method: GET
            rel: self
            href: /relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460
            uri: /relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460
            type: application/vnd.sas.relationship
          - method: DELETE
            rel: delete
            href: /relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460
            uri: /relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460
          - method: PUT
            rel: update
            href: /relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460
            uri: /relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460
            type: application/vnd.sas.relationship
            responseType: application/vnd.sas.relationship
          - method: GET
            rel: up
            href: /relationships/relationships
            uri: /relationships/relationships
            type: application/vnd.sas.collection
            itemType: application/vnd.sas.relationship
        resourceUri: /casManagement/servers/cas-shared-default/caslibs/COMMON_PROD/tables/CONTACTS_ONLY
        type: Equivalent
        relatedResourceUri: /dataTables/dataSources/cas~fs~cas-shared-default~fs~COMMON_PROD/tables/CONTACTS_ONLY
        referenceId: b5fbc8bf-57c2-4166-ae7c-bbfd2fc226eb
        relatedReferenceId: c06dfdc9-1990-4df0-a7ec-ec517b7d9847
        version: 1
    updateReferenceRequest:
      summary: Update a reference
      description: The request body to update a single reference.
      value:
        id: bc35f42f-712e-4a2b-bf77-aff28e8c0aeb
        resourceUri: /reports/reports/7339e5a3-3857-4be0-a7c6-9e0cb214888cd
        contentType: report
        name: Quarter 1 results
    relationshipsCollectionResponse:
      summary: Relationships collection response
      description: A collection of relationships.
      value:
        version: 2
        accept: application/vnd.sas.relationship
        count: 3021
        start: 0
        limit: 2
        name: items
        items:
          - creationTimeStamp: 2022-11-18T20:48:29.987000Z
            createdBy: sasuser
            modifiedTimeStamp: 2022-11-18T20:48:29.987000Z
            modifiedBy: sasuser
            id: 001a6075-617d-40a0-aae0-96e9db639a26
            links:
              - method: GET
                rel: self
                href: /relationships/relationships/001a6075-617d-40a0-aae0-96e9db639a26
                uri: /relationships/relationships/001a6075-617d-40a0-aae0-96e9db639a26
                type: application/vnd.sas.relationship
              - method: DELETE
                rel: delete
                href: /relationships/relationships/001a6075-617d-40a0-aae0-96e9db639a26
                uri: /relationships/relationships/001a6075-617d-40a0-aae0-96e9db639a26
              - method: PUT
                rel: update
                href: /relationships/relationships/001a6075-617d-40a0-aae0-96e9db639a26
                uri: /relationships/relationships/001a6075-617d-40a0-aae0-96e9db639a26
                type: application/vnd.sas.relationship
                responseType: application/vnd.sas.relationship
              - method: GET
                rel: up
                href: /relationships/relationships
                uri: /relationships/relationships
                type: application/vnd.sas.collection
                itemType: application/vnd.sas.relationship
            resourceUri: /dataTables/dataSources/Compute~fs~99e703fb-eeaa-43cb-ab9a-21f65b83a0e8~fs~DEMO_TGT/tables/NY_CLUSTERS/columns/LATLONG
            type: Contains
            relatedResourceUri: /catalog/instances/9dfc07c9-88a1-43dc-a3d9-19a4cdba3fc7
            referenceId: f28417bd-5c5b-864d-82b3-923cd1671741
            relatedReferenceId: 9dfc07c9-88a1-43dc-a3d9-19a4cdba3fc7
            version: 1
          - creationTimeStamp: 2022-11-17T09:25:04.033000Z
            createdBy: sasuser
            modifiedTimeStamp: 2022-11-17T09:25:04.033000Z
            modifiedBy: sasuser
            id: 001bc483-2dc4-4707-860d-5107abd3e460
            links:
              - method: GET
                rel: self
                href: /relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460
                uri: /relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460
                type: application/vnd.sas.relationship
              - method: DELETE
                rel: delete
                href: /relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460
                uri: /relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460
              - method: PUT
                rel: update
                href: /relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460
                uri: /relationships/relationships/001bc483-2dc4-4707-860d-5107abd3e460
                type: application/vnd.sas.relationship
                responseType: application/vnd.sas.relationship
              - method: GET
                rel: up
                href: /relationships/relationships
                uri: /relationships/relationships
                type: application/vnd.sas.collection
                itemType: application/vnd.sas.relationship
            resourceUri: /casManagement/servers/cas-shared-default/caslibs/COMMON_PROD/tables/CONTACTS_ONLY
            type: Equivalent
            relatedResourceUri: /dataTables/dataSources/cas~fs~cas-shared-default~fs~COMMON_PROD/tables/CONTACTS_ONLY
            referenceId: b5fbc8bf-57c2-4166-ae7c-bbfd2fc226eb
            relatedReferenceId: c06dfdc9-1990-4df0-a7ec-ec517b7d9847
            version: 1
        links:
          - method: GET
            rel: self
            href: /relationships/relationships?start=0&limit=2&sortBy=id
            uri: /relationships/relationships?start=0&limit=2&sortBy=id
            type: application/vnd.sas.collection
            itemType: application/vnd.sas.relationship
          - method: GET
            rel: collection
            href: /relationships/relationships
            uri: /relationships/relationships
            type: application/vnd.sas.collection
            itemType: application/vnd.sas.relationship
          - method: GET
            rel: up
            href: /relationships
            uri: /relationships
            type: application/vnd.sas.api
          - method: POST
            rel: create
            href: /relationships/relationships
            uri: /relationships/relationships
            type: application/vnd.sas.relationship
            responseType: application/vnd.sas.relationship
          - method: GET
            rel: next
            href: /relationships/relationships?limit=2&sortBy=id&start=2
            uri: /relationships/relationships?limit=2&sortBy=id&start=2
            type: application/vnd.sas.collection
            itemType: application/vnd.sas.relationship
    createReferencesRequest:
      summary: Create references request
      description: Create references resquest.
      value:
        items:
          - resourceUri: /reports/reports/7339e5a3-3857-4be0-a7c6-9e0cb214888cd
            contentType: report
            name: Quarter 1 results
          - resourceUri: /reports/reports/85a5b46f-f9ca-4d69-8f6b-fc53bf482029
            contentType: report
            name: Quarter 3 results
    updateReferenceResponse:
      summary: Update a reference response
      description: Update a single reference response.
      value:
        creationTimeStamp: 2022-11-22T19:05:44.122000Z
        createdBy: sasuser
        modifiedTimeStamp: 2022-11-22T19:05:44.122000Z
        modifiedBy: sasuser
        id: bc35f42f-712e-4a2b-bf77-aff28e8c0aeb
        links:
          - method: GET
            rel: self
            href: /relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb
            uri: /relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb
            type: application/vnd.sas.relationship.reference
          - method: GET
            rel: up
            href: /relationships/references
            uri: /relationships/references
            type: application/vnd.sas.collection
            itemType: application/vnd.sas.relationship.reference
          - method: PUT
            rel: update
            href: /relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb
            uri: /relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb
            type: application/vnd.sas.relationship.reference
            responseType: application/vnd.sas.relationship.reference
          - method: DELETE
            rel: delete
            href: /relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb
            uri: /relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb
          - method: GET
            rel: getRelationships
            href: /relationships/relationships?referenceId=bc35f42f-712e-4a2b-bf77-aff28e8c0aeb
            uri: /relationships/relationships?referenceId=bc35f42f-712e-4a2b-bf77-aff28e8c0aeb
            type: application/vnd.sas.collection
            responseType: application/vnd.sas.collection
            itemType: application/vnd.sas.relationship
        name: Quarter 1 results
        resourceUri: /reports/reports/7339e5a3-3857-4be0-a7c6-9e0cb214888cd
        contentType: report
        source: SAS
        analysisTimeStamp: 2022-11-22T19:05:44.122000Z
        version: 1
    relationshipsPostRequest:
      summary: Relationships collection request
      description: Creates a collection of relationships.
      value:
        items:
          - resourceUri: /containers/containerUri
            relatedResourceUri: /terms/term1Uri
            type: Associated
          - resourceUri: /containers/containerUri
            relatedResourceUri: /items/item1Uri
            type: Contains
          - resourceUri: /containers/containerUri
            relatedResourceUri: /items/item2Uri
            type: Contains
    rootResponse:
      summary: Root API response
      description: The root response consists of a collection of links that can be used to navigate the Relationships service API.
      value:
        version: 1
        links:
          - method: GET
            rel: types
            href: /relationships/types
            uri: /relationships/types
            type: application/vnd.sas.collection
            itemType: application/vnd.sas.relationship.type
          - method: GET
            rel: references
            href: /relationships/references
            uri: /relationships/references
            type: application/vnd.sas.collection
            itemType: application/vnd.sas.relationship.reference
          - method: POST
            rel: createReference
            href: /relationships/references
            uri: /relationships/references
            type: application/vnd.sas.relationship.reference
            responseType: application/vnd.sas.relationship.reference
          - method: POST
            rel: createReferences
            href: /relationships/references
            uri: /relationships/references
            type: application/vnd.sas.collection
            responseType: application/vnd.sas.collection
            itemType: application/vnd.sas.relationship.reference
            responseItemType: application/vnd.sas.relationship.reference
          - method: GET
            rel: relationships
            href: /relationships/relationships
            uri: /relationships/relationships
            type: application/vnd.sas.collection
            itemType: application/vnd.sas.relationship
          - method: POST
            rel: createRelationship
            href: /relationships/relationships
            uri: /relationships/relationships
            type: application/vnd.sas.relationship
            responseType: application/vnd.sas.relationship
          - method: POST
            rel: createRelationships
            href: /relationships/relationships
            uri: /relationships/relationships
            type: application/vnd.sas.collection
            responseType: application/vnd.sas.collection
            itemType: application/vnd.sas.relationship
            responseItemType: application/vnd.sas.relationship
          - method: POST
            rel: startLoad
            href: /relationships/jobs
            uri: /relationships/jobs
            type: application/vnd.sas.relationship.job.load
            responseType: application/vnd.sas.relationship.job.load
    createRelationshipRequest:
      summary: Relationship request
      description: Create a relationship between two references.
      value:
        version: 1
        resourceUri: /containers/containerUri
        relatedResourceUri: /items/item1Uri
        type: Contains
    patch:
      summary: Patch request
      description: Delete the requested items.
      value:
        - op: remove
          path: /001bc483-2dc4-4707-860d-5107abd3e460
    createReferenceResponse:
      summary: Create a reference response
      description: Create a single reference response.
      value:
        creationTimeStamp: 2022-11-22T19:05:44.122000Z
        createdBy: sasuser
        modifiedTimeStamp: 2022-11-22T19:05:44.122000Z
        modifiedBy: sasuser
        id: bc35f42f-712e-4a2b-bf77-aff28e8c0aeb
        links:
          - method: GET
            rel: self
            href: /relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb
            uri: /relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb
            type: application/vnd.sas.relationship.reference
          - method: GET
            rel: up
            href: /relationships/references
            uri: /relationships/references
            type: application/vnd.sas.collection
            itemType: application/vnd.sas.relationship.reference
          - method: PUT
            rel: update
            href: /relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb
            uri: /relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb
            type: application/vnd.sas.relationship.reference
            responseType: application/vnd.sas.relationship.reference
          - method: DELETE
            rel: delete
            href: /relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb
            uri: /relationships/references/bc35f42f-712e-4a2b-bf77-aff28e8c0aeb
          - method: GET
            rel: getRelationships
            href: /relationships/relationships?referenceId=bc35f42f-712e-4a2b-bf77-aff28e8c0aeb
            uri: /relationships/relationships?referenceId=bc35f42f-712e-4a2b-bf77-aff28e8c0aeb
            type: application/vnd.sas.collection
            responseType: application/vnd.sas.collection
            itemType: application/vnd.sas.relationship
        name: Quarter 1 results
        resourceUri: /reports/reports/7339e5a3-3857-4be0-a7c6-9e0cb214888cd
        contentType: report
        source: SAS
        analysisTimeStamp: 2022-11-22T19:05:44.122000Z
        version: 1
    relationshipsTypeResponse:
      summary: Relationships type response
      description: The relationship type specified by the URI
      value:
        version: 1
        name: Dependent
        description: A dependency exists when an object cannot function or be defined without the related object. For example, this "job" object must have its source "table" object.
        label: Is dependent on
        directional: true
        partnerLabel: Impacts
        partnerDescription: This object impacts the other object.
        links:
          - method: GET
            rel: self
            href: /relationships/types/Dependent
            uri: /relationships/types/Dependent
            type: application/vnd.sas.relationship.type
          - method: GET
            rel: up
            href: /relationships/types
            uri: /relationships/types
            type: application/vnd.sas.relationship.type
    updateRelationshipRequest:
      summary: Relationship request
      description: Update a relationship between two references.
      value:
        version: 1
        id: 39b040ad-6866-45f8-b49f-9829ac3d6c2c
        resourceUri: /casManagement/servers/cas-shared-default/caslibs/COMMON_PROD/tables/CONTACTS_ONLY
        relatedResourceUri: /dataTables/dataSources/cas~fs~cas-shared-default~fs~COMMON_PROD/tables/CONTACTS_ONLY
        type: Equivalent
    relationshipsPostQueryResponse:
      summary: Relationships query response
      description: Relationships query response.
      value:
        version: 2
        accept: application/vnd.sas.relationship
        count: 1
        start: 0
        limit: 10
        name: items
        items:
          - creationTimeStamp: 2022-11-19T02:55:55.675000Z
            createdBy: etladm
            modifiedTimeStamp: 2022-11-19T02:55:55.675000Z
            modifiedBy: etladm
            id: 3f72e77b-1966-487e-8ada-d89c69c92807
            links:
              - method: GET
                rel: self
                href: /relationships/relationships/3f72e77b-1966-487e-8ada-d89c69c92807
                uri: /relationships/relationships/3f72e77b-1966-487e-8ada-d89c69c92807
                type: application/vnd.sas.relationship
              - method: DELETE
                rel: delete
                href: /relationships/relationships/3f72e77b-1966-487e-8ada-d89c69c92807
                uri: /relationships/relationships/3f72e77b-1966-487e-8ada-d89c69c92807
              - method: PUT
                rel: update
                href: /relationships/relationships/3f72e77b-1966-487e-8ada-d89c69c92807
                uri: /relationships/relationships/3f72e77b-1966-487e-8ada-d89c69c92807
                type: application/vnd.sas.relationship
                responseType: application/vnd.sas.relationship
              - method: GET
                rel: up
                href: /relationships/relationships
                uri: /relationships/relationships
                type: application/vnd.sas.collection
                itemType: application/vnd.sas.relationship
            resourceUri: /containers/containerUri
            type: Associated
            relatedResourceUri: /terms/term1Uri
            referenceId: 228dff66-0b62-4217-b686-a62ef881228a
            relatedReferenceId: fdbdfe27-75f6-4623-96bf-fc744258c38a
            version: 1
        links:
          - method: GET
            rel: self
            href: /relationships/relationships?start=0&limit=10&sortBy=id&depth=2&direction=both
            uri: /relationships/relationships?start=0&limit=10&sortBy=id&depth=2&direction=both
            type: application/vnd.sas.collection
            itemType: application/vnd.sas.relationship
          - method: GET
            rel: collection
            href: /relationships/relationships
            uri: /relationships/relationships
            type: application/vnd.sas.collection
            itemType: application/vnd.sas.relationship
          - method: GET
            rel: up
            href: /relationships
            uri: /relationships
            type: application/vnd.sas.api
          - method: POST
            rel: create
            href: /relationships/relationships
            uri: /relationships/relationships
            type: application/vnd.sas.relationship
            responseType: application/vnd.sas.relationship
    getReferenceByIdResponse:
      summary: Get reference by ID response
      description: The reference requested.
      value:
        creationTimeStamp: 2022-11-22T16:43:41.586000Z
        modifiedTimeStamp: 2022-11-22T16:43:41.586000Z
        id: 6293390f-8f76-4620-afc1-29a94d09fb83
        links:
          - method: GET
            rel: self
            href: /relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83
            uri: /relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83
            type: application/vnd.sas.relationship.reference
          - method: GET
            rel: up
            href: /relationships/references
            uri: /relationships/references
            type: application/vnd.sas.collection
            itemType: application/vnd.sas.relationship.reference
          - method: PUT
            rel: update
            href: /relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83
            uri: /relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83
            type: application/vnd.sas.relationship.reference
            responseType: application/vnd.sas.relationship.reference
          - method: DELETE
            rel: delete
            href: /relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83
            uri: /relationships/references/6293390f-8f76-4620-afc1-29a94d09fb83
          - method: GET
            rel: getRelationships
            href: /relationships/relationships?referenceId=6293390f-8f76-4620-afc1-29a94d09fb83
            uri: /relationships/relationships?referenceId=6293390f-8f76-4620-afc1-29a94d09fb83
            type: application/vnd.sas.collection
            responseType: application/vnd.sas.collection
            itemType: application/vnd.sas.relationship
        name: COSTCHANGE
        resourceUri: /dataTables/dataSources/cas~fs~cas-shared-default~fs~Samples/tables/COSTCHANGE
        contentType: casTable
        source: SAS
        analysisTimeStamp: 2022-11-22T16:43:42.543000Z
        version: 1
    getReferenceSources:
      summary: Get reference sources
      description: Get reference sources.
      value:
        version: 2
        accept: application/json
        count: 1
        start: 0
        limit: 10
        name: items
        items:
          - SAS
        links:
          - method: GET
            rel: self
            href: /relationships/references/referenceSources?start=0&limit=10&sortBy=name
            uri: /relationships/references/referenceSources?start=0&limit=10&sortBy=name
            type: application/vnd.sas.collection
            itemType: application/json
          - method: GET
            rel: collection
            href: /relationships/references/referenceSources
            uri: /relationships/references/referenceSources
            type: application/vnd.sas.collection
            itemType: application/json
          - method: GET
            rel: up
            href: /relationships/references
            uri: /relationships/references
            type: application/vnd.sas.api
