Skip to main content

Resurrect run

POST 

/v2/actor-runs/:runId/resurrect

Resurrects a finished Actor run and returns an object that contains all the details about the resurrected run. Only finished runs, i.e. runs with status FINISHED, FAILED, ABORTED and TIMED-OUT can be resurrected. Run status will be updated to RUNNING and its container will be restarted with the same storages (the same behaviour as when the run gets migrated to the new server).

For more information, see the Actor docs.

Request

Path Parameters

    runId string required

    Run ID.


    Example: 3KH8gEpp4d8uQSe8T

Query Parameters

    build string

    Specifies the Actor build to run. It can be either a build tag or build number. By default, the run is resurrected with the same build that it originally used. Specifically, if a run is first started with the latest tag, which resolves to version 0.0.3 at the time, a run resurrected without the build parameter will continue running with the version 0.0.3, even if the latest tag already points to a newer build.


    Example: 0.1.234
    timeout number

    Optional timeout for the run, in seconds. By default, the run uses a timeout specified in the run that is being resurrected.


    Example: 60
    memory number
    Example: 256
    maxItems double

    Specifies the maximum number of dataset items that will be charged for pay-per-result Actors. This does NOT guarantee that the Actor will return only this many items. It only ensures you won't be charged for more than this number of items. Only works for pay-per-result Actors. Value can be accessed in the actor run using ACTOR_MAX_PAID_DATASET_ITEMS environment variable.


    Example: 1000
    maxTotalChargeUsd double

    Specifies the maximum cost of the run. This parameter is useful for pay-per-event Actors, as it allows you to limit the amount charged to your subscription. You can access the maximum cost in your Actor by using the ACTOR_MAX_TOTAL_CHARGE_USD environment variable.


    Example: 5
    restartOnError boolean

    Determines whether the resurrected run will be restarted if it fails. By default, the resurrected run uses the same setting as before.


    Example: false

Status 200

Response Headers
    {
    "data": {
    "id": "HG7ML7M8z78YcAPEB",
    "actId": "HDSasDasz78YcAPEB",
    "userId": "7sT5jcggjjA9fNcxF",
    "actorTaskId": "KJHSKHausidyaJKHs",
    "startedAt": "2019-11-30T07:34:24.202Z",
    "finishedAt": "2019-12-12T09:30:12.202Z",
    "status": "RUNNING",
    "statusMessage": "Actor is running",
    "isStatusMessageTerminal": false,
    "meta": {
    "origin": "WEB",
    "clientIp": "172.234.12.34",
    "userAgent": "Mozilla/5.0 (iPad)"
    },
    "stats": {
    "inputBodyLen": 240,
    "migrationCount": 0,
    "restartCount": 0,
    "resurrectCount": 2,
    "memAvgBytes": 267874071.9,
    "memMaxBytes": 404713472,
    "memCurrentBytes": 0,
    "cpuAvgUsage": 33.75321011075384,
    "cpuMaxUsage": 169.65073553494125,
    "cpuCurrentUsage": 0,
    "netRxBytes": 103508042,
    "netTxBytes": 4854600,
    "durationMillis": 248472,
    "runTimeSecs": 248.472,
    "metamorph": 0,
    "computeUnits": 0.13804
    },
    "options": {
    "build": "latest",
    "timeoutSecs": 300,
    "memoryMbytes": 1024,
    "diskMbytes": 2048
    },
    "buildId": "7sT5jcggjjA9fNcxF",
    "exitCode": 0,
    "generalAccess": "RESTRICTED",
    "defaultKeyValueStoreId": "eJNzqsbPiopwJcgGQ",
    "defaultDatasetId": "wmKPijuyDnPZAPRMk",
    "defaultRequestQueueId": "FL35cSF7jrxr3BY39",
    "buildNumber": "0.0.36",
    "containerUrl": "https://g8kd8kbc5ge8.runs.apify.net",
    "isContainerServerReady": true,
    "gitBranchName": "master",
    "usage": {
    "ACTOR_COMPUTE_UNITS": 3,
    "DATASET_READS": 4,
    "DATASET_WRITES": 4,
    "KEY_VALUE_STORE_READS": 5,
    "KEY_VALUE_STORE_WRITES": 3,
    "KEY_VALUE_STORE_LISTS": 5,
    "REQUEST_QUEUE_READS": 2,
    "REQUEST_QUEUE_WRITES": 1,
    "DATA_TRANSFER_INTERNAL_GBYTES": 1,
    "DATA_TRANSFER_EXTERNAL_GBYTES?": 3,
    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": 34,
    "PROXY_SERPS": 3
    },
    "usageTotalUsd": 0.2654,
    "usageUsd": {
    "ACTOR_COMPUTE_UNITS": 0.072,
    "DATASET_READS": 0.0004,
    "DATASET_WRITES": 0.0002,
    "KEY_VALUE_STORE_READS": 0.0006,
    "KEY_VALUE_STORE_WRITES": 0.002,
    "KEY_VALUE_STORE_LISTS": 0.004,
    "REQUEST_QUEUE_READS": 0.005,
    "REQUEST_QUEUE_WRITES": 0.02,
    "DATA_TRANSFER_INTERNAL_GBYTES": 0.0004,
    "DATA_TRANSFER_EXTERNAL_GBYTES?": 0.0002,
    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": 0.16,
    "PROXY_SERPS": 0.0006
    }
    }
    }