Skip to content

Conan v1 API

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

For Conan v2 operations, see Conan v2 API.

Use this API to interact with the Conan v1 package manager. These endpoints work for both projects and instances. For more information, see Conan packages in the package registry.

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

  • 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 all return 404 Not Found.

Create an authentication token

Creates a JSON Web Token (JWT) for use as a Bearer header in other requests to the Conan package manager client.

"Authorization: Bearer <authenticate_token>"
GET /packages/conan/v1/users/authenticate
GET /projects/:id/packages/conan/v1/users/authenticate
Attribute Type Required Description
id string Conditionally The project ID or full project path. Required only for the project endpoint.
curl --user <username>:<your_access_token> \
     --url "https://gitlab.example.com/api/v4/packages/conan/v1/users/authenticate"

Example response:

eyJhbGciOiJIUzI1NiIiheR5cCI6IkpXVCJ9.eyJhY2Nlc3NfdG9rZW4iOjMyMTQyMzAsqaVzZXJfaWQiOjQwNTkyNTQsImp0aSI6IjdlNzBiZTNjLWFlNWQtNDEyOC1hMmIyLWZiOThhZWM0MWM2OSIsImlhd3r1MTYxNjYyMzQzNSwibmJmIjoxNjE2NjIzNDMwLCJleHAiOjE2MTY2MjcwMzV9.QF0Q3ZIB2GW5zNKyMSIe0HIFOITjEsZEioR-27Rtu7E

Verify availability of a Conan repository

Verifies the availability of the GitLab Conan repository.

GET /packages/conan/v1/ping
GET /projects/:id/packages/conan/v1/ping
Attribute Type Required Description
id string Conditionally The project ID or full project path. Required only for the project endpoint.
curl --url "https://gitlab.example.com/api/v4/packages/conan/v1/ping"

Example response:

""

Search for a Conan package

Searches the instance for a Conan package with a specified name.

GET /packages/conan/v1/conans/search
GET /projects/:id/packages/conan/v1/conans/search
Attribute Type Required Description
id string Conditionally The project ID or full project path. Required only for the project endpoint.
q string yes Search query. You can use * as a wildcard.
curl --user <username>:<your_access_token> \
     --url "https://gitlab.example.com/api/v4/packages/conan/v1/conans/search?q=Hello*"

Example response:

{
  "results": [
    "Hello/0.1@foo+conan_test_prod/beta",
    "Hello/0.1@foo+conan_test_prod/stable",
    "Hello/0.2@foo+conan_test_prod/beta",
    "Hello/0.3@foo+conan_test_prod/beta",
    "Hello/0.1@foo+conan-reference-test/stable",
    "HelloWorld/0.1@baz+conan-reference-test/beta"
    "hello-world/0.4@buz+conan-test/alpha"
  ]
}

Verify authentication credentials

Verifies the validity of Basic Auth credentials or a Conan JWT generated from the /authenticate endpoint.

GET /packages/conan/v1/users/authenticate
GET /projects/:id/packages/conan/v1/users/authenticate
```0

| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id`      | string | Conditionally | The project ID or full project path. Required only for the project endpoint. |

```plaintext
GET /packages/conan/v1/users/authenticate
GET /projects/:id/packages/conan/v1/users/authenticate
```1

Example response:

```plaintext
GET /packages/conan/v1/users/authenticate
GET /projects/:id/packages/conan/v1/users/authenticate
```2

## Get a recipe snapshot

Gets a snapshot of the files for a specified Conan recipe. The snapshot is a list of filenames
with their associated MD5 hash.

```plaintext
GET /packages/conan/v1/users/authenticate
GET /projects/:id/packages/conan/v1/users/authenticate
```3

| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id`                | string | Conditionally | The project ID or full project path. Required only for the project endpoint. |
| `package_name`      | string | yes | Name of a package. |
| `package_version`   | string | yes | Version of a package. |
| `package_username`  | string | yes | Conan username of a package. This attribute is the `+`-separated full path of your project. |
| `package_channel`   | string | yes | Channel of a package. |

```plaintext
GET /packages/conan/v1/users/authenticate
GET /projects/:id/packages/conan/v1/users/authenticate
```4

Example response:

```plaintext
GET /packages/conan/v1/users/authenticate
GET /projects/:id/packages/conan/v1/users/authenticate
```5

## Get a package snapshot

Gets a snapshot of the files for a specified Conan package and reference. The snapshot is a list of filenames
with their associated MD5 hash.

```plaintext
GET /packages/conan/v1/users/authenticate
GET /projects/:id/packages/conan/v1/users/authenticate
```6

| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id`                | string | Conditionally | The project ID or full project path. Required only for the project endpoint. |
| `package_name`      | string | yes | Name of a package. |
| `package_version`   | string | yes | Version of a package. |
| `package_username`  | string | yes | Conan username of a package. This attribute is the `+`-separated full path of your project. |
| `package_channel`   | string | yes | Channel of a package. |
| `conan_package_reference` | string | yes | Reference hash of a Conan package. Conan generates this value. |

```plaintext
GET /packages/conan/v1/users/authenticate
GET /projects/:id/packages/conan/v1/users/authenticate
```7

Example response:

```plaintext
GET /packages/conan/v1/users/authenticate
GET /projects/:id/packages/conan/v1/users/authenticate
```8

## Get a recipe manifest

Gets a manifest that includes a list of files and associated download URLs for a specified recipe.

```plaintext
GET /packages/conan/v1/users/authenticate
GET /projects/:id/packages/conan/v1/users/authenticate
```9

| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id`                | string | Conditionally | The project ID or full project path. Required only for the project endpoint. |
| `package_name`      | string | yes | Name of a package. |
| `package_version`   | string | yes | Version of a package. |
| `package_username`  | string | yes | Conan username of a package. This attribute is the `+`-separated full path of your project. |
| `package_channel`   | string | yes | Channel of a package. |

```shell
curl --user <username>:<your_access_token> \
     --url "https://gitlab.example.com/api/v4/packages/conan/v1/users/authenticate"
```0

Example response:

```shell
curl --user <username>:<your_access_token> \
     --url "https://gitlab.example.com/api/v4/packages/conan/v1/users/authenticate"
```1

## Get a package manifest

Gets a manifest that includes a list of files and associated download URLs for a specified package.

```shell
curl --user <username>:<your_access_token> \
     --url "https://gitlab.example.com/api/v4/packages/conan/v1/users/authenticate"
```2

| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id`                | string | Conditionally | The project ID or full project path. Required only for the project endpoint. |
| `package_name`      | string | yes | Name of a package. |
| `package_version`   | string | yes | Version of a package. |
| `package_username`  | string | yes | Conan username of a package. This attribute is the `+`-separated full path of your project. |
| `package_channel`   | string | yes | Channel of a package. |
| `conan_package_reference` | string | yes | Reference hash of a Conan package. Conan generates this value. |

```shell
curl --user <username>:<your_access_token> \
     --url "https://gitlab.example.com/api/v4/packages/conan/v1/users/authenticate"
```3

Example response:

```shell
curl --user <username>:<your_access_token> \
     --url "https://gitlab.example.com/api/v4/packages/conan/v1/users/authenticate"
```4

## List all recipe download URLs

Lists all files and associated download URLs for a specified recipe.
Returns the same payload as the [recipe manifest](#get-a-recipe-manifest) endpoint.

```shell
curl --user <username>:<your_access_token> \
     --url "https://gitlab.example.com/api/v4/packages/conan/v1/users/authenticate"
```5

| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id`                | string | Conditionally | The project ID or full project path. Required only for the project endpoint. |
| `package_name`      | string | yes | Name of a package. |
| `package_version`   | string | yes | Version of a package. |
| `package_username`  | string | yes | Conan username of a package. This attribute is the `+`-separated full path of your project. |
| `package_channel`   | string | yes | Channel of a package. |

```shell
curl --user <username>:<your_access_token> \
     --url "https://gitlab.example.com/api/v4/packages/conan/v1/users/authenticate"
```6

Example response:

```shell
curl --user <username>:<your_access_token> \
     --url "https://gitlab.example.com/api/v4/packages/conan/v1/users/authenticate"
```7

## List all package download URLs

Lists all files and associated download URLs for a specified package.
Returns the same payload as the [package manifest](#get-a-package-manifest) endpoint.

```shell
curl --user <username>:<your_access_token> \
     --url "https://gitlab.example.com/api/v4/packages/conan/v1/users/authenticate"
```8

| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id`                | string | Conditionally | The project ID or full project path. Required only for the project endpoint. |
| `package_name`      | string | yes | Name of a package. |
| `package_version`   | string | yes | Version of a package. |
| `package_username`  | string | yes | Conan username of a package. This attribute is the `+`-separated full path of your project. |
| `package_channel`   | string | yes | Channel of a package. |
| `conan_package_reference` | string | yes | Reference hash of a Conan package. Conan generates this value. |

```shell
curl --user <username>:<your_access_token> \
     --url "https://gitlab.example.com/api/v4/packages/conan/v1/users/authenticate"
```9

Example response:

```shell
eyJhbGciOiJIUzI1NiIiheR5cCI6IkpXVCJ9.eyJhY2Nlc3NfdG9rZW4iOjMyMTQyMzAsqaVzZXJfaWQiOjQwNTkyNTQsImp0aSI6IjdlNzBiZTNjLWFlNWQtNDEyOC1hMmIyLWZiOThhZWM0MWM2OSIsImlhd3r1MTYxNjYyMzQzNSwibmJmIjoxNjE2NjIzNDMwLCJleHAiOjE2MTY2MjcwMzV9.QF0Q3ZIB2GW5zNKyMSIe0HIFOITjEsZEioR-27Rtu7E
```0

## List all recipe upload URLs

Lists the upload URLs for a specified collection of recipe files. The request must include a JSON object
with the name and size of the individual files.

```shell
eyJhbGciOiJIUzI1NiIiheR5cCI6IkpXVCJ9.eyJhY2Nlc3NfdG9rZW4iOjMyMTQyMzAsqaVzZXJfaWQiOjQwNTkyNTQsImp0aSI6IjdlNzBiZTNjLWFlNWQtNDEyOC1hMmIyLWZiOThhZWM0MWM2OSIsImlhd3r1MTYxNjYyMzQzNSwibmJmIjoxNjE2NjIzNDMwLCJleHAiOjE2MTY2MjcwMzV9.QF0Q3ZIB2GW5zNKyMSIe0HIFOITjEsZEioR-27Rtu7E
```1

| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id`                | string | Conditionally | The project ID or full project path. Required only for the project endpoint. |
| `package_name`      | string | yes | Name of a package. |
| `package_version`   | string | yes | Version of a package. |
| `package_username`  | string | yes | Conan username of a package. This attribute is the `+`-separated full path of your project. |
| `package_channel`   | string | yes | Channel of a package. |

Example request JSON payload:

The payload must include both the name and size of the file.

```shell
eyJhbGciOiJIUzI1NiIiheR5cCI6IkpXVCJ9.eyJhY2Nlc3NfdG9rZW4iOjMyMTQyMzAsqaVzZXJfaWQiOjQwNTkyNTQsImp0aSI6IjdlNzBiZTNjLWFlNWQtNDEyOC1hMmIyLWZiOThhZWM0MWM2OSIsImlhd3r1MTYxNjYyMzQzNSwibmJmIjoxNjE2NjIzNDMwLCJleHAiOjE2MTY2MjcwMzV9.QF0Q3ZIB2GW5zNKyMSIe0HIFOITjEsZEioR-27Rtu7E
```2

```shell
eyJhbGciOiJIUzI1NiIiheR5cCI6IkpXVCJ9.eyJhY2Nlc3NfdG9rZW4iOjMyMTQyMzAsqaVzZXJfaWQiOjQwNTkyNTQsImp0aSI6IjdlNzBiZTNjLWFlNWQtNDEyOC1hMmIyLWZiOThhZWM0MWM2OSIsImlhd3r1MTYxNjYyMzQzNSwibmJmIjoxNjE2NjIzNDMwLCJleHAiOjE2MTY2MjcwMzV9.QF0Q3ZIB2GW5zNKyMSIe0HIFOITjEsZEioR-27Rtu7E
```3

Example response:

```shell
eyJhbGciOiJIUzI1NiIiheR5cCI6IkpXVCJ9.eyJhY2Nlc3NfdG9rZW4iOjMyMTQyMzAsqaVzZXJfaWQiOjQwNTkyNTQsImp0aSI6IjdlNzBiZTNjLWFlNWQtNDEyOC1hMmIyLWZiOThhZWM0MWM2OSIsImlhd3r1MTYxNjYyMzQzNSwibmJmIjoxNjE2NjIzNDMwLCJleHAiOjE2MTY2MjcwMzV9.QF0Q3ZIB2GW5zNKyMSIe0HIFOITjEsZEioR-27Rtu7E
```4

## List all package upload URLs

Lists the upload URLs for a specified collection of package files. The request must include a JSON object
with the name and size of the individual files.

```shell
eyJhbGciOiJIUzI1NiIiheR5cCI6IkpXVCJ9.eyJhY2Nlc3NfdG9rZW4iOjMyMTQyMzAsqaVzZXJfaWQiOjQwNTkyNTQsImp0aSI6IjdlNzBiZTNjLWFlNWQtNDEyOC1hMmIyLWZiOThhZWM0MWM2OSIsImlhd3r1MTYxNjYyMzQzNSwibmJmIjoxNjE2NjIzNDMwLCJleHAiOjE2MTY2MjcwMzV9.QF0Q3ZIB2GW5zNKyMSIe0HIFOITjEsZEioR-27Rtu7E
```5

| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id`                | string | Conditionally | The project ID or full project path. Required only for the project endpoint. |
| `package_name`      | string | yes | Name of a package. |
| `package_version`   | string | yes | Version of a package. |
| `package_username`  | string | yes | Conan username of a package. This attribute is the `+`-separated full path of your project. |
| `package_channel`   | string | yes | Channel of a package. |
| `conan_package_reference` | string | yes | Reference hash of a Conan package. Conan generates this value. |

Example request JSON payload:

The payload must include both the name and size of the file.

```shell
eyJhbGciOiJIUzI1NiIiheR5cCI6IkpXVCJ9.eyJhY2Nlc3NfdG9rZW4iOjMyMTQyMzAsqaVzZXJfaWQiOjQwNTkyNTQsImp0aSI6IjdlNzBiZTNjLWFlNWQtNDEyOC1hMmIyLWZiOThhZWM0MWM2OSIsImlhd3r1MTYxNjYyMzQzNSwibmJmIjoxNjE2NjIzNDMwLCJleHAiOjE2MTY2MjcwMzV9.QF0Q3ZIB2GW5zNKyMSIe0HIFOITjEsZEioR-27Rtu7E
```6

```shell
eyJhbGciOiJIUzI1NiIiheR5cCI6IkpXVCJ9.eyJhY2Nlc3NfdG9rZW4iOjMyMTQyMzAsqaVzZXJfaWQiOjQwNTkyNTQsImp0aSI6IjdlNzBiZTNjLWFlNWQtNDEyOC1hMmIyLWZiOThhZWM0MWM2OSIsImlhd3r1MTYxNjYyMzQzNSwibmJmIjoxNjE2NjIzNDMwLCJleHAiOjE2MTY2MjcwMzV9.QF0Q3ZIB2GW5zNKyMSIe0HIFOITjEsZEioR-27Rtu7E
```7

Example response:

```shell
eyJhbGciOiJIUzI1NiIiheR5cCI6IkpXVCJ9.eyJhY2Nlc3NfdG9rZW4iOjMyMTQyMzAsqaVzZXJfaWQiOjQwNTkyNTQsImp0aSI6IjdlNzBiZTNjLWFlNWQtNDEyOC1hMmIyLWZiOThhZWM0MWM2OSIsImlhd3r1MTYxNjYyMzQzNSwibmJmIjoxNjE2NjIzNDMwLCJleHAiOjE2MTY2MjcwMzV9.QF0Q3ZIB2GW5zNKyMSIe0HIFOITjEsZEioR-27Rtu7E
```8

## Get a recipe file

Gets a recipe file from the package registry. You must use the download URL returned from the
[recipe download URLs](#list-all-recipe-download-urls) endpoint.

```shell
eyJhbGciOiJIUzI1NiIiheR5cCI6IkpXVCJ9.eyJhY2Nlc3NfdG9rZW4iOjMyMTQyMzAsqaVzZXJfaWQiOjQwNTkyNTQsImp0aSI6IjdlNzBiZTNjLWFlNWQtNDEyOC1hMmIyLWZiOThhZWM0MWM2OSIsImlhd3r1MTYxNjYyMzQzNSwibmJmIjoxNjE2NjIzNDMwLCJleHAiOjE2MTY2MjcwMzV9.QF0Q3ZIB2GW5zNKyMSIe0HIFOITjEsZEioR-27Rtu7E
```9

| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id`                | string | Conditionally | The project ID or full project path. Required only for the project endpoint. |
| `package_name`      | string | yes | Name of a package. |
| `package_version`   | string | yes | Version of a package. |
| `package_username`  | string | yes | Conan username of a package. This attribute is the `+`-separated full path of your project. |
| `package_channel`   | string | yes | Channel of a package. |
| `recipe_revision`   | string | yes | Revision of the recipe. GitLab does not yet support Conan revisions, so the default value of `0` is always used. |
| `file_name`         | string | yes | The name and file extension of the requested file. |

```plaintext
GET /packages/conan/v1/ping
GET /projects/:id/packages/conan/v1/ping
```0

You can also write the output to a file by using:

```plaintext
GET /packages/conan/v1/ping
GET /projects/:id/packages/conan/v1/ping
```1

This example writes to `conanfile.py` in the current directory.

## Upload a recipe file

Uploads a specified recipe file in the package registry. You must use the upload URL returned from the
[recipe upload URLs](#list-all-recipe-upload-urls) endpoint.

```plaintext
GET /packages/conan/v1/ping
GET /projects/:id/packages/conan/v1/ping
```2

| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id`                | string | Conditionally | The project ID or full project path. Required only for the project endpoint. |
| `package_name`      | string | yes | Name of a package. |
| `package_version`   | string | yes | Version of a package. |
| `package_username`  | string | yes | Conan username of a package. This attribute is the `+`-separated full path of your project. |
| `package_channel`   | string | yes | Channel of a package. |
| `recipe_revision`   | string | yes | Revision of the recipe. GitLab does not yet support Conan revisions, so the default value of `0` is always used. |
| `file_name`         | string | yes | The name and file extension of the requested file. |

Provide the file context in the request body:

```plaintext
GET /packages/conan/v1/ping
GET /projects/:id/packages/conan/v1/ping
```3

## Get a package file

Gets a package file from the package registry. You must use the download URL returned from the
[package download URLs](#list-all-package-download-urls) endpoint.

```plaintext
GET /packages/conan/v1/ping
GET /projects/:id/packages/conan/v1/ping
```4

| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id`                | string | Conditionally | The project ID or full project path. Required only for the project endpoint. |
| `package_name`      | string | yes | Name of a package. |
| `package_version`   | string | yes | Version of a package. |
| `package_username`  | string | yes | Conan username of a package. This attribute is the `+`-separated full path of your project. |
| `package_channel`   | string | yes | Channel of a package. |
| `recipe_revision`   | string | yes | Revision of the recipe. GitLab does not yet support Conan revisions, so the default value of `0` is always used. |
| `conan_package_reference` | string | yes | Reference hash of a Conan package. Conan generates this value. |
| `package_revision`  | string | yes | Revision of the package. GitLab does not yet support Conan revisions, so the default value of `0` is always used. |
| `file_name`         | string | yes | The name and file extension of the requested file. |

```plaintext
GET /packages/conan/v1/ping
GET /projects/:id/packages/conan/v1/ping
```5

You can also write the output to a file by using:

```plaintext
GET /packages/conan/v1/ping
GET /projects/:id/packages/conan/v1/ping
```6

This example writes to `conaninfo.txt` in the current directory.

## Upload a package file

Uploads a specified package file in the package registry. You must use the upload URL returned from the
[package upload URLs](#list-all-package-upload-urls) endpoint.

```plaintext
GET /packages/conan/v1/ping
GET /projects/:id/packages/conan/v1/ping
```7

| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id`                | string | Conditionally | The project ID or full project path. Required only for the project endpoint. |
| `package_name`      | string | yes | Name of a package. |
| `package_version`   | string | yes | Version of a package. |
| `package_username`  | string | yes | Conan username of a package. This attribute is the `+`-separated full path of your project. |
| `package_channel`   | string | yes | Channel of a package. |
| `recipe_revision`   | string | yes | Revision of the recipe. GitLab does not yet support Conan revisions, so the default value of `0` is always used. |
| `conan_package_reference` | string | yes | Reference hash of a Conan package. Conan generates this value. |
| `package_revision`  | string | yes | Revision of the package. GitLab does not yet support Conan revisions, so the default value of `0` is always used. |
| `file_name`         | string | yes | The name and file extension of the requested file. |

Provide the file context in the request body:

```plaintext
GET /packages/conan/v1/ping
GET /projects/:id/packages/conan/v1/ping
```8

## Delete a recipe and package

Deletes a specified Conan recipe and the associated package files from the package registry.

```plaintext
GET /packages/conan/v1/ping
GET /projects/:id/packages/conan/v1/ping
```9

| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id`                | string | Conditionally | The project ID or full project path. Required only for the project endpoint. |
| `package_name`      | string | yes | Name of a package. |
| `package_version`   | string | yes | Version of a package. |
| `package_username`  | string | yes | Conan username of a package. This attribute is the `+`-separated full path of your project. |
| `package_channel`   | string | yes | Channel of a package. |

```shell
curl --url "https://gitlab.example.com/api/v4/packages/conan/v1/ping"
```0

Example response:

```shell
curl --url "https://gitlab.example.com/api/v4/packages/conan/v1/ping"
```1

## Get package references metadata

Gets the metadata for all package references of a package.

```shell
curl --url "https://gitlab.example.com/api/v4/packages/conan/v1/ping"
```2

| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `id`                | string | Conditionally | The project ID or full project path. Required only for the project endpoint. |
| `package_name`      | string | yes | Name of a package. |
| `package_version`   | string | yes | Version of a package. |
| `package_username`  | string | yes | Conan username of a package. This attribute is the `+`-separated full path of your project. |
| `package_channel`   | string | yes | Channel of a package. |

```shell
curl --url "https://gitlab.example.com/api/v4/packages/conan/v1/ping"
```3

Example response:

```shell
curl --url "https://gitlab.example.com/api/v4/packages/conan/v1/ping"
```4

The response includes the following metadata for each package reference:

- `settings`: The build settings used for the package.
- `options`: The package options.
- `requires`: The dependencies required for the package.
- `recipe_hash`: The hash of the recipe.