As of December 31st, 2023 ThreadFix 2.X has reached End of Life and is no longer supported. For any further information please contact the Success and Implementation team.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

/rest/applications/{appId}/appTrackers/addDefectTracker

 

Descriptor

Value

HTTP Method

POST

Description

Attach a defect tracker to the application with the specified appId.

Restricted

True

 

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

defectTrackerId

Integer

Yes

ID of the Defect Tracker to attach to the application.

username

String

Yes*

Username to access the Defect Tracker with.

password

String

Yes*

Password for the username to access the Defect Tracker with.

projectName

String

Yes*

Defect Tracker project to file defects to.

useDefaultCredentials

Boolean

No

If the Defect Tracker has default credentials, set this to true to use those instead of passing in your own.

useDefaultProject

Boolean

No

If the Defect Tracker has a default project, set this to true to use it instead of passing in your own.

* ‘username’ and ‘password’ are not required if you use ‘useDefaultCredentials’.  ‘projectName’ is not required if you use ‘useDefaultProject’.

 

Sample Call:

curl --insecure -H 'Accept: application/json' -X POST --data 'defectTrackerId=10&username=yourUsername&password=yourPassword&projectName=yourPoject' http://localhost:8080/threadfix/rest/applications/1/appTrackers/addDefectTracker?apiKey={apiKey}

 

Sample Call Using Default Credentials:

curl --insecure -H 'Accept: application/json' -X POST --data 'defectTrackerId=10&useDefaultCredentails=true&useDefaultProject=true' http://localhost:8080/threadfix/rest/applications/1 /appTrackers/addDefectTracker?apiKey={apiKey}

 

Sample Output:


{
    "message": "",
    "success": true,
    "responseCode": -1,
    "object": {
        "id": 14,
        "projectName": "ThreadFix",
        "defectTracker": {
            "id": 10,
            "name": "Created By REST",
            "url": "https://yourproject.atlassian.net/",
            "defaultUsername": null,
            "defaultProductName": null,
            "defectTrackerType": {
                "id": 3,
                "name": "JIRA",
                "urlPlaceholder": "https://yourproject.atlassian.net"
            },
            "defaultDefectProfiles": []
        },
        "mainDefaultDefectProfile": null,
        "useDefaultCredentials": false,
        "useDefaultProject": false
    }
}

 


  • No labels