Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

/rest/customize/scanmetadata/keys/{metadataKeyId}/update


Descriptor

Value

HTTP Method

POST

Description

Updates a scan metadata key

Required Permission

Manage Scan Metadata Keys

Version Introduced2.7


Request Header Parameters

Parameter

Value

Required

Description

Accept

String

Yes

A value of ‘application/json’ must be provided.

Request POST Data Parameters

“TRUE”, “FALSE”

Parameter

Value

Required

Description

Available Values

namekey

StringInteger

No

The updated name of the metadata keyscan metadata key for the metadata which will be edited.

N/A

description

String

No

Text for description field.

N/Aactive

titleStringNo

Sets the metadata key to active or inactive.

Scan Metadata key title. Used if key param is not present.N/A

Sample Call:


Code Block
themeEclipse
curl --insecure -H 'Accept: application/json' -X POST --data "key=Random Key Title&active=falsedescription=I gotta brand new key" http://localhost:8080/threadfix/rest/customizescans/scanmetadata{scanId}/keysmetadata/{metadataKeyId}/update?apiKey={apiKey}


Sample Output:


Code Block
themeEclipse
{PLACEHOLDER ONLY!!! TO BE REPLACED
WITH CORRECT RETURN MESSAGE!!     "message": "",
    "success": true,
    "responseCode": -1,
    "object": [
        {
   
        "id": 12,
 
          "activeorderPosition": true1,
 
          "keydescription": "I Gottagotta Brandbrand New Pair of Rollerskates"
        },
    new key",
   {             "id": 2,
            "active": true,
            "key": "You Gotta Brand New Key"
 "title": "Scan Metadata Key"
      }
    ]
}


Page Tree
rootScans API