Environments API
Manage publishing environments (WordPress sites, Astro projects) and user access control.
Prefix: /api/environments
Endpoints
Environment CRUD
| Method | Path | Description | Role |
|---|---|---|---|
GET | / | List all environments the current user can access | Editor+ |
GET | /{id} | Get environment details | Editor+ |
POST | / | Create a new publishing environment | Admin |
PUT | /{id} | Update environment configuration | Admin |
DELETE | /{id} | Delete an environment and all associated data | Admin |
User Access Control
| Method | Path | Description | Role |
|---|---|---|---|
GET | /{id}/users | List users with access to this environment | Admin |
POST | /{id}/users | Grant a user access to this environment | Admin |
DELETE | /{id}/users/{user_id} | Revoke user access from this environment | Admin |