diff --git a/apify-api/openapi/components/objects/actors/acts@{actorId}@versions@{versionNumber}put.yaml b/apify-api/openapi/components/objects/actors/acts@{actorId}@versions@{versionNumber}put.yaml index d27decd93e..8b470b3763 100644 --- a/apify-api/openapi/components/objects/actors/acts@{actorId}@versions@{versionNumber}put.yaml +++ b/apify-api/openapi/components/objects/actors/acts@{actorId}@versions@{versionNumber}put.yaml @@ -9,7 +9,7 @@ shared: &shared content: application/json: schema: - $ref: ../../schemas/actors/CreateOrUpdateVersionRequest.yaml + $ref: ../../schemas/actors/UpdateVersionRequest.yaml example: versionNumber: "0.0" sourceType: SOURCE_FILES diff --git a/apify-api/openapi/components/schemas/actors/CreateActorRequest.yaml b/apify-api/openapi/components/schemas/actors/CreateActorRequest.yaml index 13f1aab6cc..11dfbe47db 100644 --- a/apify-api/openapi/components/schemas/actors/CreateActorRequest.yaml +++ b/apify-api/openapi/components/schemas/actors/CreateActorRequest.yaml @@ -17,10 +17,12 @@ properties: Can contain spaces and capital letters. Recommended length is 40-50 characters. You can change this title without affecting the Actor's URL or SEO. isPublic: - type: [boolean, "null"] + type: boolean examples: [false] - description: Whether the Actor is available to users in Apify Store. If `false`, the Actor is private - and only visible to you. + description: Whether the Actor is available to users in Apify Store. A new Actor is always private. + To publish it, build it first, then update it with `isPublic` set to `true`. + actorPermissionLevel: + $ref: ./ActorPermissionLevel.yaml seoTitle: type: [string, "null"] examples: [Free Instagram scraper] @@ -36,11 +38,10 @@ properties: examples: [false] deprecated: true # Use defaultRunOptions.restartOnError instead versions: - anyOf: - - type: array - items: - $ref: ./Version.yaml - - type: "null" + type: array + minItems: 1 + items: + $ref: ./CreateVersionRequest.yaml description: "An array of `Version` objects. Each object represents a specific version of the Actor's source code: its location, builds, and environment configuration." categories: diff --git a/apify-api/openapi/components/schemas/actors/CreateOrUpdateVersionRequest.yaml b/apify-api/openapi/components/schemas/actors/CreateVersionRequest.yaml similarity index 81% rename from apify-api/openapi/components/schemas/actors/CreateOrUpdateVersionRequest.yaml rename to apify-api/openapi/components/schemas/actors/CreateVersionRequest.yaml index cbb1b1046e..58d05356a9 100644 --- a/apify-api/openapi/components/schemas/actors/CreateOrUpdateVersionRequest.yaml +++ b/apify-api/openapi/components/schemas/actors/CreateVersionRequest.yaml @@ -1,23 +1,22 @@ -title: CreateOrUpdateVersionRequest +title: CreateVersionRequest +required: + - versionNumber + - sourceType type: object properties: versionNumber: - type: [string, "null"] + type: string pattern: ^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])$ examples: ["1.6"] description: The version number of the Actor. Two numbers separated by a dot, that represent the `MAJOR.MINOR` part of the semantic versioning. sourceType: - anyOf: - - $ref: ./VersionSourceType.yaml - - type: "null" + $ref: ./WritableVersionSourceType.yaml description: Where the source code of the version lives. envVars: - anyOf: - - type: array - items: - $ref: ./EnvVar.yaml - - type: "null" + type: array + items: + $ref: ./EnvVarRequest.yaml description: Environment variables for the version. applyEnvVarsToBuild: type: [boolean, "null"] @@ -32,11 +31,11 @@ properties: description: Applies when the `sourceType` is `SOURCE_FILES`. Represents the Actor's file structure as an array of files and folders. gitRepoUrl: - type: [string, "null"] + type: string description: URL of the Git repository to clone the source code from. Applies when the `sourceType` is `GIT_REPO`. tarballUrl: - type: [string, "null"] + type: string description: URL of the tarball to download the source code from. Applies when the `sourceType` is `TARBALL`. gitHubGistUrl: - type: [string, "null"] + type: string description: URL of the GitHub Gist to clone the source code from. Applies when the `sourceType` is `GITHUB_GIST`. diff --git a/apify-api/openapi/components/schemas/actors/EnvVarRequest.yaml b/apify-api/openapi/components/schemas/actors/EnvVarRequest.yaml index 1e2e1a97e6..998a127074 100644 --- a/apify-api/openapi/components/schemas/actors/EnvVarRequest.yaml +++ b/apify-api/openapi/components/schemas/actors/EnvVarRequest.yaml @@ -1,5 +1,18 @@ title: EnvVarRequest -allOf: - - $ref: ./EnvVar.yaml - - required: - - value +required: + - name + - value +type: object +properties: + name: + type: string + examples: [MY_ENV_VAR] + description: The name of the environment variable. Can't contain `=`. + value: + type: string + examples: [my-value] + description: The value of the environment variable. + isSecret: + type: [boolean, "null"] + examples: [false] + description: Whether the environment variable is encrypted. Secret values aren't returned by the API. diff --git a/apify-api/openapi/components/schemas/actors/UpdateActorRequest.yaml b/apify-api/openapi/components/schemas/actors/UpdateActorRequest.yaml index 506150c643..6c6b3c2dac 100644 --- a/apify-api/openapi/components/schemas/actors/UpdateActorRequest.yaml +++ b/apify-api/openapi/components/schemas/actors/UpdateActorRequest.yaml @@ -16,9 +16,7 @@ properties: description: Whether the Actor is available to users in Apify Store. If `false`, the Actor is private and only visible to you. actorPermissionLevel: - anyOf: - - $ref: ./ActorPermissionLevel.yaml - - type: "null" + $ref: ./ActorPermissionLevel.yaml seoTitle: type: [string, "null"] examples: [Free Instagram scraper] @@ -41,8 +39,9 @@ properties: deprecated: true # Use defaultRunOptions.restartOnError instead versions: type: array + minItems: 1 items: - $ref: ./CreateOrUpdateVersionRequest.yaml + $ref: ./CreateVersionRequest.yaml description: "An array of `Version` objects. Each object represents a specific version of the Actor's source code: its location, builds, and environment configuration." pricingInfos: diff --git a/apify-api/openapi/components/schemas/actors/UpdateVersionRequest.yaml b/apify-api/openapi/components/schemas/actors/UpdateVersionRequest.yaml new file mode 100644 index 0000000000..2afd49f957 --- /dev/null +++ b/apify-api/openapi/components/schemas/actors/UpdateVersionRequest.yaml @@ -0,0 +1,38 @@ +title: UpdateVersionRequest +type: object +properties: + versionNumber: + type: string + pattern: ^([0-9]|[1-9][0-9])\.([0-9]|[1-9][0-9])$ + examples: ["1.6"] + description: The version number of the Actor. Two numbers separated by a dot, + that represent the `MAJOR.MINOR` part of the semantic versioning. + sourceType: + $ref: ./WritableVersionSourceType.yaml + description: Where the source code of the version lives. + envVars: + type: array + items: + $ref: ./EnvVarRequest.yaml + description: Environment variables for the version. + applyEnvVarsToBuild: + type: [boolean, "null"] + examples: [false] + description: Whether to inject the environment variables at build time. + buildTag: + type: [string, "null"] + examples: [latest] + description: The tag name to apply to a successful build of this version. Can be `null` when the version has no build tag. + sourceFiles: + $ref: ./VersionSourceFiles.yaml + description: Applies when the `sourceType` is `SOURCE_FILES`. Represents the Actor's + file structure as an array of files and folders. + gitRepoUrl: + type: string + description: URL of the Git repository to clone the source code from. Applies when the `sourceType` is `GIT_REPO`. + tarballUrl: + type: string + description: URL of the tarball to download the source code from. Applies when the `sourceType` is `TARBALL`. + gitHubGistUrl: + type: string + description: URL of the GitHub Gist to clone the source code from. Applies when the `sourceType` is `GITHUB_GIST`. diff --git a/apify-api/openapi/components/schemas/actors/WritableVersionSourceType.yaml b/apify-api/openapi/components/schemas/actors/WritableVersionSourceType.yaml new file mode 100644 index 0000000000..e1aaacad92 --- /dev/null +++ b/apify-api/openapi/components/schemas/actors/WritableVersionSourceType.yaml @@ -0,0 +1,8 @@ +title: WritableVersionSourceType +description: The version source types accepted in request bodies. Same as `VersionSourceType`, without `SOURCE_CODE`. +enum: + - SOURCE_FILES + - GIT_REPO + - TARBALL + - GITHUB_GIST +type: string diff --git a/apify-api/openapi/components/schemas/schedules/CreateOrUpdateScheduleRequest.yaml b/apify-api/openapi/components/schemas/schedules/CreateOrUpdateScheduleRequest.yaml index 92f864454a..950d959546 100644 --- a/apify-api/openapi/components/schemas/schedules/CreateOrUpdateScheduleRequest.yaml +++ b/apify-api/openapi/components/schemas/schedules/CreateOrUpdateScheduleRequest.yaml @@ -21,6 +21,8 @@ properties: examples: [Schedule of actor ...] title: type: [string, "null"] + notifications: + $ref: ./ScheduleNotifications.yaml actions: type: [array, "null"] items: diff --git a/apify-api/openapi/components/schemas/schedules/Schedule.yaml b/apify-api/openapi/components/schemas/schedules/Schedule.yaml index bb31fc0dda..b7184f7914 100644 --- a/apify-api/openapi/components/schemas/schedules/Schedule.yaml +++ b/apify-api/openapi/components/schemas/schedules/Schedule.yaml @@ -26,13 +26,7 @@ Schedule: title: type: [string, "null"] notifications: - title: ScheduleNotifications - type: object - description: Notification settings for this schedule. - properties: - email: - type: boolean - examples: [true] + $ref: ./ScheduleNotifications.yaml actions: type: array items: diff --git a/apify-api/openapi/components/schemas/schedules/ScheduleNotifications.yaml b/apify-api/openapi/components/schemas/schedules/ScheduleNotifications.yaml new file mode 100644 index 0000000000..352aac47fc --- /dev/null +++ b/apify-api/openapi/components/schemas/schedules/ScheduleNotifications.yaml @@ -0,0 +1,7 @@ +title: ScheduleNotifications +type: object +description: Notification settings for this schedule. +properties: + email: + type: boolean + examples: [true] diff --git a/apify-api/openapi/paths/actors/acts@{actorId}.yaml b/apify-api/openapi/paths/actors/acts@{actorId}.yaml index 9e8be28120..355d119ef5 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}.yaml @@ -205,7 +205,6 @@ put: value: name: MyActor isPublic: false - versions: [] taggedBuilds: latest: buildId: z2EryhbfhgSyqj6Hn @@ -214,7 +213,6 @@ put: value: name: MyActor isPublic: false - versions: [] taggedBuilds: latest: null taggedBuildsMultipleOperations: @@ -222,7 +220,6 @@ put: value: name: MyActor isPublic: false - versions: [] taggedBuilds: latest: buildId: z2EryhbfhgSyqj6Hn diff --git a/apify-api/openapi/paths/actors/acts@{actorId}@versions.yaml b/apify-api/openapi/paths/actors/acts@{actorId}@versions.yaml index 3d71057676..4213e54538 100644 --- a/apify-api/openapi/paths/actors/acts@{actorId}@versions.yaml +++ b/apify-api/openapi/paths/actors/acts@{actorId}@versions.yaml @@ -107,7 +107,7 @@ post: content: application/json: schema: - $ref: ../../components/schemas/actors/CreateOrUpdateVersionRequest.yaml + $ref: ../../components/schemas/actors/CreateVersionRequest.yaml example: versionNumber: "0.1" sourceType: GIT_REPO