Last Actor task run's default dataset

Update the default dataset of an Actor task's last run

Changed on

Updates the default dataset associated with the last Actor task run.

This endpoint is a shortcut for getting the last task run's defaultDatasetId and then using the Update dataset endpoint.

put/v2/actor-tasks/{actorTaskId}/runs/last/dataset

Request

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

Path parameters

actorTaskIdstring required
Example:janedoe~my-task

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

Query parameters

statusstring
Example:SUCCEEDED

Filter for the run status.

origin'DEVELOPMENT' | 'WEB' | 'API' | 'SCHEDULER' | 'TEST' | 'WEBHOOK' | 'ACTOR' | 'CLI' | 'CI' | 'STANDBY' | 'MCP'

Filter for the run origin, i.e. the means by which the run was started.

Request body

namestring nullable
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

{
  "name": "new-dataset-name",
  "generalAccess": "RESTRICTED"
}

Response

Example response

{
  "data": {
    "id": "WkzbQMuFYuamGv3YF",
    "name": "d7b9MDYsbtX5L7XAj",
    "title": "My Dataset",
    "userId": "wRsJZtadYvn4mBZmm",
    "createdAt": "2019-12-12T07:34:14.202Z",
    "modifiedAt": "2019-12-13T08:36:13.202Z",
    "accessedAt": "2019-12-14T08:36:13.202Z",
    "itemCount": 7,
    "cleanItemCount": 5,
    "schema": {
      "actorSpecification": 1,
      "title": "My dataset",
      "views": {
        "overview": {
          "title": "Overview",
          "transformation": {
            "fields": [
              "linkUrl"
            ]
          },
          "display": {
            "component": "table",
            "properties": {
              "linkUrl": {
                "label": "Link URL",
                "format": "link"
              }
            }
          }
        }
      }
    },
    "consoleUrl": "https://console.apify.com/storage/datasets/27TmTznX9YPeAYhkC",
    "itemsPublicUrl": "https://api.apify.com/v2/datasets/WkzbQMuFYuamGv3YF/items?signature=abc123",
    "generalAccess": "RESTRICTED",
    "stats": {
      "readCount": 22,
      "writeCount": 3,
      "storageBytes": 783
    }
  }
}

Changes

    • 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 the optional property / to the response with the status