API Documentation

Access your Ulinda data programmatically using the REST API. This guide covers authentication and common endpoints.

Authentication

Generating an API Token

Before you can use the API, you need to generate an API token from the Ulinda web interface:

  1. Log in to your Ulinda account
  2. Navigate to the API Tokens page
  3. Click "Generate New Token"
  4. Give your token a descriptive name
  5. Copy and securely store the generated token
Important: Your API token will only be shown once. Store it securely and never share it publicly.

Using Your Token

Include your API token in the Authorization header with the Bearer scheme:

Authorization: Bearer YOUR_API_TOKEN_HERE

Example cURL Request

curl -X GET "https://your-ulinda-instance.com/api/v1/models" \ -H "Authorization: Bearer YOUR_API_TOKEN_HERE" \ -H "Content-Type: application/json"

Example with JavaScript (Fetch API)

const token = 'YOUR_API_TOKEN_HERE'; const baseUrl = 'https://your-ulinda-instance.com'; fetch(`${baseUrl}/api/v1/models`, { method: 'GET', headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' } }) .then(response => response.json()) .then(data => console.log(data)) .catch(error => console.error('Error:', error));

Example with Python (Requests)

import requests token = 'YOUR_API_TOKEN_HERE' base_url = 'https://your-ulinda-instance.com' headers = { 'Authorization': f'Bearer {token}', 'Content-Type': 'application/json' } response = requests.get(f'{base_url}/api/v1/models', headers=headers) data = response.json() print(data)

Common API Endpoints

Models

GET/api/v1/models

Get all models accessible to the authenticated user.

Response: List of models with their metadata.

curl -X GET "https://your-ulinda-instance.com/api/v1/models" \ -H "Authorization: Bearer YOUR_API_TOKEN_HERE"

GET/api/v1/models/{modelId}

Get detailed information about a specific model, including fields and permissions.

Parameters:

  • modelId - UUID of the model
curl -X GET "https://your-ulinda-instance.com/api/v1/models/{modelId}" \ -H "Authorization: Bearer YOUR_API_TOKEN_HERE"

Records

POST/api/v1/models/{modelId}/records/search

Search and retrieve records from a model with pagination, filtering, and sorting.

Request Body:

{ "page": 0, "pageSize": 20, "sortBy": "created_at", "sortDirection": "DESC", "filters": [] }

Example Request:

curl -X POST "https://your-ulinda-instance.com/api/v1/models/{modelId}/records/search" \ -H "Authorization: Bearer YOUR_API_TOKEN_HERE" \ -H "Content-Type: application/json" \ -d '{ "page": 0, "pageSize": 20, "sortBy": "created_at", "sortDirection": "DESC" }'

GET/api/v1/records/{modelId}/{recordId}

Get a specific record by ID.

Parameters:

  • modelId - UUID of the model
  • recordId - UUID of the record
curl -X GET "https://your-ulinda-instance.com/api/v1/records/{modelId}/{recordId}" \ -H "Authorization: Bearer YOUR_API_TOKEN_HERE"

POST/api/v1/models/{modelId}/records

Create a new record in a model.

Request Body:

{ "fieldValues": { "field_name_1": "value1", "field_name_2": "value2", "field_name_3": 123 } }

Example Request:

curl -X POST "https://your-ulinda-instance.com/api/v1/models/{modelId}/records" \ -H "Authorization: Bearer YOUR_API_TOKEN_HERE" \ -H "Content-Type: application/json" \ -d '{ "fieldValues": { "name": "John Doe", "email": "john@example.com", "age": 30 } }'

PUT/api/v1/records/{modelId}/{recordId}

Update an existing record.

Request Body:

{ "fieldValues": { "field_name_1": "updated_value1", "field_name_2": "updated_value2" } }

Example Request:

curl -X PUT "https://your-ulinda-instance.com/api/v1/records/{modelId}/{recordId}" \ -H "Authorization: Bearer YOUR_API_TOKEN_HERE" \ -H "Content-Type: application/json" \ -d '{ "fieldValues": { "name": "Jane Doe", "email": "jane@example.com" } }'

DELETE/api/v1/records/{modelId}/{recordId}

Delete a record.

Parameters:

  • modelId - UUID of the model
  • recordId - UUID of the record
  • overrideLinkedModelsError (optional) - Set to true to force delete despite linked records
curl -X DELETE "https://your-ulinda-instance.com/api/v1/records/{modelId}/{recordId}" \ -H "Authorization: Bearer YOUR_API_TOKEN_HERE"

Token Management

GET/api/tokens/my-tokens

Get a list of all API tokens for the authenticated user.

curl -X GET "https://your-ulinda-instance.com/api/tokens/my-tokens" \ -H "Authorization: Bearer YOUR_API_TOKEN_HERE"

POST/api/tokens/generate

Generate a new API token.

Request Body:

{ "name": "My API Token", "expiresAt": "2025-12-31T23:59:59Z" }

DELETE/api/tokens/{tokenId}

Revoke an API token.

Parameters:

  • tokenId - UUID of the token to revoke
curl -X DELETE "https://your-ulinda-instance.com/api/tokens/{tokenId}" \ -H "Authorization: Bearer YOUR_API_TOKEN_HERE"

Record Linking

POST/api/v1/records/link-records

Create a link between two records in different models.

Request Body:

{ "modelLinkId": "uuid-of-model-link", "sourceRecordId": "uuid-of-source-record", "targetRecordId": "uuid-of-target-record" }

DELETE/api/v1/model/linked-records/{modelLinkId}/{linkId}

Remove a link between two records.

Parameters:

  • modelLinkId - UUID of the model link definition
  • linkId - UUID of the specific link to remove

Need Help?

For more information or support: