Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion skyflow-skills-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The **create-vault** skill guides you through creating Skyflow vaults programmat

**Slash command:** `/skyflow-skills:call-rest-apis`

The **call-rest-apis** skill provides expertise on Skyflow REST APIs including management APIs, data APIs, and detect APIs. It covers API endpoints, request/response formats, authentication methods, and code examples. The skill includes an API quick reference table, OpenAPI specifications for data, detect, and management APIs, authentication guidance for bearer tokens and service accounts, error handling patterns, rate limiting information, and links to SDK documentation.
The **call-rest-apis** skill provides expertise on Skyflow REST APIs including management APIs, data APIs, detect APIs, and the Flow Vault API. It covers API endpoints, request/response formats, authentication methods, and code examples. The skill includes an API quick reference table, OpenAPI specifications for data, detect, management, and Flow Vault APIs, authentication guidance for bearer tokens and service accounts, error handling patterns, rate limiting information, and links to SDK documentation.

### Migrate SDK V1 to V2

Expand Down
3 changes: 2 additions & 1 deletion skyflow-skills-plugin/skills/call-rest-apis/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ Locate the OpenAPI spec for the API you're documenting:
| API Guide | OpenAPI Spec |
| ------------------- | ------------------------- |
| `management-api.md` | `management.openapi.json` |
| `vault-api.md` | `data.openapi.json` |
| `data-api.md` | `data.openapi.json` |
| `detect-api.md` | `detect.openapi.json` |
| `flow-vault-api.md` | `flow-vault.openapi.json` |

## 2. Find the Operation

Expand Down
21 changes: 18 additions & 3 deletions skyflow-skills-plugin/skills/call-rest-apis/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: call-rest-apis
description: Call the Skyflow REST APIs - including management APIs, data APIs, and detect APIs.
description: Call the Skyflow REST APIs - including management APIs, data APIs, detect APIs, and the Flow Vault API.
---

# Skyflow REST APIs
Expand Down Expand Up @@ -39,6 +39,18 @@ You are an expert on Skyflow's REST APIs. Your role is to provide quick, accurat
| Update vault/schema | Management | PATCH | `/v1/vaults/{id}` | [management-api.md](management-api.md) |
| Create policy | Management | POST | `/v1/policies` | [management-api.md](management-api.md) |
| Get audit events | Management | GET | `/v1/audit/events` | [management-api.md](management-api.md) |
| Create vault (V2) | Flow Vault | POST | `/v2/vaults` | [flow-vault-api.md](flow-vault-api.md) |
| List vaults (V2) | Flow Vault | GET | `/v2/vaults` | [flow-vault-api.md](flow-vault-api.md) |
| Insert records | Flow Vault | POST | `/v2/records/insert` | [flow-vault-api.md](flow-vault-api.md) |
| Get records | Flow Vault | POST | `/v2/records/get` | [flow-vault-api.md](flow-vault-api.md) |
| Update records | Flow Vault | POST | `/v2/records/update` | [flow-vault-api.md](flow-vault-api.md) |
| Delete records | Flow Vault | POST | `/v2/records/delete` | [flow-vault-api.md](flow-vault-api.md) |
| Query data | Flow Vault | POST | `/v2/query` | [flow-vault-api.md](flow-vault-api.md) |
| Get tokens | Flow Vault | POST | `/v2/records/getTokens` | [flow-vault-api.md](flow-vault-api.md) |
| Detokenize | Flow Vault | POST | `/v2/tokens/detokenize` | [flow-vault-api.md](flow-vault-api.md) |
| Create policy (V1) | Flow Vault | POST | `/v1/policies` | [flow-vault-api.md](flow-vault-api.md) |
| Create role (V1) | Flow Vault | POST | `/v1/roles` | [flow-vault-api.md](flow-vault-api.md) |
| Create service account (V1) | Flow Vault | POST | `/v1/serviceAccounts` | [flow-vault-api.md](flow-vault-api.md) |

## OpenAPI Specifications

Expand All @@ -47,6 +59,7 @@ Complete API schemas are available in these OpenAPI 3.0 spec files:
- **[data.openapi.json](data.openapi.json)** - Data API (insert, retrieve, update, delete)
- **[detect.openapi.json](detect.openapi.json)** - Detect API (PII detection and de-identification), including v1 and v2 (beta) endpoints
- **[management.openapi.json](management.openapi.json)** - Management API (vaults, schemas, policies)
- **[flow-vault.openapi.json](flow-vault.openapi.json)** - Flow Vault API (V2 vault management, records, query, and tokens; V1 policies, roles, service accounts, users, workspaces, and authentication)

## Authentication

Expand Down Expand Up @@ -82,6 +95,8 @@ Include in all requests:
Authorization: Bearer {accessToken}
```

> **Flow Vault**: The Flow Vault API additionally requires an `X-SKYFLOW-ACCOUNT-ID` header on every request and uses distinct base URLs (a `skyvault` domain for records, query, and tokens). See [flow-vault-api.md](flow-vault-api.md) for details.

## Error Handling

**Standard error format**:
Expand Down Expand Up @@ -129,8 +144,8 @@ For language-specific SDKs with additional features:

When helping users with API operations:

1. **Identify the API** - Data, Detect, or Management
2. **Link to the detailed doc** - data-api.md, detect-api.md, or management-api.md
1. **Identify the API** - Data, Detect, Management, or Flow Vault
2. **Link to the detailed doc** - data-api.md, detect-api.md, management-api.md, or flow-vault-api.md
3. **Show the endpoint** - HTTP method and URL pattern
4. **Provide a curl example** - Complete, copy-pastable command
5. **Explain key parameters** - Required fields and common options
Expand Down
Loading