CircleCI Resource Class API

Endpoints for managing runner resource classes, which define the compute resources available for self-hosted runner jobs.

GitHub OpenAPI

Operations 4

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /runner/resource-class List self-hosted runner resource classes · List resource classes #
Ask an LLM
“Which runner resource classes are available for my self-hosted runners?”
“What compute resources can I define for self-hosted runners?”
Tell an agent
List resource classes in namespace {namespace}.
Show the runner resource classes available for {namespace}.
POST /runner/resource-class Create a self-hosted runner resource class · Create a resource class #
Ask an LLM
“How do I define a new compute resource class for my self-hosted runners?”
“Can I give a new runner resource class a description?”
Tell an agent
Create resource class {resource_class} in namespace {namespace} described as {description}.
Define a runner resource class {resource_class} with description {description}.
GET /runner/resource-class/{resource-class} Get a self-hosted runner resource class · Get a resource class #
Ask an LLM
“What are the details of one runner resource class?”
“Can I look up a resource class by its name?”
Tell an agent
Get resource class {resource_class}.
Show details of runner resource class {resource_class}.
DELETE /runner/resource-class/{resource-class} Delete a self-hosted runner resource class · Delete a resource class #
Ask an LLM
“How do I stop runners from using a resource class?”
“What happens to new tasks when a runner resource class is deleted?”
Tell an agent destructive · confirm first
Delete resource class {resource_class}.
Remove the runner resource class {resource_class} so no new tasks are assigned.

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/circleci:circleci-resource-class-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

circleci-resource-class-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: CircleCI REST API v1 Artifact Resource Class API
  description: The CircleCI REST API v1 is the legacy API that provides access to build information, project details, and user data. While still available, CircleCI recommends migrating to the v2 API for newer features and improved functionality. The v1 API supports operations for retrieving build details, triggering builds, managing SSH keys, and accessing test metadata. Authentication is handled through API tokens passed as query parameters or HTTP headers.
  version: '1.1'
  contact:
    name: CircleCI Support
    url: https://support.circleci.com
  termsOfService: https://circleci.com/terms-of-service/
servers:
- url: https://circleci.com/api/v1.1
  description: CircleCI Production API v1.1
security:
- apiToken: []
tags:
- name: Resource Class
  description: Endpoints for managing runner resource classes, which define the compute resources available for self-hosted runner jobs.
paths:
  /runner/resource-class:
    get:
      operationId: listResourceClasses
      summary: List resource classes
      description: Returns a list of runner resource classes for the specified namespace. Resource classes define the compute resources available for self-hosted runner jobs.
      tags:
      - Resource Class
      parameters:
      - name: namespace
        in: query
        required: true
        description: The namespace to list resource classes for
        schema:
          type: string
      responses:
        '200':
          description: Successfully retrieved resource classes
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/ResourceClass'
                    description: List of resource classes
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    post:
      operationId: createResourceClass
      summary: Create a resource class
      description: Creates a new resource class for the specified namespace. Returns a resource class token that is only displayed once and cannot be retrieved again. This token is used by runner agents to authenticate.
      tags:
      - Resource Class
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - resource_class
              - description
              properties:
                resource_class:
                  type: string
                  description: The resource class name in namespace/name format
                  pattern: ^[a-z0-9-]+/[a-z0-9-]+$
                description:
                  type: string
                  description: A description of the resource class
      responses:
        '200':
          description: Resource class created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceClassCreation'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /runner/resource-class/{resource-class}:
    get:
      operationId: getResourceClass
      summary: Get a resource class
      description: Returns details about a specific resource class.
      tags:
      - Resource Class
      parameters:
      - $ref: '#/components/parameters/ResourceClassParam'
      responses:
        '200':
          description: Successfully retrieved resource class
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceClass'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource class not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      operationId: deleteResourceClass
      summary: Delete a resource class
      description: Deletes a resource class. This will prevent any runners using this resource class from picking up new tasks.
      tags:
      - Resource Class
      parameters:
      - $ref: '#/components/parameters/ResourceClassParam'
      responses:
        '200':
          description: Resource class deleted successfully
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource class not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ResourceClass:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the resource class
        resource_class:
          type: string
          description: The resource class name in namespace/name format
        description:
          type: string
          description: A description of the resource class
    ResourceClassCreation:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the resource class
        resource_class:
          type: string
          description: The resource class name in namespace/name format
        description:
          type: string
          description: A description of the resource class
        token:
          type: string
          description: The resource class token. This is only displayed once and cannot be retrieved again. Store it securely.
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: A human-readable error message
  parameters:
    ResourceClassParam:
      name: resource-class
      in: path
      required: true
      description: The resource class in namespace/name format
      schema:
        type: string
  securitySchemes:
    apiToken:
      type: apiKey
      in: header
      name: Circle-Token
      description: Personal API token for authenticating with the CircleCI API. Can also be passed as a query parameter.
externalDocs:
  description: CircleCI API v1 Reference
  url: https://circleci.com/docs/api/v1/