On this page you will find the REST API documentation for Categories for Bitbucket.
Further links regarding the REST API browser:
Not all requests may be available on all versions of Categories for Bitbucket. The paths have been changed on version 1.3.0. Version - 1.2.1 /rest/projectCategories/latest/... |
Type: GET
Path: /rest/categories/latest/categories
Parameter:
Description: Search for categories.
{ "data":[], "query": String input query, "suggestions":[ { "id": int Id of the category, "title":String Title of the category }, ... ] } |
Type: GET
Path: /rest/categories/latest/project
Description: List all projects and their categories.
{ "message": String Error or hint message, "result":[ { "projectId": int Id of the project, "projectKey": String Key of the project, "projectName": String Name of the project, "categories":[ { "id":int Id of the category, "title": String Title of the category }, ... ] }, ... ] } |
Type: GET
Path: /rest/categories/latest/project/{projectKey}
Description: List all categories of a project.
{ "message": String Error or hint message, "result": { "projectId": int Id of the project, "projectKey": String Key of the project, "projectName": String Name of the project, "categories":[ { "id":int Id of the category, "title": String Title of the category }, ... ] } } |
Type: POST
Path: /rest/categories/latest/project/{projectKey}
Parameter:
Return: List all categories of the project.
Description: Set the categories of a project.
curl -u username:password -X POST -H "Content-Type: application/json" http://localhost:7990/rest/categories/latest/project/{projectKey}?categories={categorie1}&categories={categorie2} ... |
{ "message": String Error or hint message, "result": { "projectId": int Id of the project, "projectKey": String Key of the project, "projectName": String Name of the project, "categories":[ { "id":int Id of the category, "title": String Title of the category }, ... ] } } |
Type: GET
Path: /rest/categories/latest/repositories
Parameter:
Description: List all repositories of the project with the given key and their categories.
Categories are not returned
This endpoint is known to have performance issues on bigger systems.
{ "message": String Error or hint message, "result":[ { "repositoryId": int Id of the repository, "repositoryName": String Name of the repository, "repositorySlug": String Slug of the repository, "categories":[ { "id": int Id of the repository category, "title": String Title of the repository category }, ... ] }, ... ] } |
Type: GET
Path: /rest/categories/latest/project/{projectKey}/repository{repositorySlug}
Description: List all categories of a repository.
{ "message": String Error or hint message, "result": { "repositoryId": int Id of the repository, "repositoryName": String Name of the repository, "repositorySlug": String Slug of the repository, "categories":[ { "id": int Id of the repository category, "title": String Title of the repository category }, ... ] } } |
Type: POST
Path: /rest/categories/latest/project/{projectKey}/repository{repositorySlug}
Parameter:
Return: List all categories of the repository.
Description: Set the categories of a repository.
curl -u username:password -X POST -H "Content-Type: application/json" http://localhost:7990/rest/categories/latest/project/{projectKey}/repository/{repositorySlug}?categories={categorie1}&categories={categorie2} ... |
{ "message": String Error or hint message, "result": { "repositoryId": int Id of the repository, "repositoryName": String Name of the repository, "repositorySlug": String Slug of the repository, "categories":[ { "id": int Id of the repository category, "title": String Title of the repository category }, ... ] } } |
|