Skip to content

feat: add docs explaining how Coder integrates with PlatformX #16378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Feb 4, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
docs: update PlatformX doc with steps from README (#16406)
copied and reformatted the steps from the
https://github.com/coder/coder-platformx-notifications README to include
them as an example in the Coder docs


[preview](https://coder.com/docs/@ea-dx-integration/admin/integrations/platformx)

---------

Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
  • Loading branch information
EdwardAngert and EdwardAngert authored Feb 3, 2025
commit 7bda04d01081d1689401bd649d90614d30bc5616
54 changes: 48 additions & 6 deletions docs/admin/integrations/platformx.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,59 @@ their experience.

You'll need:

- A running Coder v2.19+ deployment
- Coder v2.19+
- A PlatformX subscription from [DX](https://getdx.com/)
- A platform to host the integration (choose any of these):
- A platform to host the integration, such as:
- AWS Lambda
- Google Cloud Run
- Heroku
- Kubernetes
- Or any other platform that can run Python web applications

## Getting Started
## coder-platformx-events-middleware

Refer to the instructions in the
Coder sends [notifications](../monitoring/notifications/index.md) via webhooks
to coder-platformx-events-middleware, which processes and reformats the payload
into a structure compatible with [PlatformX by DX](https://help.getdx.com/en/articles/7880779-getting-started).

For more information about coder-platformx-events-middleware and how to
integrate it with your Coder deployment and PlatformX events, refer to the
[coder-platformx-notifications](https://github.com/coder/coder-platformx-notifications)
repository to deploy a lightweight web server to forward Coder Notifications to
PlatformX.
repository.

### Supported Notification Types

coder-platformx-events-middleware supports the following [Coder notifications](../monitoring/notifications/index.md):

- Workspace Created
- Workspace Manually Updated
- User Account Created
- User Account Suspended
- User Account Activated

### Environment Variables

The application expects the following environment variables when started.
For local development, create a `.env` file in the project root with the following variables.
A `.env.sample` file is included:

| Variable | Description | Example |
|------------------|--------------------------------------------|----------------------------------------------|
| `LOG_LEVEL` | Logging level (`DEBUG`, `INFO`, `WARNING`) | `INFO` |
| `GETDX_API_KEY` | API key for PlatformX | `your-api-key` |
| `EVENTS_TRACKED` | Comma-separated list of tracked events | `"Workspace Created,User Account Suspended"` |

### Logging

Logs are printed to the console and can be adjusted using the `LOG_LEVEL` variable. The available levels are:

| Level | Description |
|-----------|---------------------------------------|
| `DEBUG` | Most verbose, useful for debugging |
| `INFO` | Standard logging for normal operation |
| `WARNING` | Logs only warnings and errors |

### API Endpoints

- `GET /` - Health check endpoint
- `POST /` - Webhook receiver
Loading