EnSync Config Manager API Reference
This document provides the complete API reference for the EnSync Config Manager.
API Overview
The EnSync Config Manager API provides RESTful endpoints for managing configuration and access control within the EnSync ecosystem.
Base URLs
Production:
https://api.ensync.io/v1
Staging:
https://api.staging.ensync.io/v1
Local development:
http://localhost:8080/v1
Authentication
All API endpoints require authentication using an API key provided in the X-API-KEY
header.
Access Keys
List Access Keys
Retrieves a list of access keys with optional filtering.
Parameters:
Name | In | Type | Required | Description |
---|---|---|---|---|
accessKey | query | string | No | The key to filter |
limit | query | integer | Yes | Maximum number of results (1-100) |
order | query | string | Yes | Sort order (ASC, DESC) |
pageIndex | query | integer | Yes | Page index (0-based) |
orderBy | query | string | Yes | Field to order by (name, createdAt) |
Responses:
Status | Description |
---|---|
200 | Access keys retrieved successfully |
401 | Unauthorized |
403 | Forbidden |
500 | Internal server error |
Create Access Key
Creates a new access key with specified permissions.
Request Body:
Responses:
Status | Description |
---|---|
200 | Access key created successfully |
400 | Bad request |
401 | Unauthorized |
403 | Forbidden |
500 | Internal server error |
Get Access Key Permissions
Retrieves permissions for a specific access key.
Parameters:
Name | In | Type | Required | Description |
---|---|---|---|---|
accessKey | path | string | Yes | The access key to retrieve permissions for |
Responses:
Status | Description |
---|---|
200 | Access key permissions retrieved successfully |
401 | Unauthorized |
403 | Forbidden |
404 | Not found |
500 | Internal server error |
Update Access Key Permissions
Updates permissions for a specific access key.
Parameters:
Name | In | Type | Required | Description |
---|---|---|---|---|
accessKey | path | string | Yes | The access key to update permissions for |
Request Body:
Responses:
Status | Description |
---|---|
200 | Access key permissions updated successfully |
400 | Bad request |
401 | Unauthorized |
403 | Forbidden |
404 | Not found |
500 | Internal server error |
Verify Access Key
Verifies if an access key is valid.
Parameters:
Name | In | Type | Required | Description |
---|---|---|---|---|
accessKey | path | string | Yes | The access key to verify |
Responses:
Status | Description |
---|---|
200 | Access key verification result |
401 | Unauthorized |
403 | Forbidden |
500 | Internal server error |
Event Definitions
List Event Definitions
Retrieves a list of event definitions with optional filtering.
Parameters:
Name | In | Type | Required | Description |
---|---|---|---|---|
name | query | string | No | The name of the event to filter |
limit | query | integer | Yes | Maximum number of results (1-100) |
order | query | string | Yes | Sort order (ASC, DESC) |
pageIndex | query | integer | Yes | Page index (0-based) |
orderBy | query | string | Yes | Field to order by (name, createdAt) |
Responses:
Status | Description |
---|---|
200 | Event definitions retrieved successfully |
401 | Unauthorized |
403 | Forbidden |
500 | Internal server error |
Create Event Definition
Creates a new event definition.
Request Body:
Responses:
Status | Description |
---|---|
200 | Event definition created successfully |
400 | Bad request |
401 | Unauthorized |
403 | Forbidden |
500 | Internal server error |
Get Event Definition by Name
Retrieves a specific event definition by name.
Parameters:
Name | In | Type | Required | Description |
---|---|---|---|---|
name | path | string | Yes | The name of the event definition |
Responses:
Status | Description |
---|---|
200 | Event definition retrieved successfully |
401 | Unauthorized |
403 | Forbidden |
404 | Not found |
500 | Internal server error |
Update Event Definition
Updates an existing event definition.
Parameters:
Name | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | Yes | The ID of the event definition |
Request Body:
Responses:
Status | Description |
---|---|
200 | Event definition updated successfully |
400 | Bad request |
401 | Unauthorized |
403 | Forbidden |
404 | Not found |
500 | Internal server error |
Workspaces
List Workspaces
Retrieves a list of workspaces with optional filtering.
Parameters:
Name | In | Type | Required | Description |
---|---|---|---|---|
limit | query | integer | Yes | Maximum number of results (1-100) |
order | query | string | Yes | Sort order (ASC, DESC) |
pageIndex | query | integer | Yes | Page index (0-based) |
orderBy | query | string | Yes | Field to order by (name, createdAt) |
name | query | string | No | The name of the workspace to filter |
id | query | string | No | The id of the workspace to filter |
Responses:
Status | Description |
---|---|
200 | Workspaces retrieved successfully |
401 | Unauthorized |
403 | Forbidden |
500 | Internal server error |
Create Workspace
Creates a new workspace.
Request Body:
Responses:
Status | Description |
---|---|
200 | Workspace created successfully |
400 | Bad request |
401 | Unauthorized |
403 | Forbidden |
500 | Internal server error |
Service Key Pairs
Update Service Key Pair
Updates a service key pair.
Request Body:
Responses:
Status | Description |
---|---|
200 | Service key pair updated successfully |
401 | Unauthorized |
403 | Forbidden |
500 | Internal server error |
Data Models
Error
KeyType
Enum: ACCOUNT
, SERVICE