Skip to content

Commit

Permalink
/api/v2/segment-target -> /api/v2/segment-targets to match prod envir…
Browse files Browse the repository at this point in the history
…onment (#58)
  • Loading branch information
oneearedrabbit authored Dec 14, 2023
1 parent 2858ca3 commit 1b029f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ The LaunchDarkly Integration Validation Server exposes the following endpoints:

| Endpoint | Method | Description |
|--------------------|--------|-----------------------------------------------|
| `/api/v2/segment-target/:integrationKey` | POST | Simulates processing a synced segment data from a Customer Data Provider (CDP). Replace `:integrationKey` with the name of the directory that you are adding to the `integration-framework` repository under `integrations/`. |
| `/api/v2/segment-targets/:integrationKey` | POST | Simulates processing a synced segment data from a Customer Data Provider (CDP). Replace `:integrationKey` with the name of the directory that you are adding to the `integration-framework` repository under `integrations/`. |

### Example usage

To validate that a segment from a Customer Data Platform (CDP) will be successfully parsed and processed, you can make the following curl request:

```shell
curl --location 'http://localhost:3000/api/v2/segment-target/example-integration-key' \
curl --location 'http://localhost:3000/api/v2/segment-targets/example-integration-key' \
--header 'Content-Type: application/json' \
--data '{
"environmentId": "example-client-side-ID",
Expand Down
2 changes: 1 addition & 1 deletion server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const port = 3000;

app.use(express.json());

app.post('/api/v2/segment-target/:integrationKey', async (req, res) => {
app.post('/api/v2/segment-targets/:integrationKey', async (req, res) => {
const key = req.params.integrationKey;

const body = req.body;
Expand Down

0 comments on commit 1b029f3

Please sign in to comment.