Skip to content

Commit c0ee356

Browse files
authored
Fix grammar
1 parent 164767f commit c0ee356

File tree

1 file changed

+36
-28
lines changed

1 file changed

+36
-28
lines changed

umbraco-cloud/set-up/project-settings/umbraco-cicd/UmbracoCloudApi.md

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
# Cloud API For CI/CD Flow v2
1+
# Cloud API For CI/CD Flow
22

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.
44

55
The V1 endpoints are still available, you can see the [V1 api documentation here](./V1-UmbracoCloudApi.md).
66

7-
## Changes between V1 and V2 endpoints
7+
## Changes between endpoints for version 1 and 2
88

99
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.
1112
- More options are available when deploying.
1213
- Simplified api call flow: Uploading an artifact is decoupled from the actual deployment.
1314

@@ -18,13 +19,16 @@ These are the most important differences between the V1 and V2 endpoints:
1819
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):
1920

2021
**Path for artifacts**
22+
2123
* `/v2/projects/$projectId/deployments/artifacts`
2224

2325
**Paths for deployments**
26+
2427
* `/v2/projects/$projectId/deployments`
2528
* `/v2/projects/$projectId/deployments/$deploymentId`
2629

27-
**Paths for querying deployments and fetching changes
30+
**Paths for querying deployments and fetching changes**
31+
2832
* `/v2/projects/$projectId/deployments`
2933
* `/v2/projects/$projectId/deployments/$latestCompletedDeploymentId/diff`
3034

@@ -48,7 +52,7 @@ It's important to note that each API key is tightly coupled with a specific Umbr
4852

4953
### How to authenticate your requests
5054

51-
To authenticate your API requests you'll need to include your API key in a custom HTTP header named Umbraco-Cloud-Api-Key.
55+
To authenticate your API requests, you'll need to include your API key in a custom HTTP header named Umbraco-Cloud-Api-Key.
5256

5357
{% tabs %}
5458
{% tab title="HTTP Request Syntax" %}
@@ -74,8 +78,8 @@ curl -s -X GET https://api.cloud.umbraco.com/v2/projects/$projectId/deployments
7478

7579
### Upload artifact
7680

77-
Artifact are tied to a project. The uploaded artifact is will be available to use in any deployment to an environment on that project.
78-
The artifact need to be a zip-file with source code needed to build your website.
81+
Artifacts are tied to a project. The uploaded artifact will be available to use in any deployment to an environment on that project.
82+
The artifact needs to be a zip file with the source code needed to build your website.
7983

8084
[Read about artifact Best Practices](ArtifactBestPractice.md).
8185

@@ -110,7 +114,7 @@ Content-Disposition: form-data; name="version"
110114
{% endtab %}
111115
{% endtabs %}
112116

113-
Once the file is uploaded you will get a response which follows the following JSON schema:
117+
Once the file is uploaded, you will get a response which follows the following JSON schema:
114118

115119
```json
116120
{
@@ -125,9 +129,10 @@ Once the file is uploaded you will get a response which follows the following JS
125129
```
126130

127131
### List artifacts
128-
List artifacts uploaded related to a project. The endpoint is paged and accepts the options skip and take.
129-
If skip is not supplied its value will default to 0.
130-
If take is not supplied its value will default to 10.
132+
133+
List artifacts uploaded related to a project. The endpoint is paged and accepts the options `skip` and `take`.
134+
If `skip` is not supplied, its value will default to 0.
135+
If `take` is not supplied, its value will default to 10.
131136

132137
{% tabs %}
133138
{% tab title="HTTP Request Syntax" %}
@@ -144,7 +149,7 @@ Content-Type: application/json
144149
{% endtab %}
145150
{% endtabs %}
146151

147-
Response look like:
152+
Response looks like:
148153

149154
```json
150155
{
@@ -171,9 +176,10 @@ Response look like:
171176

172177
### Start the deployment
173178

174-
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`.
175180

176181
Some new options are available to use in the request payload:
182+
177183
- `artifactId` **REQUIRED** Id of the artifact you want to deploy
178184
- `targetEnvironmentAlias` **REQUIRED** Alias of the environment you want to deploy to
179185
- `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
222228
},
223229
],
224230
"createdUtc": string,
225-
"completedUtc":string,
231+
"completedUtc": string,
226232
"modifiedUtc": string
227233
}
228234
```
229235

230236
You can use the deploymentId to query the Get Deployment status endpoint.
231237

232238
{% 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.
234240

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.
236242
{% endhint %}
237243

238244
### Get Deployment status
239245

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.
241247

242248
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.
243249

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+
245252
- `lastModifiedUtc` **OPTIONAL** Only show new deploymentStatusMessages since this point in time.
246253

247254
{% tabs %}
@@ -285,16 +292,16 @@ Should the deployment fail, check the `deploymentStatusMessages` for more inform
285292

286293
### Get Deployments
287294

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.
289296

290297
The API allows you to filter and limit the number of returned deployments using query parameters:
298+
291299
- `Skip` : **OPTIONAL** zero or positive integer
292300
- `Take` : **OPTIONAL** zero or positive integer
293301
- `Includenulldeployments` : **OPTIONAL** boolean, defaults to true
294302
- `TargetEnvironmentAlias` **OPTIONAL** Will query only for deployments to a specific environment.
295303

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.
298305

299306
With `includenulldeployments` set to true, you will get all completed deployments, including those that did not create any new changes in the cloud repository.
300307

@@ -317,7 +324,7 @@ Content-Type: application/json
317324
{% endtab %}
318325
{% endtabs %}
319326

320-
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 deployment objects are consistent with the structure used in other API responses. Deployments are listed in descending order based on their creation timestamp.
321328

322329
```json
323330
{
@@ -342,9 +349,10 @@ The response from this API call will return an object containing a list of deplo
342349

343350
### Get Deployment diff
344351

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:
346355

347-
Required query parameter has been added to the endpoint:
348356
- `TargetEnvironmentAlias` **REQUIRED** The intended deployment target environment for the diff.
349357

350358
{% tabs %}
@@ -375,9 +383,9 @@ When interacting with the Umbraco Cloud API, you may encounter various HTTP stat
375383

376384
| Status Code | Error | Basic Root Cause |
377385
| ----------- | ------------------- | ----------------------------------------------------------------------------------- |
378-
| 400 | BadRequest | Check the requested path, supplied headers and query-parameters |
379-
| 401 | Unauthorized | Check the Project Id and Api Key |
380-
| 404 | NotFound | Usually related to the supplied deploymentId in path not being found |
386+
| 400 | BadRequest | Check the requested path, supplied headers, and query parameters |
387+
| 401 | Unauthorized | Check the Project ID and Api Key |
388+
| 404 | NotFound | Usually related to the supplied deploymentId in the path not being found |
381389
| 409 | Conflict | The state of the referenced deployment is not ready for the work you are requesting |
382390
| 500 | InternalServerError | InternalServerError |
383391

0 commit comments

Comments
 (0)