Use this API to interact with the Composer package manager client.
This API is used by the Composer package manager client and is generally not meant for manual consumption.
These endpoints do not adhere to the standard API authentication methods. See the Composer package registry documentation for details on which headers and token types are supported. Undocumented authentication methods might be removed in the future.
List all packages for a group
GET /api/v4/group/{id}/-/packages/composer/p/{sha}
Lists all repository packages for a specified group. Composer V2 is recommended over V1.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
shaPath, | String | Provider SHA from the repository URL templates response Example: 673594f85a55fe3c0eb4 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | — |
400 | Bad Request | — |
401 | Unauthorized | — |
404 | Not Found | — |
Composer v2 packages p2 endpoint for a group’s package versions metadata
GET /api/v4/group/{id}/-/packages/composer/p2/{package_name}
Retrieves the list of versions and metadata for a specified package for a group. This feature was introduced in GitLab 13.1
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
package_Path, | String | The Composer package name Example: my- |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | — |
400 | Bad Request | — |
401 | Unauthorized | — |
404 | Not Found | — |
Retrieve repository URL templates
GET /api/v4/group/{id}/-/packages/composer/packages
Retrieves the repository URL templates for requesting individual packages for a group. Composer V1 and V2 both use this endpoint. If the User-Agent header contains Composer/2, the endpoint returns the V2 response, which contains only packages and the metadata-url template. Composer V2 is recommended over V1.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | — |
400 | Bad Request | — |
401 | Unauthorized | — |
404 | Not Found | — |
Composer packages endpoint for a group’s package versions metadata
GET /api/v4/group/{id}/-/packages/composer/{package_name}
Retrieves the list of versions and metadata for a specified package for a group. Composer V2 is recommended over V1. This feature was introduced in GitLab 12.1
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
package_Path, | String | The Composer package name,$ and the SHA digest of the package from the V1 packages list.$ as %24Example: my- |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | — |
400 | Bad Request | — |
401 | Unauthorized | — |
404 | Not Found | — |
Create a package
POST /api/v4/projects/{id}/packages/composer
Creates a Composer package from a specified Git tag or branch for a project.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
branch | String | Name of the branch to target for the package.tag,branch must be providedExample: release |
tag | String | Name of the tag to target for the package.tag,branch must be providedExample: v1. |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | — |
400 | Bad Request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not Found | — |
Composer package endpoint to download a package archive
GET /api/v4/projects/{id}/packages/composer/archives/{package_name}
Downloads a specified Composer package archive for a project. The V1 and V2 package metadata responses provide this URL. The request must include a .zip file extension. This feature was introduced in GitLab 13.1
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | ID or URL- |
shaQuery, | String | Target SHA of the requested package version Example: 673594f85a55fe3c0eb4 |
package_Path, | String | The Composer package name Example: my- |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | — |
400 | Bad Request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not Found | — |