Snippet

Get all snippets

Beta
GET

Query parameters

pageintegerOptional
Page number starting from 1
page_sizeintegerOptional
Number of items per page

Response

This endpoint returns an object
snippets
list of objects
total
integer
page
integer
page_size
integer
pages
integer
GET
1curl https://api.athenaintelligence.ai/api/v0/snippets \
2 -H "X-API-KEY: <apiKey>"
200
Retrieved
1{
2 "snippets": [
3 {
4 "id": "snippet_02329f1b-f6ad-4e93-be84-355c3bb8524b",
5 "created_at": "2024-03-01 19:30:08.112689+00:00",
6 "title": "Top 10 Customers",
7 "description": "Get the top 10 customers by revenue",
8 "content": "SELECT * FROM customers ORDER BY revenue DESC LIMIT 10;",
9 "language": "sql",
10 "dependencies": {
11 "tables": [
12 "thompson_square_bagels.customers"
13 ]
14 }
15 }
16 ],
17 "total": 100,
18 "page": 1,
19 "page_size": 10,
20 "pages": 1
21}