Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apify-api/openapi/components/schemas/actor-tasks/Task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,7 @@ properties:
standbyUrl:
type: [string, "null"]
format: uri
publicConfig:
anyOf:
- $ref: ./TaskPublicConfig.yaml
- type: "null"
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
title: TaskPublicConfig
type: object
description: |
Public-facing configuration of a published task, used by the task's public landing page.
The task's publication state is determined by `publishedAt` - a task is published when
`publishedAt` is set and unpublished when it is `null`.
properties:
publishedAt:
type: [string, "null"]
format: date-time
readOnly: true
description: |
Time when the task was published, or `null` if the task is not published.
This field is server-controlled - to publish or unpublish a task, use the
[Publish task](/api/v2/actor-task-publish-post) and
[Unpublish task](/api/v2/actor-task-unpublish-post) endpoints.
examples: ["2025-06-16T09:20:45.777Z"]
seoTitle:
type: [string, "null"]
description: SEO title of the public task page. Defaults to the task title when not set.
examples: [Scrape data from a website]
seoDescription:
type: [string, "null"]
description: SEO description of the public task page. Defaults to the task description when not set.
categorization:
type: [string, "null"]
description: Use-case category of the public task.
inputSchemaFields:
type: [array, "null"]
description: Names of the task input fields displayed on the public task page.
items:
type: string
datasetName:
type: [string, "null"]
description: Name of the dataset from the Actor's dataset schema whose results are displayed.
datasetView:
type: [string, "null"]
description: Key of the dataset view from the Actor's dataset schema used to display results.
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,14 @@ properties:
anyOf:
- $ref: ../actors/ActorStandby.yaml
- type: "null"
publicConfig:
anyOf:
- $ref: ./TaskPublicConfig.yaml
- type: "null"
description: |
Public-facing display configuration of the task's public landing page. The provided
fields are merged into the stored configuration and validated.
[Publish task](/api/v2/actor-task-publish-post) and
[Unpublish task](/api/v2/actor-task-unpublish-post) endpoints to change the
publication state. Updating `publicConfig` requires write permission to the task's
Actor.
4 changes: 4 additions & 0 deletions apify-api/openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,10 @@ paths:
$ref: paths/actor-tasks/actor-tasks.yaml
"/v2/actor-tasks/{actorTaskId}":
$ref: "paths/actor-tasks/actor-tasks@{actorTaskId}.yaml"
"/v2/actor-tasks/{actorTaskId}/publish":
$ref: "paths/actor-tasks/actor-tasks@{actorTaskId}@publish.yaml"
"/v2/actor-tasks/{actorTaskId}/unpublish":
$ref: "paths/actor-tasks/actor-tasks@{actorTaskId}@unpublish.yaml"
"/v2/actor-tasks/{actorTaskId}/input":
$ref: "paths/actor-tasks/actor-tasks@{actorTaskId}@input.yaml"
"/v2/actor-tasks/{actorTaskId}/webhooks":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ put:

If the object does not define a specific property, its value is not updated.

The `publicConfig` field carries the display configuration of the task's public
landing page. To publish or unpublish the task itself, use the
[Publish task](/api/v2/actor-task-publish-post) and
[Unpublish task](/api/v2/actor-task-unpublish-post) endpoints.

The response is the full task object as returned by the
[Get task](/api/v2/actor-task-get) endpoint.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
post:
tags:
- Actor tasks
summary: Publish task
description: |
Publish the task on its public landing page. The task's public display configuration
is set beforehand via the `publicConfig` field of the
[Update task](/api/v2/actor-task-put) endpoint. This endpoint validates it and
publishes the task.

Publishing requires the task's Actor to be public, and the task must pass the
publication validation.
The publication state is stored in `publicConfig.publishedAt` (`null` means the task
is not published).

The endpoint requires write permission to the task's Actor.

The response is the full task object as returned by the
[Get task](/api/v2/actor-task-get) endpoint.
operationId: actorTask_publish_post
parameters:
- $ref: "../../components/parameters/runAndBuildParameters.yaml#/actorTaskId"
responses:
"200":
description: ""
headers: {}
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
$ref: ../../components/schemas/actor-tasks/Task.yaml
"400":
$ref: ../../components/responses/BadRequest.yaml
"401":
$ref: ../../components/responses/Unauthorized.yaml
"403":
$ref: ../../components/responses/Forbidden.yaml
"404":
$ref: ../../components/responses/NotFound.yaml
"405":
$ref: ../../components/responses/MethodNotAllowed.yaml
"429":
$ref: ../../components/responses/TooManyRequests.yaml
deprecated: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
post:
tags:
- Actor tasks
summary: Unpublish task
description: |
Unpublish the task from its public landing page. The public display configuration
(`publicConfig`) is preserved, so the task can be re-published without re-entering it.

The endpoint requires write permission to the task's Actor.

The response is the full task object as returned by the
[Get task](/api/v2/actor-task-get) endpoint.
operationId: actorTask_unpublish_post
parameters:
- $ref: "../../components/parameters/runAndBuildParameters.yaml#/actorTaskId"
responses:
"200":
description: ""
headers: {}
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
$ref: ../../components/schemas/actor-tasks/Task.yaml
"400":
$ref: ../../components/responses/BadRequest.yaml
"401":
$ref: ../../components/responses/Unauthorized.yaml
"403":
$ref: ../../components/responses/Forbidden.yaml
"404":
$ref: ../../components/responses/NotFound.yaml
"405":
$ref: ../../components/responses/MethodNotAllowed.yaml
"429":
$ref: ../../components/responses/TooManyRequests.yaml
deprecated: false
Loading