Whether a dependency fix pull request can be opened for a finding
curl --request GET \
--url https://app.trustivan.com/api/v1/findings/{id}/fix-pr \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/findings/{id}/fix-pr"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/findings/{id}/fix-pr', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/findings/{id}/fix-pr"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Whether a finding can get a dependency fix PR
Requires findings:read. available: false with a reason when it
cannot (not a dependency, an unsupported ecosystem, no fixed version,
not a github.com repository, fix PRs off). Otherwise the ecosystem,
package, versions, manifest and how many open findings it clears,
lockfile_policy saying what happens to the lockfile, and existing
when one was already opened.
GET
/
findings
/
{id}
/
fix-pr
Whether a dependency fix pull request can be opened for a finding
curl --request GET \
--url https://app.trustivan.com/api/v1/findings/{id}/fix-pr \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trustivan.com/api/v1/findings/{id}/fix-pr"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trustivan.com/api/v1/findings/{id}/fix-pr', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/findings/{id}/fix-pr"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Authorizations
Response
The plan.