UpdateFormConfig

This method can be used for the following: Update form configuration for a type;

Parameters

The following URL, Headers and Parameters are required for requests to this API endpoint. Where a parameter is optional, it will be indicated. Otherwise treat all parameters as mandatory.

Headers

PUT /api/ss/config/form/:type HTTP/1.1
Host: demo.attackforge.com
X-SSAPI-KEY: APIKey
Content-Type: application/json
Connection: close

Query

type (string)

Update configuration options for a particular type. Must be one of the following: vulnerability, test-case, project-test-case

Example:

PUT /api/ss/config/form/vulnerability HTTP/1.1

config (array of objects)

Example

The following example is a cURL request to update custom fields configuration for projects.

Request

Include API Token instead of stars in 'X-SSAPI-KEY: ***************************************' parameter.

curl -X PUT 'https://demo.attackforge.com/api/ss/config/form/vulnerability' -H 'Host: localhost:3000' -H 'X-SSAPI-KEY: ***************************************' -H 'Content-Type: application/json' -H 'Connection: close' -d '{
  "config": [
    {
      "config": {
        "fields": [
          {
            "config": {
              "key": "writeupAndAssets",
              "label": "Writeup and Affected Assets"
            },
            "type": "system"
          },
          {
            "config": {
              "key": "zeroDay",
              "label": "Is 0-Day?"
            },
            "type": "system"
          },
          {
            "config": {
              "key": "visibility",
              "label": "Visibility"
            },
            "type": "system"
          }
        ],
        "label": "Basic"
      },
      "type": "section"
    },
    {
      "config": {
        "fields": [
          {
            "config": {
              "key": "scoring",
              "label": "CVSS Scoring, Priority and Exploitability"
            },
            "type": "system"
          }
        ],
        "label": "Scoring"
      },
      "type": "section"
    },
    {
      "config": {
        "fields": [
          {
            "config": {
              "key": "stepsToReproduce",
              "label": "Steps to Reproduce"
            },
            "type": "system"
          },
          {
            "config": {
              "key": "notes",
              "label": "Notes"
            },
            "type": "system"
          }
        ],
        "label": "Testing"
      },
      "type": "section"
    },
    {
      "config": {
        "fields": [
          {
            "config": {
              "key": "cvssTags",
              "label": "CVSS Tags"
            },
            "type": "system"
          },
          {
            "config": {
              "key": "tags",
              "label": "Tags"
            },
            "type": "system"
          },
          {
            "config": {
              "key": "customTags",
              "label": "Custom Tags"
            },
            "type": "system"
          },
          {
            "config": {
              "key": "testCases",
              "label": "Associated Test Cases"
            },
            "type": "system"
          }
        ],
        "label": "Tags"
      },
      "type": "section"
    }
  ],
  "type": "vulnerability"
}'

Response

Response contains a status and a list of custom field configuration objects.

{
  "status": "updated",
  "type": "vulnerability",
  "config": [
    {
      "config": {
        "fields": [
          {
            "config": {
              "key": "writeupAndAssets",
              "label": "Writeup and Affected Assets"
            },
            "type": "system"
          },
          {
            "config": {
              "key": "zeroDay",
              "label": "Is 0-Day?"
            },
            "type": "system"
          },
          {
            "config": {
              "key": "visibility",
              "label": "Visibility"
            },
            "type": "system"
          }
        ],
        "label": "Basic"
      },
      "type": "section"
    },
    {
      "config": {
        "fields": [
          {
            "config": {
              "key": "scoring",
              "label": "CVSS Scoring, Priority and Exploitability"
            },
            "type": "system"
          }
        ],
        "label": "Scoring"
      },
      "type": "section"
    },
    {
      "config": {
        "fields": [
          {
            "config": {
              "key": "stepsToReproduce",
              "label": "Steps to Reproduce"
            },
            "type": "system"
          },
          {
            "config": {
              "key": "notes",
              "label": "Notes"
            },
            "type": "system"
          }
        ],
        "label": "Testing"
      },
      "type": "section"
    },
    {
      "config": {
        "fields": [
          {
            "config": {
              "key": "cvssTags",
              "label": "CVSS Tags"
            },
            "type": "system"
          },
          {
            "config": {
              "key": "tags",
              "label": "Tags"
            },
            "type": "system"
          },
          {
            "config": {
              "key": "customTags",
              "label": "Custom Tags"
            },
            "type": "system"
          },
          {
            "config": {
              "key": "testCases",
              "label": "Associated Test Cases"
            },
            "type": "system"
          }
        ],
        "label": "Tags"
      },
      "type": "section"
    }
  ]
}

Last updated

Check YouTube for more tutorials: https://youtube.com/@attackforge