diff --git a/apify-api/openapi/components/schemas/actor-tasks/CreateTaskRequest.yaml b/apify-api/openapi/components/schemas/actor-tasks/CreateTaskRequest.yaml index 0d985ef897..aae35f94a9 100644 --- a/apify-api/openapi/components/schemas/actor-tasks/CreateTaskRequest.yaml +++ b/apify-api/openapi/components/schemas/actor-tasks/CreateTaskRequest.yaml @@ -23,3 +23,9 @@ properties: anyOf: - $ref: ../actors/ActorStandby.yaml - type: "null" + publicConfig: + description: | + Public-facing display configuration of the task's public landing page. The task is not + published by setting it — set `isPublic` via the [Update task](/api/v2/actor-task-put) + endpoint for that. Setting `publicConfig` requires write permission to the task's Actor. + $ref: ./TaskPublicConfig.yaml diff --git a/apify-api/openapi/components/schemas/actor-tasks/Task.yaml b/apify-api/openapi/components/schemas/actor-tasks/Task.yaml index eff273d7e9..64802ab63d 100644 --- a/apify-api/openapi/components/schemas/actor-tasks/Task.yaml +++ b/apify-api/openapi/components/schemas/actor-tasks/Task.yaml @@ -55,3 +55,14 @@ properties: standbyUrl: type: [string, "null"] format: uri + isPublic: + type: boolean + description: | + Whether the task is published on its public landing page. Derived from + `publicConfig.publishedAt`. Set it via the [Update task](/api/v2/actor-task-put) + endpoint to publish or unpublish the task. + examples: [false] + publicConfig: + anyOf: + - $ref: ./TaskPublicConfig.yaml + - type: "null" diff --git a/apify-api/openapi/components/schemas/actor-tasks/TaskPublicConfig.yaml b/apify-api/openapi/components/schemas/actor-tasks/TaskPublicConfig.yaml new file mode 100644 index 0000000000..c78979ae0e --- /dev/null +++ b/apify-api/openapi/components/schemas/actor-tasks/TaskPublicConfig.yaml @@ -0,0 +1,37 @@ +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, set `isPublic` + via the [Update task](/api/v2/actor-task-put) endpoint. + 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. diff --git a/apify-api/openapi/components/schemas/actor-tasks/UpdateTaskRequest.yaml b/apify-api/openapi/components/schemas/actor-tasks/UpdateTaskRequest.yaml index d12c85c191..bad6a1a847 100644 --- a/apify-api/openapi/components/schemas/actor-tasks/UpdateTaskRequest.yaml +++ b/apify-api/openapi/components/schemas/actor-tasks/UpdateTaskRequest.yaml @@ -18,3 +18,18 @@ properties: anyOf: - $ref: ../actors/ActorStandby.yaml - type: "null" + publicConfig: + description: | + Public-facing display configuration of the task's public landing page. The provided + fields are merged into the stored configuration and validated. The stored configuration + cannot be cleared this way. Set `isPublic` to change the publication state. + Updating `publicConfig` requires write permission to the task's Actor. + $ref: ./TaskPublicConfig.yaml + isPublic: + type: boolean + description: | + Set to `true` to publish the task on its public landing page, or `false` to unpublish it. + Sending the value the task already has does nothing. Publishing requires the task's + `publicConfig` to be filled in and write permission to the task's Actor; it fails if the + task is not ready to be published, leaving the rest of the update unapplied. + examples: [true] diff --git a/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}.yaml b/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}.yaml index 4b2d8acde8..17dc21fa4c 100644 --- a/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}.yaml +++ b/apify-api/openapi/paths/actor-tasks/actor-tasks@{actorTaskId}.yaml @@ -52,6 +52,10 @@ 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, and `isPublic` publishes or unpublishes the task itself. Both require + 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.