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: umbraco-cloud/set-up/project-settings/umbraco-cicd/UmbracoCloudApi.md
+36-28Lines changed: 36 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,14 @@
1
-
# Cloud API For CI/CD Flow v2
1
+
# Cloud API For CI/CD Flow
2
2
3
-
For the v2 endpoints we want to give you even more control over the process.
3
+
With the endpoints for version 2, you are given more control over the process.
4
4
5
5
The V1 endpoints are still available, you can see the [V1 api documentation here](./V1-UmbracoCloudApi.md).
6
6
7
-
## Changes between V1 and V2 endpoints
7
+
## Changes between endpoints for version 1 and 2
8
8
9
9
These are the most important differences between the V1 and V2 endpoints:
10
-
- We have added the posibility to target a flexible environment or the left-most environment.
10
+
11
+
- With version 2, it is possible to target a flexible environment or the left-most environment.
11
12
- More options are available when deploying.
12
13
- Simplified api call flow: Uploading an artifact is decoupled from the actual deployment.
13
14
@@ -18,13 +19,16 @@ These are the most important differences between the V1 and V2 endpoints:
18
19
To integrate Umbraco Cloud into your CI/CD pipeline, you'll need to make API calls to the following endpoint [`https://api.cloud.umbraco.com`](https://api.cloud.umbraco.com):
The Create Deployment endpoint start a new deployment and returns a unique `deploymentId`.
179
+
The Create Deployment endpoint starts a new deployment and returns a unique `deploymentId`.
175
180
176
181
Some new options are available to use in the request payload:
182
+
177
183
-`artifactId`**REQUIRED** Id of the artifact you want to deploy
178
184
-`targetEnvironmentAlias`**REQUIRED** Alias of the environment you want to deploy to
179
185
-`commitMessage`**OPTIONAL** The commit message you want stamped in the Umbraco Cloud environment repository.
@@ -222,26 +228,27 @@ The response from the API should be an HTTP 201 Created response including a `de
222
228
},
223
229
],
224
230
"createdUtc": string,
225
-
"completedUtc":string,
231
+
"completedUtc":string,
226
232
"modifiedUtc": string
227
233
}
228
234
```
229
235
230
236
You can use the deploymentId to query the Get Deployment status endpoint.
231
237
232
238
{% hint style="info" %}
233
-
We recommend that you don't enable the `skipVersionCheck`to ensure that versions of the various Umbraco packages in the Cloud environment does not get overwritten by older versions. However there may be instances where you would like to deploy an older artifact, and for those cases it is possible to enable this setting to skip the step.
239
+
It is not recommended to enable the `skipVersionCheck`. This is to ensure that versions of the various Umbraco packages in the Cloud environment aren't overwritten by older versions. However, there may be instances where you would like to deploy an older artifact, and for those cases, it is possible to enable this setting to skip the step.
234
240
235
-
Enabling the `noBuildAndRestore` only disabled the restore and build inside the isolated instance. Once the system pushes the source code to the environment, the regular Cloud flow takes over and a build and publish operation will run as usual. One minute or more can be saved during the deployment process by enabling this option.
241
+
Enabling the `noBuildAndRestore` only disabled the restore and build inside the isolated instance. Once the system pushes the source code to the environment, the regular Cloud flow takes over, and a build and publish operation will run as usual. One minute or more can be saved during the deployment process by enabling this option.
236
242
{% endhint %}
237
243
238
244
### Get Deployment status
239
245
240
-
To monitor the status of a deployment — whether it's completed, successful, or otherwise — you can periodically query the 'Get Deployment Status' API. This API endpoint is an HTTP GET request to the Umbraco Cloud API, and it requires both the `projectId` and the `deploymentId` obtained from previous steps to be included in the path.
246
+
To monitor the status of a deployment, you can periodically query the 'Get Deployment Status' API. This API endpoint is an HTTP GET request to the Umbraco Cloud API, and it requires both the `projectId` and the `deploymentId` obtained from previous steps to be included in the path.
241
247
242
248
Deployments in Umbraco services can take varying amounts of time to complete. Therefore, it's advisable to poll this API at regular intervals to stay updated on the deployment's current state. For example, in a simple project, you might choose to poll the API every 25 seconds for a duration of 15 minutes. These figures are just a starting point; the optimal polling frequency and duration may differ for your specific pipeline.
243
249
244
-
A new query-parameter has been added to limit the deploymentStatusMessages. As value for the query-parameter you can use the `modifiedUtc` value from a previous response.
250
+
A new query parameter has been added to limit the deploymentStatusMessages. As a value for the query parameter you can use the `modifiedUtc` value from a previous response.
251
+
245
252
-`lastModifiedUtc`**OPTIONAL** Only show new deploymentStatusMessages since this point in time.
246
253
247
254
{% tabs %}
@@ -285,16 +292,16 @@ Should the deployment fail, check the `deploymentStatusMessages` for more inform
285
292
286
293
### Get Deployments
287
294
288
-
The endpoint lets you retrieve a list of completed deployments. It can only list deployments that has been run through the api.
295
+
The endpoint lets you retrieve a list of completed deployments. It can only list deployments that have been run through the api.
289
296
290
297
The API allows you to filter and limit the number of returned deployments using query parameters:
298
+
291
299
-`Skip` : **OPTIONAL** zero or positive integer
292
300
-`Take` : **OPTIONAL** zero or positive integer
293
301
-`Includenulldeployments` : **OPTIONAL** boolean, defaults to true
294
302
-`TargetEnvironmentAlias`**OPTIONAL** Will query only for deployments to a specific environment.
295
303
296
-
297
-
The "skip" and "take" parameters, while optional, are always required to be used together.
304
+
The `skip` and `take` parameters, while optional, are always required to be used together.
298
305
299
306
With `includenulldeployments` set to true, you will get all completed deployments, including those that did not create any new changes in the cloud repository.
The response from this API call will return an object containing a list of deployment objects. The deployment-objects are consistent with the structure used in other API responses. Deployments are listed in descending order based on their creation timestamp.
327
+
The response from this API call will return an object containing a list of deployment objects. The deploymentobjects are consistent with the structure used in other API responses. Deployments are listed in descending order based on their creation timestamp.
321
328
322
329
```json
323
330
{
@@ -342,9 +349,10 @@ The response from this API call will return an object containing a list of deplo
342
349
343
350
### Get Deployment diff
344
351
345
-
Sometimes updates are done directly on the Umbraco Cloud repository. We encourage you to not do any actual work there, but auto-upgrades and environment changes will affect the Umbraco Cloud git-repositories. To keep track of such changes, you can use the 'Get Deployment Diff' API. This API endpoint will provide you with a git-patch file detailing the changes between a specific deployment and the current state of the repository. To make this API call, you'll need to include both the `projectId` and the `deploymentId` of the deployment you want to check for differences against. This is a standard HTTP GET request.
352
+
Sometimes updates are done directly on the Umbraco Cloud repository. It is encouraged not to do any actual work there, but auto-upgrades and environment changes will affect the Umbraco Cloud git repositories. To keep track of such changes, you can use the 'Get Deployment Diff' API. This API endpoint will provide you with a git-patch file detailing the changes between a specific deployment and the current state of the repository. To make this API call, you'll need to include both the `projectId` and the `deploymentId` of the deployment you want to check for differences against. This is a standard HTTP GET request.
353
+
354
+
The required query parameter has been added to the endpoint:
346
355
347
-
Required query parameter has been added to the endpoint:
348
356
-`TargetEnvironmentAlias`**REQUIRED** The intended deployment target environment for the diff.
349
357
350
358
{% tabs %}
@@ -375,9 +383,9 @@ When interacting with the Umbraco Cloud API, you may encounter various HTTP stat
0 commit comments