diff --git a/jekyll/_cci2/triggers-overview.adoc b/jekyll/_cci2/triggers-overview.adoc index bc432e91c20..df711cea8a7 100644 --- a/jekyll/_cci2/triggers-overview.adoc +++ b/jekyll/_cci2/triggers-overview.adoc @@ -54,23 +54,23 @@ TIP: If your code is integrated via **GitHub OAuth or Bitbucket Cloud**, you can NOTE: Triggering a pipeline via the CircleCI v2 API is not currently supported for GitLab projects. -[.tab.apitrigger.GitHub_App_/_Bitbucket_Data_Center] +[.tab.trigger-pipeline-api.GitHub_and_Bitbucket] -- -For **projects integrated with GitHub App or Bitbucket Data Center**, you can trigger a pipeline for a project using the link:https://circleci.com/docs/api/v2/index.html#tag/Pipeline/operation/triggerPipelineRun[v2 API endpoint] `https://circleci.com/api/v2/project/circleci///pipeline/run`. +This method is supported for GitHub (OAuth and App) and Bitbucket (Cloud and Data Center) orgs. + +TIP: **GitHub OAuth and Bitbucket Cloud pipelines** can also be triggered using the link:https://circleci.com/docs/api/v2/index.html#operation/triggerPipeline[Trigger a New Pipeline] endpoint, which is described in the **CircleCI server** tab. However, the method outlined in this section is recommended. + +Trigger a pipeline for a project using the link:https://circleci.com/docs/api/v2/index.html#tag/Pipeline/operation/triggerPipelineRun[v2 API endpoint] `https://circleci.com/api/v2/project//pipeline/run`. . If you have not already, get set up to use API v2 by following the steps in the <>. . In the link:https://app.circleci.com/home/[CircleCI web app] select your organization. Over the next few steps you will collect the data you need to trigger your pipeline. -. Find your organization ID: -.. Select **Organization Settings** in the CircleCI web app sidebar. -.. Copy and your organization ID. Save this somewhere, you will need it later. - -. Find your project ID: +. Find your project slug: .. Select **Projects** in the CircleCI web app sidebar. .. Find your project. .. Select the ellipsis menu (icon:ellipsis-h[ellipsis]) and choose **Project Settings**. -.. Copy your project ID. Save this somewhere, you will need it later. +.. Copy your project slug. Save this somewhere, you will need it later. . Find your definition ID: .. You should be in project settings if you are following these steps in sequence. If not see previous steps to get there. Select **Pipelines** in the sidebar. @@ -82,7 +82,7 @@ image::triggers/copy-pipeline-definition-id.png[screenshot showing location of p + [source,shell] ---- -curl -X POST https://circleci.com/api/v2/project/circleci///pipeline/run \ +curl -X POST https://circleci.com/api/v2/project//pipeline/run \ --header "Circle-Token: $CIRCLE_TOKEN" \ --header "content-type: application/json" \ --data '{ @@ -103,17 +103,17 @@ curl -X POST https://circleci.com/api/v2/project/circleci/// . Head back to the CircleCI web app and see your pipeline running on the dashboard. -- -[.tab.apitrigger.GitHub_OAuth_app_/_Bitbucket_Cloud] +[.tab.trigger-pipeline-api.CircleCI_server] -- -For **projects integrated with GitHub OAuth app or Bitbucket Cloud**, you can trigger a pipeline for a project using the link:https://circleci.com/docs/api/v2/index.html#operation/triggerPipeline[Trigger a New Pipeline] endpoint. - . If you have not already, get set up to use API v2 by following the steps in the <>. . To trigger a pipeline from the command line using `curl`, copy and paste this sample request and replace the details in `< >` with your details, VCS can be `gh` or `bb`: + +NOTE: If you are using CircleCI cloud, should be `circleci.com`. ++ [source,shell] ---- -curl -X POST https://circleci.com/api/v2/project////pipeline \ +curl -X POST https:///api/v2/project////pipeline \ --header "Circle-Token: $CIRCLE_TOKEN" \ --header "content-type: application/json" \ --data '{"branch":""}'