Description: Returns the status of a repository and whether it was assigned and/or shared to a project, to multiple projects, or to all projects.
Note
When you assign a resource to a project, the project owns and manages the resource. When you share a resource with a project, the project does not own the resource.
Since: 7.90.0
Security: Requires a user with 'Administer Platform' role.
Usage: GET ${baseUrl}/v1/projects/_/repositories/{repo_name}
Produces: application/json; charset=UTF-8
Header parameter: Authorization: Bearer
Parameters:
Name | Description |
---|---|
(path) | The repository name |
Sample Request:
curl -X GET "${baseUrl}/access/api/v1/projects/_/repositories/${repo_name}" -H "accept: application/json -H 'Authorization: Bearer <a valid access-token>"
Sample Response:
{ "resource_name": "repoName", "environments": ["DEV", "PROD"], "shared_with_projects": ["projectKey2", "projectKey3"], "shared_with_all_projects": false, "shared_read_only": false "assigned_to": "projectKey1", }
Success Response Codes:
200: Success (returns response).
Error Response Codes:
401 Unauthorized (user not authenticated).
404 Forbidden (user not authorized to access the resource).
404 Not found (respository does not exist).