API endpoints

Overview

Codejig App Builder provides a robust platform for developing API endpoints. It combines Auto-Generated APIs for standard operations and Custom API Functions for tailored business logic, facilitating seamless application integration.

Auto-Generated API

Introduction

The auto-generated API allows for quick and straightforward data access with minimal configuration. It automatically provides endpoints for standard CRUD operations (Create, Read, Update, and Delete) based on the data model defined in your application.

Core Features

  • Endpoints: Auto-generate endpoints for standard operations.
  • Parameter Support: Includes filtering, pagination, and sorting capabilities.
  • Permissions: Enforce application-level security measures for data access.

Usage

With endpoints auto-configured, developers can quickly achieve data manipulation tasks, allowing focus on more complex application logic.

For detailed documentation on the auto-generated API, please visit Codejig API Documentation.

Custom API Functions

Introduction

Custom API functions allow developers to specify custom API endpoints that align with unique business requirements. They support complex logic and provide integration capabilities with various systems.

Location and Access

Custom API functions can be accessed via the Advanced section in the Codejig App Builder menu, offering details such as names, descriptions, input/output configurations, views, and permissions.

Invocation Details

  • HTTP Method: Invoked using the POST method.
  • Authentication: Secured through Basic Authentication.
  • Parameter Passing: Parameters are passed as raw JSON within the request body, enabling structured data management.

Real-world Implementation

Between API Data Source Application as the provider and API Demo Application as the consumer, demonstrating effective cross-application integration.

Example: Set Status Endpoint

Demonstrates usage within the API provider:

  • Input Type: Shop Order, with 'id and status' JSON view for structured input.
  • Output Type: Result Info, formatted as 'Result info - JSON'.
  • JSON View - 'id and Status': Includes identifier and Order status for precise data operations.

Implementation Logic

Implemented using block programming, processing through setup variables, condition checks, update executions, and configuring result messages.

Conclusion

By leveraging both auto-generated and custom API functions, Codejig App Builder enables developers to maintain flexible and precise application processes, ensuring robust and secure data interactions across various business applications.