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

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of a group
sha
Path, required
StringShasum of current json
Example: 673594f85a55fe3c0eb45df7bd2fa9d95a1601ab

Responses

CodeDescriptionSchema
200OK—
400Bad Request—
401Unauthorized—
404Not Found—

Composer v2 packages p2 endpoint for a group’s package versions metadata

GET /api/v4/group/{id}/-/packages/composer/p2/{package_name}

This feature was introduced in GitLab 13.1

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of a group
package_name
Path, required
StringThe Composer package name
Example: my-composer-package

Responses

CodeDescriptionSchema
200OK—
400Bad Request—
401Unauthorized—
404Not 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.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of a group

Responses

CodeDescriptionSchema
200OK—
400Bad Request—
401Unauthorized—
404Not Found—

Composer packages endpoint for a group’s package versions metadata

GET /api/v4/group/{id}/-/packages/composer/{package_name}

This feature was introduced in GitLab 12.1

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of a group
package_name
Path, required
StringThe Composer package name
Example: my-composer-package

Responses

CodeDescriptionSchema
200OK—
400Bad Request—
401Unauthorized—
404Not 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

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of a project

Request body (application/json)

PropertyTypeDescription
branchStringThe name of the branch
Example: release
tagStringThe name of the tag
Example: v1.0.0

Responses

CodeDescriptionSchema
201Created—
400Bad Request—
401Unauthorized—
403Forbidden—
404Not Found—

Composer package endpoint to download a package archive

GET /api/v4/projects/{id}/packages/composer/archives/{package_name}

This feature was introduced in GitLab 13.1

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of a project
sha
Query, required
StringShasum of current json
Example: 673594f85a55fe3c0eb45df7bd2fa9d95a1601ab
package_name
Path, required
StringThe Composer package name
Example: my-composer-package

Responses

CodeDescriptionSchema
200OK—
400Bad Request—
401Unauthorized—
403Forbidden—
404Not Found—