Skip to main content

Update version (POST)

POST 

/v2/actors/:actorId/versions/:versionNumber

Updates Actor version using values specified by a Version object passed as JSON in the POST payload. This endpoint is an alias for the PUT update version method and behaves identically.

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 version.


    Example: 0.1

Bodyrequired

  • versionNumber string | null nullable

    Possible values: Value must match regular expression ^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])$


    Example: 0.0
  • sourceType object
      anyOf
    • VersionSourceType (string)

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

  • envVars object[]
    • name string required

      The name of the environment variable.


      Example: MY_ENV_VAR
    • value string required

      The value of the environment variable. If isSecret is true, this value isn't returned by the API.


      Example: my-value
    • isSecret boolean | null nullable

      Whether the environment variable is encrypted. Secret values aren't returned by the API.


      Example: false
  • applyEnvVarsToBuild boolean | null nullable
    Example: false
  • buildTag string | null nullable
    Example: latest
  • sourceFiles object[]
      anyOf
    • format SourceCodeFileFormat (string)

      Format of the file's content, TEXT for plain text and BASE64 for encoded content.

      Possible values: [BASE64, TEXT]


      Example: TEXT
    • content string

      The contents of the file. Interpreted based on the value of format.


      Example: console.log('This is the main.js file');
    • name string required

      The path of the file relative to the Actor's root directory.


      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": [
    {
    "name": "MY_ENV_VAR",
    "value": "my-value",
    "isSecret": false
    }
    ],
    "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"
    }
    }