Cloud Foundry App Autoscaler API

The App Autoscaler is a Cloud Foundry service that automatically scales application instances against dynamic metric rules and scheduled windows. The project publishes OpenAPI descriptions for its public surface: a Policy API for reading, writing and deleting a per-application scaling policy, a Custom Metrics API for submitting application-defined metrics, a Scaling History API for the record of scaling events, and an Application Metric API for aggregated metric series.

Operations 3

PUT /v1/apps/{guid}/policy Create the Policy
DELETE /v1/apps/{guid}/policy Deletes the policy
GET /v1/apps/{guid}/policy Retrieves the Policy

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/app-autoscaler"
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

cloud-foundry-app-autoscaler-policy-api-openapi.yaml Raw ↑
openapi: 3.0.0
info:
  title: Policy API
  description: This API is used to create, delete, retrieve the policy
  version: 1.0.0
  license:
    name: "Apache License Version 2.0"
    # identifier: "Apache-2.0" # Requires at least OpenAPI 3.1.0
    url: "http://www.apache.org/licenses/LICENSE-2.0.html"
security:
- bearerAuth: []
tags:
- name: Policy API V1
  description: This API is used to create, delete, retrieve the policy

paths:
  /v1/apps/{guid}/policy:
    parameters:
    - name: guid
      in: path
      required: true
      description: |
        The GUID identifying the application for which the scaling policy is fetched.

        It can be found in the `application_id` property of the JSON object stored in the
        `VCAP_APPLICATION` environment variable.
      schema:
        $ref: "./shared_definitions.yaml#/schemas/GUID"
    put:
      summary: Create the Policy
      description: This API is used to create the policy
      tags:
        - Create Policy API V1
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Policy"
      responses:
        "200":
          description: "OK"
          content:
           application/json:
            schema:
              $ref: "#/components/schemas/Policy"
        default:
          $ref: "./shared_definitions.yaml#/responses/Error"
      x-codegen-request-body-name: body
    delete:
      summary: Deletes the policy
      description: This API is used to delete the policy
      tags:
        - Delete Policy API V1
      responses:
        "200":
          description: "OK"
          content:
           application/json:
            schema:
              $ref: "#/components/schemas/Policy"
        default:
          $ref: "./shared_definitions.yaml#/responses/Error"
      x-codegen-request-body-name: body
    get:
      summary: Retrieves the Policy
      description: This API is used to retrieve the policy
      tags:
      - Get Policy API V1
      responses:
        "200":
          description: "OK"
          content:
           application/json:
            schema:
              $ref: "#/components/schemas/Policy"
        default:
          $ref: "./shared_definitions.yaml#/responses/Error"
components:
  schemas:
    Policy:
      description: Object containing policy and optional configuration
      type: object
      required:
        - instance_min_count
        - instance_max_count
      properties:
        instance_min_count:
          type: integer
          format: int64
          description: minimal number of instance count
          example: 2
        instance_max_count:
          type: integer
          format: int64
          description: maximal number of instance count
          example: 4
        scaling_rules:
          type: array
          items:
            $ref: '#/components/schemas/ScalingRule'
        configuration:
          type: object
          properties:
            custom_metrics:
              type: object
              properties:
                metric_submission_strategy:
                  type: object
                  properties:
                    allow_from:
                      type: string
                      enum:
                        - bound_app
                  required:
                    - allow_from
              required:
                - metric_submission_strategy
    ScalingRule:
      type: object
      required:
        - threshold
        - operator
        - adjustment
      properties:
        metric_type:
          $ref: "./shared_definitions.yaml#/schemas/metric_type"
        threshold:
          description: |
            The boundary when metric value exceeds is considered as a breach
          type: integer
          format: int64
          example: 30
        operator:
          description: Used for standard operting signs - ">", "<", ">=", "<="
          #required: true
          type: string
          enum: [">", "<", ">=", "<="]
          example: <
        adjustment:
          description: |
            The adjustment approach for instance count with each scaling.

            +5 means adding 5 instances, -50% means shrinking to the half of current size.
          # required: true
          type: string
          pattern: ^[-+][1-9]+[0-9]*[%]?$
          example: -1
        breach_duration_secs:
          description: |
            Time duration(in seconds) to fire scaling event if it keeps breaching
          type: integer
          format: int64
          example: 600
        cool_down_secs:
          description: |
            The time duration (in seconds) to wait before the next scaling kicks in
          type: integer
          format: int64
          example: 300
        schedules:
          type: array
          items:
            $ref: '#/components/schemas/Schedules'
    Schedules:
      type: object
      required:
        - timezone
      properties:
        timezone:
          description: Using timezone definition of Java
          type: string
          example: Asia/Shanghai
          # TODO: Try to make use of <https://stackoverflow.com/a/71121905>
          #- $ref: "../../src/autoscaler/schema/api/policyvalidator/policy_json.schema.json#/" # TODO:
        recurring_schedule:
          type: array
          items:
            $ref: "#/components/schemas/RecurringSchedule"
    RecurringSchedule:
      type: object
      required:
        - start_time
        - end_time
        - instance_min_count
        - instance_max_count
      properties:
        start_date:
          description: the start date of the schedule. Must be a future time
          type: string
          format: date
          example: 2016-06-27
        end_date:
          description: the end date of the schedule. Must be a future time.
          type: string
          format: date
          example: 2016-07-23
        start_time:
          description: the start time of the schedule in HH:MM format
          type: string
          pattern: ^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$
          example: 11:00
        end_time:
          description: the end time of the schedule in HH:MM format
          type: string
          pattern: ^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$
          example: 19:30
        end time of the schedule:
          description: |
            recurring days of a week or month. Use [1,2,..,7] or [1,2,...,31] to define it
          type: array
          items:
            type: integer
          example: [5, 15, 25]
        instance_min_count:
          description: minimal number of instance count for this schedule
          type: integer
          format: int64
          example: 3
        instance_max_count:
          description: maximal number of instance count for this schedule
          type: integer
          format: int64
          example: 10
        instance_min_instance_count:
          description: the initial minimal number of instance count for this schedule
          type: integer
          format: int64
          example: 5
        specific_date:
          type: array
          items:
            $ref: '#/components/schemas/SpecificDate'
    SpecificDate:
      type: object
      required:
        - start_date_time
        - end_date_time
        - instance_min_count
        - instance_max_count
      properties:
        start_date_time:
          description: the start time of the schedule. Must be a future time
          type: string
          pattern: /[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]/
          example: 2015-01-04T20:00
        end_date_time:
          description: the start time of the schedule. Must be a future time
          type: string
          pattern: /[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):[0-5][0-9]/
          example: 2015-01-04T20:00
        instance_min_count:
          description: minimal number of instance count for this schedule
          type: integer
          format: int64
          example: 2
        instance_max_count:
          description: maximal number of instance count for this schedule
          type: integer
          format: int64
          example: 5
        instance_min_instance_count:
          description: the initial minimal number of instance count for this schedule
          type: integer
          format: int64
          example: 3
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT