REST API for Categories for Bitbucket (v 1.4)
On this page you will find the REST API documentation for Categories for Bitbucket. 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 Parameter: Description: Search for categories. SINCE VERSION 1.3.0 Type: GET Description: List all projects and their categories. Type: GET Description: List all categories of a project. Type: POST Parameter: Return: List all categories of the project. Description: Set the categories of a project. Type: GET Parameter: Description: List all repositories of the project with the given key and their categories. BROKEN Categories are not returned DEPRECATED This endpoint is known to have performance issues on bigger systems. Type: GET Description: List all categories of a repository. Type: POST Return: List all categories of the repository. Description: Set the categories of a repository.Information
Further links regarding the REST API browser:
Version 1.3.0+ /rest/categories/latest/...Categories
Path: /rest/categories/latest/categories{
"data":[],
"query": String input query,
"suggestions":[
{
"id": int Id of the category,
"title":String Title of the category
},
...
]
}
Projects
All projects
Path: /rest/categories/latest/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
},
...
]
},
...
]
}
Categories
Path: /rest/categories/latest/project/{projectKey}{
"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
},
...
]
}
}
Path: /rest/categories/latest/project/{projectKey}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
},
...
]
}
}
Repositories
All repositories
Path: /rest/categories/latest/repositories{
"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
},
...
]
},
...
]
}
Repository Categories
Path: /rest/categories/latest/project/{projectKey}/repository{repositorySlug}{
"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
},
...
]
}
}
Path: /rest/categories/latest/project/{projectKey}/repository{repositorySlug}
Parameter: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
},
...
]
}
}