Skip to content

Commit 4e50f3d

Browse files
authored
Documenting how to find IDs (#9634)
* Create file and associated navigation item * Adding steps to find IDs * Also including alternative methods * Adding screenshots * Adding correct steps for getting pipeline ID from job page * DRY-ing and adding screenshots * Rewording and adding xref * Rewording and fixing xref hash * Fixing typos * Tweaking content and behaviour * Adding note about using the APIs
1 parent ad5522b commit 4e50f3d

File tree

8 files changed

+161
-1
lines changed

8 files changed

+161
-1
lines changed
230 KB
Loading
243 KB
Loading
218 KB
Loading
241 KB
Loading
208 KB
Loading

docs/guides/modules/ROOT/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@
291291
*** xref:integration:authorize-google-cloud-sdk.adoc[Authorize Google Cloud SDK]
292292
293293
* Developer toolkit
294+
** xref:toolkit:how-to-find-ids.adoc[How to find IDs]
294295
** AI features
295296
*** xref:toolkit:using-the-circleci-mcp-server.adoc[Using the CircleCI MCP server]
296297
*** xref:toolkit:intelligent-summaries.adoc[Intelligent summaries]

docs/guides/modules/ROOT/partials/app-navigation/steps-to-project-settings.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
. In the link:https://app.circleci.com[CircleCI web app], select your org from the org cards on your user homepage.
1+
. In the link:https://app.circleci.com[CircleCI web app, window=_blank], select your org from the org cards on your user homepage.
22
. Select **Projects** from the sidebar and locate your project from the list. You can use the search to help.
33
. Select the ellipsis image:guides:ROOT:icons/more.svg[more icon, role="no-border"] next to your project and select **Project Settings**.
44
+
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
= How to find IDs
2+
:page-platform: Cloud
3+
:page-description: "This page describes how customers can find IDs of various CircleCI elements."
4+
:experimental:
5+
6+
You may need to find the ID of specific CircleCI elements to perform various actions, including:
7+
8+
- Making a request to the CircleCI API.
9+
- Running a command from the local CircleCI CLI.
10+
- Identifying a CircleCI element in logs or webhook payloads.
11+
12+
NOTE: This guide covers finding IDs in the CircleCI web app, or from environment variables. It is also possible to find IDs via the xref:reference:ROOT:api-homepage.adoc[CircleCI APIs].
13+
14+
== Get IDs from the built-in environment variables
15+
16+
xref:reference:ROOT:variables.adoc#built-in-environment-variables[Buit-in environment variables, window=_blank], scoped at the job level, include the following IDs:
17+
18+
- `CIRCLE_ORGANIZATION_ID`: The organization ID.
19+
- `CIRCLE_PROJECT_ID`: The project ID.
20+
- `CIRCLE_PIPELINE_ID`: The pipeline ID.
21+
- `CIRCLE_WORKFLOW_ID`: The workflow ID.
22+
- `CIRCLE_WORKFLOW_JOB_ID`: The job ID.
23+
24+
To view all environment variables available at the job level, follow these steps:
25+
26+
. In the link:https://app.circleci.com[CircleCI web app, window=_blank], select your org from the org cards on your user homepage.
27+
. Select **Projects** from the sidebar and locate your project from the list. You can use the search to help.
28+
. Select the menu:Pipelines[] next to your project.
29+
. Expand a workflow run.
30+
. Select a job from that workflow run.
31+
. On the job page, expand the menu:Preparing environment variables[] step.
32+
. Locate the relevant environment variable(s) and note the associated value(s).
33+
34+
image::guides:ROOT:ids-from-env-vars.png[IDs available from built-in environment variables]
35+
36+
== Find your user ID
37+
38+
The user ID is a unique identifier for a user. Follow these steps to find it in the CircleCI web app:
39+
40+
. In the CircleCI application, go to your link:https://app.circleci.com/settings/user[User settings, window=_blank].
41+
. On the menu:Account Integrations[] page, locate the **User ID** label.
42+
. Note the value or select the btn:[Copy] icon next to your user ID.
43+
44+
45+
== Find an organization ID
46+
47+
The organization ID is a unique identifier for an organization.
48+
49+
You can access the organization ID through the `CIRCLE_ORGANIZATION_ID` xref:get-ids-from-the-built-in-environment-variables[built-in environment variable]. Alternatively, follow these steps to find it in the CircleCI web app:
50+
51+
. In the link:https://app.circleci.com[CircleCI web app, window=_blank], select your org from the org cards on your user homepage.
52+
. Navigate to menu:Organization Settings[Overview] in the CircleCI web app.
53+
. Note the value or select the btn:[Copy] icon next to the organization ID.
54+
55+
56+
== Find a project ID
57+
58+
The project ID is a unique identifier for a project.
59+
60+
You can access the project ID through the `CIRCLE_PROJECT_ID` xref:get-ids-from-the-built-in-environment-variables[built-in environment variable]. Alternatively, follow these steps to find it in the CircleCI web app:
61+
62+
include::guides:ROOT:partial$app-navigation/steps-to-project-settings.adoc[]
63+
64+
. On the menu:Overview[] page, note the value or select the btn:[Copy] icon next to the project ID.
65+
66+
67+
== Find a pipeline ID
68+
69+
The pipeline ID is a unique identifier for a pipeline that has been triggered.
70+
71+
You can access the pipeline ID through the `CIRCLE_PIPELINE_ID` xref:get-ids-from-the-built-in-environment-variables[built-in environment variable]. Alternatively, follow these steps to find it in the CircleCI web app:
72+
73+
74+
[tabs]
75+
====
76+
77+
From the pipelines dashboard::
78+
+
79+
. In the link:https://app.circleci.com[CircleCI web app, window=_blank], select your org from the org cards on your user homepage.
80+
. Select **Projects** from the sidebar and locate your project from the list. You can use the search to help.
81+
. Select the menu:Pipelines[] next to your project.
82+
. Select the ellipsis image:guides:ROOT:icons/more.svg[more icon, role="no-border"] next to any workflow run of the pipeline.
83+
. In the contextual menu, select btn:[Copy Pipeline ID].
84+
85+
+
86+
image::guides:ROOT:pipeline-id.png[Copy pipeline ID from pipelines dashboard]
87+
88+
From the workflow page::
89+
+
90+
. In the link:https://app.circleci.com[CircleCI web app, window=_blank], select your org from the org cards on your user homepage.
91+
. Select **Projects** from the sidebar and locate your project from the list. You can use the search to help.
92+
. Select the menu:Pipelines[] next to your project.
93+
. Select any workflow run of the pipeline you want to find the ID for.
94+
. On the workflow page, select the ellipsis image:guides:ROOT:icons/more.svg[more icon, role="no-border"] at the top-right of the page (next to the btn:[Rerun] button).
95+
. In the contextual menu, select btn:[Copy Pipeline ID].
96+
97+
+
98+
image::guides:ROOT:pipeline-id-from-workflow.png[Copy pipeline ID from workflow page]
99+
100+
From the job page::
101+
+
102+
. In the link:https://app.circleci.com[CircleCI web app, window=_blank], select your org from the org cards on your user homepage.
103+
. Select **Projects** from the sidebar and locate your project from the list. You can use the search to help.
104+
. Select the menu:Pipelines[] next to your project.
105+
. Select any workflow run from the pipeline you want to find the ID for.
106+
. Select any job from that workflow run.
107+
. On the job page, select the ellipsis image:guides:ROOT:icons/more.svg[more icon, role="no-border"] at the top-right of the page (next to the btn:[Rerun] button).
108+
. In the contextual menu, select btn:[Copy Pipeline ID].
109+
110+
+
111+
image::guides:ROOT:pipeline-id-from-job.png[Copy pipeline ID from job page]
112+
====
113+
114+
115+
116+
== Find a workflow ID
117+
118+
The workflow ID is a unique identifier for a workflow that has been triggered.
119+
120+
You can access the workflow ID through the `CIRCLE_WORKFLOW_ID` xref:get-ids-from-the-built-in-environment-variables[built-in environment variable]. Alternatively, follow these steps to find it in the CircleCI web app:
121+
122+
[tabs]
123+
====
124+
125+
From the workflow URL::
126+
+
127+
. In the link:https://app.circleci.com[CircleCI web app, window=_blank], select your org from the org cards on your user homepage.
128+
. Select **Projects** from the sidebar and locate your project from the list. You can use the search to help.
129+
. Select the menu:Pipelines[] next to your project.
130+
. Select the workflow run you want to find the ID for.
131+
. Check the URL of the page. The workflow ID is the last alphanumeric string of the URL, after the `/workflows/` string.
132+
133+
+
134+
image::guides:ROOT:workflow-id-from-workflow-url.png[Get workflow ID from workflow page URL]
135+
136+
From the job URL::
137+
+
138+
. In the link:https://app.circleci.com[CircleCI web app, window=_blank], select your org from the org cards on your user homepage.
139+
. Select **Projects** from the sidebar and locate your project from the list. You can use the search to help.
140+
. Select the menu:Pipelines[] next to your project.
141+
. Select the workflow run you want to find the ID for.
142+
. Select any job from that workflow run.
143+
. Check the URL of the page. The workflow ID is the alphanumeric string of the URL located between the `/workflows/` and the `/jobs/` strings.
144+
145+
+
146+
image::guides:ROOT:workflow-id-from-job-url.png[Get workflow ID from job page URL]
147+
====
148+
149+
== Find a pipeline definition ID
150+
151+
The pipeline definition ID is a unique identifier for a pipeline definition. Follow these steps to find it in the CircleCI web app:
152+
153+
include::guides:ROOT:partial$app-navigation/steps-to-project-settings.adoc[]
154+
155+
. Navigate to the menu:Project Setup[] page.
156+
. Locate the pipeline definition you want to find the ID for.
157+
. Note the value below the pipeline name or select the btn:[Copy] icon next to the pipeline definition ID.
158+
159+
image::guides:ROOT:orchestrate-and-trigger/pipeline-definition-id.png[Get pipeline definition ID]

0 commit comments

Comments
 (0)