Skip to content

Commit eeb0183

Browse files
lewis-wowtobice
andauthored
feat: update tagged builds API docs (#2018)
This PR updates the tagged builds API documentation to reflect the new interface and the fix for an inherent race condition that was fixed in apify/apify-core#23446. --------- Co-authored-by: Tobiáš Potoček <[email protected]>
1 parent 3785c13 commit eeb0183

File tree

2 files changed

+86
-32
lines changed

2 files changed

+86
-32
lines changed

apify-api/openapi/components/schemas/actors/UpdateActorRequest.yaml

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,48 @@ properties:
5353
taggedBuilds:
5454
type: object
5555
description: |
56-
Object containing the Actor's tagged builds, where the key is the tag name (e.g., _latest_) and the value is an object containing the build ID.
57-
The object you provide will completely overwrite all existing tagged builds for the Actor.
56+
An object to modify tags on the Actor's builds. The key is the tag name (e.g., _latest_), and the value is either an object with a `buildId` or `null`.
5857
59-
- To create or reassign a tag: Include it in the object with the desired `buildId`.
60-
- To remove a specific tag: Submit the object without that tag's key.
61-
- To remove all tags: Provide an empty object: `{}`.
62-
- If this field is omitted or `null`, the existing tags will not be changed.
58+
This operation is a patch; any existing tags that you omit from this object will be preserved.
59+
60+
- **To create or reassign a tag**, provide the tag name with a `buildId`. e.g., to assign the _latest_ tag:
61+
62+
&nbsp;
63+
64+
```json
65+
{
66+
"latest": {
67+
"buildId": "z2EryhbfhgSyqj6Hn"
68+
}
69+
}
70+
```
71+
72+
- **To remove a tag**, provide the tag name with a `null` value. e.g., to remove the _beta_ tag:
73+
74+
&nbsp;
75+
76+
```json
77+
{
78+
"beta": null
79+
}
80+
```
81+
82+
- **To perform multiple operations**, combine them. The following reassigns _latest_ and removes _beta_, while preserving any other existing tags.
83+
84+
&nbsp;
85+
86+
```json
87+
{
88+
"latest": {
89+
"buildId": "z2EryhbfhgSyqj6Hn"
90+
},
91+
"beta": null
92+
}
93+
```
6394
nullable: true
6495
additionalProperties:
6596
type: object
97+
nullable: true
6698
required:
6799
- buildId
68100
properties:
@@ -71,3 +103,4 @@ properties:
71103
example:
72104
latest:
73105
buildId: z2EryhbfhgSyqj6Hn
106+
beta: null

apify-api/openapi/paths/actors/acts@{actorId}.yaml

Lines changed: 47 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -133,32 +133,53 @@ put:
133133
application/json:
134134
schema:
135135
$ref: "../../components/schemas/actors/UpdateActorRequest.yaml"
136-
example:
137-
name: MyActor
138-
description: My favourite Actor!
139-
isPublic: false
140-
seoTitle: My Actor
141-
seoDescription: My Actor is the best
142-
title: My Actor
143-
restartOnError: false
144-
versions:
145-
- versionNumber: '0.0'
146-
sourceType: SOURCE_FILES
147-
envVars:
148-
- name: DOMAIN
149-
value: 'http://example.com'
150-
isSecret: false
151-
- name: SECRET_PASSWORD
152-
value: MyTopSecretPassword123
153-
isSecret: true
154-
applyEnvVarsToBuild: false
155-
buildTag: latest
156-
sourceFiles: []
157-
categories: []
158-
defaultRunOptions:
159-
build: latest
160-
timeoutSecs: 3600
161-
memoryMbytes: 2048
136+
examples:
137+
common:
138+
summary: 'Common example'
139+
value:
140+
name: MyActor
141+
description: My favourite Actor!
142+
isPublic: false
143+
seoTitle: My Actor
144+
seoDescription: My Actor is the best
145+
title: My Actor
146+
restartOnError: false
147+
versions:
148+
- versionNumber: '0.0'
149+
sourceType: SOURCE_FILES
150+
envVars:
151+
- name: DOMAIN
152+
value: 'http://example.com'
153+
isSecret: false
154+
- name: SECRET_PASSWORD
155+
value: MyTopSecretPassword123
156+
isSecret: true
157+
applyEnvVarsToBuild: false
158+
buildTag: latest
159+
sourceFiles: []
160+
categories: []
161+
defaultRunOptions:
162+
build: latest
163+
timeoutSecs: 3600
164+
memoryMbytes: 2048
165+
taggedBuildsCreateOrReassignTag:
166+
summary: 'Create or reassign a build tag'
167+
value:
168+
taggedBuilds:
169+
latest:
170+
buildId: 'z2EryhbfhgSyqj6Hn'
171+
taggedBuildsRemoveTag:
172+
summary: 'Remove a build tag'
173+
value:
174+
taggedBuilds:
175+
latest: null
176+
taggedBuildsMultipleOperations:
177+
summary: 'Update multiple build tags at once'
178+
value:
179+
taggedBuilds:
180+
latest:
181+
buildId: 'z2EryhbfhgSyqj6Hn'
182+
beta: null
162183
required: true
163184
responses:
164185
'200':

0 commit comments

Comments
 (0)