Conan v2 API

  • Tier: Free, Premium, Ultimate
  • Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated

For Conan v1 operations, see Conan v1 API.

Use this API to interact with the Conan v2 package manager. For more information, see Conan packages in the package registry.

Generally, these endpoints are used by the Conan 2 package manager client and are not meant for manual consumption.

For instructions on how to upload and install Conan packages from the GitLab package registry, see the Conan package registry documentation and Conan 2 package manager client.

These endpoints do not adhere to the standard API authentication methods. See each route for details on how credentials are expected to be passed. Undocumented authentication methods might be removed in the future.

The Conan registry is not FIPS compliant and is disabled when FIPS mode is enabled. These endpoints will all return 404 Not Found.

Route prefix

The project-level prefix is used to make requests in a single project’s scope. The examples in this document all use the project-level prefix.

Copy to clipboard
/projects/:id/packages/conan
AttributeTypeRequiredDescription
idstringyesThe project ID or full project path.

Get latest recipe revision

History

The availability of this feature is controlled by a feature flag. For more information, see the history.

Get the revision hash and creation date of the latest package recipe.

Copy to clipboard
GET <route_prefix>/v2/conans/:package_name/:package_version/:package_username/:package_channel/latest
AttributeTypeRequiredDescription
package_namestringyesName of a package.
package_versionstringyesVersion of a package.
package_usernamestringyesConan username of a package. This attribute is the +-separated full path of your project.
package_channelstringyesChannel of a package.
Shell Copy to clipboard
curl --header "Authorization: Bearer <authenticate_token>" "https://gitlab.example.com/api/v4/projects/9/packages/conan/v2/conans/my-package/1.0/my-group+my-project/stable/latest"

Example response:

JSON Copy to clipboard
{
  "revision" : "75151329520e7685dcf5da49ded2fec0",
  "time" : "2024-12-17T09:16:40.334+0000"
}