EnSync Engine Documentation Help

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

GET /access-key

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

POST /access-key

Creates a new access key with specified permissions.

Request Body:

{ "type": "ACCOUNT", "permissions": { "resources": { "resource1": { "action1": ["path1", "path2"] } }, "send": ["event1", "event2"], "receive": ["event3", "event4"] }, "name": "My Access Key" }

Responses:

Status

Description

200

Access key created successfully

400

Bad request

401

Unauthorized

403

Forbidden

500

Internal server error

Get Access Key Permissions

GET /access-key/{accessKey}/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

POST /access-key/{accessKey}/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:

{ "resources": { "resource1": { "action1": ["path1", "path2"] } }, "send": ["event1", "event2"], "receive": ["event3", "event4"] }

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

GET /access/verify/{accessKey}

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

GET /event

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

POST /event

Creates a new event definition.

Request Body:

{ "name": "user/profile/updated", "payload": { "userId": "string", "name": "string", "email": "string" } }

Responses:

Status

Description

200

Event definition created successfully

400

Bad request

401

Unauthorized

403

Forbidden

500

Internal server error

Get Event Definition by Name

GET /event/{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

PUT /event/{id}

Updates an existing event definition.

Parameters:

Name

In

Type

Required

Description

id

path

string

Yes

The ID of the event definition

Request Body:

{ "name": "user/profile/updated", "payload": { "userId": "string", "name": "string", "email": "string" } }

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

GET /workspace

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

POST /workspace

Creates a new workspace.

Request Body:

{ "name": "Development" }

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

PUT /access/service-key-pair

Updates a service key pair.

Request Body:

{ "access_key": "your-access-key" }

Responses:

Status

Description

200

Service key pair updated successfully

401

Unauthorized

403

Forbidden

500

Internal server error

Data Models

Error

{ "code": 400, "message": "Bad request" }

KeyType

Enum: ACCOUNT, SERVICE

ServiceKeyPair

{ "public_key": "string", "private_key": "string" }

AccessKeyPermissionsRequest

{ "resources": { "additionalProp1": { "additionalProp1": [ "string" ] } }, "send": [ "string" ], "receive": [ "string" ] }

AccessKeyResponse

{ "accessKey": "string", "accessKeyId": "string", "service_key_pair": { "public_key": "string", "private_key": "string" } }

WorkspaceItem

{ "id": 0, "name": "string", "path": "string", "parentId": 0, "createdAt": "2023-01-01T00:00:00Z", "children": [ { "id": 0, "name": "string", "path": "string", "parentId": 0, "createdAt": "2023-01-01T00:00:00Z" } ] }

EventDefinitionItem

{ "id": 0, "name": "string", "payload": { "additionalProp1": "string" }, "createdAt": "2023-01-01T00:00:00Z", "updatedAt": "2023-01-01T00:00:00Z" }
Last modified: 07 October 2025