Snippet

Get a Snippet by ID

Beta
POST

Request

This endpoint expects an object.
id
stringRequired

Response

This endpoint returns an object
response
map from strings to any
POST
1curl -X POST https://api.athenaintelligence.ai/api/v0/snippet \
2 -H "X-API-KEY: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "id": "snippet_02329f1b-f6ad-4e93-be84-355c33202024b"
6}'
200
Successful
1{
2 "response": {
3 "snippet": {
4 "id": "snippet_02329f1b-f6ad-4e93-be84-355c33202024b",
5 "title": "Top 10 Customers",
6 "description": "Get the top 10 customers by revenue",
7 "content": "SELECT * FROM customers ORDER BY revenue DESC LIMIT 10;",
8 "language": "sql",
9 "created_at": "2024-03-01 19:30:08.112689+00:00",
10 "dependencies": {
11 "tables": {
12 "0": "athena.customers"
13 }
14 }
15 }
16 }
17}