App Services Reference

API Reference

This section provides detailed documentation for the App Services API, including methods, parameters, return values, and usage examples. Explore the various functionalities to integrate App Services into your applications effectively.

Core Services

The core services provide fundamental building blocks for managing and interacting with your application's data and logic.

Data Management API

Method Description Parameters Return Type
createRecord Creates a new record in the specified data store.
  • storeName (string): The name of the data store.
  • data (object): The data to be stored.
Promise<Record>
getRecordById Retrieves a single record by its unique identifier.
  • storeName (string): The name of the data store.
  • recordId (string): The unique ID of the record.
Promise<Record | null>
queryRecords Retrieves a collection of records based on specified criteria.
  • storeName (string): The name of the data store.
  • options (object, optional): Query options like filters, sorting, and pagination.
Promise<Record[]>
updateRecord Updates an existing record.
  • storeName (string): The name of the data store.
  • recordId (string): The unique ID of the record to update.
  • data (object): The updated data.
Promise<Record>
deleteRecord Deletes a record from the data store.
  • storeName (string): The name of the data store.
  • recordId (string): The unique ID of the record to delete.
Promise<void>

User Authentication API

Method Description Parameters Return Type
login Authenticates a user using credentials.
  • username (string): The user's username.
  • password (string): The user's password.
Promise<UserSession>
logout Ends the current user session. None Promise<void>
getCurrentUser Retrieves information about the currently authenticated user. None Promise<User | null>

Advanced Features

Explore powerful features for extending your application's capabilities.

Background Tasks

Schedule and manage background tasks to perform operations asynchronously.

Task Scheduling API

Method Description Parameters Return Type
scheduleTask Schedules a new background task.
  • taskName (string): A unique name for the task.
  • payload (object): Data to be passed to the task.
  • schedule (object): Scheduling options (e.g., cron expression, delay).
Promise<TaskStatus>
getTaskStatus Retrieves the status of a scheduled task.
  • taskId (string): The ID of the task.
Promise<TaskStatus>

Notifications

Implement real-time notifications for your users.

Notification API

Method Description Parameters Return Type
sendNotification Sends a notification to a specific user or group.
  • userId (string): The recipient's user ID.
  • message (string): The notification content.
  • options (object, optional): Notification channel and metadata.
Promise<void>

For more detailed information on specific endpoints, please refer to the full API schema documentation.