Documentation edits made through Mintlify web editor
This commit is contained in:
78
docs/api-reference/organizations/openapi.json
Normal file
78
docs/api-reference/organizations/openapi.json
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
{
|
||||||
|
"openapi": "3.0.0",
|
||||||
|
"info": {
|
||||||
|
"title": "Organizations API",
|
||||||
|
"version": "1.0.0"
|
||||||
|
},
|
||||||
|
"paths": {
|
||||||
|
"/organizations": {
|
||||||
|
"get": {
|
||||||
|
"summary": "Get Organizations",
|
||||||
|
"description": "Retrieves the organization information for the current authenticated user.",
|
||||||
|
"operationId": "getOrganizations",
|
||||||
|
"tags": [
|
||||||
|
"Organizations"
|
||||||
|
],
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"BearerAuth": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful response",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/GetOrganizationsResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"401": {
|
||||||
|
"description": "Unauthorized"
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"description": "Forbidden"
|
||||||
|
},
|
||||||
|
"500": {
|
||||||
|
"description": "Internal Server Error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"components": {
|
||||||
|
"schemas": {
|
||||||
|
"GetOrganizationsResponse": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"organizations": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/Organization"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Organization": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"organization_id": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "uuid"
|
||||||
|
},
|
||||||
|
"organization_name": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"securitySchemes": {
|
||||||
|
"BearerAuth": {
|
||||||
|
"type": "http",
|
||||||
|
"scheme": "bearer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,2 +1,84 @@
|
|||||||
|
---
|
||||||
|
title: 'API Integrations'
|
||||||
|
description: 'How to integrate and validate Skyvern's API'
|
||||||
|
---
|
||||||
|
|
||||||
<img src="https://thumbs.dreamstime.com/b/pug-dog-holding-pliers-screwdriver-behind-old-wooden-sign-text-under-construction-white-background-constructor-92836854.jpg" />
|
# Organizations API Documentation
|
||||||
|
|
||||||
|
## Get Organizations
|
||||||
|
|
||||||
|
Retrieves the organization information for the current authenticated user.
|
||||||
|
|
||||||
|
### Endpoint
|
||||||
|
|
||||||
|
```
|
||||||
|
GET /organizations
|
||||||
|
```
|
||||||
|
|
||||||
|
### Authentication
|
||||||
|
|
||||||
|
This endpoint requires Bearer Token authentication. Include the token in the `x-api-key` header of your request.
|
||||||
|
|
||||||
|
```
|
||||||
|
x-api-key: <your_api_key_here>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Response
|
||||||
|
|
||||||
|
#### Successful Response (200 OK)
|
||||||
|
|
||||||
|
The API will return a JSON object containing an array of organizations associated with the authenticated user.
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"organizations": [
|
||||||
|
{
|
||||||
|
"organization_id": "uuid-string",
|
||||||
|
"organization_name": "Organization Name"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- `organizations`: An array of organization objects
|
||||||
|
- `organization_id`: A unique identifier for the organization (UUID format)
|
||||||
|
- `organization_name`: The name of the organization
|
||||||
|
|
||||||
|
#### Error Responses
|
||||||
|
|
||||||
|
- `401 Unauthorized`: The request lacks valid authentication credentials
|
||||||
|
- `403 Forbidden`: The authenticated user does not have permission to access the requested resource
|
||||||
|
- `500 Internal Server Error`: An unexpected error occurred on the server
|
||||||
|
|
||||||
|
### Example Request
|
||||||
|
|
||||||
|
Using cURL:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -X GET "https://api.skyvern.com/organizations" \
|
||||||
|
-H "x-api-key: your_api_key_here"
|
||||||
|
```
|
||||||
|
|
||||||
|
Using Python with the `requests` library:
|
||||||
|
|
||||||
|
```python
|
||||||
|
import requests
|
||||||
|
|
||||||
|
url = "https://api.skyvern.com/organizations"
|
||||||
|
headers = {
|
||||||
|
"x-api-key": "your_api_key"
|
||||||
|
}
|
||||||
|
|
||||||
|
response = requests.get(url, headers=headers)
|
||||||
|
|
||||||
|
if response.status_code == 200:
|
||||||
|
organizations = response.json()["organizations"]
|
||||||
|
for org in organizations:
|
||||||
|
print(f"Organization ID: {org['organization_id']}")
|
||||||
|
print(f"Organization Name: {org['organization_name']}")
|
||||||
|
else:
|
||||||
|
print(f"Error: {response.status_code}")
|
||||||
|
print(response.text)
|
||||||
|
```
|
||||||
|
|
||||||
|
Remember to replace `your_api_key` with your API Key token retrieved from Skyvern's setting page
|
||||||
@@ -93,6 +93,7 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
"footerSocials": {
|
"footerSocials": {
|
||||||
"twitter": "https://twitter.com/skyvernai",
|
"twitter": "https://twitter.com/skyvernai",
|
||||||
"github": "https://github.com/skyvern-ai/skyvern/",
|
"github": "https://github.com/skyvern-ai/skyvern/",
|
||||||
|
|||||||
Reference in New Issue
Block a user