Skip to content

Commit c4004ce

Browse files
committed
feat(api): added openapi endpoints documentation
1 parent 00d61f8 commit c4004ce

File tree

5 files changed

+100
-0
lines changed

5 files changed

+100
-0
lines changed

apify-api/openapi/components/tags.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,17 @@
251251
```
252252
253253
In order to save new items to the dataset, send HTTP POST request with JSON payload to the same URL.
254+
- name: Actors/Build OpenAPI specification
255+
x-displayName: Build OpenAPI Specification
256+
x-parent-tag-name: Actors
257+
x-trait: 'true'
258+
description: |
259+
To obtain the OpenAPI schema for actor builds, two similar endpoints are available:
260+
261+
- [First Endpoint](/api/v2/act-openapi-specification-get): Requires both `actorId` and `buildId`. You can pass `default` instead of buildId to retrieve the OpenAPI schema for the default actor build.
262+
- [Second Endpoint](/api/v2/actor-build-openapi-specification-get): Requires only `buildId`.
263+
x-legacy-doc-urls:
264+
- '#/reference/actors/openapi-specification'
254265
- name: Actor tasks
255266
x-displayName: Actor tasks
256267
x-legacy-doc-urls:
@@ -548,6 +559,17 @@
548559
- '#tag/Actor-buildsBuild-log'
549560
x-trait: 'true'
550561
description: Check out [Logs](#/reference/logs) for full reference.
562+
- name: Actor builds/Build OpenAPI specification
563+
x-displayName: Build OpenAPI Specification
564+
x-parent-tag-name: Actor builds
565+
x-trait: 'true'
566+
description: |
567+
To obtain the OpenAPI schema for actor builds, two similar endpoints are available:
568+
569+
- [First Endpoint](/api/v2/act-openapi-specification-get): Requires both `actorId` and `buildId`. You can pass `default` instead of buildId to retrieve the OpenAPI schema for the default actor build.
570+
- [Second Endpoint](/api/v2/actor-build-openapi-specification-get): Requires only `buildId`.
571+
x-legacy-doc-urls:
572+
- '#/reference/actor-builds/openapi-specification'
551573
- name: Key-value stores
552574
x-displayName: Key-value stores
553575
x-legacy-doc-urls:

apify-api/openapi/components/x-tag-groups.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- Actors/Metamorph run
2020
- Actors/Resurrect run
2121
- Actors/Last run object and its storages
22+
- Actors/Build OpenAPI specification
2223
- name: Actor tasks
2324
tags:
2425
- Actor tasks
@@ -50,6 +51,7 @@
5051
- Actor builds/Delete build
5152
- Actor builds/Abort build
5253
- Actor builds/Build log
54+
- Actor builds/Build OpenAPI specification
5355
- name: Key-value stores
5456
tags:
5557
- Key-value stores

apify-api/openapi/openapi.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,8 @@ paths:
501501
$ref: 'paths/actors/acts@{actorId}@builds@{buildId}.yaml'
502502
'/v2/acts/{actorId}/builds/{buildId}/abort':
503503
$ref: 'paths/actors/acts@{actorId}@builds@{buildId}@abort.yaml'
504+
'/v2/acts/{actorId}/builds/{buildId}/openapi-specification':
505+
$ref: 'paths/actors/acts@{actorId}@builds@{buildId}@openapi-specification.yaml'
504506
'/v2/acts/{actorId}/runs':
505507
$ref: 'paths/actors/acts@{actorId}@runs.yaml'
506508
'/v2/acts/{actorId}/run-sync':
@@ -553,6 +555,8 @@ paths:
553555
$ref: 'paths/actor-builds/actor-builds@{buildId}@abort.yaml'
554556
'/v2/actor-builds/{buildId}/log':
555557
$ref: 'paths/actor-builds/actor-builds@{buildId}@log.yaml'
558+
'/v2/actor-builds/{buildId}/openapi-specification':
559+
$ref: 'paths/actor-builds/actor-builds@{buildId}@openapi-specification.yaml'
556560
/v2/key-value-stores:
557561
$ref: paths/key-value-stores/key-value-stores.yaml
558562
'/v2/key-value-stores/{storeId}':
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
get:
2+
tags:
3+
- Actor builds/Build OpenAPI specification
4+
summary: Get OpenAPI specification
5+
description: |
6+
7+
> **You can also use a [similar endpoint](/api/v2/act-openapi-specification-get)**
8+
> from the `acts` namespace to retrieve the OpenAPI specification for a build.
9+
10+
This endpoint does not require the authentication token. Instead, calls are authenticated using a hard-to-guess ID of the build.
11+
operationId: actorBuild_openapiSpecification_get
12+
security:
13+
- apiKeyActorBuilds: []
14+
- httpBearerActorBuilds: []
15+
parameters:
16+
- name: buildId
17+
in: path
18+
description: 'ID of the build you want to get, found in the build''s `Info` tab.'
19+
required: true
20+
style: simple
21+
schema:
22+
type: string
23+
example: soSkq9ekdmfOslopH
24+
responses:
25+
'200':
26+
description: ''
27+
headers: {}
28+
content:
29+
application/json:
30+
schema:
31+
$ref: "../../components/schemas/actor-builds/GetOpenApiResponse.yaml"
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
get:
2+
tags:
3+
- Actors/Build OpenAPI specification
4+
summary: Get OpenAPI specification
5+
description: |
6+
7+
> **You can also use a [similar endpoint](/api/v2/actor-build-openapi-specification-get)**
8+
> from the `actor-builds` namespace to retrieve the OpenAPI specification for a build.
9+
10+
To fetch the default actor build, simply pass `default` in place of `buildId`.
11+
12+
This endpoint does not require the authentication token. Instead, calls are authenticated using a hard-to-guess ID of the build.
13+
operationId: act_openapiSpecification_get
14+
security:
15+
- apiKeyActorBuilds: []
16+
- httpBearerActorBuilds: []
17+
parameters:
18+
- name: actorId
19+
in: path
20+
description: Actor ID or a tilde-separated owner's username and Actor name.
21+
required: true
22+
style: simple
23+
schema:
24+
type: string
25+
example: janedoe~my-actor
26+
- name: buildId
27+
in: path
28+
description: 'ID of the build you want to get, found in the build''s `Info` tab. Pass `default` for default actor build.'
29+
required: true
30+
style: simple
31+
schema:
32+
type: string
33+
example: soSkq9ekdmfOslopH
34+
responses:
35+
'200':
36+
description: ''
37+
headers: {}
38+
content:
39+
application/json:
40+
schema:
41+
$ref: "../../components/schemas/actor-builds/GetOpenApiResponse.yaml"

0 commit comments

Comments
 (0)