Versions Compared

Key

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

/rest/{version}/metadataKeys/new


Descriptor

Value

HTTP Method

POST

Description

Creates a new Metadata Key.

Required Permission

Manage Metadata Keys.

Version Introduced2.7.5


Request Header Parameters

Parameter

Value

Required

Description

Accept

String

Yes

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


Request POST Data Parameters

Parameter

Value

Required

Description

key

String

Yes

Name of the Metadata Key.

activeBooleanNoWhether the new key is immediately enabled.  Defaults to 'True'
typeStringYesType of Metadata Key.  Must be one of: 'Scan', 'Application'


Sample Call:


Code Block
languagebash
themeEclipse
curl --insecure -H 'Accept: application/json' -H "Authorization: APIKEY {API Key}" -X POST --data "key=Version&type=Scan" http://localhost:8080/threadfix/rest/latest/metadataKeys/new


Sample Output:


Code Block
themeEclipse
{
    "message": "",
    "success": true,
    "responseCode": -1,
    "object": {
        "id": 8,
        "active": true,
        "type": "SCAN",
        "key": "Version"
    }
}


Page Tree
rootThreadFix API 3.0 - WIP