afv-library/skills/dx-devops-test-suite-assignments-configure/references/api-endpoint.md
2026-06-26 17:15:29 +00:00

31 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# API Endpoint — testSuiteStages (Modes BD)
All three assignment modes (B, C, D) use the same Connect API endpoint. Substitute all `<placeholder>` values before executing.
```bash
sf api request rest "/services/data/v67.0/connect/devopstesting/pipeline/<pipelineId>/testSuiteStages" --method POST --body '{"pipelineStageId":"<stageId>","event":"<event>","assignments":[{"testSuiteId":"<id>","action":"add|remove"}]}' --target-org <doce-org-alias>
```
## Full payload schema
```json
{
"pipelineStageId": "<stageId>",
"event": "<event>",
"assignments": [
{"testSuiteId": "<suiteId1>", "action": "add"},
{"testSuiteId": "<suiteId2>", "action": "remove"}
]
}
```
| Field | Type | Description |
|---|---|---|
| `pipelineStageId` | string | The pipeline stage ID (from Prerequisite 5) |
| `event` | string | `Pre-Promote`, `Post-Promote`, or `Review` |
| `assignments` | array | One or more `{testSuiteId, action}` entries — `action` is `add` or `remove` |
- **Mode B** sends a single `add` assignment.
- **Mode C** sends multiple `add`/`remove` entries in one call (bulk mapping).
- **Mode D** sends `add`/`remove` entries for the classes/suites being synced — rejected tests excluded.