Skip to main content

Update version

PUT 

/v2/acts/:actorId/versions/:versionNumber

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.

Request

Path Parameters

    actorId string required

    Actor ID or a tilde-separated owner's username and Actor name.


    Example: janedoe~my-actor
    versionNumber string required

    Actor major and minor version of the Actor.


    Example: 1.0

Bodyrequired

  • versionNumber string | null nullable
    Example: 0.0
  • sourceType object
      anyOf
    • VersionSourceType (string)

      Possible values: [SOURCE_FILES, GIT_REPO, TARBALL, GITHUB_GIST]

  • envVars object[]
    • name string required
      Example: MY_ENV_VAR
    • value string required
      Example: my-value
    • isSecret boolean | null nullable
      Example: false
  • applyEnvVarsToBuild boolean | null nullable
    Example: false
  • buildTag string | null nullable
    Example: latest
  • sourceFiles object[]
      anyOf
    • format SourceCodeFileFormat (string) required

      Possible values: [BASE64, TEXT]


      Example: TEXT
    • content string required
      Example: console.log('This is the main.js file');
    • name string required
      Example: src/main.js
  • gitRepoUrl string | null nullable

    URL of the Git repository when sourceType is GIT_REPO.

  • tarballUrl string | null nullable

    URL of the tarball when sourceType is TARBALL.

  • gitHubGistUrl string | null nullable

    URL of the GitHub Gist when sourceType is GITHUB_GIST.

Status 200

Response Headers
    {
    "data": {
    "versionNumber": "0.0",
    "sourceType": "SOURCE_FILES",
    "envVars": "Unknown Type: array,null",
    "applyEnvVarsToBuild": false,
    "buildTag": "latest",
    "sourceFiles": [
    {
    "format": "TEXT",
    "content": "console.log('This is the main.js file');",
    "name": "src/main.js"
    },
    {
    "name": "src/utils",
    "folder": true
    }
    ],
    "gitRepoUrl": "string",
    "tarballUrl": "string",
    "gitHubGistUrl": "string"
    }
    }