Actors/Actor versions
Update version
Updates Actor version using values specified by a Version object passed as JSON in the POST payload.
If the object does not define a specific property, its value will not be updated.
The request needs to specify the Content-Type: application/json HTTP header!
When providing your API authentication token, we recommend using the request's Authorization header, rather than the URL. (More info).
The response is the Version object as returned by the Get version endpoint.
put/v2/actors/{actorId}/versions/{versionNumber}
Path parameters
actorIdstring required
Example:janedoe~my-actor
Actor ID or a tilde-separated owner's username and Actor name.
versionNumberstring required
Example:0.1
Actor version.
Request body
Example request
{
"versionNumber": "1.6",
"envVars": [
{
"name": "MY_ENV_VAR",
"value": "my-value"
}
],
"buildTag": "latest",
"sourceFiles": [
{
"format": "TEXT",
"content": "console.log('This is the main.js file');",
"name": "src/main.js"
}
]
}Response
Example response
{
"data": {
"versionNumber": "0.0",
"envVars": [
{
"name": "MY_ENV_VAR",
"value": "my-value"
}
],
"buildTag": "latest",
"sourceFiles": [
{
"format": "TEXT",
"content": "console.log('This is the main.js file');",
"name": "src/main.js"
}
]
}
}