Pipeline Request Trigger REST API
Published: 2024-05-15
Last Updated: 2026-08-26
Check out source or objects from a Git repository when the checkout is not triggered directly by a repository push webhook.
Optionally pass a unique tracing key for the pipeline, such as the build ID, so that downstream RFP activity can be invoked and MDCMS can send status updates back to the pipeline.
Status updates can be performed using the MDUPDPIPE command on *RFP exit point commands.
JSON payloads
All MDCMS REST API request and response bodies use JSON. Send Content-Type: application/json.
Authorization
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer token for the MDSEC user. See Authenticate requests to the MDCMS REST API server. |
Content-Type | string | Yes | application/json |
A missing or invalid token returns HTTP 401 Unauthorized.
Request body
Schema
| Property | Type | Required | Description |
|---|---|---|---|
href | string | Yes | URL of the Git repository in HTML or SSH format. The repository must already be defined in MDOpen and have at least one Continuous Integration or Cross-Referencing element defined for it. |
branch | string | No | Branch to pull from, if not specified in the URL. |
userName | string | No | Name of the user that committed the changes to Git. This user is mapped to an MDCMS user based on the mapping definitions for the Git repository in MDOpen. |
oldHash | string | Yes | Prior commit hash in Git. |
newHash | string | Yes | New commit hash in Git. |
commitMsg | string | No | Commit message. If the message includes the task reference, place it at the very beginning in the format PROJECT-TASK.SUBTASK:. |
taskRef | string | No | Reference of the MDCMS, Jira, or Azure task to apply the checkouts to. Omit if commitMsg starts with the reference ID. |
pipeline | string | No | 10-character ID of a pipeline server defined in MDOpen. Used for downstream update messages to that server with the MDUPDPIPE command. |
traceKey | string | No | Unique key that identifies the pipeline build MDCMS should communicate with. Used for downstream update messages with the MDUPDPIPE command. |
Example
Trigger a checkout from Git and attach a pipeline trace key. Replace {endpoint} with the URL endpoint defined for the MDCMS HTTP server.
{
"href": "ssh://git@bitbucket.org/yourcompany/yourproject",
"branch": "main",
"userName": "john@doe.com",
"oldHash": "a2c8933436a99a4ea90bc0972e7728a4e8bea519",
"newHash": "1a0c808bb1aa1886f896d3989645fb6574fc23a8",
"commitMsg": "DEMOCH-3: flow demo",
"pipeline": "BAMBOO",
"traceKey": "YOURPROJECT-37"
}
curl -X POST "https://{endpoint}/git/checkout" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"href":"ssh://git@bitbucket.org/yourcompany/yourproject","branch":"main","userName":"john@doe.com","oldHash":"a2c8933436a99a4ea90bc0972e7728a4e8bea519","newHash":"1a0c808bb1aa1886f896d3989645fb6574fc23a8","commitMsg":"DEMOCH-3: flow demo","pipeline":"BAMBOO","traceKey":"YOURPROJECT-37"}'
POST /git/checkout HTTP/1.1
Host: {endpoint}
Authorization: Bearer {token}
Content-Type: application/json
{
"href": "ssh://git@bitbucket.org/yourcompany/yourproject",
"branch": "main",
"userName": "john@doe.com",
"oldHash": "a2c8933436a99a4ea90bc0972e7728a4e8bea519",
"newHash": "1a0c808bb1aa1886f896d3989645fb6574fc23a8",
"commitMsg": "DEMOCH-3: flow demo",
"pipeline": "BAMBOO",
"traceKey": "YOURPROJECT-37"
}
Response body
Schema
| Property | Type | Description |
|---|---|---|
transaction | string | Transaction number. Use it to find the log record in file MDXREF/MDDFREP. |
msg | string | Detailed message for the error or successful transaction. |
Example
Related resources
| Resource | Description |
|---|---|
| Git Repositories REST API | List Git repositories defined in MDCMS |
| Object Request REST API | Create an object request, including pipeline notification fields |
| RFP Submission REST API | Submit RFPs after checkout |