Actor runs

Update Actor run

Changed on

This endpoint can be used to update both the run's status message and to configure its general resource access level.

Status message:

You can set a single status message on your run that will be displayed in the Apify Console UI. During an Actor run, you will typically do this in order to inform users of your Actor about the Actor's progress.

The request body must contain runId and statusMessage properties. The isStatusMessageTerminal property is optional and it indicates if the status message is the very last one. In the absence of a status message, the platform will try to substitute sensible defaults.

General resource access:

You can also update the run's general resource access setting, which determines who can view the run and its related data.

Allowed values:

  • FOLLOW_USER_SETTING - The run inherits the general access setting from the account level.
  • ANYONE_WITH_ID_CAN_READ - The run can be viewed anonymously by anyone who has its ID.
  • RESTRICTED - Only users with explicit access to the resource can access the run.

When a run is accessible anonymously, all of the run's default storages and logs also become accessible anonymously.

put/v2/actor-runs/{runId}

Request

  • Base URL
    https://api.apify.com
  • Auth
    • HTTP bearer
    • or API key in query parameter token

Path parameters

runIdstring required
Example:3KH8gEpp4d8uQSe8T

Actor run ID.

Request body

runIdstring
statusMessagestring
isStatusMessageTerminalboolean
generalAccess'ANYONE_WITH_ID_CAN_READ' | 'ANYONE_WITH_NAME_CAN_READ' | 'FOLLOW_USER_SETTING' | 'RESTRICTED'

Defines the general access level for the resource.

Example request

{
  "runId": "3KH8gEpp4d8uQSe8T",
  "statusMessage": "Actor has finished",
  "isStatusMessageTerminal": true
}

Response

Example response

{
  "data": {
    "id": "HG7ML7M8z78YcAPEB",
    "actId": "HDSasDasz78YcAPEB",
    "userId": "7sT5jcggjjA9fNcxF",
    "actorTaskId": "KJHSKHausidyaJKHs",
    "startedAt": "2019-11-30T07:34:24.202Z",
    "finishedAt": "2019-12-12T09:30:12.202Z",
    "statusMessage": "Actor is running",
    "meta": {
      "actorRunId": "HG7ML7M8z78YcAPEB",
      "webhookDispatchId": "asdLZtadYvn4mBZmm",
      "scheduledAct2Id": "c6KfSgoQzFhMk3etc",
      "scheduledActorTaskId": "c6KfSgoQzFhMk3etc"
    },
    "pricingInfo": {
      "apifyMarginPercentage": 0.2
    },
    "stats": {
      "inputBodyLen": 240,
      "resurrectCount": 2,
      "memAvgBytes": 267874071.9,
      "memMaxBytes": 404713472,
      "cpuAvgUsage": 33.7532101107538,
      "cpuMaxUsage": 169.650735534941,
      "netRxBytes": 103508042,
      "netTxBytes": 4854600,
      "durationMillis": 248472,
      "runTimeSecs": 248.472,
      "computeUnits": 0.13804
    },
    "chargedEventCounts": {
      "actor-start": 1,
      "page-crawled": 150,
      "data-extracted": 75
    },
    "accountedChargedEventCounts": {
      "actor-start": 1,
      "page-crawled": 150
    },
    "externalChargedTotalUsd": 0.5,
    "standby": {
      "deployment": "MULTI_TENANT_PAYING_USERS"
    },
    "integrationTracking": {
      "platform": "zapier"
    },
    "createdByOrganizationMemberUserId": "7sT5jcggjjA9fNcxF",
    "consoleUrl": "https://console.apify.com/view/runs/HG7ML7M8z78YcAPEB",
    "output": {
      "results": "https://api.apify.com/v2/datasets/wmKPijuyDnPZAPRMk/items"
    },
    "options": {
      "build": "latest",
      "timeoutSecs": 300,
      "memoryMbytes": 1024,
      "diskMbytes": 2048,
      "maxItems": 1000,
      "maxTotalChargeUsd": 5,
      "isMaxTotalChargeUsdSetByUser": true
    },
    "buildId": "7sT5jcggjjA9fNcxF",
    "generalAccess": "RESTRICTED",
    "defaultKeyValueStoreId": "eJNzqsbPiopwJcgGQ",
    "defaultDatasetId": "wmKPijuyDnPZAPRMk",
    "defaultRequestQueueId": "FL35cSF7jrxr3BY39",
    "storageIds": {
      "datasets": {
        "default": "wmKPijuyDnPZAPRMk"
      },
      "keyValueStores": {
        "default": "eJNzqsbPiopwJcgGQ"
      },
      "requestQueues": {
        "default": "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.0003,
      "DATASET_READS": 0.0001,
      "DATASET_WRITES": 0.0001,
      "KEY_VALUE_STORE_READS": 0.0001,
      "KEY_VALUE_STORE_WRITES": 0.00005,
      "KEY_VALUE_STORE_LISTS": 0.0001,
      "REQUEST_QUEUE_READS": 0.0001,
      "REQUEST_QUEUE_WRITES": 0.0001,
      "DATA_TRANSFER_INTERNAL_GBYTES": 0.001,
      "DATA_TRANSFER_EXTERNAL_GBYTES": 0.003,
      "PROXY_RESIDENTIAL_TRANSFER_GBYTES": 0.034,
      "PROXY_SERPS": 0.003
    },
    "metamorphs": [
      {
        "createdAt": "2019-11-30T07:39:24.202Z",
        "actorId": "nspoEjklmnsF2oosD",
        "buildId": "ME6oKecqy5kXDS4KQ",
        "inputKey": "INPUT-METAMORPH-1",
        "buildTags": [
          "latest"
        ]
      }
    ],
    "platformUsageBillingModel": "USER"
  }
}

Changes

    • warning

      added the new MULTI_TENANT_FREE_USERS enum value to the /// response property for the response status

    • warning

      added the new MULTI_TENANT_OWNER_PAID enum value to the /// response property for the response status

    • warning

      added the new MULTI_TENANT_PAYING_USERS enum value to the /// response property for the response status

    • warning

      added the new SINGLE_TENANT enum value to the /// response property for the response status

    • breaking

      the / response's property type changed from object to no type for status

    • breaking

      removed the required property // from the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added subschema #2 to the / response property anyOf list for the response status