diff --git a/apify-api/openapi/components/objects/actors/acts@{actorId}@versions@{versionNumber}@env-vars@{envVarName}put.yaml b/apify-api/openapi/components/objects/actors/acts@{actorId}@versions@{versionNumber}@env-vars@{envVarName}put.yaml index f93d907232..9230a123c8 100644 --- a/apify-api/openapi/components/objects/actors/acts@{actorId}@versions@{versionNumber}@env-vars@{envVarName}put.yaml +++ b/apify-api/openapi/components/objects/actors/acts@{actorId}@versions@{versionNumber}@env-vars@{envVarName}put.yaml @@ -47,7 +47,7 @@ shared: &shared content: application/json: schema: - oneOf: + anyOf: - $ref: "../../schemas/common/errors/ActorErrors.yaml#/ActorNotFoundError" - $ref: "../../schemas/common/errors/ActorErrors.yaml#/ActorVersionNotFoundError" - $ref: "../../schemas/common/errors/EnvVariableErrors.yaml#/EnvironmentVariableNotFoundError" diff --git a/apify-api/openapi/components/objects/key-value-stores/key-value-stores@{storeId}@records@{recordKey}put.yaml b/apify-api/openapi/components/objects/key-value-stores/key-value-stores@{storeId}@records@{recordKey}put.yaml index 8cb3d634df..fe4b3fb606 100644 --- a/apify-api/openapi/components/objects/key-value-stores/key-value-stores@{storeId}@records@{recordKey}put.yaml +++ b/apify-api/openapi/components/objects/key-value-stores/key-value-stores@{storeId}@records@{recordKey}put.yaml @@ -14,6 +14,7 @@ shared: &shared - gzip - deflate - br + - identity type: string requestBody: description: "" diff --git a/apify-api/openapi/components/responses/PaymentRequired.yaml b/apify-api/openapi/components/responses/PaymentRequired.yaml new file mode 100644 index 0000000000..4af07d552a --- /dev/null +++ b/apify-api/openapi/components/responses/PaymentRequired.yaml @@ -0,0 +1,9 @@ +description: Payment Required - the account does not have sufficient credits to perform this action. +content: + application/json: + schema: + $ref: ../schemas/common/ErrorResponse.yaml + example: + error: + type: insufficient-credits + message: The account does not have sufficient credits to run the Actor. diff --git a/apify-api/openapi/components/schemas/actor-pricing-info/CommonActorPricingInfo.yaml b/apify-api/openapi/components/schemas/actor-pricing-info/CommonActorPricingInfo.yaml index b11a920712..d0ad5fb1e7 100644 --- a/apify-api/openapi/components/schemas/actor-pricing-info/CommonActorPricingInfo.yaml +++ b/apify-api/openapi/components/schemas/actor-pricing-info/CommonActorPricingInfo.yaml @@ -1,9 +1,5 @@ title: CommonActorPricingInfo type: object -required: - - apifyMarginPercentage - - createdAt - - startedAt properties: apifyMarginPercentage: type: number @@ -17,13 +13,19 @@ properties: format: date-time description: Since when is this pricing info record effective for a given Actor notifiedAboutFutureChangeAt: - type: [string, "null"] - format: date-time x-internal: true + anyOf: + - type: string + format: date-time + - type: "null" notifiedAboutChangeAt: - type: [string, "null"] - format: date-time x-internal: true + anyOf: + - type: string + format: date-time + - type: "null" reasonForChange: - type: [string, "null"] x-internal: true + anyOf: + - type: string + - type: "null" diff --git a/apify-api/openapi/components/schemas/actor-pricing-info/FlatPricePerMonthActorPricingInfo.yaml b/apify-api/openapi/components/schemas/actor-pricing-info/FlatPricePerMonthActorPricingInfo.yaml index 6ce7b75c71..234b12d6cb 100644 --- a/apify-api/openapi/components/schemas/actor-pricing-info/FlatPricePerMonthActorPricingInfo.yaml +++ b/apify-api/openapi/components/schemas/actor-pricing-info/FlatPricePerMonthActorPricingInfo.yaml @@ -4,11 +4,10 @@ allOf: - type: object required: - pricingModel - - pricePerUnitUsd - - trialMinutes properties: pricingModel: - $ref: ./PricingModel.yaml + type: string + enum: [FLAT_PRICE_PER_MONTH] trialMinutes: type: integer description: For how long this Actor can be used for free in trial period diff --git a/apify-api/openapi/components/schemas/actor-pricing-info/FreeActorPricingInfo.yaml b/apify-api/openapi/components/schemas/actor-pricing-info/FreeActorPricingInfo.yaml index 68c83f0788..a25f5e718e 100644 --- a/apify-api/openapi/components/schemas/actor-pricing-info/FreeActorPricingInfo.yaml +++ b/apify-api/openapi/components/schemas/actor-pricing-info/FreeActorPricingInfo.yaml @@ -6,4 +6,5 @@ allOf: - pricingModel properties: pricingModel: - $ref: ./PricingModel.yaml + type: string + enum: [FREE] diff --git a/apify-api/openapi/components/schemas/actor-pricing-info/PayPerEventActorPricingInfo.yaml b/apify-api/openapi/components/schemas/actor-pricing-info/PayPerEventActorPricingInfo.yaml index 92b5ba9aa3..e3340aaca0 100644 --- a/apify-api/openapi/components/schemas/actor-pricing-info/PayPerEventActorPricingInfo.yaml +++ b/apify-api/openapi/components/schemas/actor-pricing-info/PayPerEventActorPricingInfo.yaml @@ -4,10 +4,10 @@ allOf: - type: object required: - pricingModel - - pricingPerEvent properties: pricingModel: - $ref: ./PricingModel.yaml + type: string + enum: [PAY_PER_EVENT] pricingPerEvent: type: object properties: @@ -16,4 +16,6 @@ allOf: additionalProperties: $ref: ./ActorChargeEvent.yaml minimalMaxTotalChargeUsd: - type: [number, "null"] + anyOf: + - type: number + - type: "null" diff --git a/apify-api/openapi/components/schemas/actor-pricing-info/PricePerDatasetItemActorPricingInfo.yaml b/apify-api/openapi/components/schemas/actor-pricing-info/PricePerDatasetItemActorPricingInfo.yaml index 845eacd839..cb9c959300 100644 --- a/apify-api/openapi/components/schemas/actor-pricing-info/PricePerDatasetItemActorPricingInfo.yaml +++ b/apify-api/openapi/components/schemas/actor-pricing-info/PricePerDatasetItemActorPricingInfo.yaml @@ -4,13 +4,23 @@ allOf: - type: object required: - pricingModel - - pricePerUnitUsd - - unitName properties: pricingModel: - $ref: ./PricingModel.yaml + type: string + enum: [PRICE_PER_DATASET_ITEM] unitName: type: string description: Name of the unit that is being charged pricePerUnitUsd: type: number + description: Price per unit in USD (for flat-rate pricing) + tieredPricing: + type: array + description: Tiered pricing configuration (for tiered pricing) + items: + type: object + properties: + fromUnitCount: + type: integer + pricePerUnitUsd: + type: number diff --git a/apify-api/openapi/components/schemas/actor-runs/Run.yaml b/apify-api/openapi/components/schemas/actor-runs/Run.yaml index b3f76d9d9e..f21a4e04a6 100644 --- a/apify-api/openapi/components/schemas/actor-runs/Run.yaml +++ b/apify-api/openapi/components/schemas/actor-runs/Run.yaml @@ -29,30 +29,38 @@ properties: examples: [7sT5jcggjjA9fNcxF] description: ID of the user who started the run. actorTaskId: - type: [string, "null"] examples: [KJHSKHausidyaJKHs] description: ID of the Actor task, if the run was started from a task. + anyOf: + - type: string + - type: "null" startedAt: type: string format: date-time examples: ["2019-11-30T07:34:24.202Z"] description: Time when the Actor run started. finishedAt: - type: [string, "null"] - format: date-time examples: ["2019-12-12T09:30:12.202Z"] description: Time when the Actor run finished. + anyOf: + - type: string + format: date-time + - type: "null" status: description: Current status of the Actor run. $ref: ../common/ActorJobStatus.yaml statusMessage: - type: [string, "null"] examples: [Actor is running] description: Detailed message about the run status. + anyOf: + - type: string + - type: "null" isStatusMessageTerminal: - type: [boolean, "null"] examples: [false] description: Whether the status message is terminal (final). + anyOf: + - type: boolean + - type: "null" meta: description: Metadata about the Actor run. $ref: ./RunMeta.yaml @@ -79,9 +87,11 @@ properties: examples: [7sT5jcggjjA9fNcxF] description: ID of the Actor build used for this run. exitCode: - type: [integer, "null"] examples: [0] description: Exit code of the Actor run process. + anyOf: + - type: integer + - type: "null" generalAccess: description: General access level for the Actor run. $ref: ../common/GeneralAccess.yaml @@ -132,35 +142,43 @@ properties: additionalProperties: type: string buildNumber: - type: string examples: [0.0.36] description: Build number of the Actor build used for this run. + anyOf: + - type: string + - type: "null" containerUrl: type: string format: uri examples: ["https://g8kd8kbc5ge8.runs.apify.net"] description: URL of the container running the Actor. isContainerServerReady: - type: [boolean, "null"] examples: [true] description: Whether the container's HTTP server is ready to accept requests. + anyOf: + - type: boolean + - type: "null" gitBranchName: - type: [string, "null"] examples: [master] description: Name of the git branch used for the Actor build. + anyOf: + - type: string + - type: "null" usage: description: Resource usage statistics for the run. anyOf: - $ref: ./RunUsage.yaml - type: "null" usageTotalUsd: - type: [number, "null"] examples: [0.2654] description: >- Total cost in USD for this run. Represents what you actually pay. For run owners: includes platform usage (compute units) and/or event costs depending on the Actor's pricing model. For run non-owners: only available for Pay-Per-Event Actors (event costs only). Not available for Pay-Per-Result Actors when you're not the Actor owner. + anyOf: + - type: number + - type: "null" usageUsd: description: >- Platform usage costs breakdown in USD. Only present if you own the run AND are paying for platform usage diff --git a/apify-api/openapi/components/schemas/actor-runs/RunOptions.yaml b/apify-api/openapi/components/schemas/actor-runs/RunOptions.yaml index 0723482907..dc4b9a3f59 100644 --- a/apify-api/openapi/components/schemas/actor-runs/RunOptions.yaml +++ b/apify-api/openapi/components/schemas/actor-runs/RunOptions.yaml @@ -23,7 +23,7 @@ properties: minimum: 0 examples: [2048] maxItems: - type: integer + type: [integer, "null"] minimum: 1 examples: [1000] maxTotalChargeUsd: diff --git a/apify-api/openapi/components/schemas/actor-runs/RunStats.yaml b/apify-api/openapi/components/schemas/actor-runs/RunStats.yaml index e6827b1580..a6a2327533 100644 --- a/apify-api/openapi/components/schemas/actor-runs/RunStats.yaml +++ b/apify-api/openapi/components/schemas/actor-runs/RunStats.yaml @@ -6,9 +6,11 @@ required: type: object properties: inputBodyLen: - type: integer - minimum: 0 examples: [240] + anyOf: + - type: integer + minimum: 0 + - type: "null" migrationCount: type: integer minimum: 0 diff --git a/apify-api/openapi/components/schemas/actor-tasks/CreateTaskRequest.yaml b/apify-api/openapi/components/schemas/actor-tasks/CreateTaskRequest.yaml index 715f3bc970..1d976d128c 100644 --- a/apify-api/openapi/components/schemas/actor-tasks/CreateTaskRequest.yaml +++ b/apify-api/openapi/components/schemas/actor-tasks/CreateTaskRequest.yaml @@ -1,7 +1,6 @@ title: CreateTaskRequest required: - actId - - name type: object properties: actId: @@ -16,10 +15,13 @@ properties: - type: "null" input: anyOf: - - $ref: ./TaskInput.yaml + - type: object + additionalProperties: true - type: "null" title: - type: [string, "null"] + anyOf: + - type: string + - type: "null" actorStandby: anyOf: - $ref: ../actors/ActorStandby.yaml diff --git a/apify-api/openapi/components/schemas/actor-tasks/Task.yaml b/apify-api/openapi/components/schemas/actor-tasks/Task.yaml index 783829f1a7..af17aee5ea 100644 --- a/apify-api/openapi/components/schemas/actor-tasks/Task.yaml +++ b/apify-api/openapi/components/schemas/actor-tasks/Task.yaml @@ -21,7 +21,9 @@ properties: type: string examples: [my-task] username: - type: [string, "null"] + anyOf: + - type: string + - type: "null" examples: [janedoe] createdAt: type: string @@ -32,8 +34,10 @@ properties: format: date-time examples: ["2018-10-26T13:30:49.578Z"] removedAt: - type: [string, "null"] - format: date-time + anyOf: + - type: string + format: date-time + - type: "null" stats: anyOf: - $ref: ./TaskStats.yaml @@ -44,14 +48,19 @@ properties: - type: "null" input: anyOf: - - $ref: ./TaskInput.yaml + - type: object + additionalProperties: true - type: "null" title: - type: [string, "null"] + anyOf: + - type: string + - type: "null" actorStandby: anyOf: - $ref: ../actors/ActorStandby.yaml - type: "null" standbyUrl: - type: [string, "null"] - format: uri + anyOf: + - type: string + format: uri + - type: "null" diff --git a/apify-api/openapi/components/schemas/actor-tasks/UpdateTaskRequest.yaml b/apify-api/openapi/components/schemas/actor-tasks/UpdateTaskRequest.yaml index 0a3d2ed903..bcf0612caf 100644 --- a/apify-api/openapi/components/schemas/actor-tasks/UpdateTaskRequest.yaml +++ b/apify-api/openapi/components/schemas/actor-tasks/UpdateTaskRequest.yaml @@ -10,10 +10,13 @@ properties: - type: "null" input: anyOf: - - $ref: ./TaskInput.yaml + - type: object + additionalProperties: true - type: "null" title: - type: [string, "null"] + anyOf: + - type: string + - type: "null" actorStandby: anyOf: - $ref: ../actors/ActorStandby.yaml diff --git a/apify-api/openapi/components/schemas/actors/EnvVar.yaml b/apify-api/openapi/components/schemas/actors/EnvVar.yaml index e886dd2070..168d073489 100644 --- a/apify-api/openapi/components/schemas/actors/EnvVar.yaml +++ b/apify-api/openapi/components/schemas/actors/EnvVar.yaml @@ -1,7 +1,6 @@ title: EnvVar required: - name - - value type: object properties: name: @@ -11,5 +10,7 @@ properties: type: string examples: [my-value] isSecret: - type: [boolean, "null"] examples: [false] + anyOf: + - type: boolean + - type: "null" diff --git a/apify-api/openapi/components/schemas/actors/SourceCodeFile.yaml b/apify-api/openapi/components/schemas/actors/SourceCodeFile.yaml index 794b69fb3a..5e4916ba50 100644 --- a/apify-api/openapi/components/schemas/actors/SourceCodeFile.yaml +++ b/apify-api/openapi/components/schemas/actors/SourceCodeFile.yaml @@ -1,7 +1,6 @@ title: SourceCodeFile type: object required: - - format - content - name properties: diff --git a/apify-api/openapi/components/schemas/actors/TaggedBuildInfo.yaml b/apify-api/openapi/components/schemas/actors/TaggedBuildInfo.yaml deleted file mode 100644 index 50e0aa9e61..0000000000 --- a/apify-api/openapi/components/schemas/actors/TaggedBuildInfo.yaml +++ /dev/null @@ -1,17 +0,0 @@ -title: TaggedBuildInfo -description: Information about a tagged build. -type: object -properties: - buildId: - type: string - description: The ID of the build associated with this tag. - examples: [z2EryhbfhgSyqj6Hn] - buildNumber: - type: string - description: The build number/version string. - examples: [0.0.2] - finishedAt: - type: [string, "null"] - format: date-time - description: The timestamp when the build finished. - examples: ["2019-06-10T11:15:49.286Z"] diff --git a/apify-api/openapi/components/schemas/actors/TaggedBuilds.yaml b/apify-api/openapi/components/schemas/actors/TaggedBuilds.yaml index a24f6a6019..4a30a8ea08 100644 --- a/apify-api/openapi/components/schemas/actors/TaggedBuilds.yaml +++ b/apify-api/openapi/components/schemas/actors/TaggedBuilds.yaml @@ -3,7 +3,25 @@ description: A dictionary mapping build tag names (e.g., "latest", "beta") to th type: object additionalProperties: anyOf: - - $ref: ./TaggedBuildInfo.yaml + - type: object + properties: + buildId: + type: string + description: The ID of the build associated with this tag. + examples: [z2EryhbfhgSyqj6Hn] + buildNumber: + description: The build number/version string. + examples: [0.0.2] + anyOf: + - type: string + - type: "null" + finishedAt: + description: The timestamp when the build finished. + examples: ["2019-06-10T11:15:49.286Z"] + anyOf: + - type: string + format: date-time + - type: "null" - type: "null" example: latest: diff --git a/apify-api/openapi/components/schemas/actors/Version.yaml b/apify-api/openapi/components/schemas/actors/Version.yaml index ba6044cdc9..928b4da272 100644 --- a/apify-api/openapi/components/schemas/actors/Version.yaml +++ b/apify-api/openapi/components/schemas/actors/Version.yaml @@ -12,24 +12,34 @@ properties: - $ref: ./VersionSourceType.yaml - type: "null" envVars: - type: [array, "null"] - items: - $ref: ./EnvVar.yaml description: "" + anyOf: + - type: array + items: + $ref: ./EnvVar.yaml + - type: "null" applyEnvVarsToBuild: - type: [boolean, "null"] examples: [false] + anyOf: + - type: boolean + - type: "null" buildTag: type: string examples: [latest] sourceFiles: $ref: ./VersionSourceFiles.yaml gitRepoUrl: - type: [string, "null"] description: URL of the Git repository when sourceType is GIT_REPO. + anyOf: + - type: string + - type: "null" tarballUrl: - type: [string, "null"] description: URL of the tarball when sourceType is TARBALL. + anyOf: + - type: string + - type: "null" gitHubGistUrl: - type: [string, "null"] description: URL of the GitHub Gist when sourceType is GITHUB_GIST. + anyOf: + - type: string + - type: "null" diff --git a/apify-api/openapi/components/schemas/common/errors/ActorErrors.yaml b/apify-api/openapi/components/schemas/common/errors/ActorErrors.yaml index 9034a50075..743d4c3225 100644 --- a/apify-api/openapi/components/schemas/common/errors/ActorErrors.yaml +++ b/apify-api/openapi/components/schemas/common/errors/ActorErrors.yaml @@ -3,10 +3,11 @@ ActorNotFoundError: properties: error: type: object + required: [type] properties: type: type: string - enum: [actor-not-found] + examples: [actor-not-found, record-not-found, record-or-token-not-found] message: type: string example: Actor was not found @@ -16,6 +17,7 @@ ActorBuildNotFoundError: properties: error: type: object + required: [type] properties: type: type: string @@ -29,6 +31,7 @@ RecordOrTokenNotFoundError: properties: error: type: object + required: [type] properties: type: type: string @@ -42,6 +45,7 @@ ActorRunNotFoundError: properties: error: type: object + required: [type] properties: type: type: string @@ -55,6 +59,7 @@ ActorRunTimeoutExceededError: properties: error: type: object + required: [type] properties: type: type: string @@ -68,6 +73,7 @@ ActorRunFailedError: properties: error: type: object + required: [type] properties: type: type: string @@ -81,6 +87,7 @@ ActorVersionNotFoundError: properties: error: type: object + required: [type] properties: type: type: string diff --git a/apify-api/openapi/components/schemas/common/errors/BuildErrors.yaml b/apify-api/openapi/components/schemas/common/errors/BuildErrors.yaml index a5e56c7e2b..805d9aecdf 100644 --- a/apify-api/openapi/components/schemas/common/errors/BuildErrors.yaml +++ b/apify-api/openapi/components/schemas/common/errors/BuildErrors.yaml @@ -3,6 +3,7 @@ UnknownBuildTagError: properties: error: type: object + required: [type] properties: type: type: string diff --git a/apify-api/openapi/components/schemas/common/errors/EnvVariableErrors.yaml b/apify-api/openapi/components/schemas/common/errors/EnvVariableErrors.yaml index 4f4d75e498..18eed82d1e 100644 --- a/apify-api/openapi/components/schemas/common/errors/EnvVariableErrors.yaml +++ b/apify-api/openapi/components/schemas/common/errors/EnvVariableErrors.yaml @@ -3,6 +3,7 @@ EnvironmentVariableNotFoundError: properties: error: type: object + required: [type] properties: type: type: string diff --git a/apify-api/openapi/components/schemas/common/errors/StorageErrors.yaml b/apify-api/openapi/components/schemas/common/errors/StorageErrors.yaml index 9221a7afe8..5cf5b010fd 100644 --- a/apify-api/openapi/components/schemas/common/errors/StorageErrors.yaml +++ b/apify-api/openapi/components/schemas/common/errors/StorageErrors.yaml @@ -3,6 +3,7 @@ DatasetNotFoundError: properties: error: type: object + required: [type] properties: type: type: string @@ -16,6 +17,7 @@ KeyValueStoreNotFoundError: properties: error: type: object + required: [type] properties: type: type: string @@ -29,6 +31,7 @@ RequestQueueNotFoundError: properties: error: type: object + required: [type] properties: type: type: string @@ -42,6 +45,7 @@ RecordNotFoundError: properties: error: type: object + required: [type] properties: type: type: string @@ -55,6 +59,7 @@ RequestNotFoundError: properties: error: type: object + required: [type] properties: type: type: string @@ -68,6 +73,7 @@ RequestIdInvalidError: properties: error: type: object + required: [type] properties: type: type: string diff --git a/apify-api/openapi/components/schemas/key-value-stores/RecordResponse.yaml b/apify-api/openapi/components/schemas/key-value-stores/RecordResponse.yaml index a5c09dc69c..b8d06d6b44 100644 --- a/apify-api/openapi/components/schemas/key-value-stores/RecordResponse.yaml +++ b/apify-api/openapi/components/schemas/key-value-stores/RecordResponse.yaml @@ -2,8 +2,6 @@ title: RecordResponse description: | The response body contains the value of the record. The content type of the response is determined by the Content-Type header stored with the record. -type: object -additionalProperties: true example: message: Hello, world! count: 42 diff --git a/apify-api/openapi/components/schemas/request-queues/HeadRequest.yaml b/apify-api/openapi/components/schemas/request-queues/HeadRequest.yaml index 34aeb2b63c..7a1ae5042d 100644 --- a/apify-api/openapi/components/schemas/request-queues/HeadRequest.yaml +++ b/apify-api/openapi/components/schemas/request-queues/HeadRequest.yaml @@ -11,7 +11,9 @@ properties: uniqueKey: $ref: ./SharedProperties.yaml#/UniqueKey url: - $ref: ./SharedProperties.yaml#/RequestUrl + type: string + description: The URL of the request. May be truncated if it exceeds 128 characters. + examples: [https://apify.com] method: $ref: ./SharedProperties.yaml#/RequestMethod retryCount: diff --git a/apify-api/openapi/components/schemas/request-queues/LockedHeadRequest.yaml b/apify-api/openapi/components/schemas/request-queues/LockedHeadRequest.yaml index d0b50d49c0..a017b49824 100644 --- a/apify-api/openapi/components/schemas/request-queues/LockedHeadRequest.yaml +++ b/apify-api/openapi/components/schemas/request-queues/LockedHeadRequest.yaml @@ -12,7 +12,9 @@ properties: uniqueKey: $ref: ./SharedProperties.yaml#/UniqueKey url: - $ref: ./SharedProperties.yaml#/RequestUrl + type: string + description: The URL of the request. May be truncated if it exceeds 128 characters. + examples: [https://apify.com] method: $ref: ./SharedProperties.yaml#/RequestMethod retryCount: diff --git a/apify-api/openapi/components/schemas/webhooks/ExampleWebhookDispatch.yaml b/apify-api/openapi/components/schemas/webhooks/ExampleWebhookDispatch.yaml index 719990542c..feb76ca5cd 100644 --- a/apify-api/openapi/components/schemas/webhooks/ExampleWebhookDispatch.yaml +++ b/apify-api/openapi/components/schemas/webhooks/ExampleWebhookDispatch.yaml @@ -1,11 +1,11 @@ title: ExampleWebhookDispatch -required: - - status type: object properties: status: $ref: ../webhook-dispatches/WebhookDispatchStatus.yaml finishedAt: - type: [string, "null"] - format: date-time examples: ["2019-12-13T08:36:13.202Z"] + anyOf: + - type: string + format: date-time + - type: "null" diff --git a/apify-api/openapi/components/schemas/webhooks/Webhook.yaml b/apify-api/openapi/components/schemas/webhooks/Webhook.yaml index 3f52936ae8..357c2f3e4d 100644 --- a/apify-api/openapi/components/schemas/webhooks/Webhook.yaml +++ b/apify-api/openapi/components/schemas/webhooks/Webhook.yaml @@ -59,7 +59,20 @@ properties: examples: [this is webhook description] lastDispatch: anyOf: - - $ref: ./ExampleWebhookDispatch.yaml + - type: object + properties: + status: + type: string + enum: + - ACTIVE + - SUCCEEDED + - FAILED + finishedAt: + examples: ["2019-12-13T08:36:13.202Z"] + anyOf: + - type: string + format: date-time + - type: "null" - type: "null" stats: anyOf: diff --git a/apify-api/openapi/paths/actor-runs/actor-runs@{runId}@charge.yaml b/apify-api/openapi/paths/actor-runs/actor-runs@{runId}@charge.yaml index 0a0405e2c9..f36c58fd01 100644 --- a/apify-api/openapi/paths/actor-runs/actor-runs@{runId}@charge.yaml +++ b/apify-api/openapi/paths/actor-runs/actor-runs@{runId}@charge.yaml @@ -36,6 +36,10 @@ post: responses: "201": description: "The charge was successful. Note that you still have to make sure in your Actor that the total charge for the run respects the maximum value set by the user, as the API does not check this. Above the limit, the charges reported as successful in API will not be added to your payouts, but you will still bear the associated costs. Use the Apify charge manager or SDK to avoid having to deal with this manually." + content: + application/json: + schema: + type: object "400": $ref: ../../components/responses/BadRequest.yaml "401": diff --git a/apify-api/openapi/paths/actor-tasks/actor-tasks.yaml b/apify-api/openapi/paths/actor-tasks/actor-tasks.yaml index a07449a249..9d444e3b15 100644 --- a/apify-api/openapi/paths/actor-tasks/actor-tasks.yaml +++ b/apify-api/openapi/paths/actor-tasks/actor-tasks.yaml @@ -142,6 +142,8 @@ post: $ref: ../../components/responses/Forbidden.yaml "405": $ref: ../../components/responses/MethodNotAllowed.yaml + "409": + $ref: ../../components/responses/Conflict.yaml "413": $ref: ../../components/responses/PayloadTooLarge.yaml "415": diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@builds@{buildId}.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@builds@{buildId}.yaml index 03db66e51c..f73bcfbb7e 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@builds@{buildId}.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@builds@{buildId}.yaml @@ -31,7 +31,7 @@ get: content: application/json: schema: - oneOf: + anyOf: - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorNotFoundError" - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorBuildNotFoundError" "405": diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@builds@{buildId}@abort.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@builds@{buildId}@abort.yaml index adbb1e42dd..5bfb15708f 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@builds@{buildId}@abort.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@builds@{buildId}@abort.yaml @@ -58,7 +58,7 @@ post: content: application/json: schema: - oneOf: + anyOf: - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorNotFoundError" - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorBuildNotFoundError" "405": diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@builds@{buildId}@openapi.json.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@builds@{buildId}@openapi.json.yaml index 9cc9969e83..fda455aff6 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@builds@{buildId}@openapi.json.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@builds@{buildId}@openapi.json.yaml @@ -35,12 +35,14 @@ get: description: A standard OpenAPI 3.x JSON document. "400": $ref: ../../components/responses/BadRequest.yaml + "403": + $ref: ../../components/responses/Forbidden.yaml "404": description: Not found - the requested resource was not found. content: application/json: schema: - oneOf: + anyOf: - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorNotFoundError" - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorBuildNotFoundError" "405": diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml index c3d867dfb0..cc6d0e753a 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@run-sync.yaml @@ -73,6 +73,8 @@ post: application/json: schema: $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorRunTimeoutExceededError" + "415": + $ref: ../../components/responses/UnsupportedMediaType.yaml "429": $ref: ../../components/responses/TooManyRequests.yaml deprecated: false diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@runs.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@runs.yaml index fec120968e..ddab38d420 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@runs.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@runs.yaml @@ -121,7 +121,13 @@ post: type: object example: foo: bar - required: true + application/x-www-form-urlencoded: + schema: + type: string + text/plain: + schema: + type: string + required: false responses: "201": description: "" @@ -141,6 +147,8 @@ post: $ref: ../../components/responses/BadRequest.yaml "401": $ref: ../../components/responses/Unauthorized.yaml + "402": + $ref: ../../components/responses/PaymentRequired.yaml "403": $ref: ../../components/responses/Forbidden.yaml "404": diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@runs@last.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@runs@last.yaml index 2a2db848c2..cf81172f90 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@runs@last.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@runs@last.yaml @@ -60,6 +60,7 @@ get: parameters: - $ref: "../../components/parameters/runAndBuildParameters.yaml#/actorId" - $ref: "../../components/parameters/runAndBuildParameters.yaml#/statusLastRun" + - $ref: "../../components/parameters/runAndBuildParameters.yaml#/waitForFinishRun" responses: "200": description: "" @@ -79,7 +80,7 @@ get: content: application/json: schema: - oneOf: + anyOf: - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorNotFoundError" - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorRunNotFoundError" "405": diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@runs@{runId}.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@runs@{runId}.yaml index 29334c69a1..e6fd4c7fde 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@runs@{runId}.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@runs@{runId}.yaml @@ -39,7 +39,7 @@ get: content: application/json: schema: - oneOf: + anyOf: - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorNotFoundError" - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorRunNotFoundError" "405": diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@runs@{runId}@abort.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@runs@{runId}@abort.yaml index 720115132b..5ea33a08dc 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@runs@{runId}@abort.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@runs@{runId}@abort.yaml @@ -35,7 +35,7 @@ post: content: application/json: schema: - oneOf: + anyOf: - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorNotFoundError" - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorRunNotFoundError" "405": diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@runs@{runId}@metamorph.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@runs@{runId}@metamorph.yaml index de21e372fa..d5ff6436ce 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@runs@{runId}@metamorph.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@runs@{runId}@metamorph.yaml @@ -60,7 +60,7 @@ post: content: application/json: schema: - oneOf: + anyOf: - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorNotFoundError" - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorRunNotFoundError" "405": diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@runs@{runId}@resurrect.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@runs@{runId}@resurrect.yaml index 6d21ff9ea5..363aef8adc 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@runs@{runId}@resurrect.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@runs@{runId}@resurrect.yaml @@ -43,7 +43,7 @@ post: content: application/json: schema: - oneOf: + anyOf: - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorNotFoundError" - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorRunNotFoundError" "405": diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@versions@{versionNumber}.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@versions@{versionNumber}.yaml index 8b4ca2f7cf..c071c31cb3 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@versions@{versionNumber}.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@versions@{versionNumber}.yaml @@ -27,7 +27,7 @@ get: content: application/json: schema: - oneOf: + anyOf: - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorNotFoundError" - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorVersionNotFoundError" "405": @@ -77,7 +77,7 @@ delete: content: application/json: schema: - oneOf: + anyOf: - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorNotFoundError" - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorVersionNotFoundError" "405": diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@versions@{versionNumber}@env-vars.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@versions@{versionNumber}@env-vars.yaml index 3c6b264f9f..3d5a4a654c 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@versions@{versionNumber}@env-vars.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@versions@{versionNumber}@env-vars.yaml @@ -28,7 +28,7 @@ get: content: application/json: schema: - oneOf: + anyOf: - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorNotFoundError" - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorVersionNotFoundError" "405": diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@versions@{versionNumber}@env-vars@{envVarName}.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@versions@{versionNumber}@env-vars@{envVarName}.yaml index acb4ba3765..a121d02a44 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@versions@{versionNumber}@env-vars@{envVarName}.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@versions@{versionNumber}@env-vars@{envVarName}.yaml @@ -43,7 +43,7 @@ get: content: application/json: schema: - oneOf: + anyOf: - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorNotFoundError" - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorVersionNotFoundError" - $ref: "../../components/schemas/common/errors/EnvVariableErrors.yaml#/EnvironmentVariableNotFoundError" @@ -101,7 +101,7 @@ delete: content: application/json: schema: - oneOf: + anyOf: - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorNotFoundError" - $ref: "../../components/schemas/common/errors/ActorErrors.yaml#/ActorVersionNotFoundError" - $ref: "../../components/schemas/common/errors/EnvVariableErrors.yaml#/EnvironmentVariableNotFoundError" diff --git a/apify-api/openapi/paths/datasets/datasets.yaml b/apify-api/openapi/paths/datasets/datasets.yaml index aaabfa9b95..a5375ebcee 100644 --- a/apify-api/openapi/paths/datasets/datasets.yaml +++ b/apify-api/openapi/paths/datasets/datasets.yaml @@ -80,8 +80,14 @@ post: type: string example: eshop-items responses: + "200": + description: Dataset with the given name already exists, returning the existing object. + content: + application/json: + schema: + $ref: ../../components/schemas/datasets/DatasetResponse.yaml "201": - description: "" + description: A new dataset was created. headers: Location: content: diff --git a/apify-api/openapi/paths/datasets/datasets@{datasetId}@items.yaml b/apify-api/openapi/paths/datasets/datasets@{datasetId}@items.yaml index 449f9fe6ab..f8cb74ded7 100644 --- a/apify-api/openapi/paths/datasets/datasets@{datasetId}@items.yaml +++ b/apify-api/openapi/paths/datasets/datasets@{datasetId}@items.yaml @@ -314,11 +314,13 @@ post: content: application/json: schema: - oneOf: - - $ref: ../../components/schemas/datasets/PutItemsRequest.yaml + anyOf: + - type: object + additionalProperties: true - type: array items: - $ref: ../../components/schemas/datasets/PutItemsRequest.yaml + type: object + additionalProperties: true description: "" required: true responses: diff --git a/apify-api/openapi/paths/key-value-stores/key-value-stores.yaml b/apify-api/openapi/paths/key-value-stores/key-value-stores.yaml index c809202f6c..1aaf1b0677 100644 --- a/apify-api/openapi/paths/key-value-stores/key-value-stores.yaml +++ b/apify-api/openapi/paths/key-value-stores/key-value-stores.yaml @@ -87,8 +87,14 @@ post: type: string example: eshop-values responses: + "200": + description: Key-value store with the given name already exists, returning the existing object. + content: + application/json: + schema: + $ref: ../../components/schemas/key-value-stores/KeyValueStoreResponse.yaml "201": - description: "" + description: A new key-value store was created. headers: Location: content: diff --git a/apify-api/openapi/paths/key-value-stores/key-value-stores@{storeId}@records@{recordKey}.yaml b/apify-api/openapi/paths/key-value-stores/key-value-stores@{storeId}@records@{recordKey}.yaml index c268c09a58..c7e7d09d5a 100644 --- a/apify-api/openapi/paths/key-value-stores/key-value-stores@{storeId}@records@{recordKey}.yaml +++ b/apify-api/openapi/paths/key-value-stores/key-value-stores@{storeId}@records@{recordKey}.yaml @@ -23,6 +23,17 @@ get: - $ref: "../../components/parameters/storageParameters.yaml#/storeId" - $ref: "../../components/parameters/storageParameters.yaml#/recordKey" - $ref: "../../components/parameters/storageParameters.yaml#/signature" + - name: disableRedirect + in: query + description: | + If `true` or `1`, the API serves the record content directly instead of redirecting to the + storage provider (e.g. Amazon S3). This is useful when you want to fetch the content in + one HTTP request without following redirects. + required: false + style: form + schema: + type: boolean + example: true - name: attachment in: query description: | @@ -38,9 +49,6 @@ get: description: "" headers: {} content: - application/json: - schema: - $ref: ../../components/schemas/key-value-stores/RecordResponse.yaml "*/*": schema: {} "302": @@ -65,7 +73,7 @@ get: content: application/json: schema: - oneOf: + anyOf: - $ref: "../../components/schemas/common/errors/StorageErrors.yaml#/KeyValueStoreNotFoundError" - $ref: "../../components/schemas/common/errors/StorageErrors.yaml#/RecordNotFoundError" "405": diff --git a/apify-api/openapi/paths/request-queues/request-queues.yaml b/apify-api/openapi/paths/request-queues/request-queues.yaml index 9cb92ae791..fe945ad87c 100644 --- a/apify-api/openapi/paths/request-queues/request-queues.yaml +++ b/apify-api/openapi/paths/request-queues/request-queues.yaml @@ -83,8 +83,14 @@ post: type: string example: example-com responses: + "200": + description: Request queue with the given name already exists, returning the existing object. + content: + application/json: + schema: + $ref: ../../components/schemas/request-queues/RequestQueueResponse.yaml "201": - description: "" + description: A new request queue was created. headers: Location: content: diff --git a/apify-api/openapi/paths/request-queues/request-queues@{queueId}@requests@{requestId}.yaml b/apify-api/openapi/paths/request-queues/request-queues@{queueId}@requests@{requestId}.yaml index 3b11234af4..1664b200f3 100644 --- a/apify-api/openapi/paths/request-queues/request-queues@{queueId}@requests@{requestId}.yaml +++ b/apify-api/openapi/paths/request-queues/request-queues@{queueId}@requests@{requestId}.yaml @@ -26,7 +26,7 @@ get: content: application/json: schema: - oneOf: + anyOf: - $ref: "../../components/schemas/common/errors/StorageErrors.yaml#/RequestQueueNotFoundError" - $ref: "../../components/schemas/common/errors/StorageErrors.yaml#/RequestNotFoundError" "405":