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

Commitd09f265

Browse files
committed
Update analytics-api-examples.md
1 parentbab014f commitd09f265

File tree

1 file changed

+221
-25
lines changed

1 file changed

+221
-25
lines changed

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

Lines changed: 221 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ Currently, you do not need to select specific scopes for the API key.
3030

3131

3232

33-
##Get list of pipelines
33+
##Get list of pipelines/pipelinesDropdown
3434

35-
Gets the list of
35+
Gets the list of pipelines - max number? what are the default settings?
36+
by pipeline name or ID.
3637

3738

3839
###Headers
@@ -51,47 +52,242 @@ For a description of the fields, see [Request parameters](#request-parameters).
5152

5253
###Request example
5354

54-
The request isformatted in curl.
55+
The request isan HTTP GET request.
5556

5657
```
57-
curl -X POST https://codefresh-hosted-gitops-runtime.com/api/promotions/commit \
58-
--header "content-type: application/json" \
59-
--header "Authorization: 214ffb**************" \
60-
--data
58+
GET https://g.codefresh.io/api/analytics/reports/pipelinesDropdown
59+
```
60+
###Response example
61+
62+
####Success
63+
Here's an example of the response for a successful request.
64+
65+
For each pipeline, the following data is returned.
66+
*`id`: The ID of the pipeline, generated when the pipeline was created.
67+
*`pipelineName`: The full name of the pipeline, including the project name, in the format`"<project-name>/<pipeline-name>"`.
68+
*`shortName`: The name of the pipeline, without the project name.
69+
*`isDeleted`: Indicates if the pipeline has been deleted from the account (`true`), or not (`false`).
70+
71+
```json
6172
{
62-
\"srcAppId\": {
63-
\"runtime\": \"codefresh\",
64-
\"namespace\": \"orders-qa\",
65-
\"name\": \"orders-qa-us-east\"
66-
},
67-
\"destAppId\": {
68-
\"runtime\": \"codefresh\",
69-
\"namespace\": \"orders-prod\",
70-
\"name\": \"orders-prod-us-east\"
73+
"data": [
74+
{
75+
"id":"61a893f69ff69e2cf086f12d",
76+
"pipelineName":"NimaCFProject/BasicPipeline",
77+
"shortName":"basicpipeline",
78+
"isDeleted":false
79+
},
80+
{
81+
"id":"632afb121899584bf3ec14f8",
82+
"pipelineName":"default/NimaCronLink",
83+
"shortName":"nimacronlink",
84+
"isDeleted":false
85+
},
86+
{
87+
"id":"6372180f39b06e632745555d",
88+
"pipelineName":"test",
89+
"shortName":"test",
90+
"isDeleted":false
91+
},
92+
{
93+
"id":"639ede86ec4d257410904ba7",
94+
"pipelineName":"NimaCFProject/StepTest",
95+
"shortName":"steptest",
96+
"isDeleted":false
97+
},
98+
{
99+
"id":"63b58656e8dad136b2a74927",
100+
"pipelineName":"my-first-project/My Pipeline",
101+
"shortName":"my pipeline",
102+
"isDeleted":false
103+
},
104+
{
105+
"id":"641fe3c0ba826b3e53d3bbbd",
106+
"pipelineName":"TestTags",
107+
"shortName":"testtags",
108+
"isDeleted":false
109+
},
110+
{
111+
"id":"641fe485ba826b8fe8d3bbbe",
112+
"pipelineName":"MyPipelines",
113+
"shortName":"mypipelines",
114+
"isDeleted":false
115+
},
116+
{
117+
"id":"6423edc4dbc27269e2693bb6",
118+
"pipelineName":"NimaCFProject/Restart",
119+
"shortName":"restart",
120+
"isDeleted":false
121+
},
122+
{
123+
"id":"642578967afcb3664998231a",
124+
"pipelineName":"AnnotatePipeline",
125+
"shortName":"annotatepipeline",
126+
"isDeleted":false
127+
},
128+
{
129+
"id":"64cb4160795de76fcd8b5b29",
130+
"pipelineName":"MyPipelines template",
131+
"shortName":"mypipelines template",
132+
"isDeleted":false
133+
},
134+
{
135+
"id":"64cb42f2993fc4da530b8756",
136+
"pipelineName":"mu",
137+
"shortName":"mu",
138+
"isDeleted":false
139+
},
140+
141+
{
142+
"id":"66f246ff58c8309825491a5a",
143+
"pipelineName":"Marvel/smoke-tests",
144+
"shortName":"smoke-tests",
145+
"isDeleted":false
146+
}
147+
]
71148
},
72-
\"message\": \"Update image tag and bump version\"
73-
}"
149+
150+
"timeDimensions": {}
151+
```
152+
153+
####Failure
154+
Here's an example of the
155+
156+
```
157+
{"statusCode":400,"message":"no changes found between source and destination applications","error":"Bad Request"}
158+
```
159+
160+
##Get list of pipeline by name
161+
162+
Get the list of pipelines that correspond to the name passed as the query parameter.
163+
You can either pass the complete name of the pipeline or a partial name. In which case, returns all pipelines including those characters.
164+
by pipeline name or ID.
165+
166+
167+
###Headers
168+
The API authorization token must be included in the header of the API request. See[Authorization](#authorization).
169+
170+
```
171+
content-type: application/json
172+
Authorization: <TOKEN>
173+
```
174+
175+
###Request body
176+
177+
For a description of the fields, see[Request parameters](#request-parameters).
178+
179+
180+
181+
###Request example
182+
183+
The request is an HTTP GET request.
184+
185+
```
186+
GET https://g.codefresh.io/api/analytics/reports/pipelinesDropdown/?filters={"name":["<pipeline-name>"]}
74187
```
75188
###Response example
76189

77190
####Success
78191
Here's an example of the response for a successful request.
79-
It includes the:
80-
* Commit SHA
81-
* Commit message
82-
* Name and email of the user who authored the commit
83192

193+
For each pipeline, the following data is returned.
194+
*`id`: The ID of the pipeline, generated when the pipeline was created.
195+
*`pipelineName`: The full name of the pipeline, including the project name, in the format`"<project-name>/<pipeline-name>"`.
196+
*`shortName`: The name of the pipeline, without the project name.
197+
*`isDeleted`: Indicates if the pipeline has been deleted from the account (`true`), or not (`false`).
198+
199+
```json
200+
{
201+
"data": [
202+
{
203+
"id":"61a893f69ff69e2cf086f12d",
204+
"pipelineName":"NimaCFProject/BasicPipeline",
205+
"shortName":"basicpipeline",
206+
"isDeleted":false
207+
},
208+
{
209+
"id":"632afb121899584bf3ec14f8",
210+
"pipelineName":"default/NimaCronLink",
211+
"shortName":"nimacronlink",
212+
"isDeleted":false
213+
},
214+
{
215+
"id":"6372180f39b06e632745555d",
216+
"pipelineName":"test",
217+
"shortName":"test",
218+
"isDeleted":false
219+
},
220+
{
221+
"id":"639ede86ec4d257410904ba7",
222+
"pipelineName":"NimaCFProject/StepTest",
223+
"shortName":"steptest",
224+
"isDeleted":false
225+
},
226+
{
227+
"id":"63b58656e8dad136b2a74927",
228+
"pipelineName":"my-first-project/My Pipeline",
229+
"shortName":"my pipeline",
230+
"isDeleted":false
231+
},
232+
{
233+
"id":"641fe3c0ba826b3e53d3bbbd",
234+
"pipelineName":"TestTags",
235+
"shortName":"testtags",
236+
"isDeleted":false
237+
},
238+
{
239+
"id":"641fe485ba826b8fe8d3bbbe",
240+
"pipelineName":"MyPipelines",
241+
"shortName":"mypipelines",
242+
"isDeleted":false
243+
},
244+
{
245+
"id":"6423edc4dbc27269e2693bb6",
246+
"pipelineName":"NimaCFProject/Restart",
247+
"shortName":"restart",
248+
"isDeleted":false
249+
},
250+
{
251+
"id":"642578967afcb3664998231a",
252+
"pipelineName":"AnnotatePipeline",
253+
"shortName":"annotatepipeline",
254+
"isDeleted":false
255+
},
256+
{
257+
"id":"64cb4160795de76fcd8b5b29",
258+
"pipelineName":"MyPipelines template",
259+
"shortName":"mypipelines template",
260+
"isDeleted":false
261+
},
262+
{
263+
"id":"64cb42f2993fc4da530b8756",
264+
"pipelineName":"mu",
265+
"shortName":"mu",
266+
"isDeleted":false
267+
},
268+
269+
{
270+
"id":"66f246ff58c8309825491a5a",
271+
"pipelineName":"Marvel/smoke-tests",
272+
"shortName":"smoke-tests",
273+
"isDeleted":false
274+
}
275+
]
276+
},
277+
278+
"timeDimensions": {}
84279
```
85-
{"COMMIT_SHA":"ff46cab5a4c94fc2db215b2bd2102da05c5314ba","COMMIT_MESSAGE":"bumped version","COMMIT_AUTHOR":"codefresh-user <codefresh.user@codefresh.io>"}
86-
```
280+
87281
####Failure
88-
Here's an example of theresponse for a failed request when there were no changes to promote between the source and the destination applications.
282+
Here's an example of the
89283

90284
```
91285
{"statusCode":400,"message":"no changes found between source and destination applications","error":"Bad Request"}
92286
```
93287

94288

289+
290+
95291
##POST`/promotions/pullRequest`
96292

97293
Promotes the application from the source environment to the destination or target environment through a`pull request` as the promotion action.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp