Labels
Crie, atualize e gerencie labels do projeto. Anexe e remova labels de tarefas.
REST API — Todos os endpoints requerem autenticação via Bearer token. IncluaAuthorization: Bearer {token}em cada requisição. Os tokens são gerenciados em Configurações do GitScrum → API. Base URL:https://services.gitscrum.com— Todos os caminhos de requisição nesta documentação são relativos a esta URL base.
Labels ajudam a categorizar e filtrar tarefas entre projetos. Gerencie labels no nível do workspace e anexe-as a tarefas individuais.
Listar labels
GET /projects-labels?company_slug={slug}
Retorna todas as labels do workspace.
Parâmetros de query
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
company_slug | string | Sim | Identificador do workspace |
curl -X GET "https://services.gitscrum.com/projects-labels?company_slug=acme-corp" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json"Resposta 200 OK
{
"data": [
{
"id": 1,
"slug": "bug",
"title": "Bug",
"color": "EF4444"
},
{
"id": 2,
"slug": "feature",
"title": "Feature",
"color": "3B82F6"
},
{
"id": 3,
"slug": "urgent",
"title": "Urgent",
"color": "F59E0B"
}
]
}Criar label
POST /projects-labels?company_slug={slug}
Cria uma nova label no workspace.
Parâmetros de query
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
company_slug | string | Sim | Identificador do workspace |
Corpo da requisição
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
title | string | Sim | Nome da label |
color | string | Sim | Cor hex sem # (ex.: FF5733) |
curl -X POST "https://services.gitscrum.com/projects-labels?company_slug=acme-corp" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"title": "Design",
"color": "8B5CF6"
}'Resposta 201 Created
{
"data": {
"id": 4,
"slug": "design",
"title": "Design",
"color": "8B5CF6"
}
}Atualizar label
PUT /projects-labels/{slug}?company_slug={slug}
Atualiza uma label existente.
Parâmetros de caminho
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
slug | string | Sim | Identificador da label |
Parâmetros de query
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
company_slug | string | Sim | Identificador do workspace |
Corpo da requisição
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
title | string | Não | Novo nome da label |
color | string | Não | Nova cor hex sem # |
curl -X PUT "https://services.gitscrum.com/projects-labels/design?company_slug=acme-corp" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"title": "UI Design",
"color": "7C3AED"
}'Resposta 200 OK
{
"data": {
"id": 4,
"slug": "design",
"title": "UI Design",
"color": "7C3AED"
}
}Excluir label
DELETE /projects-labels/{slug}?company_slug={slug}
Exclui permanentemente uma label e a remove de todas as tarefas.
Parâmetros de caminho
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
slug | string | Sim | Identificador da label |
Parâmetros de query
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
company_slug | string | Sim | Identificador do workspace |
curl -X DELETE "https://services.gitscrum.com/projects-labels/design?company_slug=acme-corp" \
-H "Authorization: Bearer {token}"Anexar label
POST /projects-labels/{labelslug}/attach?companyslug={slug}&project_slug={slug}
Anexa uma label a uma tarefa. Sem efeito se já estiver anexada.
Parâmetros de caminho
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
label_slug | string | Sim | Identificador da label |
Parâmetros de query
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
company_slug | string | Sim | Identificador do workspace |
project_slug | string | Sim | Identificador do projeto |
Corpo da requisição
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
task_uuid | string | Sim | Identificador único da tarefa |
curl -X POST "https://services.gitscrum.com/projects-labels/feature/attach?company_slug=acme-corp&project_slug=web-platform" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"task_uuid": "task-uuid-abc123"
}'Remover label
DELETE /projects-labels/{labelslug}/detach?companyslug={slug}&project_slug={slug}
Remove uma label de uma tarefa. Sem efeito se não estiver anexada.
Parâmetros de caminho
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
label_slug | string | Sim | Identificador da label |
Parâmetros de query
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
company_slug | string | Sim | Identificador do workspace |
project_slug | string | Sim | Identificador do projeto |
Corpo da requisição
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
task_uuid | string | Sim | Identificador único da tarefa |
curl -X DELETE "https://services.gitscrum.com/projects-labels/feature/detach?company_slug=acme-corp&project_slug=web-platform" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"task_uuid": "task-uuid-abc123"
}'Referência de campos
| Campo | Tipo | Descrição |
|---|---|---|
id | integer | ID da label |
slug | string | Identificador da label amigável para URL |
title | string | Nome de exibição da label |
color | string | Código de cor hex sem # |