List Environments
GET
Endpoint: /api/environments
Query Parameters
Organization ID to retrieve environments for (required for remote providers)
Page number for pagination (0-indexed)
Number of environments per page
Search term for filtering environments by name
Field to order by (e.g.,
name, created_at, updated_at)JSON filter conditions
Response
Current page number
Number of items per page
Total number of environments
Array of environment objects
Get Environment by ID
GET
Endpoint: /api/environments/{id}
Path Parameters
Environment ID (UUID)
Query Parameters
Organization ID (required for remote providers)
Response
Returns a single environment object with the same structure as the list response.Create Environment
POST
Endpoint: /api/environments
Request Body
Environment name
Environment description
Organization ID that will own this environment
Response
Status:201 Created
Returns the created environment object.
Update Environment
PUT
Endpoint: /api/environments/{id}
Path Parameters
Environment ID (UUID)
Request Body
Updated environment name
Updated environment description
Response
Status:200 OK
Returns the updated environment object.
Delete Environment
DELETE
Endpoint: /api/environments/{id}
Path Parameters
Environment ID (UUID)
Response
Status:200 OK
Returns the deleted environment object.
Get Environment Connections
GET
Endpoint: /api/environments/{environmentID}/connections
Path Parameters
Environment ID (UUID)
Query Parameters
Page number
Page size
Search term
Order by field
Filter conditions:
{"assigned": true/false, "deleted_at": true/false}Response
Returns a paginated list of connections assigned to this environment. Example Response:Add Connection to Environment
POST
Endpoint: /api/environments/{environmentID}/connections/{connectionID}
Path Parameters
Environment ID (UUID)
Connection ID to add (UUID)
Response
Status:200 OK
Returns the environment-connection mapping object.
Remove Connection from Environment
DELETE
Endpoint: /api/environments/{environmentID}/connections/{connectionID}
Path Parameters
Environment ID (UUID)
Connection ID to remove (UUID)
Response
Status:200 OK
Returns the removed environment-connection mapping.
Error Codes
Invalid request parameters or malformed JSON
Missing or invalid authentication token
Environment not found
Server error occurred