Skip to main content

Checkmarx One API - POST Project Webhook

Endpoint

POST /api/webhooks/projects/{project-id}

Description

Creates a new webhook associated with a Project. Two events are available to trigger your customized URL payload:

  • when a scan in your Project finishes, or

  • when a scan in your Project fails

Workflow

  1. Use POST /api/webhooks/projects/{project-id} to create a new webhook

  2. Use the webhook in your CI/CD pipeline to trigger events related to Checkmarx One scans

URL

The URL for Webhooks Projects endpoints is <base_url>/api/webhooks/projects/{project-id}

Curl Sample

curl -X POST "https://ast.checkmarx.net/api/webhooks/projects/d86049f0-77f5-49c2-9a19-cc4e343c7ce5" -H  "accept: application/json; version=1.0" -H  "Content-Type: application/json; version=1.0" -d "{"name":"Demo","active":true,"enabledEvents":["scan_completed_successfully"],"config":{"contentType":"string","insecureSsl":0,"url":"string","secret":"string"}}"

Media Type (header)

Authorization: Bearer <access_token>

Accept: application/json

Parameters

Path Parameters - Required:

Parameter

Type

Description

project-id

string

The unique identifier of the Project.

Body Parameters - Required

“*” indicates a required parameter

Parameter

Type

Enums

Description

name*

string

-

The name of the webhook.

active

boolean

  • true - the webhook is active

  • false - the webhook is not active

The status of the webhook.

enabledEvents

string

  • scan_completed_successfully

  • scan_failed

The event(s) that trigger the webhook.

config

The webhook configuration details.

config/contentType

string

Need info

Need info

config/insecureSsl

integer

Need info

Need info

config/url

string

-

The payload URL to access upon the triggering of the event.

config/secret

string

-

Need info

Success Response

Code: 201 Created

Attributes:

Attribute

Type

Enums

Description

id

string

-

The unique identifier of the webhook.

name

string

-

The name of the webhook.

active

boolean

  • true

  • false

The status of the webhook.

true = active

false = inactive

enabledEvents

string

  • scan_completed_successfully

  • scan_failed

The event(s) that trigger the webhook.

config

The webhook configuration details.

config/contentType

string

Need info

Need info

config/insecureSsl

integer

Need info

Need info

config/url

string

-

The payload URL to access upon the triggering of the event.

createdAt

string

(date-time)

-

The date and time the webhook was created.

updatedAt

string

(date-time)

-

The date and time the webhook was updated.

Sample Success Response:

{
    "id": "78d1dd38-7e60-44b3-9474-7117629c6248",
    "name": "Sample Web Hook 06",
    "active": true,
    "config": {
        "contentType": "",
        "insecureSsl": 0,
        "url": "http://PostDatapost"
    },
    "createdAt": "2021-06-03T05:07:58.271570549Z",
    "updatedAt": "2021-06-03T05:07:58.271570549Z",
    "enabledEvents": [
        "scan_completed_successfully"
    ]
}

Error Responses: