DevCycle Feature Configurations API

The Feature Configurations API from DevCycle — 1 operation(s) for feature configurations.

OpenAPI Specification

devcycle-feature-configurations-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: DevCycle Bucketing Audiences Feature Configurations API
  description: Documents the DevCycle Bucketing API which provides an API interface to User Bucketing and for Server SDKs configured to use Cloud Bucketing.
  version: 1.3.0
servers:
- url: https://bucketing-api.devcycle.com/
tags:
- name: Feature Configurations
paths:
  /v1/projects/{project}/features/{feature}/configurations:
    get:
      operationId: FeatureConfigsController_findAll
      summary: List Feature configurations
      description: List Feature configurations for all environments or by environment key or ID
      parameters:
      - name: environment
        required: false
        in: query
        description: A Environment key or ID
        schema:
          type: string
      - name: feature
        required: true
        in: path
        description: A Feature key or ID
        schema:
          type: string
      - name: project
        required: true
        in: path
        description: A Project key or ID
        schema:
          type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FeatureConfig'
        '401':
          description: ''
        '403':
          description: ''
        '404':
          description: ''
      tags:
      - Feature Configurations
    patch:
      operationId: FeatureConfigsController_update
      summary: Update a Feature configuration
      description: Update a Feature configuration by environment key or ID
      parameters:
      - name: environment
        required: true
        in: query
        description: A Environment key or ID
        schema:
          type: string
      - name: feature
        required: true
        in: path
        description: A Feature key or ID
        schema:
          type: string
      - name: project
        required: true
        in: path
        description: A Project key or ID
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateFeatureConfigDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeatureConfig'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestErrorResponse'
        '401':
          description: ''
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundErrorResponse'
      tags:
      - Feature Configurations
components:
  schemas:
    AudienceOperatorWithAudienceMatchFilter:
      type: object
      properties:
        filters:
          type: array
          description: Filters to apply using the "operator" operation
          items:
            anyOf:
            - $ref: '#/components/schemas/AllFilter'
            - $ref: '#/components/schemas/UserFilter'
            - $ref: '#/components/schemas/UserCountryFilter'
            - $ref: '#/components/schemas/UserAppVersionFilter'
            - $ref: '#/components/schemas/UserPlatformVersionFilter'
            - $ref: '#/components/schemas/UserCustomFilter'
            - $ref: '#/components/schemas/AudienceMatchFilter'
        operator:
          description: Operator type if this object represents an operator, and not a filter
          enum:
          - and
          - or
          type: string
      required:
      - filters
      - operator
    TargetAudience:
      type: object
      properties:
        name:
          type: string
          description: Audience display name, must be set for project-level audiences.
          example: Android Users
          maxLength: 100
          minLength: 1
        filters:
          description: Audience filters, describing logic for segmenting users
          allOf:
          - $ref: '#/components/schemas/AudienceOperatorWithAudienceMatchFilter'
      required:
      - filters
    AllFilter:
      type: object
      properties:
        type:
          type: string
          description: Filter type of this audience
          default: all
          enum:
          - all
      required:
      - type
    UserFilter:
      type: object
      properties:
        subType:
          description: Sub type of this filter
          example: email
          enum:
          - user_id
          - email
          - platform
          - deviceModel
          type: string
        comparator:
          description: Comparator to use
          example: '!='
          enum:
          - '='
          - '!='
          - exist
          - '!exist'
          - contain
          - '!contain'
          - startWith
          - '!startWith'
          - endWith
          - '!endWith'
          type: string
        values:
          description: An array of values is required for all filters except when the comparator is 'exist' or '!exist'
          example:
          - baduser@email.com
          type: array
          items:
            type: string
        type:
          type: string
          description: Filter type of this audience
          example: user
          default: user
          enum:
          - user
      required:
      - subType
      - comparator
      - type
    UserCountryFilter:
      type: object
      properties:
        subType:
          description: Sub type of this filter
          example: country
          enum:
          - country
          type: string
          default: country
        comparator:
          description: Comparator to use
          example: '!='
          enum:
          - '='
          - '!='
          - exist
          - '!exist'
          - contain
          - '!contain'
          - startWith
          - '!startWith'
          - endWith
          - '!endWith'
          type: string
        values:
          description: An array of values is required for all filters except when the comparator is 'exist' or '!exist'
          example:
          - CA
          - US
          type: array
          items:
            type: string
        type:
          type: string
          description: Filter type of this audience
          example: user
          default: user
          enum:
          - user
      required:
      - subType
      - comparator
      - type
    Rollout:
      type: object
      properties:
        startPercentage:
          type: number
          description: Rollout start percentage
          minimum: 0
          maximum: 1
        type:
          type: string
          description: Type of rollout
          enum:
          - schedule
          - gradual
          - stepped
        startDate:
          format: date-time
          type: string
          description: Date to start rollout
        stages:
          description: Stages of rollout
          type: array
          items:
            $ref: '#/components/schemas/RolloutStage'
      required:
      - type
      - startDate
    UserAppVersionFilter:
      type: object
      properties:
        comparator:
          description: Comparator to use
          example: '>'
          enum:
          - '='
          - '!='
          - '>'
          - '>='
          - <
          - <=
          - exist
          - '!exist'
          type: string
        values:
          description: An array of values is required for all filters except when the comparator is 'exist' or '!exist'
          example:
          - 1.0.2
          type: array
          items:
            type: string
        type:
          type: string
          description: Filter type of this audience
          example: user
          default: user
          enum:
          - user
        subType:
          type: string
          description: Sub type of this filter
          example: appVersion
          default: appVersion
          enum:
          - appVersion
      required:
      - comparator
      - type
      - subType
    Target:
      type: object
      properties:
        _id:
          type: string
          description: A unique Target ID
          example: 61450f3daec96f5cf4a49946
        name:
          type: string
          description: Target name
          example: Feature Enabled
        audience:
          description: Audience model describing target segmentation.
          allOf:
          - $ref: '#/components/schemas/TargetAudience'
        rollout:
          description: Rollout sub-document describing how a Target's audience is rolled out
          allOf:
          - $ref: '#/components/schemas/Rollout'
        distribution:
          description: Specifies variation distribution percentages for features
          type: array
          items:
            $ref: '#/components/schemas/TargetDistribution'
        bucketingKey:
          type: string
          description: String to bucket users into a specific variation
          example: '''organization_id'
      required:
      - _id
      - audience
      - distribution
    UpdateFeatureConfigDto:
      type: object
      properties:
        status:
          type: string
          description: Status of the Feature Configuration
          enum:
          - active
          - inactive
        targets:
          description: The targets to evaluate what variation a user should be delivered
          type: array
          items:
            $ref: '#/components/schemas/UpdateTargetDto'
    UserCustomFilter:
      type: object
      properties:
        comparator:
          description: Comparator to use
          example: '>='
          enum:
          - '='
          - '!='
          - '>'
          - '>='
          - <
          - <=
          - exist
          - '!exist'
          - contain
          - '!contain'
          - startWith
          - '!startWith'
          - endWith
          - '!endWith'
          type: string
        dataKey:
          type: string
          description: Data Key used for custom data
          example: my_custom_prop
          minLength: 1
        dataKeyType:
          description: Data Key Type used for custom data
          example: Number
          enum:
          - String
          - Boolean
          - Number
          type: string
        values:
          type: object
          description: An array of values is required for all filters except when the comparator is 'exist' or '!exist'
          example:
          - 0
        type:
          type: string
          description: Filter type of this audience
          example: user
          default: user
          enum:
          - user
        subType:
          type: string
          description: Sub type of this filter
          example: customData
          default: customData
          enum:
          - customData
      required:
      - comparator
      - dataKey
      - dataKeyType
      - type
      - subType
    FeatureConfig:
      type: object
      properties:
        _feature:
          type: string
          description: ID of the Feature owning the Configuration
          example: 61450f3daec96f5cf4a49946
        _environment:
          type: string
          description: ID of the Environment owning the Configuration
          example: 61450f3daec96f5cf4a49946
        _createdBy:
          type: string
          description: User who created the Feature Configuration
        status:
          description: Status of the Feature Configuration
          enum:
          - active
          - inactive
          type: string
        startedAt:
          format: date-time
          type: string
          description: Date the Feature Configuration was started
        updatedAt:
          format: date-time
          type: string
          description: The date the Feature Configuration was last updated
        targets:
          description: The targets to evaluate what variation a user should be delivered
          type: array
          items:
            $ref: '#/components/schemas/Target'
        readonly:
          type: boolean
          description: Controls whether the feature configuration is editable for a given user
        hasStaticConfig:
          type: boolean
          description: 'Flag to indicate if the Feature owning the configuration has been marked as complete.

            If true, the user targeting rules are ignored and the static variation is always used.'
      required:
      - _feature
      - _environment
      - status
      - updatedAt
      - targets
      - readonly
      - hasStaticConfig
    UserPlatformVersionFilter:
      type: object
      properties:
        comparator:
          description: Comparator to use
          example: '>'
          enum:
          - '='
          - '!='
          - '>'
          - '>='
          - <
          - <=
          - exist
          - '!exist'
          type: string
        values:
          description: An array of values is required for all filters except when the comparator is 'exist' or '!exist'
          example:
          - 1.0.2
          type: array
          items:
            type: string
        type:
          type: string
          description: Filter type of this audience
          example: user
          default: user
          enum:
          - user
        subType:
          type: string
          description: Sub type of this filter
          example: appVersion
          default: appVersion
          enum:
          - appVersion
      required:
      - comparator
      - type
      - subType
    TargetDistribution:
      type: object
      properties:
        percentage:
          type: number
          description: Distribution percentage for the variation
          example: 0.0005
          minimum: 0
          maximum: 1
        _variation:
          type: string
          description: Variation ID or key from `feature.variations`
          example: variation-1
      required:
      - percentage
      - _variation
    NotFoundErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: Response status code
          example: 404
        message:
          type: object
          description: Error details
          example: Item with key 'key-123' not found
        error:
          type: string
          description: Error type
          example: Not Found
      required:
      - statusCode
      - message
      - error
    BadRequestErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: Response status code
          example: 400
        message:
          type: object
          description: Error details
          example:
          - key should not be empty
        error:
          type: string
          description: Error type
          example: Bad Request
      required:
      - statusCode
      - message
      - error
    AudienceMatchFilter:
      type: object
      properties:
        type:
          type: string
          default: audienceMatch
          enum:
          - audienceMatch
        comparator:
          enum:
          - '='
          - '!='
          type: string
        _audiences:
          type: array
          items:
            type: string
      required:
      - type
    RolloutStage:
      type: object
      properties:
        percentage:
          type: number
          description: Target percentage to reach by the step date
          minimum: 0
          maximum: 1
        type:
          type: string
          description: Defines the transition into this percentage level
          enum:
          - linear
          - discrete
        date:
          format: date-time
          type: string
          description: Date the target percentage should be fully applied
      required:
      - percentage
      - type
      - date
    UpdateTargetDto:
      type: object
      properties:
        _id:
          type: string
          description: A unique Target ID
          example: 61450f3daec96f5cf4a49946
        name:
          type: string
          description: Target name
          example: Feature Enabled
        rollout:
          description: Rollout sub-document describing how a Target's audience is rolled out
          allOf:
          - $ref: '#/components/schemas/Rollout'
        distribution:
          description: Specifies variation distribution percentages for features
          type: array
          items:
            $ref: '#/components/schemas/TargetDistribution'
        audience:
          description: Audience model describing target segmentation.
          allOf:
          - $ref: '#/components/schemas/TargetAudience'
      required:
      - distribution
      - audience
  securitySchemes:
    bearerAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Enter your DevCycle SDK token