Skip to content

Commit 3a64316

Browse files
genai: updates - jul 29 2025 (#1070)
* genai updates - jul 29 2025 * wrong example * updates * remove endpoint without example * restore
1 parent 7626d23 commit 3a64316

13 files changed

+848
-382
lines changed

specification/DigitalOcean-public.v2.yaml

Lines changed: 135 additions & 75 deletions
Large diffs are not rendered by default.

specification/resources/gen-ai/definitions.yml

Lines changed: 460 additions & 305 deletions
Large diffs are not rendered by default.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
lang: cURL
2+
source: |-
3+
curl -X POST \
4+
-H "Content-Type: application/json" \
5+
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6+
"https://api.digitalocean.com/v2/gen-ai/oauth2/dropbox/tokens?code=<oauth2_code_from_dropbox>"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
lang: cURL
2+
source: |-
3+
curl -X POST \
4+
-H "Content-Type: application/json" \
5+
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6+
"https://api.digitalocean.com/v2/gen-ai/oauth2/google/tokens?code=<oauth2_code_from_google>"

specification/resources/gen-ai/examples/curl/genai_delete_knowledge_base_data_source.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ source: |-
33
curl -X DELETE \
44
-H "Content-Type: application/json" \
55
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6-
"https://api.digitalocean.com/v2/gen-ai/knowledge_bases/9a6e3975-b0c6-11ef-bf8f-4e013e2ddde4/data_sources/bd2a2db5-b8b0-11ef-bf8f-4e013e2ddde4"
6+
"https://api.digitalocean.com/v2/gen-ai/knowledge_bases/9a6e3975-b0c6-11ef-bf8f-4e013e2ddde4/data_sources/bd2a2db5-b8b0-11ef-bf8f-4e013e2ddde4"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
lang: cURL
2+
source: |-
3+
curl -X GET \
4+
-H "Content-Type: application/json" \
5+
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6+
"https://api.digitalocean.com/v2/genai/agents/c441bf77-81d6-11ef-bf8f-4e013e2ddde4/usage?start=2024-01-01T00:00:00Z&stop=2024-01-31T23:59:59Z"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
lang: cURL
2+
source: |-
3+
curl -X GET \
4+
-H "Content-Type: application/json" \
5+
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
6+
"https://api.digitalocean.com/v2/gen-ai/oauth2/url?type=google&redirect_uri=http://localhost:3000"

specification/resources/gen-ai/examples/curl/genai_update_agents_workspace.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ source: |-
77
-d '{
88
"workspace_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4",
99
"agent_uuids": ["95ea6652-75ed-11ef-bf8f-4e013e2ddde4", "37455431-84bd-4fa2-94cf-e8486f8f8c5e"]
10-
}'
10+
}'
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
description: To obtain the refresh token, needed for creation of data sources, send
2+
a GET request to `/v2/gen-ai/oauth2/dropbox/tokens`. Pass the code you obtrained
3+
from the oauth flow in the field 'code'
4+
operationId: genai_create_oauth2_dropbox_tokens
5+
requestBody:
6+
content:
7+
application/json:
8+
schema:
9+
$ref: ./definitions.yml#/apiDropboxOauth2GetTokensInput
10+
responses:
11+
"200":
12+
content:
13+
application/json:
14+
schema:
15+
$ref: ./definitions.yml#/apiDropboxOauth2GetTokensOutput
16+
description: A successful response.
17+
headers:
18+
ratelimit-limit:
19+
$ref: ../../shared/headers.yml#/ratelimit-limit
20+
ratelimit-remaining:
21+
$ref: ../../shared/headers.yml#/ratelimit-remaining
22+
ratelimit-reset:
23+
$ref: ../../shared/headers.yml#/ratelimit-reset
24+
"401":
25+
$ref: ../../shared/responses/unauthorized.yml
26+
"404":
27+
$ref: ../../shared/responses/not_found.yml
28+
"429":
29+
$ref: ../../shared/responses/too_many_requests.yml
30+
"500":
31+
$ref: ../../shared/responses/server_error.yml
32+
default:
33+
$ref: ../../shared/responses/unexpected_error.yml
34+
security:
35+
- bearer_auth:
36+
- genai:create
37+
summary: Get Oauth2 Dropbox Tokens
38+
tags:
39+
- GradientAI Platform
40+
x-codeSamples:
41+
- $ref: examples/curl/genai_create_oauth2_dropbox_tokens.yml
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
description: To get agent usage, send a GET request to `/v2/gen-ai/agents/{uuid}/usage`.
2+
Returns usage metrics for the specified agent within the provided time range.
3+
operationId: genai_get_agent_usage
4+
parameters:
5+
- description: Agent id
6+
example: '"123e4567-e89b-12d3-a456-426614174000"'
7+
in: path
8+
name: uuid
9+
required: true
10+
schema:
11+
type: string
12+
- description: Return all usage data from this date.
13+
example: '"example string"'
14+
in: query
15+
name: start
16+
schema:
17+
type: string
18+
- description: Return all usage data up to this date, if omitted, will return up to
19+
the current date.
20+
example: '"example string"'
21+
in: query
22+
name: stop
23+
schema:
24+
type: string
25+
responses:
26+
"200":
27+
content:
28+
application/json:
29+
schema:
30+
$ref: ./definitions.yml#/apiGetAgentUsageOutput
31+
description: A successful response.
32+
headers:
33+
ratelimit-limit:
34+
$ref: ../../shared/headers.yml#/ratelimit-limit
35+
ratelimit-remaining:
36+
$ref: ../../shared/headers.yml#/ratelimit-remaining
37+
ratelimit-reset:
38+
$ref: ../../shared/headers.yml#/ratelimit-reset
39+
"401":
40+
$ref: ../../shared/responses/unauthorized.yml
41+
"404":
42+
$ref: ../../shared/responses/not_found.yml
43+
"429":
44+
$ref: ../../shared/responses/too_many_requests.yml
45+
"500":
46+
$ref: ../../shared/responses/server_error.yml
47+
default:
48+
$ref: ../../shared/responses/unexpected_error.yml
49+
security:
50+
- bearer_auth:
51+
- genai:read
52+
summary: Get Agent Usage
53+
tags:
54+
- GradientAI Platform
55+
x-codeSamples:
56+
- $ref: examples/curl/genai_get_agent_usage.yml

0 commit comments

Comments
 (0)