API Reference
The Kinesis API provides a comprehensive set of RESTful endpoints that allow you to interact with all aspects of the platform programmatically. This reference documentation will help you understand how to authenticate, make requests, and interpret responses when working with the API.
Accessing the API Documentation
Kinesis API includes interactive OpenAPI documentation that allows you to:
- Browse all available endpoints
- View request and response schemas
- Test API calls directly from your browser
- Understand authentication requirements
You can access this documentation at:
- Local installation:
http://your-server-address/scalar
- Official instance: https://api.kinesis.world/scalar
Authentication
Most API endpoints require authentication using one of the following methods:
Personal Access Tokens (PAT)
The recommended method for programmatic access is using Personal Access Tokens:
- Generate a token in the web interface under Personal Access Tokens or PATs
- Include the token in your requests using the
Authorization
header:
Authorization: Bearer your-token-here
Session-based Authentication
For web applications, you can use session-based authentication:
- Call the
/user/login
endpoint with valid credentials - Store the returned token
- Include the token in subsequent requests
Common Request Patterns
Standard Request Format
Most endpoints follow this pattern:
- GET endpoints accept query parameters
- DELETE endpoints accept query parameters
- POST endpoints accept JSON data in the request body
- PATCH endpoints accept JSON data in the request body
- All endpoints return JSON responses
Request Example
POST /user/login HTTP/1.1
Host: api.kinesis.world
Content-Type: application/json
{
"auth_data": "john_doe",
"password": "Test123*"
}
Response Example
{
"status": 200,
"message": "Login Successful!",
"user": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"username": "john_doe",
"email": "john_doe@example.com",
"password": "",
"role": "VIEWER",
"reset_token": "",
"bio": "",
"profile_picture": "",
"is_public": false,
"links": []
},
"uid": 1,
"jwt": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiZXhwIjoxNjcyNTI2NDAwfQ.example_token"
}
Response Structure
All API responses follow a consistent structure:
{
"status": 200,
"message": "Operation successful",
"data": {
// Optional: Operation-specific data
}
}
Status Codes
The API uses standard HTTP status codes:
- 2xx: Success
- 200: OK
- 201: Created
- 204: No Content
- 4xx: Client errors
- 400: Bad Request
- 401: Unauthorized
- 403: Forbidden
- 404: Not Found
- 422: Unprocessable Entity
- 5xx: Server errors
- 500: Internal Server Error
Error Handling
Error responses follow the same structure and include error details in the message field itself:
{
"status": 400,
"message": "Error: Invalid input data"
}
Pagination
For endpoints that return collections of items, pagination is supported:
- Use
offset
andlimit
query parameters to control pagination - Responses include
amount
for the total amount of items
Example:
GET /config/fetch/all?uid=0&offset=2&limit=10
Using the API with the X Engine
The X Engine's visual API builder generates endpoints that follow the same patterns and conventions as the core Kinesis API. When you publish a route in the X Engine, it becomes available as a standard RESTful endpoint that can be accessed using the same authentication mechanisms.
Related Documentation
- Routes - More information on route management
- Personal Access Tokens - Detailed guide on token management