Uniform Manifest API

The Manifest API from Uniform — 1 operation(s) for manifest.

OpenAPI Specification

uniform-manifest-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Uniform Platform Aggregates Manifest API
  version: '2.0'
tags:
- name: Manifest
paths:
  /api/v2/manifest:
    options:
      tags:
      - Manifest
      description: Handles preflight requests. This endpoint allows CORS.
      responses:
        '204':
          description: OK
    get:
      description: 'Fetches the optimization Manifest for a given project.

        If no manifest has ever been published, and an API key is used that has preview manifest permissions then the current preview manifest will be returned (in delivery format).

        '
      tags:
      - Manifest
      parameters:
      - in: query
        name: preview
        schema:
          type: boolean
          default: false
          description: If true, returns a preview of the manifest instead of the last published version. The response format changes depending on the value of the preview parameter.
      - in: query
        name: projectId
        required: true
        schema:
          type: string
          format: uuid
          description: The ID of the project to fetch the manifest for.
      security:
      - ApiKeyAuth: []
      - BearerAuth: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManifestV2'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          description: No manifest has ever been published, and the API key does not have preview permissions
          content:
            text/plain:
              schema:
                type: string
        '429':
          $ref: '#/components/responses/RateLimitError'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    ManifestV2:
      type: object
      required:
      - project
      properties:
        project:
          type: object
          properties:
            id:
              type: string
              format: uuid
              description: is not present unless getting a preview manifest
            name:
              type: string
              description: is not present unless getting a preview manifest
            ui_version:
              type: number
              description: is not present unless getting a preview manifest
            pz:
              $ref: '#/components/schemas/PersonalizationManifest'
            test:
              description: A/B test settings
              type: object
              additionalProperties:
                $ref: '#/components/schemas/Test'
          additionalProperties: false
      additionalProperties: false
    EnrichmentCategory:
      type: object
      required:
      - cap
      properties:
        cap:
          description: The maximum visitor score allowed for enrichment keys in this category
          type: integer
          minimum: 1
          maximum: 2147483647
    StringMatch:
      description: Describes a match expression on a string
      type: object
      oneOf:
      - type: object
        required:
        - op
        - rhs
        properties:
          rhs:
            description: The right-hand side of the match expression
            type: string
            minLength: 1
          op:
            description: 'The match operator

              ''='' = exact match

              ''~'' = contains match

              ''//'' = regular expression match


              Any of the above can be prefixed with ''!'' to invert the match (i.e. != for ''not an exact match'')

              '
            type: string
            enum:
            - '='
            - '~'
            - //
            - '!='
            - '!~'
            - '!//'
          cs:
            description: The case sensitivity of the match. Defaults to false if unspecified
            type: boolean
      - type: object
        required:
        - op
        properties:
          op:
            description: 'The type of match to perform

              ''*'' = exists with any value

              ''!*'' = does not exist

              '
            type: string
            enum:
            - '*'
            - '!*'
      discriminator:
        propertyName: op
    QuirkCriteria:
      description: Matches a visitor quirk key and value
      type: object
      required:
      - type
      - key
      - match
      properties:
        type:
          type: string
          enum:
          - QK
        key:
          description: The name of the quirk key to match
          type: string
          minLength: 1
        match:
          description: The quirk value to match against
          $ref: '#/components/schemas/StringMatch'
    AggregateDimension:
      description: Defines an aggregate dimension that is a grouping of other dimensions' scores; an intent or audience
      type: object
      required:
      - inputs
      properties:
        inputs:
          description: Input dimensions to the aggregate dimension
          type: array
          items:
            $ref: '#/components/schemas/AggregateDimensionInput'
      additionalProperties: false
    PageViewCountCriteria:
      type: object
      required:
      - type
      - match
      properties:
        type:
          type: string
          enum:
          - PVC
        match:
          description: The expression to match the page view count against
          $ref: '#/components/schemas/NumberMatch'
    Test:
      type: object
      properties:
        wv:
          description: Winning variation ID - if set, the test will not run and this variation is shown to all visitors (the test is closed)
          type: string
      additionalProperties: false
    NumberMatch:
      description: Describes a match expression on a number
      type: object
      required:
      - op
      - rhs
      properties:
        rhs:
          description: The right-hand side of the match expression
          type: number
        op:
          description: 'The type of match to perform

            ''='' = exact match

            ''!='' = not an exact match

            ''<'' = less than match expression

            ''>'' = greater than match expression

            '
          type: string
          enum:
          - '='
          - <
          - '>'
          - '!='
    SignalCriteria:
      oneOf:
      - $ref: '#/components/schemas/CookieCriteria'
      - $ref: '#/components/schemas/QueryStringCriteria'
      - $ref: '#/components/schemas/QuirkCriteria'
      - $ref: '#/components/schemas/EventCriteria'
      - $ref: '#/components/schemas/CurrentPageCriteria'
      - $ref: '#/components/schemas/PageViewCountCriteria'
    RootSignalCriteriaGroup:
      type: object
      required:
      - clauses
      - type
      properties:
        type:
          description: Criteria type (Group of other criteria)
          type: string
          enum:
          - G
        op:
          type: string
          description: 'The logical operator to apply to the criteria groups

            & = AND

            | = OR


            Default is `&` if unspecified

            '
          default: '&'
          enum:
          - '&'
          - '|'
        clauses:
          description: The criteria clauses that make up this grouping of criteria
          type: array
          minItems: 1
          items:
            oneOf:
            - $ref: '#/components/schemas/SignalCriteriaGroup'
            - $ref: '#/components/schemas/SignalCriteria'
      additionalProperties: false
    PersonalizationManifest:
      type: object
      properties:
        sig:
          description: Map of all signals defined for personalization criteria
          type: object
          additionalProperties:
            $ref: '#/components/schemas/Signal'
        enr:
          description: Map of all enrichment categories defined for personalization criteria
          type: object
          additionalProperties:
            $ref: '#/components/schemas/EnrichmentCategory'
        agg:
          description: Map of all aggregate dimensions (intents or audiences) defined for personalization criteria
          type: object
          additionalProperties:
            $ref: '#/components/schemas/AggregateDimension'
        control:
          description: Percentage of visitors that will be used as a personalization control group (not shown any personalization)
          type: number
          minimum: 0
          maximum: 100
      additionalProperties: false
    EventCriteria:
      description: Matches an analytics event name being fired
      type: object
      required:
      - type
      - event
      properties:
        type:
          type: string
          enum:
          - EVT
        event:
          description: How to match the event name
          $ref: '#/components/schemas/StringMatch'
    SignalCriteriaGroup:
      type: object
      required:
      - clauses
      - type
      properties:
        type:
          description: Criteria type (Group of other criteria)
          type: string
          enum:
          - G
        op:
          type: string
          description: 'The logical operator to apply to the criteria groups

            & = AND

            | = OR


            Default is `&` if unspecified

            '
          enum:
          - '&'
          - '|'
        clauses:
          description: The criteria clauses that make up this grouping of criteria
          type: array
          minItems: 1
          items:
            oneOf:
            - $ref: '#/components/schemas/SignalCriteriaGroup'
            - $ref: '#/components/schemas/SignalCriteria'
      additionalProperties: false
    Signal:
      type: object
      required:
      - crit
      - str
      - cap
      - dur
      properties:
        str:
          description: The signal strength per activation (each time its criteria are true, this score is added)
          type: integer
          minimum: 1
          maximum: 2147483647
        cap:
          description: The maximum visitor score allowed for this signal
          type: integer
          minimum: 1
          maximum: 2147483647
        dur:
          description: 'How long the signal''s score should persist

            ''s'' = current session (expires after a period of inactivity)

            ''p'' = permanent (expires as far in the future as possible, may be limited by browser security settings)

            ''t'' = transient (score tracks the current state of the criteria every time scores are updated)

            '
          type: string
          enum:
          - s
          - p
          - t
        crit:
          $ref: '#/components/schemas/RootSignalCriteriaGroup'
        conversion:
          oneOf:
          - $ref: '#/components/schemas/Conversion'
          - enum:
            - null
    Conversion:
      type: object
      required:
      - freq
      properties:
        freq:
          description: The frequency of the conversion event
          type: string
          enum:
          - O
    Error:
      type: object
      properties:
        errorMessage:
          description: Error message(s) that occurred while processing the request
          oneOf:
          - type: array
            items:
              type: string
          - type: string
    CookieCriteria:
      description: Matches a web cookie value
      type: object
      required:
      - type
      - cookieName
      - match
      properties:
        type:
          type: string
          enum:
          - CK
        cookieName:
          description: The name of the cookie to match
          type: string
          minLength: 1
        match:
          description: The value to match the cookie against
          $ref: '#/components/schemas/StringMatch'
    AggregateDimensionInput:
      description: Defines an input dimension to an aggregate dimension
      type: object
      required:
      - dim
      properties:
        dim:
          description: 'Dimension name to reference as an input.

            For enrichment inputs, use CATEGORY_KEY as the dimension.

            Enrichments, signals, and other aggregate dimensions may be referenced.


            Note that creating a cycle of aggregate dimensions is allowed, however

            the final score will _ignore_ the cycled aggregate dimension in the result.

            This can be used to create mutually exclusive aggregates

            '
          type: string
          minLength: 1
        sign:
          description: 'The sign of the input dimension controls how it affects the aggregate dimension''s final score.


            ''+'' = add to the final score

            ''-'' = subtract from the final score

            ''c'' = clear the final score (if the input dimension has any score at all, this aggregate will have no score regardless of other inputs)


            Default if unspecified: ''+''

            '
          type: string
          enum:
          - +
          - '-'
          - c
          default: +
      additionalProperties: false
    QueryStringCriteria:
      description: Matches a URL query string parameter value
      type: object
      required:
      - type
      - queryName
      - match
      properties:
        type:
          type: string
          enum:
          - QS
        queryName:
          description: The name of the query string parameter to match
          type: string
          minLength: 1
        match:
          description: The value to match the query string parameter against
          $ref: '#/components/schemas/StringMatch'
    CurrentPageCriteria:
      description: 'Matches the current page''s absolute path (i.e. /path/to/page.html)

        Does not include the query string or protocol and hostname (i.e. NOT https://foo.com/path/to/page.html?query=something)

        '
      type: object
      required:
      - type
      - path
      properties:
        type:
          type: string
          enum:
          - PV
        path:
          description: The page/route path to match as a page that has been visited
          $ref: '#/components/schemas/StringMatch'
  responses:
    BadRequestError:
      description: Request input validation failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ForbiddenError:
      description: Permission was denied
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Execution error occurred
    UnauthorizedError:
      description: API key or token was not valid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimitError:
      description: Too many requests in allowed time period
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
    BearerAuth:
      type: http
      scheme: bearer