Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit746c40a

Browse files
committed
Update analytics-api-examples.md
1 parent129faf5 commit746c40a

File tree

1 file changed

+26
-22
lines changed

1 file changed

+26
-22
lines changed

‎_docs/api-examples/analytics-api-examples.md‎

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,18 @@ Filtering by name returns pipelines whose names match or contain the specified t
4747

4848
###Endpoint
4949

50-
`GET https://g.codefresh.io/api/analytics/reports/pipelinesDropdown`
50+
`GET https://g.codefresh.io/api/analytics/reports/pipelinesDropdown&filters={"name":[array<string>]}`
51+
5152

5253

5354

5455
###Query parameters
5556

5657

5758
{: .table .table-bordered .table-hover}
58-
| Setting | Description | Data Type | Required/Optional
59-
|`name`| The name of the pipeline or a part of the name by which to filter the pipelines. For example, filtering by`name`=`e-to-e` retrieves all pipelines that include`e-to-e` in their names.|[array<string>]| Optional|
59+
| Parameter| Description| Data Type| Required/Optional|
60+
| ------------| --------------| ------| ------------------|
61+
|`filters`|`name`: The name of the pipeline or a part of the name by which to filter the pipelines.<br>For example, filtering by`name`=`e-to-e` retrieves all pipelines that include`e-to-e` in their names.|[array<string>]| Optional|
6062

6163

6264
###Request examples
@@ -162,27 +164,28 @@ Here's an example of the
162164
```
163165

164166
##Get average build duration
165-
Retrieves the average execution duration of pipeline builds.
167+
Retrieves the average execution duration of pipeline builds for the specified time frame.
166168
The average (mean) duration is calculated by dividing the total execution time by the number of builds, providing an overall measure of pipeline performance.
167169

168-
You can filterpipeline builds by either a project, specific pipeline, status, or by the favorites tag.
170+
You can filterbuild data by either a project, a specific pipeline, status, or by the favorites tag.
169171

170172
###Endpoint
171-
`GET https://g.codefresh.io/api/analytics/reports/buildAvgDuration?granularity=month`
173+
`GET https://g.codefresh.io/api/analytics/reports/buildAvgDuration?dateRange=granularity=<granularity>?filters={"filter-type":[array<string>]}`
172174

173175

174176

175177
###Query parameters
178+
176179
{: .table .table-bordered .table-hover}
177180
| Setting| Description| Data Type| Required/Optional|
181+
| -----------|-----------------|-----------|------------------|
178182
| `dateRange` | The time frame for which to generate the report, from a minimum of one day to a maximum of six months. The start and end dates must be in `yyyy-mm-dd` (ISO 8601) formats. For example, `dateRange=2024-09-05dateRange=2024-09-01`. | <!--- `dateRange` | The custom or fixed time frame for which to generate the report. {::nomarkdown}<ul><li><b>Custom</b>: Requires the start and end dates in <code class="highlighter-rouge">yyyy-mm-dd</code> (ISO 8601) formats, separated by <code class="highlighter-rouge">&</code>. For example, <code class="highlighter-rouge">dateRange=2024-09-05dateRange=2024-09-01</code>.</li><li><b>Today</b>: <code class="highlighter-rouge">today</code></li><li><b>Last 7 days</b>: The previous seven days starting from today in encoded format. For example, <code class="highlighter-rouge">last%207%20days%20</code>.</li><li><b>Last 30 days</b>: The previous 30 days starting from today in encoded format. For example, <code class="highlighter-rouge">last%2030%20days%20</code>.</li></ul>{:/} | --> string | Required |
179183
|`granularity`| The level of detail or resolution at which to present the data in the report. The`granularity` levels depend on the`dateRange` defined. {::nomarkdown}<ul><li><b>0 days to 6 months</b>: No granularity.</li><li><b> 1 to 4 days</b>: <codeclass="highlighter-rouge">hour</code>.</li><li><b>1 day to 3 months</b>: <codeclass="highlighter-rouge">day</code></li><li><b>Up to 6 months</b>: <codeclass="highlighter-rouge">week</code> or <codeclass="highlighter-rouge">month</code>.</li></ul>{:/}| string| Optional|
180-
|`projectId`| The ID/IDs of the project(s) with the pipeline builds for which to include data. To include data for specific pipelines, omit this filter and use`pipelineId` instead.| array| Optional|
181-
|`granularity`| The level of detail or resolution at which to present the data in the report. The`granularity` levels depend on the`dateRange` defined. {::nomarkdown}<ul><li><b>Up to 6 months</b>: No granularity.</li><li><b>1 to 4 days</b>: <codeclass="highlighter-rouge">hour</code>.</li><li><b>1 day to 3 months</b>: <codeclass="highlighter-rouge">day</code></li><li><b>Up to 6 months</b>: <codeclass="highlighter-rouge">week</code> or <codeclass="highlighter-rouge">month</code>.<br>When omitted, the default granularity of ???? is used.</li></ul>{:/}| string| Optional|
182-
|`projectId`| The ID/IDs of the project(s) with the pipeline builds for which to include data. To include data for specific pipeline builds, omit this filter and use`pipelineId` instead.| array| Optional|
183-
|`pipelineId`| The ID/IDs of the pipeline(s) for which to include data. To include data for all pipeline builds in a project, omit this filter, and use`projectId` instead.| array| Optional|
184-
|`status`| The build statuses by which to filter pipelines. <br>Can be one of the following: {::nomarkdown}<ul><li><codeclass="highlighter-rouge">error</code>: Pipelines with builds that failed due to errors in the pipeline specifications or with failed steps.</li><li><codeclass="highlighter-rouge">succeeded</code>: Pipelines with builds that completed successfully.</li><li><codeclass="highlighter-rouge">terminated</code>: TPipelines with builds terminated by the system according to the policy defined in the pipeline's settings. See <ahref="https://codefresh.io/docs/docs/pipelines/pipelines/#policies">Build termination in pipeline policies</a>.</li></ul>{:/}| array| Optional|
185-
|`isFavorites`| Include only project or pipelines that have been starred as favorites. (NIMA: what is the default)| boolean| Optional|
184+
|`filters` | The filters by which to narrow the scope of the build data. Can be any of the following:
185+
||`projectId`: The ID/IDs of the project(s) with the pipeline builds for which to include data. To include data for specific pipelines, omit this filter and use`pipelineId` instead.| array| Optional|
186+
||`pipelineId`: The ID/IDs of the pipeline(s) for which to include data. To include data for all pipeline builds in a project, omit this filter, and use`projectId` instead.| array| Optional|
187+
||`status`: The build statuses by which to filter pipelines. <br>Can be one of the following: {::nomarkdown}<ul><li><codeclass="highlighter-rouge">error</code>: Pipelines with builds that failed due to errors in the pipeline specifications or with failed steps.</li><li><codeclass="highlighter-rouge">succeeded</code>: Pipelines with builds that completed successfully.</li><li><codeclass="highlighter-rouge">terminated</code>: TPipelines with builds terminated by the system according to the policy defined in the pipeline's settings. See <ahref="https://codefresh.io/docs/docs/pipelines/pipelines/#policies">Build termination in pipeline policies</a>.</li></ul>{:/}| array| Optional|
188+
||`isFavorites`: Include only project or pipelines that have been starred as favorites. (NIMA: what is the default)| boolean| Optional|
186189

187190

188191
###Request examples
@@ -282,10 +285,11 @@ This metric helps you assess the overall performance without being skewed by out
282285
| Setting| Description| Data Type| Required/Optional|
283286
|`dateRange`| The time frame for which to generate the report, from a minimum of one day to a maximum of six months. The start and end dates must be in`yyyy-mm-dd` (ISO 8601) formats. For example,`dateRange=2024-09-05dateRange=2024-09-01`.| string| Required|
284287
|`granularity`| The level of detail or resolution at which to present the data in the report. The`granularity` levels depend on the`dateRange` defined. {::nomarkdown}<ul><li><b>Up to 6 months</b>: No granularity.</li><li><b> 1 to 4 days</b>: <codeclass="highlighter-rouge">hour</code>.</li><li><b>1 day to 3 months</b>: <codeclass="highlighter-rouge">day</code></li><li><b>Up to 6 months</b>: <codeclass="highlighter-rouge">week</code> or <codeclass="highlighter-rouge">month</code>.<br>When omitted, the default granularity of ???? is used.</li></ul>{:/}| string| Optional|
285-
|`projectId`| The ID/IDs of the project(s) with the pipeline builds for which to include data. To include data for specific pipeline builds, omit this filter and use`pipelineId` instead.| array| Optional|
286-
|`pipelineId`| The ID/IDs of the pipeline(s) for which to include data. To include data for all pipeline builds in a project, omit this filter, and use`projectId` instead.| array| Optional|
287-
|`status`| The build statuses by which to filter pipelines. <br>Can be one of the following: {::nomarkdown}<ul><li><codeclass="highlighter-rouge">error</code>: Pipelines with builds that failed due to errors in the pipeline specifications or with failed steps.</li><li><codeclass="highlighter-rouge">succeeded</code>: Pipelines with builds that completed successfully.</li><li><codeclass="highlighter-rouge">terminated</code>: TPipelines with builds terminated by the system according to the policy defined in the pipeline's settings. See <ahref="https://codefresh.io/docs/docs/pipelines/pipelines/#policies">Build termination in pipeline policies</a>.</li></ul>{:/}| array| Optional|
288-
|`isFavorites`| Include only project or pipelines that have been starred as favorites. (NIMA: what is the default)| boolean| Optional|
288+
|`filters` | The filters by which to narrow the scope of the build data. Can be any of the following:
289+
||`projectId`: The ID/IDs of the project(s) with the pipeline builds for which to include data. To include data for specific pipelines, omit this filter and use`pipelineId` instead.| array| Optional|
290+
||`pipelineId`: The ID/IDs of the pipeline(s) for which to include data. To include data for all pipeline builds in a project, omit this filter, and use`projectId` instead.| array| Optional|
291+
||`status`: The build statuses by which to filter pipelines. <br>Can be one of the following: {::nomarkdown}<ul><li><codeclass="highlighter-rouge">error</code>: Pipelines with builds that failed due to errors in the pipeline specifications or with failed steps.</li><li><codeclass="highlighter-rouge">succeeded</code>: Pipelines with builds that completed successfully.</li><li><codeclass="highlighter-rouge">terminated</code>: TPipelines with builds terminated by the system according to the policy defined in the pipeline's settings. See <ahref="https://codefresh.io/docs/docs/pipelines/pipelines/#policies">Build termination in pipeline policies</a>.</li></ul>{:/}| array| Optional|
292+
||`isFavorites`: Include only project or pipelines that have been starred as favorites. (NIMA: what is the default)| boolean| Optional|
289293

290294

291295
###Request examples
@@ -344,7 +348,7 @@ at the pipeline, trigger, and branch levels.
344348
Here's an example of the
345349

346350
```
347-
{"statusCode":400,"message":"no changes found between source and destination applications","error":"Bad Request"}
351+
348352
```
349353

350354

@@ -368,11 +372,11 @@ This metric is useful for identifying performance issues that affect the slowest
368372
| Setting| Description| Data Type| Required/Optional|
369373
|`dateRange`| The time frame for which to generate the report, from a minimum of one day to a maximum of six months. The start and end dates must be in`yyyy-mm-dd` (ISO 8601) formats. For example,`dateRange=2024-09-05dateRange=2024-09-01`.| string| Required|
370374
|`granularity`| The level of detail or resolution at which to present the data in the report. The`granularity` levels depend on the`dateRange` defined. {::nomarkdown}<ul><li><b>Up to 6 months</b>: No granularity.</li><li><b> 1 to 4 days</b>: <codeclass="highlighter-rouge">hour</code>.</li><li><b>1 day to 3 months</b>: <codeclass="highlighter-rouge">day</code></li><li><b>Up to 6 months</b>: <codeclass="highlighter-rouge">week</code> or <codeclass="highlighter-rouge">month</code>.<br>When omitted, the default granularity of ???? is used.</li></ul>{:/}| string| Optional|
371-
|`projectId`| TheID/IDs of the project(s) with thepipeline builds for which to includedata.To include data for specific pipeline builds, omit this filter and use`pipelineId` instead.| array| Optional|
372-
|`pipelineId`|The ID/IDs of thepipeline(s) for which to include data. To include data forall pipeline builds in a project, omit this filter, and use`projectId` instead.| array| Optional|
373-
|`status`| The build statuses by which to filter pipelines. <br>Can be one of the following: {::nomarkdown}<ul><li><codeclass="highlighter-rouge">error</code>: Pipelines with builds that failed due to errors inthe pipeline specifications or with failed steps.</li><li><codeclass="highlighter-rouge">succeeded</code>: Pipelines with builds that completed successfully.</li><li><codeclass="highlighter-rouge">terminated</code>: TPipelines withbuildsterminated by the system according to the policy definedinthe pipeline's settings. See <ahref="https://codefresh.io/docs/docs/pipelines/pipelines/#policies">Build termination in pipeline policies</a>.</li></ul>{:/}| array| Optional|
374-
|`isFavorites`| Include only project orpipelinesthathave been starred as favorites. (NIMA: what isthedefault)| boolean| Optional|
375-
375+
|`filters` | Thefilters by which to narrow thescope of the builddata.Can be any of the following:
376+
||`projectId`:The ID/IDs of theproject(s)with the pipeline buildsfor which to include data. To include data forspecific pipelines, omit this filter and use`pipelineId` instead.| array| Optional|
377+
||`pipelineId`: The ID/IDs ofthe pipeline(s) for which to include data. To include data for all pipelinebuilds ina project, omit this filter, and use`projectId` instead.| array| Optional|
378+
||`status`: The build statuses by which to filterpipelines. <br>Can be one of the following: {::nomarkdown}<ul><li><codeclass="highlighter-rouge">error</code>: Pipelines with buildsthatfailed due to errors in the pipeline specifications or with failed steps.</li><li><codeclass="highlighter-rouge">succeeded</code>: Pipelines with builds that completed successfully.</li><li><codeclass="highlighter-rouge">terminated</code>: TPipelines with builds terminated bythesystem according to the policy defined in the pipeline's settings. See <ahref="https://codefresh.io/docs/docs/pipelines/pipelines/#policies">Build termination in pipeline policies</a>.</li></ul>{:/}| array| Optional|
379+
||`isFavorites`: Include only project or pipelines that have been starred as favorites. (NIMA: what is the default)| boolean| Optional|
376380

377381
###Request examples
378382

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp