Detected country: US
logo
API Docs
‌
‌
‌
logo

Powered by

  • Home
  • Cobalt API
  • DAST Targets

DAST Targets

1min read

Share

Get All DAST Targets

This endpoint retrieves a list of all DAST Targets that belong to the organization specified in the X-Org-Token header.

HTTP Request

GET https://api.us.cobalt.io/dast/targets

URL Parameters

ParameterDefaultDescription
cursor N/AUsed for pagination. Example: https://api.us.cobalt.io/dast/targets?cursor=a1b2c3d4
limit10If specified, returns only a specified amount of targets. Example: https://api.us.cobalt.io/dast/targets?limit=5

Response Fields

FieldDescription
idA unique ID representing the DAST target. Starts with dt_
nameThe name of the returned DAST target.
urlThe URL of the returned DAST target
enabled A boolean flag specifying if the DAST target is enabled
curl -X GET "https://api.us.cobalt.io/dast/targets" \
  -H "Accept: application/vnd.cobalt.v2+json" \
  -H "Authorization: Bearer YOUR-PERSONAL-API-TOKEN" \
  -H "X-Org-Token: YOUR-V2-ORGANIZATION-TOKEN"

The above command returns JSON structured like this:

{
  "pagination": {
    "next_page": "/resource?cursor=123asdzxc",
    "prev_page": "/resource?cursor=123asdzxc"
  },
  "data": [
    {
      "resource": {
        "id": "dt_GZgcehapJUNh6mjNuqsE4T",
        "name": "My DAST Target",
        "url": "https://myapp.local",
        "enabled": true
      }
    }
  ]
}

Get a DAST Target

This endpoint retrieves a specific DAST Target that belongs to the organization specified in the X-Org-Token header.

HTTP Request

GET https://api.us.cobalt.io/dast/targets/YOUR-DAST-TARGET-IDENTIFIER

Response Fields

FieldDescription
idA unique ID representing the DAST target. Starts with dt_
nameThe name of the returned DAST target.
urlThe URL of the returned DAST target
enabledA boolean flag specifying if the DAST target is enabled
curl -X GET "https://api.us.cobalt.io/dast/targets/YOUR-DAST-TARGET-IDENTIFIER" \
  -H "Accept: application/vnd.cobalt.v2+json" \
  -H "Authorization: Bearer YOUR-PERSONAL-API-TOKEN" \
  -H "X-Org-Token: YOUR-V2-ORGANIZATION-TOKEN"

The above command returns JSON structured like this:

{
  "resource": {
    "id": "dt_GZgcehapJUNh6mjNuqsE4T",
    "name": "My DAST Target",
    "url": "https://myapp.local",
    "enabled": true
  }
}

Share