Retrieving latest revision
This guide shows how to retrieve the latest revision for each branch of a project.
The endpoint is GET https://app.fossa.com/api/projects/<encoded-project-locator>?ref_type=branch
. Here's an example of how to use it:
curl 'https://app.fossa.com/api/projects/<encoded-project-locator>?ref_type=branch' \
--header 'Authorization: Bearer <fossa-full-access-token>' | jq '.references[] | select(.type == "branch")'
The output should look like the following:
...,
{
"id": integer-id,
"type": "branch",
"name": "name-of-branch",
"revision_id": "project-locator$revision-id",
"project_id": "project-locator"
},
...
Updated 12 months ago
What’s Next