Rulebase Program Sampling Rules API

The Program Sampling Rules API from Rulebase — 1 operation(s) for program sampling rules.

Operations 3

PATCH /program_sampling_rules/{id} Update program sampling rules by id #
PUT /program_sampling_rules/{id} Replace program sampling rules by id #
DELETE /program_sampling_rules/{id} Delete program sampling rules by id #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/rulebase:rulebase-program-sampling-rules-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

rulebase-program-sampling-rules-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Rulebase API2 Program Sampling Rules API
  version: 0.0.1
tags:
- name: Program Sampling Rules
paths:
  /program_sampling_rules/{id}:
    patch:
      parameters:
      - schema:
          type: string
        required: true
        name: id
        in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                program_sampling_rule:
                  type: object
                  properties:
                    name:
                      type: string
                    description:
                      type: string
                      nullable: true
                    conditions:
                      type: array
                      items:
                        type: object
                        properties:
                          field:
                            type: string
                            nullable: true
                          operator:
                            type: string
                            nullable: true
                          value:
                            nullable: true
                    sampling_strategy:
                      type: object
                      nullable: true
                      properties:
                        type:
                          type: string
                          nullable: true
                        value:
                          anyOf:
                          - type: number
                          - type: string
                          - nullable: true
                        tiers:
                          type: array
                          nullable: true
                          items:
                            type: object
                            properties:
                              min:
                                type: number
                                nullable: true
                              max:
                                type: number
                                nullable: true
                              value:
                                type: number
                                nullable: true
                              value_type:
                                type: string
                                nullable: true
              required:
              - program_sampling_rule
      responses:
        '200':
          description: Program sampling rule updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      description:
                        type: string
                        nullable: true
                      conditions:
                        type: array
                        items:
                          $ref: '#/components/schemas/program_sampling_rule_condition'
                      sampling_strategy:
                        $ref: '#/components/schemas/program_sampling_rule_sampling_strategy'
                      created_at:
                        type: string
                      updated_at:
                        type: string
                    required:
                    - id
                    - name
                    - description
                    - conditions
                    - sampling_strategy
                    - created_at
                    - updated_at
                required:
                - data
        '400':
          description: Validation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                required:
                - error
                - errors
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
      tags:
      - Program Sampling Rules
      summary: Update program sampling rules by id
      x-summary-source: derived
      operationId: patchProgramSamplingRulesById
      x-operation-id-source: derived
    put:
      parameters:
      - schema:
          type: string
        required: true
        name: id
        in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                program_sampling_rule:
                  type: object
                  properties:
                    name:
                      type: string
                    description:
                      type: string
                      nullable: true
                    conditions:
                      type: array
                      items:
                        type: object
                        properties:
                          field:
                            type: string
                            nullable: true
                          operator:
                            type: string
                            nullable: true
                          value:
                            nullable: true
                    sampling_strategy:
                      type: object
                      nullable: true
                      properties:
                        type:
                          type: string
                          nullable: true
                        value:
                          anyOf:
                          - type: number
                          - type: string
                          - nullable: true
                        tiers:
                          type: array
                          nullable: true
                          items:
                            type: object
                            properties:
                              min:
                                type: number
                                nullable: true
                              max:
                                type: number
                                nullable: true
                              value:
                                type: number
                                nullable: true
                              value_type:
                                type: string
                                nullable: true
              required:
              - program_sampling_rule
      responses:
        '200':
          description: Program sampling rule updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      description:
                        type: string
                        nullable: true
                      conditions:
                        type: array
                        items:
                          $ref: '#/components/schemas/program_sampling_rule_condition'
                      sampling_strategy:
                        $ref: '#/components/schemas/program_sampling_rule_sampling_strategy'
                      created_at:
                        type: string
                      updated_at:
                        type: string
                    required:
                    - id
                    - name
                    - description
                    - conditions
                    - sampling_strategy
                    - created_at
                    - updated_at
                required:
                - data
        '400':
          description: Validation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        type: string
                required:
                - error
                - errors
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
      tags:
      - Program Sampling Rules
      summary: Replace program sampling rules by id
      x-summary-source: derived
      operationId: putProgramSamplingRulesById
      x-operation-id-source: derived
    delete:
      parameters:
      - schema:
          type: string
        required: true
        name: id
        in: path
      responses:
        '204':
          description: Program sampling rule deleted
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
      tags:
      - Program Sampling Rules
      summary: Delete program sampling rules by id
      x-summary-source: derived
      operationId: deleteProgramSamplingRulesById
      x-operation-id-source: derived
components:
  schemas:
    program_sampling_rule_tier:
      type: object
      properties:
        min:
          type: integer
          nullable: true
        max:
          type: integer
          nullable: true
        value:
          type: integer
          nullable: true
        value_type:
          type: string
          nullable: true
      required:
      - min
      - max
      - value
      - value_type
    program_sampling_rule_sampling_strategy:
      oneOf:
      - type: object
        properties:
          type:
            type: string
            enum:
            - census
        required:
        - type
      - type: object
        properties:
          type:
            type: string
            enum:
            - percentage
          value:
            type: integer
        required:
        - type
        - value
      - type: object
        properties:
          type:
            type: string
            enum:
            - tiered
          tiers:
            type: array
            items:
              $ref: '#/components/schemas/program_sampling_rule_tier'
        required:
        - type
        - tiers
      - nullable: true
    program_sampling_rule_condition:
      type: object
      properties:
        field:
          type: string
        operator:
          type: string
        value:
          nullable: true
      required:
      - field
      - operator
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Rulebase organization API key