You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: jekyll/_cci2/api-developers-guide.md
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -209,7 +209,7 @@ The following section details the steps you would need, from start to finish, to
209
209
}
210
210
```
211
211
212
-
While this alone can be useful, we want to be able to customize parameters of the pipeline when we send this POST request. By including a body parameter in the `curl` request (via the `-d` flag), we can customize specific attributes of the pipeline when it runs: pipeline parameters, the branch, or the git tag. Below, we are telling the pipelines to trigger for "my-branch"
212
+
While this alone can be useful, we want to be able to customize parameters of the pipeline when we send this POST request. By including a body parameter in the `curl` request (via the `-d` flag), we can customize specific attributes of the pipeline when it runs: pipeline parameters, the branch, or the git tag. Below, we are telling the pipelines to trigger for "my-branch"
213
213
214
214
```sh
215
215
curl -X POST https://circleci.com/api/v2/project/{project-slug}/pipeline \
@@ -237,7 +237,7 @@ While this alone can be useful, we want to be able to customize parameters of th
237
237
type: string
238
238
```
239
239
240
-
You will need to declare the parameters you expect to receive from the API. In this case, under the `parameters` key, we definte an "image-tag" to be expected in the JSON payload of a POST request to the _Trigger New Pipeline_ endpoint.
240
+
You will need to declare the parameters you expect to receive from the API. In this case, under the `parameters` key, we definte an "image-tag" to be expected in the JSON payload of a POST request to the _Trigger New Pipeline_ endpoint.
241
241
242
242
7. Now we can run a `curl` request that passes variables in a POST request, similar to the following:
243
243
@@ -275,17 +275,19 @@ You may often find that it would be helpful to retrieve information about a spec
275
275
276
276
You may notice a new concept called a `project-slug` when making this API call. A `project-slug` is a "triplet" that takes the following form:
277
277
278
-
`<project_type>/<org_name>/<repo_name>`
278
+
```
279
+
{project_type}/{org_name}/{repo_name}
280
+
```
279
281
280
282
The `project_slug` is included in the payload when you pull information about a project, which enables you to retrieve detailed information about a specific project.
281
283
282
284
**Note** If you would like more detailed information about a project, or simply need a refresher on the specifics of a project, please refer to the CircleCI [Projects](https://circleci.com/docs/2.0/projects/) page.
283
285
284
286
### Steps
285
287
286
-
Of the several project-related API endpoints available with CircleCI API v2, making a GET request to the `/project/{project-slug}`endpoint enables you to return detailed information about a specific project by passing the `project_slug` parameter with your request.
288
+
Of the several project-related API endpoints available with CircleCI API v2, making a GET request to the `/project/{project-slug}`endpoint enables you to return detailed information about a specific project by passing the `project_slug` parameter with your request.
287
289
288
-
**Note** In this example, please note that whenever you see curly brackets `{}`, this represents a variable that you must manually enter in the request.
290
+
**Note:** whenever you see curly brackets `{}`, this represents a variable that you must manually enter in the request.
289
291
290
292
To return project details, perform the following steps:
0 commit comments