Retrieving the latest revision

Retrieve the latest revision for each branch of a project via the API.

1 min readUpdated Jul 10, 2026

Overview

This recipe shows how to retrieve the latest revision for each branch of a project.

Listing a project's branches

Send a GET request to the project endpoint with ref_type=branch:

Shell
curl --request GET \  --url 'https://app.fossa.com/api/projects/<project-locator>?ref_type=branch' \  --header 'Authorization: Bearer YOUR_API_KEY'

Note

URL-encode the project locator, for example, custom+1234/example becomes custom%2B1234%2Fexample.

Reading the response

The response includes a references array. Each entry describes a branch and points to its latest revision:

FieldDescription
idThe reference ID.
typeThe reference type (e.g. branch).
nameThe branch name.
revision_idThe locator of the latest revision on that branch.
project_idThe project locator.

Use the revision_id value wherever a revision locator is required, for example, when downloading attribution reports or modifying release groups.

© 2026 FOSSA, Inc.support@fossa.com