For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • REST API overview
    • Access Tokens
    • Account Members
    • Account Usage Beta
    • AI Configs
    • Announcements
    • Applications Beta
    • Approvals
    • Approvals Beta
    • Audit Log
    • Code References
    • Contexts
    • Context Settings
    • Custom Roles
    • Data Export Destinations
    • Environments
    • Experiments
    • Feature Flags
    • Feature Flags Beta
    • Flag Import Configurations Beta
    • Flag Links Beta
    • Flag Triggers
    • Follow Flags
    • Holdouts Beta
    • Insights Charts Beta
    • Insights Deployments Beta
      • POSTCreate deployment event
      • GETGet deployment
      • GETList deployments
      • PATCHUpdate deployment
    • Insights Flag Events Beta
    • Insights Pull Requests Beta
    • Insights Repositories Beta
    • Insights Scores Beta
    • Integration Audit Log Subscriptions
    • Integration Delivery Configurations Beta
    • Integrations Beta
    • Layers
    • Metrics
    • Metrics Beta
    • OAuth2 Clients
    • Persistent Store Integrations Beta
    • Projects
    • Relay Proxy Configurations
    • Release Pipelines Beta
    • Releases Beta
    • Scheduled Changes
    • Segments
    • Tags
    • Teams
    • Teams Beta
    • Users
    • Users Beta
    • User Settings
    • Views Beta
    • Webhooks
    • Workflows
    • Workflow Templates
    • Other
Sign inTry it free
LogoLogo
REST API overviewInsights Deployments Beta

Update deployment

PATCH
/api/v2/engineering-insights/deployments/:deploymentID
PATCH
/api/v2/engineering-insights/deployments/:deploymentID
$curl -X PATCH https://app.launchdarkly.com/api/v2/engineering-insights/deployments/deploymentID \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '[
> {
> "op": "replace",
> "path": "/status",
> "value": null
> }
>]'
1{
2 "id": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
3 "applicationKey": "billing-service",
4 "applicationVersion": "a90a8a2",
5 "startedAt": 1706701522000,
6 "status": "finished",
7 "kind": "redeployment",
8 "active": true,
9 "archived": false,
10 "environmentKey": "production",
11 "numberOfContributors": 1,
12 "numberOfPullRequests": 2,
13 "linesAdded": 100,
14 "linesDeleted": 50,
15 "leadTime": 20237000,
16 "endedAt": 1706712518000,
17 "durationMs": 10996000,
18 "metadata": {
19 "buildNumber": "1234"
20 },
21 "pullRequests": {
22 "totalCount": 25,
23 "items": [
24 {
25 "id": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
26 "externalId": "1234",
27 "title": "Enable new payment structure",
28 "status": "merged",
29 "author": "jane.doe",
30 "createTime": 1706701522000,
31 "baseCommitKey": "a90a8a2",
32 "headCommitKey": "a90a8a2",
33 "filesChanged": 2,
34 "linesAdded": 100,
35 "linesDeleted": 50,
36 "url": "https://github.com/launchdarkly/LaunchDarkly-Docs/pull/406",
37 "mergeTime": 1706712518000,
38 "mergeCommitKey": "a90a8a2",
39 "deployments": {
40 "totalCount": 25,
41 "items": [
42 {
43 "id": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
44 "applicationKey": "billing-service",
45 "applicationVersion": "a90a8a2",
46 "startedAt": 1706701522000,
47 "status": "finished",
48 "kind": "redeployment",
49 "active": true,
50 "archived": false,
51 "environmentKey": "production",
52 "numberOfContributors": 1,
53 "numberOfPullRequests": 2,
54 "linesAdded": 100,
55 "linesDeleted": 50,
56 "leadTime": 20237000,
57 "endedAt": 1706712518000,
58 "durationMs": 10996000,
59 "metadata": {
60 "buildNumber": "1234"
61 },
62 "flagReferences": {
63 "totalCount": 25,
64 "items": [
65 {
66 "projectKey": "default",
67 "flagKey": "enable-new-payment-structure",
68 "referencesAdded": 2,
69 "referencesRemoved": 5
70 }
71 ]
72 },
73 "leadTimeStages": {
74 "codingDurationMs": 1000000,
75 "reviewDurationMs": 500000,
76 "waitDurationMs": 100000,
77 "deployDurationMs": 100000,
78 "totalLeadTimeMs": 1600000
79 }
80 }
81 ],
82 "_links": {
83 "next": {
84 "href": "/api/v2/engineering-insights/deployments?after=a4290006-1fd1-4ca5-acf7-9f31fac61cf5",
85 "type": "application/json"
86 },
87 "self": {
88 "href": "/api/v2/engineering-insights/deployments",
89 "type": "application/json"
90 }
91 }
92 },
93 "flagReferences": {
94 "totalCount": 25,
95 "items": [
96 {
97 "projectKey": "default",
98 "flagKey": "enable-new-payment-structure",
99 "referencesAdded": 2,
100 "referencesRemoved": 5
101 }
102 ]
103 },
104 "leadTime": {
105 "codingDurationMs": 1000000,
106 "reviewDurationMs": 500000,
107 "maxWaitDurationMs": 100000,
108 "avgWaitDurationMs": 100000,
109 "maxDeployDurationMs": 100000,
110 "avgDeployDurationMs": 100000,
111 "maxTotalLeadTimeMs": 1600000,
112 "avgTotalLeadTimeMs": 1600000
113 }
114 }
115 ],
116 "_links": {
117 "next": {
118 "href": "/api/v2/engineering-insights/pull-requests?after=a4290006-1fd1-4ca5-acf7-9f31fac61cf5",
119 "type": "application/json"
120 },
121 "self": {
122 "href": "/api/v2/engineering-insights/pull-requests",
123 "type": "application/json"
124 }
125 }
126 },
127 "flagReferences": {
128 "totalCount": 25,
129 "items": [
130 {
131 "projectKey": "default",
132 "flagKey": "enable-new-payment-structure",
133 "referencesAdded": 2,
134 "referencesRemoved": 5
135 }
136 ]
137 },
138 "leadTimeStages": {
139 "codingDurationMs": 1000000,
140 "reviewDurationMs": 500000,
141 "waitDurationMs": 100000,
142 "deployDurationMs": 100000,
143 "totalLeadTimeMs": 1600000
144 }
145}
Update a deployment by ID. Updating a deployment uses a [JSON patch](https://datatracker.ietf.org/doc/html/rfc6902) representation of the desired changes. To learn more, read [Updates](https://launchdarkly.com/docs/api#updates).<br/><br/>The deployment ID is returned as part of the [List deployments](https://launchdarkly.com/docs/api/insights-deployments-beta/get-deployments) response. It is the `id` field of each element in the `items` array.
Was this page helpful?
Previous

Insights Flag Events Beta

Next
Built with

Update a deployment by ID. Updating a deployment uses a JSON patch representation of the desired changes. To learn more, read Updates.

The deployment ID is returned as part of the List deployments response. It is the id field of each element in the items array.

Authentication

Authorizationstring
API Key authentication via header

Path parameters

deploymentIDstringRequiredformat: "string"
The deployment ID

Request

This endpoint expects a list of objects.
opstringRequired
The type of operation to perform
pathstringRequired
A JSON Pointer string specifying the part of the document to operate on
valueanyOptional
A JSON value used in "add", "replace", and "test" operations

Response

Deployment response
idstringformat: "uuid"
The deployment ID
applicationKeystring
The application key
applicationVersionstring
The application version
startedAtlong
The time the deployment started
statusstring
The status of the deployment
kindstring
The kind of deployment
activeboolean
Whether the deployment is active
archivedboolean
Whether the deployment is archived
environmentKeystring
The environment key
numberOfContributorsinteger
The number of contributors
numberOfPullRequestsinteger
The number of pull requests
linesAddedlong
The number of lines added
linesDeletedlong
The number of lines deleted
leadTimelong
The total lead time from first commit to deployment end in milliseconds
endedAtlong
The time the deployment ended
durationMslong
The duration of the deployment in milliseconds
metadatamap from strings to any
The metadata associated with the deployment
pullRequestsobject
The pull requests contained in the deployment
flagReferencesobject
The flag references contained in the deployment
leadTimeStagesobject
The lead time stages for the deployment

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error