Fix Pull Requests
Creates a Snyk Fix PR. This feature is currently in experimental phase and access is restricted behind the "apiFixPrCreation" feature flag. (Early Access)
post
Creates a Snyk Fix pull-request asynchronously and responds with a remediation job ID that can be used to check the status and result.
Required permissions
org.org.project.pr.create
Authorizations
AuthorizationstringRequired
API key value must be prefixed with "Token ".
Path parameters
org_idstring · uuidRequiredExample:
Org ID
7626925e-4b0f-11ee-be56-0242ac120002project_idstring · uuidRequiredExample:
Project ID
7626925e-4b0f-11ee-be56-0242ac120002Query parameters
versionstringRequiredExample:
Requested API version
2021-06-04Pattern: ^(wip|work-in-progress|experimental|beta|((([0-9]{4})-([0-1][0-9]))-((3[01])|(0[1-9])|([12][0-9]))(~(wip|work-in-progress|experimental|beta))?))$Body
Responses
202
Fix pull request job accepted for processing
application/vnd.api+json
400
Bad Request: A parameter provided as a part of the request was invalid.
application/vnd.api+json
401
Unauthorized: the request requires an authentication token.
application/vnd.api+json
403
Forbidden: the request requires an authentication token with more or different permissions.
application/vnd.api+json
404
Not Found: The resource being operated on could not be found.
application/vnd.api+json
500
Internal Server Error: An error was encountered while attempting to process the request.
application/vnd.api+json
post
/orgs/{org_id}/projects/{project_id}/fix_pull_requestsPOST /rest/orgs/{org_id}/projects/{project_id}/fix_pull_requests?version=text HTTP/1.1
Host: api.snyk.io
Authorization: YOUR_API_KEY
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 71
{
"data": {
"issue_ids": [
"SNYK-JS-YARGSPARSER-560381"
],
"type": "resource"
}
}{
"data": {
"attributes": {
"created_at": "2024-10-29T12:00:00Z",
"status": "STARTED"
},
"id": "7626925e-4b0f-11ee-be56-0242ac120002",
"type": "resource"
},
"jsonapi": {
"version": "1.0"
},
"links": {
"first": "https://example.com/api/resource?ending_before=v1.eyJpZCI6IjExIn0K",
"last": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjMwIn0K",
"next": "https://example.com/api/resource?starting_after=v1.eyJpZCI6IjEwIn0K"
}
}Last updated
Was this helpful?

