Skip to content

Commit 365cb3d

Browse files
committed
tweaks to the v2 endpoints article
1 parent cbeb7e7 commit 365cb3d

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ To integrate Umbraco Cloud into your CI/CD pipeline, you'll need to make API cal
2323
**Paths for deployments**
2424
* `/v2/projects/$projectId/deployments`
2525
* `/v2/projects/$projectId/deployments/$deploymentId`
26+
27+
**Paths for querying deployments and fetching changes
28+
* `/v2/projects/$projectId/deployments`
2629
* `/v2/projects/$projectId/deployments/$latestCompletedDeploymentId/diff`
2730

2831
You will find relevant examples using `HTTP Request Syntax` in the sections below.
@@ -67,7 +70,7 @@ curl -s -X GET https://api.cloud.umbraco.com/v2/projects/$projectId/deployments
6770
{% endtab %}
6871
{% endtabs %}
6972

70-
## How to upload artifacts
73+
## Deployment Artifacts
7174

7275
### Upload artifact
7376

@@ -164,7 +167,7 @@ Response look like:
164167
}
165168
```
166169

167-
## How to make a deployment to Umbraco Cloud using the Umbraco CI/CD API
170+
## Deployments
168171

169172
### Start the deployment
170173

@@ -278,7 +281,7 @@ Should the deployment fail, check the `deploymentStatusMessages` for more inform
278281
}
279282
```
280283

281-
## Query Deployments and Get Diff
284+
## Query Deployments and fetch Changes
282285

283286
### Get Deployments
284287

@@ -341,7 +344,7 @@ The response from this API call will return an object containing a list of deplo
341344

342345
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.
343346

344-
Query parameter:
347+
Required query parameter has been added to the endpoint:
345348
- `TargetEnvironmentAlias` **REQUIRED** The intended deployment target environment for the diff.
346349

347350
{% tabs %}
@@ -362,6 +365,10 @@ Content-Type: application/json
362365

363366
The API response will vary based on whether or not there are changes to report. If no changes are detected, you'll receive an HTTP 204 No Content status. On the other hand, if there are changes, the API will return an HTTP 200 OK status along with a git-patch file as the content. This git-patch file can then be applied to your local repository to sync it with the changes.
364367

368+
{% hint style="info" %}
369+
It is only possible to generate git-patch files when the selected `deploymentId` points to a deployment where the `targetEnvironmentAlias` then, is the same as in this request.
370+
{% endhint %}
371+
365372
### Possible errors
366373

367374
When interacting with the Umbraco Cloud API, you may encounter various HTTP status codes that indicate the success or failure of your API request. Below is a table summarizing the possible status codes, their corresponding errors, and basic root causes to guide your troubleshooting:

0 commit comments

Comments
 (0)