Skip to main content
CircleCI logo

CircleCI

Overview

CircleCI is your continuous integration and delivery platform for building, testing, and deploying code with confidence. Connect to CircleCI to build custom internal tools that turbocharge CI/CD. Monitor pipelines, report on job executions, manage job runs, and more.

Setting up CircleCI

Create an access token

  1. In the CircleCI application, go to your User settings
  2. Click Personal API Tokens
  3. Click the Create New Token button
  4. In the Token name field, type a memorable name for the token
  5. Click the Add API Token button
  6. Copy the API key to configure your integration's connection

Learn more about CircleCI Authentication

Add integration

Once you have an access token, you're ready to set up your Superblocks integration.

  1. In the web app, navigate to the Integrations page
  2. Click on the CircleCI tile
  3. Name the integration
  4. Paste your credentials into the relevant fields
  5. Optionally, add more configurations to set credentials for different environments
  6. Click Create
tip

CircleCI connected Now you can use CircleCI in any Application, Workflow, or Scheduled Job.

Use CircleCI in APIs

Once your CircleCI integration is created, you can start calling CircleCI actions in Superblocks APIs.

CircleCI actions are REST requests. To learn more about REST requests in Superblocks, see the Building REST requests guide.

Supported actions

List contexts

List all contexts for an owner.

Create a new context

Get a context

Returns basic information about a context.

Delete a context

List environment variables

List information about environment variables in a context, not including their values.

Add or update an environment variable

Create or update an environment variable within a context. Returns information about the environment variable, not including its value.

Remove an environment variable

Delete an environment variable from a context.

Get summary metrics and trends for a project across it's workflows and branches

Get summary metrics and trends for a project at workflow and branch level. Workflow runs going back at most 90 days are included in the aggregation window. Trends are only supported upto last 30 days. Please note that Insights is not a financial reporting tool and should not be used for precise credit reporting. Credit reporting from Insights does not use the same source of truth as the billing information that is found in the Plan Overview page in the CircleCI UI, nor does the underlying data have the same data accuracy guarantees as the billing information in the CircleCI UI. This may lead to discrepancies between credits reported from Insights and the billing information in the Plan Overview page of the CircleCI UI. For precise credit reporting, always use the Plan Overview page in the CircleCI UI.

Job timeseries data

Get timeseries data for all jobs within a workflow.

Get summary metrics with trends for the entire org, and for each project.

Gets aggregated summary metrics with trends for the entire org. Also gets aggregated metrics and trends for each project belonging to the org.

Get all branches for a project

Get a list of all branches for a specified project. The list will only contain branches currently available within Insights. The maximum number of branches returned by this endpoint is 5,000.

Get flaky tests for a project

Get a list of flaky tests for a given project. Flaky tests are branch agnostic. A flaky test is a test that passed and failed in the same commit.

Get summary metrics for a project's workflows

Get summary metrics for a project's workflows. Workflow runs going back at most 90 days are included in the aggregation window. Metrics are refreshed daily, and thus may not include executions from the last 24 hours. Please note that Insights is not a financial reporting tool and should not be used for precise credit reporting. Credit reporting from Insights does not use the same source of truth as the billing information that is found in the Plan Overview page in the CircleCI UI, nor does the underlying data have the same data accuracy guarantees as the billing information in the CircleCI UI. This may lead to discrepancies between credits reported from Insights and the billing information in the Plan Overview page of the CircleCI UI. For precise credit reporting, always use the Plan Overview page in the CircleCI UI.

Get recent runs of a workflow

Get recent runs of a workflow. Runs going back at most 90 days are returned. Please note that Insights is not a financial reporting tool and should not be used for precise credit reporting. Credit reporting from Insights does not use the same source of truth as the billing information that is found in the Plan Overview page in the CircleCI UI, nor does the underlying data have the same data accuracy guarantees as the billing information in the CircleCI UI. This may lead to discrepancies between credits reported from Insights and the billing information in the Plan Overview page of the CircleCI UI. For precise credit reporting, always use the Plan Overview page in the CircleCI UI.

Get summary metrics for a project workflow's jobs.

Get summary metrics for a project workflow's jobs. Job runs going back at most 90 days are included in the aggregation window. Metrics are refreshed daily, and thus may not include executions from the last 24 hours. Please note that Insights is not a financial reporting tool and should not be used for precise credit reporting. Credit reporting from Insights does not use the same source of truth as the billing information that is found in the Plan Overview page in the CircleCI UI, nor does the underlying data have the same data accuracy guarantees as the billing information in the CircleCI UI. This may lead to discrepancies between credits reported from Insights and the billing information in the Plan Overview page of the CircleCI UI. For precise credit reporting, always use the Plan Overview page in the CircleCI UI.

Get metrics and trends for workflows

Get the metrics and trends for a particular workflow on a single branch or all branches

Get test metrics for a project's workflows

Get test metrics for a project's workflows. Currently tests metrics are calculated based on 10 most recent workflow runs.

Get a list of pipelines

Returns all pipelines for the most recently built projects (max 250) you follow in an organization.

Continue a pipeline

Continue a pipeline from the setup phase.

Get a pipeline by ID

Returns a pipeline by the pipeline ID.

Get a pipeline's configuration

Returns a pipeline's configuration by ID.

Get a pipeline's workflows

Returns a paginated list of workflows by pipeline ID.

Get job details

Returns job details.

Cancel job

Cancel job with a given job number.

Get a job's artifacts

Returns a job's artifacts.

Get test metadata

Get test metadata for a build. In the rare case where there is more than 250MB of test data on the job, no results will be returned.

Current User Information

Provides information about the user that is currently signed in.

Collaborations

Provides the set of organizations of which a user is a member or a collaborator. The set of organizations that a user can collaborate on is composed of: * Organizations that the current user belongs to across VCS types (e.g. BitBucket, GitHub) * The parent organization of repository that the user can collaborate on, but is not necessarily a member of * The organization of the current user's account

User Information

Provides information about the user with the given ID.

Get a workflow

Returns summary fields of a workflow by ID.

Approve a job

Approves a pending approval job in a workflow.

Cancel a workflow

Cancels a running workflow.

Get a workflow's jobs

Returns a sequence of jobs for a workflow.

Rerun a workflow

Reruns a workflow.

List webhooks

Get a list of webhook that match the given scope-type and scope-id

Create a webhook

Get a webhook

Get a webhook by id.

Update a webhook

Delete a webhook

Get a project

Retrieves a project by project slug.

Get all checkout keys

Returns a sequence of checkout keys for `:project`.

Create a new checkout key

Creates a new checkout key. This API request is only usable with a user API token.

Get a checkout key

Returns an individual checkout key.

Delete a checkout key

Deletes the checkout key.

List all environment variables

Returns four 'x' characters, in addition to the last four ASCII characters of the value, consistent with the display of environment variable values on the CircleCI website.

Create an environment variable

Creates a new environment variable.

Get a masked environment variable

Returns the masked value of environment variable :name.

Delete an environment variable

Deletes the environment variable named :name.

Get all pipelines

Returns all pipelines for this project.

Trigger a new pipeline

Triggers a new pipeline on the project.

Get your pipelines

Returns a sequence of all pipelines for this project triggered by the user.

Get a pipeline by pipeline number

Returns a pipeline by the pipeline number.

Get all schedules

Returns all schedules for this project.

Create a schedule

Creates a schedule and returns the created schedule.

Get a schedule

Get a schedule by id.

Update a schedule

Updates a schedule and returns the updated schedule.

Delete a schedule

Deletes the schedule by id.
and 42 more

Generic HTTP Request

Every SaaS integration in Superblocks comes with a built in Generic HTTP Request Action. This is a powerful action you can use to call CircleCI API endpoints not in the Superblocks supported actions.

To use this action simply add the method, path, required query parameters, and body for the desired endpoint.

info

Learn more about REST requests in Superblocks in our Building REST requests guide.

Generic HTTP Requests use the authentication set up and base URL you've configured for your integration, making it an easy for your team to extend Superblocks Integrations to meet their needs.