The dynamic API documentation makes front-end development a breeze, as the front-end developer has in front of them exactly what they need to be able to make an API call and display the data on a page, or send an API call to Anythink to create, update or delete data.
The API documentation is broken into sections which are tabbed to allow you to see all the available endpoints that have been created as part of your data model, to be able to see endpoints that have been added by installing a plugin (such as marketplace) and Anythink specific endpoints that give you access to Authentication (login/register) and public and private search.
Automatic Endpoint Generation
When you create an entity called songs, Anythink automatically generates:
GET /org/{orgId}/songs - List all songs
POST /org/{orgId}/songs - Create a new song
GET /org/{orgId}/songs/{id} - Get a specific song
PUT /org/{orgId}/songs/{id} - Update a specific song
DELETE /org/{orgId}/songs/{id} - Delete a specific song
Interactive API Documentation
Every Anythink instance includes automatically generated Swagger-style API documentation at:
https://your-instance.anythink.cloud/org/{orgId}/api-docs
This interactive documentation allows you to:
- Explore all available endpoints for your entities
- Test API calls directly in the browser
- See request/response schemas automatically generated from your fields
- Try different query parameters and see results immediately
- Copy working code examples in multiple programming languages
Schema-Driven API Design
Your entity fields automatically become:
- Request body schemas for POST/PUT operations
- Response schemas for all operations
- Query parameters for filtering and searching
- Validation rules enforced at the API level
Advanced Query Patterns
Anythink provides a powerful query language that works across all your entities without any additional configuration.
Basic Filtering
All entities support standard pagination and basic filtering:
GET /org/{orgId}/songs?page=1&pageSize=25&title=Park
Comparison Operators
Use these operators to create sophisticated queries:
OperatorSyntaxExampleDescriptionEquals{field}={value}title=ParkExact matchNot Equals{field}=!{value}status=!draftExclude valuesStarts With{field}=SW:{value}title=SW:TheBegins with textEnds With{field}=EW:{value}title=EW:SongEnds with textGreater Than{field}=GT:{value}price=GT:10Numeric/date comparisonLess Than{field}=LT:{value}price=LT:100Numeric/date comparisonGreater Than or Equal{field}=GTE:{value}rating=GTE:4Inclusive comparisonLess Than or Equal{field}=LTE:{value}rating=LTE:5Inclusive comparisonContains{field}=C:{value}description=C:rockText search within fieldNot Contains{field}=NC:{value}genre=NC:popExclude text matches
Real-World Query Examples
E-commerce Product Filtering:
GET /org/{orgId}/products?category=electronics&price=GTE:50&price=LTE:500&name=C:wireless
Find electronics products between $50-$500 with "wireless" in the name
User Management:
GET /org/{orgId}/users?status=!inactive&lastLogin=GT:2024-01-01&role=admin
Find active admin users who logged in after January 1st, 2024
Content Filtering:
GET /org/{orgId}/articles?publishedAt=LTE:2024-12-31&tags=C:tutorial&author=!guest
Find tutorial articles published this year, excluding guest authors
Sorting and Ordering
Control result ordering with the sort parameter:
GET /org/{orgId}/songs?sort=title # Ascending by title
GET /org/{orgId}/songs?sort=-createdAt # Descending by creation date
GET /org/{orgId}/songs?sort=artist,title # Multiple fields
Field Selection
Optimize API responses by selecting specific fields:
GET /org/{orgId}/songs?fields=id,title,artist # Only return these fields
GET /org/{orgId}/songs?exclude=content # Return all except content
Relationship Inclusion
Automatically include related data in your responses:
GET /org/{orgId}/songs?include=artist # Include artist details
GET /org/{orgId}/songs?include=artist,album # Include multiple relationships
GET /org/{orgId}/songs?include=artist.label # Include nested relationships
Advanced Pagination
Beyond basic pagination, use cursor-based pagination for large datasets:
GET /org/{orgId}/songs?cursor=eyJpZCI6MTIzfQ&limit=50
Search Across Multiple Fields
Use the global search parameter to search across all text fields:
GET /org/{orgId}/songs?search=Beatles&searchFields=title,artist,album
Date Range Queries
Powerful date filtering for time-based data:
GET /org/{orgId}/events?startDate=GTE:2024-01-01&endDate=LTE:2024-12-31
GET /org/{orgId}/logs?createdAt=GT:2024-01-01T00:00:00Z
Combining Multiple Conditions
Build complex queries by combining multiple operators:
GET /org/{orgId}/products?category=electronics&price=GTE:100&price=LTE:1000&rating=GTE:4&inStock=true&name=C:wireless&brand=!generic&sort=-rating,price&include=reviews&fields=id,name,price,rating
API Response Formats
Standard List Response
{
"data": [
{
"id": 1,
"title": "Bohemian Rhapsody",
"artist": "Queen",
"duration": 355
}
],
"pagination": {
"page": 1,
"pageSize": 25,
"totalRecords": 150,
"totalPages": 6
},
"meta": {
"processingTime": "12ms",
"apiVersion": "1.0"
}
}
Single Record Response
{
"data": {
"id": 1,
"title": "Bohemian Rhapsody",
"artist": {
"id": 10,
"name": "Queen",
"country": "UK"
},
"duration": 355,
"createdAt": "2024-01-15T10:30:00Z"
}
}
Error Handling
Anythink provides consistent error responses across all endpoints:
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid query parameter",
"details": {
"field": "price",
"operator": "INVALID",
"allowedOperators": ["GT", "LT", "GTE", "LTE", "EQ"]
}
}
}
Performance Optimisation
Automatic Indexing
Anythink automatically creates database indexes for:
- Primary keys and unique fields
- Fields frequently used in queries
- Relationship foreign keys
- Fields marked as "searchable"
Query Optimisation Tips
- Use field selection to reduce response size
- Limit relationship inclusion to avoid deep nesting
- Use cursor pagination for large datasets
- Index custom fields that you query frequently
- Combine filters to reduce result sets early
This dynamic API system means you can build sophisticated applications immediately after defining your data model, with enterprise-grade query capabilities built in from day one.