swagger: '2.0'
info:
  title: Configuration
  description: |
    The Configuration API manages the discovery and update of service configurations.

    # Error Types

    Error responses in this API may have one of the `type` values described below.
    See [Errors](https://developer.apiture.com/docs/concepts/errors) for more information
    on error responses and error types.



    ## <span class='errorType' id="err-malformedRequestBodyBadRequest">malformedRequestBodyBadRequest</span>

    **Description**: The supplied request body was malformed. <br>
    **Remediation**: Check to make sure that your request body exists and that it does not contain syntax errors.


    ## <span class='errorType' id="err-groupNotFound">groupNotFound</span>

    **Description**: No Groups were found for the specified groupName. <br>
    **Remediation**: Check to make sure that the supplied groupName corresponds to an apiture group resource.


    ## <span class='errorType' id="err-valueNotFound">valueNotFound</span>

    **Description**: No Group values were found for the specified groupName and valueName. <br>
    **Remediation**: Check to make sure that the supplied groupName and valueName corresponds to an apiture group and value resource.


    ## <span class='errorType' id="err-configurationAccessDenied">configurationAccessDenied</span>

    **Description**: The credentials supplied in the request are insufficient to grant access. <br>
    **Remediation**: Check the supplied credentials for validity.
  version: 0.4.9
  contact:
    name: Apiture
    url: 'https://developer.apiture.com'
    email: api@apiture.com
  termsOfService: 'https://developer.apiture.com/docs/Apiture-Open-API-License-Agreement.pdf'
schemes:
  - https
basePath: /configurations
consumes:
  - application/hal+json
  - application/json
produces:
  - application/hal+json
  - application/json
tags:
  - name: API
    description: Endpoints which describe this API.
  - name: Configuration
    description: A set of endpoints that allows for the creation and retrieval of configuration options specific to this service
x-apiture-traits:
  - api:
      title: Configurations API
      basePath: /configurations
      links:
        - getApi
        - getApiDoc
        - getConfigurationGroups
  - resource:
      name: configuration
      pluralName: configurations
      description: A Configuration details.
      simpleModelSchema: true
      paginated: true
      sortable: true
      searchable: true
      filterable: true
  - security:
      baseScope: admin
paths:
  /apiDoc:
    get:
      summary: Return API definition document
      description: Return the OpenAPI document that describes this API.
      operationId: getApiDoc
      security:
        - apiKey: []
      x-apiture-implemented: true
      produces:
        - application/json
        - application/openapi+json;version=2.0
        - application/openapi+yaml;version=2.0
      responses:
        '200':
          description: OK
          schema:
            type: object
      tags:
        - API
      parameters: []
  /:
    get:
      summary: Top-level resources and operations in this API
      description: Return links to the top-level resources and operations in this API.
      operationId: getApi
      security:
        - apiKey: []
      x-apiture-implemented: true
      tags:
        - API
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/root'
      parameters: []
  /configurations/groups:
    get:
      summary: Return a collection of configuration groups
      description: >-
        Return a [paginated](https://developer.apiture.com/docs/concepts/pagination) [sortable](https://developer.apiture.com/docs/concepts/sorting)
        [filterable](https://developer.apiture.com/docs/concepts/filtering) [searchable](https://developer.apiture.com/docs/concepts/searchable)
        collection of configuration groups. The [links](https://developer.apiture.com/docs/concepts/links) in the response include pagination links.
      operationId: getConfigurationGroups
      security:
        - apiKey: []
          accessToken:
            - admin/read
      tags:
        - Configuration
      parameters:
        - name: start
          in: query
          description: The zero-based index of the first configuration group item to include in this page. The default 0 denotes the beginning of the collection.
          type: integer
          format: int64
          default: 0
        - name: limit
          in: query
          description: The maximum number of configuration group representations to return in this page.
          type: integer
          format: int32
          default: 100
        - name: sortBy
          in: query
          type: string
          description: 'Optional sort criteria. See [sort criteria format](https://developer.apiture.com/docs/concepts/sorting), such as `?sortBy=field1,-field2`.'
        - $ref: '#/parameters/filterQueryParam'
        - $ref: '#/parameters/qQueryParam'
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/configurationGroups'
        '400':
          $ref: '#/responses/400'
        '422':
          $ref: '#/responses/422'
  '/configurations/groups/{groupName}':
    get:
      summary: Fetch a representation of this configuration group
      description: 'Return a [HAL](https://developer.apiture.com/docs/concepts/hal) representation of this configuration group resource.'
      operationId: getConfigurationGroup
      security:
        - apiKey: []
          accessToken:
            - admin/read
      tags:
        - Configuration
      parameters:
        - $ref: '#/parameters/configurationGroupNamePathParam'
        - $ref: '#/parameters/ifNoneMatchHeaderParam'
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/configurationGroup'
          headers:
            ETag:
              description: >-
                The `ETag` response header specifies an entity tag which may be provided in an `If-None-Match` request header for *`GET`* operations
                for this configuration group resource.
              type: string
        '304':
          $ref: '#/responses/304'
        '404':
          $ref: '#/responses/404ConfigurationGroup'
  '/configurations/groups/{groupName}/schema':
    get:
      summary: Fetch the schema for this configuration group
      description: 'Return a [HAL](https://developer.apiture.com/docs/concepts/hal) representation of this configuration group schema resource.'
      operationId: getConfigurationGroupSchema
      security:
        - apiKey: []
          accessToken:
            - admin/read
      tags:
        - Configuration
      parameters:
        - $ref: '#/parameters/configurationGroupNamePathParam'
        - $ref: '#/parameters/ifNoneMatchHeaderParam'
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/configurationSchema'
          headers:
            ETag:
              description: The `ETag` response header specifies an entity tag which must be provided in an `If-Match` request header for *`PUT`*
              type: string
        '304':
          $ref: '#/responses/304'
        '404':
          $ref: '#/responses/404ConfigurationGroup'
  '/configurations/groups/{groupName}/values':
    get:
      summary: Fetch the values for the specified configuration group
      description: Return a representation of this configuration group values resource.
      operationId: getConfigurationGroupValues
      security:
        - apiKey: []
          accessToken:
            - admin/read
      tags:
        - Configuration
      parameters:
        - $ref: '#/parameters/configurationGroupNamePathParam'
        - $ref: '#/parameters/ifNoneMatchHeaderParam'
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/configurationValues'
          headers:
            ETag:
              description: The `ETag` response header specifies an entity tag which must be provided in an `If-Match` request header for *`PUT`*
              type: string
        '304':
          $ref: '#/responses/304'
        '404':
          $ref: '#/responses/404ConfigurationGroup'
    put:
      summary: Update the values for the specified configuration group
      description: Perform a complete replacement of this set of values
      operationId: updateConfigurationGroupValues
      security:
        - apiKey: []
          accessToken:
            - admin/write
      tags:
        - Configuration
      parameters:
        - $ref: '#/parameters/configurationGroupNamePathParam'
        - name: configuration group values
          in: body
          required: true
          schema:
            $ref: '#/definitions/configurationValues'
        - $ref: '#/parameters/ifMatchHeaderParam'
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/configurationSchema'
          headers:
            ETag:
              description: The `ETag` response header specifies an entity tag which must be provided in an `If-Match` request header for *`PUT`*
              type: string
        '400':
          $ref: '#/responses/400'
        '403':
          description: |-
            Access denied. Only user allowed to update configurations is an admin.

            This error response may have one of the following `type` values:
            * [`configurationAccessDenied`](#err-configurationAccessDenied)
          schema:
            $ref: '#/definitions/errorResponse'
          x-apiture-errors:
            - configurationAccessDenied
        '404':
          $ref: '#/responses/404ConfigurationGroup'
        '412':
          $ref: '#/responses/412'
  '/configurations/groups/{groupName}/values/{valueName}':
    get:
      summary: Fetch a single value associated with the specified configuration group
      description: |-
        Fetch a single value associated with this configuration group.
        This provides convenient access to individual values of the configuration group.


        The response is always a JSON value which can be parsed with a strict
        JSON parser. The response may be
         * a primitive number, boolean, or quoted JSON string.
         * a JSON array.
         * a JSON object.
         * `null`.


        Examples:
          * `"a string configuration value"`
          * `120`
          * `true`
          * `null`
          * `{ "borderWidth": 8, "foregroundColor": "blue" }`


        To update a specific value,
        use `PUT /configurations/configurations/groups/{groupName}/values/{valueName}`
        (operation `updateConfigurationGroupValue`).
      operationId: getConfigurationGroupValue
      security:
        - apiKey: []
          accessToken:
            - admin/read
      tags:
        - Configuration
      parameters:
        - $ref: '#/parameters/configurationGroupNamePathParam'
        - $ref: '#/parameters/configurationGroupValueNamePathParam'
      responses:
        '200':
          description: 'OK. The value of the named configuration value as a JSON string, number, boolean, array, or object.'
          schema:
            type: string
          headers:
            ETag:
              description: >-
                The `ETag` response header specifies an entity tag which must be provided in an `If-Match` request header for *`PUT`* or *`PATCH`*
                operations which update this configuration group resource.
              type: string
        '404':
          $ref: '#/responses/404ConfigurationGroupOrValue'
    put:
      summary: Update a single value associated with the specified configuration group
      description: |-
        Update a single value associated with this configuration group.
        This provides convenient access to individual values of the configuration group
        as defined in the configuration group's `schema`. The request body must conform to
        the configuration group's schema for the named `{valueName}`.
        This operation is idempotent.


        The request body must be a JSON value which can be parsed with a strict
        JSON parser. The response may be
         * a primitive number, boolean, or quoted JSON string.
         * a JSON array.
         * a JSON object.
         * `null`.


        Examples:
          * `"a string configuration value"`
          * `120`
          * `true`
          * `null`
          * `{ "borderWidth": 8, "foregroundColor": "blue" }`


        To fetch specific value, use `GET /configurations/configurations/groups/{groupName}/values/{valueName}`
        (operation `getConfigurationGroupValue`).
      operationId: updateConfigurationGroupValue
      security:
        - apiKey: []
          accessToken:
            - admin/write
      tags:
        - Configuration
      parameters:
        - $ref: '#/parameters/configurationGroupNamePathParam'
        - $ref: '#/parameters/configurationGroupValueNamePathParam'
        - name: value
          description: >-
            The request body must a valid JSON value and should be parsable with a JSON parser. The result may be a string, number, boolean, array, or
            object.
          in: body
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          schema:
            type: string
          headers:
            ETag:
              description: >-
                The `ETag` response header specifies an entity tag which must be provided in an `If-Match` request header for *`PUT`* or *`PATCH`*
                operations which update this configuration group resource.
              type: string
        '403':
          description: |-
            Access denied. Only user allowed to update configurations is an admin.

            This error response may have one of the following `type` values:
            * [`configurationAccessDenied`](#err-configurationAccessDenied)
          schema:
            $ref: '#/definitions/errorResponse'
          x-apiture-errors:
            - configurationAccessDenied
parameters:
  filterQueryParam:
    name: filter
    in: query
    description: 'Optional filter criteria. See [filtering](https://developer.apiture.com/docs/concepts/filtering).'
    type: string
  qQueryParam:
    name: q
    in: query
    description: 'Optional search string. See [searching](https://developer.apiture.com/docs/concepts/searching).'
    type: string
  ifMatchHeaderParam:
    name: If-Match
    description: The entity tag that was returned in the `ETag` response. This must match the current entity tag of the resource.
    in: header
    type: string
  ifNoneMatchHeaderParam:
    name: If-None-Match
    description: >-
      The entity tag that was returned in the `ETag` response. If the resource's current entity tag matches, the `GET` will return 304 (Not Modified)
      and no response body, else the resource representation will be returned.
    in: header
    type: string
  configurationGroupNamePathParam:
    name: groupName
    description: The unique name of this configuration group.
    in: path
    type: string
    required: true
  configurationGroupValueNamePathParam:
    name: valueName
    description: >-
      The unique name of a value in a configuration group. This is the name of the value in the `schema`. A `{valueName}` must be a simple identifier
      following the pattern _`letter [letter | digit | '-' | '_']*`_
    in: path
    type: string
    required: true
securityDefinitions:
  apiKey:
    type: apiKey
    name: API-Key
    in: header
    description: >-
      API Key based authentication. Each client application must pass its private, unique API key, allocated in the developer portal, via the
      `API-Key: {api-key}` request header.
  accessToken:
    type: oauth2
    flow: accessCode
    description: >-
      OAuth2 client access token authentication. The client authenticates against the server at `authorizationUrl`, passing the client's private
      `clientId` (and optional `clientSecret`) as part of this flow. The client obtains an access token from the server at `tokenUrl`. It then passes
      the received access token via the `Authorization: Bearer {access-token}` header in subsequent API calls. The authorization process also returns
      a refresh token which the client should use to renew the access token before it expires.
    authorizationUrl: /auth/oauth2/authorize
    tokenUrl: /auth/oauth2/token
    scopes:
      admin/read: Read access to system configuration.
      admin/write: Write (update) access to system configuration.
      admin/delete: Delete access to system configuration.
      admin/full: Full access to system configuration.
responses:
  '304':
    description: Not Modified. The resource has not been modified since it was last fetched.
  '400':
    description: >-
      Bad Request. The request body or one or more of the query parameters was not well formed.  The `_error` field in the response will contain
      details about the request error.
    schema:
      $ref: '#/definitions/errorResponse'
  '412':
    description: >-
      Precondition Failed. The supplied `if-Match` header value does not match the most recent `ETag` response header value. The resource has changed
      in the interim.
    schema:
      $ref: '#/definitions/errorResponse'
  '413':
    description: Payload to large. The request entity is larger than the limits defined by the server.
    schema:
      $ref: '#/definitions/errorResponse'
  '422':
    description: >-
      Unprocessable Entity. One or more of the query parameters was well formed but otherwise invalid. The `_error` field in the response will contain
      details about the request error.
    schema:
      $ref: '#/definitions/errorResponse'
  404ConfigurationGroup:
    description: >-
      Not Found. There is no such configuration group resource at the specified `{groupName}` The `_error` field in the response will contain details
      about the request error.
    schema:
      $ref: '#/definitions/errorResponse'
  404ConfigurationGroupOrValue:
    description: >-
      Not Found. There is either no such configuration group resource at the specified `{groupName}` or no such value at the specified `{valueName}`.
      The `_error` field in the response will contain details about the request error.
    schema:
      $ref: '#/definitions/errorResponse'
  204Deleted:
    description: No Content. The resource was deleted successfully.
definitions:
  configuration:
    x-apiture-version: 2.0.0
    title: Configuration (v2.0.0)
    description: Represents the configuration for various services.
    properties:
      _links:
        $ref: '#/definitions/links'
    example:
      _links:
        self:
          href: /configurations/configurations/
        'apiture:groups':
          href: /configurations/configurations/groups
    type: object
    x-apiture-flattened: true
  configurationGroups:
    x-apiture-version: 2.0.1
    title: Configuration Group Collection (v2.0.1)
    description: >-
      Collection of configuration groups. The items in the collection are ordered in the `_embedded` object with name `items`. The top-level `_links`
      object may contain pagination links (`self`, `next`, `prev`, `first`, `last`, `collection`).
    example:
      _profile: 'https://api.apiture.com/schemas/configurations/configurationGroups/v2.0.1/profile.json'
      start: 10
      limit: 10
      count: 67
      name: configurationGroups
      _links:
        self:
          href: /configurations/configurations/groups?start=10&limit=10
        first:
          href: /configurations/configurations/groups?start=0&limit=10
        next:
          href: /configurations/configurations/groups?start=20&limit=10
        collection:
          href: /configurations/configurations/groups
      _embedded:
        items:
          - _profile: 'https://api.apiture.com/schemas/configurations/configurationGroup/v2.0.1/profile.json'
            _links:
              self:
                href: /configurations/groups/basic
            name: basic
            label: Basic Settings
            description: The basic settings for the Transfers API
          - _profile: 'https://api.apiture.com/schemas/configurations/configurationGroup/v2.0.1/profile.json'
            _links:
              self:
                href: /configurations/groups/calendar
            name: calendar
            label: Calendar
            description: 'A calendar that specifies which dates are valid for performing transfers (e.g., weekdays excluding federal holidays)'
    x-apiture-composition:
      - $ref: '#/definitions/collection'
      - properties:
          - _embedded
    properties:
      _links:
        description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
        $ref: '#/definitions/links'
      _embedded:
        description: Embedded objects.
        type: object
        properties:
          items:
            description: An array containing a page of configuration group items.
            type: array
            items:
              $ref: '#/definitions/configurationGroupSummary'
      _profile:
        description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
        type: string
        format: uri
      _error:
        description: An object which describes an error. This value is omitted if the operation succeeded without error.
        type: object
        allOf:
          - $ref: '#/definitions/error'
      count:
        description: >-
          The number of items in the collection. This value is _optional_ and may be omitted if the count is not computable efficiently. If a filter
          is applied to the collection (either implicitly or explicitly), the count, if present, indicates the number of items that satisfy the
          filter.
        type: integer
      start:
        description: The start index of this page of items.
        type: integer
      limit:
        description: The maximum number of items per page.
        type: integer
      name:
        description: The name of the collection.
        type: string
    type: object
    x-apiture-flattened: true
  configurationGroupSummary:
    x-apiture-version: 2.0.0
    title: Configuration Group Summary (v2.0.0)
    description: A summary of the data contained within a configuration group resource.
    example:
      _profile: 'https://api.apiture.com/schemas/configurations/configurationGroupSummary/v2.0.0/profile.json'
      _links:
        self:
          href: /configurations/groups/basic
      name: basic
      label: Basic Settings
      description: The basic settings for the Transfers API
    x-apiture-composition:
      - $ref: '#/definitions/abstractResource'
      - properties:
          - name
          - label
          - description
    properties:
      _links:
        description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
        $ref: '#/definitions/links'
      _embedded:
        description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
        type: object
      _profile:
        description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
        type: string
        format: uri
      _error:
        description: An object which describes an error. This value is omitted if the operation succeeded without error.
        type: object
        allOf:
          - $ref: '#/definitions/error'
      name:
        description: 'The name of this configuration group, must be unique within the set of all resources of this type.'
        type: string
        maxLength: 48
        minLength: 1
        pattern: '[a-zA-Z][-\w_]*'
        example: transfers
      label:
        description: 'The text label for this resource, suitable for presentation to the client.'
        type: string
        maxLength: 128
        minLength: 1
        example: Transfers Configuration
      description:
        description: 'The full description for this resource, suitable for presentation to the client.'
        type: string
        maxLength: 4096
        minLength: 1
        example: The configuration for the Transfers API.
    type: object
    x-apiture-flattened: true
  configurationGroup:
    x-apiture-version: 2.0.1
    title: Configuration Group (v2.0.1)
    description: Represents a configuration group.
    example:
      _profile: 'https://api.apiture.com/schemas/configurations/configurationGroup/v2.0.1/profile.json'
      _links:
        self:
          href: /configurations/groups/basic
      name: basic
      label: Basic Settings
      description: The basic settings for the Transfers API
      schema:
        type: object
        properties:
          dailyLimit:
            type: number
            description: The daily limit for the number of transfers
          cutoffTime:
            type: string
            format: time
            description: The cutoff time for scheduling transfers for the current day
      values:
        dailyLimit: 5
        cutoffTime: '17:30:00'
    x-apiture-composition:
      - $ref: '#/definitions/configurationGroupSummary'
      - properties:
          - schema
          - values
    properties:
      _links:
        description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
        $ref: '#/definitions/links'
      _embedded:
        description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
        type: object
      _profile:
        description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
        type: string
        format: uri
      _error:
        description: An object which describes an error. This value is omitted if the operation succeeded without error.
        type: object
        allOf:
          - $ref: '#/definitions/error'
      name:
        description: 'The name of this configuration group, must be unique within the set of all resources of this type.'
        type: string
        maxLength: 48
        minLength: 1
        pattern: '[a-zA-Z][-\w_]*'
        example: transfers
      label:
        description: 'The text label for this resource, suitable for presentation to the client.'
        type: string
        maxLength: 128
        minLength: 1
        example: Transfers Configuration
      description:
        description: 'The full description for this resource, suitable for presentation to the client.'
        type: string
        maxLength: 4096
        minLength: 1
        example: The configuration for the Transfers API.
      schema:
        $ref: '#/definitions/configurationSchema'
      values:
        $ref: '#/definitions/configurationValues'
    type: object
    x-apiture-flattened: true
  configurationSchema:
    x-apiture-version: 2.0.1
    title: Configuration Schema (v2.0.1)
    description: |-
      The schema which defines the name and types of the
      variables that are part of this configuration definition.
      Property names must be simple identifiers
      which follow the pattern `letter [letter | digit | - | _]*`.

      This is implicitly a schema for `type: object`
      and contains the properties.


      The `values` in a configuration conform to the schema.
      The names and types are described with a subset of
      [JSON Schema Core](https://tools.ietf.org/html/draft-zyp-json-schema-04)
      and [JSON Schema Validation](https://tools.ietf.org/html/draft-fge-json-schema-validation-00)
      similar to that used to define schemas in
      [OpenAPI Specification 2.0](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#schemaObject).
    type: object
    additionalProperties:
      $ref: '#/definitions/configurationSchemaValue'
    example:
      type: object
      properties:
        dailyLimit:
          type: number
          description: The daily limit for the number of transfers
        cutoffTime:
          type: string
          format: time
          description: The cutoff time for scheduling transfers for the current day
    properties: {}
    x-apiture-flattened: true
  configurationSchemaValue:
    x-apiture-version: 2.0.0
    title: Configuration Schema Value (v2.0.0)
    description: The data associated with this configuration schema.
    type: object
    properties: {}
    x-apiture-flattened: true
  configurationValues:
    x-apiture-version: 2.0.0
    title: Configuration Values (v2.0.0)
    description: |-
      The data values associated with this configuration group:
      the group's variable names and values. These values must conform to this
      item's `schema`.


      *Note*: the `schema` may also contain `default` values
      which, if present, are used if a value is *not* set in the
      definition's `values`.


      For example, multiple configurations may use the same schema
      that defines values `a`, `b`, and `c`, but each configuration
      may have their own unique values for `a`, `b`, and `c`
      which is separate from the schema.
    type: object
    additionalProperties:
      $ref: '#/definitions/configurationValue'
    example:
      dailyLimit: 5
      cutoffTime: '17:30:00'
    properties: {}
    x-apiture-flattened: true
  configurationValue:
    x-apiture-version: 2.0.0
    title: Configuration Value (v2.0.0)
    description: The data associated with this configuration.
    type: object
    properties: {}
    x-apiture-flattened: true
  root:
    x-apiture-version: 2.0.0
    title: API Root
    description: 'A HAL response, with hypermedia `_links` for the top-level resources and operations in API.'
    example:
      id: apiName
      name: API name
      apiVersion: 1.0.0
      _profile: 'https://production.api.apiture.com/schemas/common/root/v2.0.0/profile.json'
      _links: {}
    x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/root/v2.0.0/model.json'
    x-apiture-namespace: common
    x-apiture-composition:
      - $ref: '#/definitions/abstractResource'
      - properties:
          - _id
          - name
          - apiVersion
    properties:
      _links:
        description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
        $ref: '#/definitions/links'
      _embedded:
        description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
        type: object
      _profile:
        description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
        type: string
        format: uri
      _error:
        description: An object which describes an error. This value is omitted if the operation succeeded without error.
        type: object
        allOf:
          - $ref: '#/definitions/error'
      _id:
        description: This API's unique ID.
        readOnly: true
        type: string
      name:
        type: string
        description: This API's name.
      apiVersion:
        type: string
        description: This API's version.
    type: object
    x-apiture-flattened: true
  errorResponse:
    x-apiture-version: 2.0.0
    title: Error Response
    description: 'Describes an error response, typically returned on 4xx or 5xx errors from API operations. The `_error` object contains the error details.'
    example:
      _profile: 'https://api.apiture.com/schemas/common/errorResponse/v2.0.0/profile.json'
      _error:
        _id: 2eae46e1-575c-4d69-8a8f-0a7b0115a4b3
        message: The value for deposit must be greater than 0.
        statusCode: 422
        type: positiveNumberRequired
        attributes:
          value: -125.5
        remediation: Provide a value which is greater than 0
        occurredAt: '2018-01-25T05:50:52.375Z'
        _links:
          describedby:
            href: 'https://api.apiture.com/errors/positiveNumberRequired'
        _embedded:
          errors: []
    x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/errorResponse/v2.0.0/model.json'
    x-apiture-namespace: common
    x-apiture-composition:
      - $ref: '#/definitions/abstractResource'
    properties:
      _links:
        description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
        $ref: '#/definitions/links'
      _embedded:
        description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
        type: object
      _profile:
        description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
        type: string
        format: uri
      _error:
        description: An object which describes an error. This value is omitted if the operation succeeded without error.
        type: object
        allOf:
          - $ref: '#/definitions/error'
    type: object
    x-apiture-flattened: true
  links:
    title: Links
    description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
    type: object
    x-apiture-key: linkRelationName
    additionalProperties:
      $ref: '#/definitions/link'
    x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/links/v1.0.0/model.json'
    x-apiture-namespace: common
    x-apiture-version: 1.0.0
    properties: {}
    x-apiture-flattened: true
  collection:
    x-apiture-version: 2.0.0
    title: Collection
    description: A collection of resources. This is an abstract model schema which is extended to define specific resource collections.
    x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/collection/v2.0.0/model.json'
    x-apiture-namespace: common
    x-apiture-composition:
      - $ref: '#/definitions/abstractResource'
      - properties:
          - count
          - start
          - limit
          - name
    properties:
      _links:
        description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
        $ref: '#/definitions/links'
      _embedded:
        description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
        type: object
      _profile:
        description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
        type: string
        format: uri
      _error:
        description: An object which describes an error. This value is omitted if the operation succeeded without error.
        type: object
        allOf:
          - $ref: '#/definitions/error'
      count:
        description: >-
          The number of items in the collection. This value is _optional_ and may be omitted if the count is not computable efficiently. If a filter
          is applied to the collection (either implicitly or explicitly), the count, if present, indicates the number of items that satisfy the
          filter.
        type: integer
      start:
        description: The start index of this page of items.
        type: integer
      limit:
        description: The maximum number of items per page.
        type: integer
      name:
        description: The name of the collection.
        type: string
    type: object
    x-apiture-flattened: true
  abstractResource:
    x-apiture-version: 2.0.0
    title: Abstract Resource
    description: >-
      An abstract schema used to define other schemas for request and response bodies. This is a
      [HAL](https://tools.ietf.org/html/draft-kelly-json-hal-08) resource representation. This model contains hypermedia `_links`, and either optional
      domain object data with `_profile` and optional `_embedded` objects, or an `_error` object. In responses, if the operation was successful, this
      object will not include the `_error`, but if the operation was a 4xx or 5xx error, this object will not include `_embedded` or any data fields,
      only `_error` and optionally `_links`.
    example:
      _profile: '{uri of resource profile.json}'
      _links:
        self:
          href: '{uri of current resource}'
    x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/abstractResource/v2.0.0/model.json'
    x-apiture-namespace: common
    x-apiture-composition:
      - $ref: '#/definitions/abstractRequest'
      - properties:
          - _error
    properties:
      _links:
        description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
        $ref: '#/definitions/links'
      _embedded:
        description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
        type: object
      _profile:
        description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
        type: string
        format: uri
      _error:
        description: An object which describes an error. This value is omitted if the operation succeeded without error.
        type: object
        allOf:
          - $ref: '#/definitions/error'
    type: object
    x-apiture-flattened: true
  link:
    x-apiture-version: 1.0.0
    title: Link
    description: >-
      Describes a hypermedia link within a `_links` object in HAL representations. In Apiture APIs, links are [HAL
      links](https://developer.apiture.com/docs/concepts/links), but Apiture APIs do not use the `name` or `hreflang` properties of HAL. Apiture links
      _may_ include a `method` property.
    required:
      - href
    properties:
      href:
        type: string
        format: uri
        description: The URI or URI template for the resource/operation this link refers to.
      type:
        type: string
        description: The media type for the resource.
      templated:
        type: boolean
        description: 'If true, the link''s href is a [URI template](https://tools.ietf.org/html/rfc6570).'
      title:
        type: string
        description: An optional human-readable localized title for the link.
      deprecation:
        type: string
        format: uri
        description: 'If present, the containing link is deprecated and the value is a URI which provides human-readable text information about the deprecation.'
      profile:
        type: string
        format: uri
        description: 'The URI of a profile document, a JSON document which describes the target resource/operation.'
    example:
      href: /contacts/contacts/328f6bf6-d762-422f-a077-ab91ca4d0b6f
      title: Applicant
    x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/link/v1.0.0/model.json'
    x-apiture-namespace: common
    type: object
    x-apiture-flattened: true
  abstractRequest:
    x-apiture-version: 2.0.0
    title: Abstract Request
    description: >-
      An abstract schema used to define other request-only schemas. This is a [HAL](https://tools.ietf.org/html/draft-kelly-json-hal-08) resource
      representation, minus the `_error` defined in `abstractResource`.
    properties:
      _links:
        description: 'An optional map of links, mapping each link relation to a link object. This model defines the `_links` object of HAL representations.'
        $ref: '#/definitions/links'
      _embedded:
        description: 'An optional map of nested resources, mapping each nested resource name to a nested resource representation.'
        type: object
      _profile:
        description: 'The URI of a [resource profile](https://developer.apiture.com/docs/concepts/profiles/) which describes the representation.'
        type: string
        format: uri
    example:
      _profile: '{uri of resource profile.json}'
      _links:
        self:
          href: '{uri of current resource}'
    x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/abstractRequest/v2.0.0/model.json'
    x-apiture-namespace: common
    type: object
    x-apiture-flattened: true
  error:
    x-apiture-version: 2.0.0
    title: Error
    description: Describes an error in an API request or in a service called via the API.
    required:
      - message
    properties:
      message:
        type: string
        description: A localized message string describing the error condition.
      _id:
        description: >-
          A unique identifier for this error instance. This may be used as a correlation ID with the root cause error (i.e. this ID may be logged at
          the source of the error). This is is an opaque string.
        readOnly: true
        type: string
      statusCode:
        description: The HTTP status code associate with this error.
        type: integer
        minimum: 100
        maximum: 599
        example: 422
      type:
        type: string
        description: >-
          An error identifier which indicates the category of error and associate it with API support documentation or which the UI tier can use to
          render an appropriate message or hint. This provides a finer level of granularity than the `statusCode`. For example, instead of just 400
          Bad Request, the `type` may be much more specific. such as `integerValueNotInAllowedRange` or `numericValueExceedsMaximum` or
          `stringValueNotInAllowedSet`.
      occurredAt:
        type: string
        format: date-time
        description: 'An [RFC 3339](https://tools.ietf.org/html/rfc3339) UTC time stamp indicating when the error occurred.'
        example: '2018-02-02T03:37:15.375Z'
      attributes:
        description: >-
          Informative values or constraints which describe the error. For example, for a value out of range error, the attributes may specify the
          `minimum` and `maximum` values. This allows clients to present error messages as they see fit (the API does not assume the
          client/presentation tier). The set of attributes varies by error `type`.
        allOf:
          - $ref: '#/definitions/attributes'
      remediation:
        type: string
        description: An optional localized string which provides hints for how the user or client can resolve the error.
      errors:
        description: An optional array of nested error objects. This property is not always present.
        type: array
        items:
          $ref: '#/definitions/error'
      _links:
        $ref: '#/definitions/links'
    example:
      _id: 2eae46e1575c0a7b0115a4b3
      message: Descriptive error message...
      statusCode: 422
      type: errorType1
      remediation: Remediation string...
      occurredAt: '2018-01-25T05:50:52.375Z'
      errors:
        - _id: ccdbe2c5c938a230667b3827
          message: An optional embedded error
        - _id: dbe9088dcfe2460f229338a3
          message: Another optional embedded error
      _links:
        describedby:
          href: 'https://developer.apiture.com/errors/errorType1'
    x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/error/v2.0.0/model.json'
    x-apiture-namespace: common
    type: object
    x-apiture-flattened: true
  attributes:
    x-apiture-version: 2.0.0
    title: Attributes
    description: An optional map of name/value pairs which contains additional dynamic data about the resource.
    type: object
    x-apiture-key: attributeName
    additionalProperties:
      $ref: '#/definitions/attributeValue'
    x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/attributes/v2.0.0/model.json'
    x-apiture-namespace: common
    properties: {}
    x-apiture-flattened: true
  attributeValue:
    x-apiture-version: 2.0.0
    title: Attribute Value
    description: The data associated with this attribute.
    x-apiture-resolved-from: 'https://production.api.apiture.com/schemas/common/attributeValue/v2.0.0/model.json'
    x-apiture-namespace: common
    type: object
    properties: {}
    x-apiture-flattened: true
x-apiture-errors:
  malformedRequestBodyBadRequest:
    description: The supplied request body was malformed
    remediation: Check to make sure that your request body exists and that it does not contain syntax errors
  groupNotFound:
    description: No Groups were found for the specified groupName
    remediation: Check to make sure that the supplied groupName corresponds to an apiture group resource
  valueNotFound:
    description: No Group values were found for the specified groupName and valueName
    remediation: Check to make sure that the supplied groupName and valueName corresponds to an apiture group and value resource
  configurationAccessDenied:
    description: The credentials supplied in the request are insufficient to grant access
    remediation: Check the supplied credentials for validity
x-apiture-annotated-at: '2020-05-28T16:35:26.295Z'
host: api.devbank.apiture.com
