GitScrum / Docs

Workspaces

Listez et récupérez les workspaces. Obtenez les détails, statistiques et configuration du workspace.

REST API — Tous les endpoints nécessitent une authentification par Bearer token. Incluez Authorization: Bearer {token} dans chaque requête. Les tokens sont gérés dans Paramètres GitScrum → API. Base URL: https://services.gitscrum.com — Tous les chemins de requête dans cette documentation sont relatifs à cette URL de base.

Les workspaces sont le conteneur de premier niveau dans GitScrum. Chaque projet, membre et ressource appartient à un workspace.

Lister les workspaces

GET /companies

Retourne tous les workspaces auxquels l'utilisateur authentifié appartient.

curl -X GET https://services.gitscrum.com/companies \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json"

Réponse 200 OK

{
  "data": [
    {
      "slug": "acme-corp",
      "name": "Acme Corp",
      "logo": "https://cdn.gitscrum.com/logos/acme.png",
      "header_logo": "https://cdn.gitscrum.com/logos/acme-header.png",
      "header_color": "#1a1a2e",
      "favicon": "https://cdn.gitscrum.com/favicons/acme.ico",
      "owner": {
        "name": "Jane Smith",
        "username": "janesmith"
      },
      "settings": {
        "timezone": "America/New_York",
        "language": "en"
      }
    }
  ]
}

Obtenir un workspace

GET /companies/{slug}

Retourne les détails complets du workspace.

Paramètres de chemin

ParamètreTypeRequisDescription
slugstringOuiIdentifiant du workspace
curl -X GET https://services.gitscrum.com/companies/acme-corp \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json"

Réponse 200 OK

{
  "data": {
    "slug": "acme-corp",
    "name": "Acme Corp",
    "logo": "https://cdn.gitscrum.com/logos/acme.png",
    "header_logo": "https://cdn.gitscrum.com/logos/acme-header.png",
    "header_color": "#1a1a2e",
    "favicon": "https://cdn.gitscrum.com/favicons/acme.ico",
    "owner": {
      "name": "Jane Smith",
      "username": "janesmith"
    },
    "settings": {
      "timezone": "America/New_York",
      "language": "en"
    }
  }
}

Créer un workspace

POST /companies

Crée un nouveau workspace.

Corps de la requête

ChampTypeRequisDescription
namestringOuiNom du workspace
curl -X POST https://services.gitscrum.com/companies \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "New Workspace"
  }'

Mettre à jour un workspace

PUT /companies/{slug}

Met à jour les paramètres du workspace.

Paramètres de chemin

ParamètreTypeRequisDescription
slugstringOuiIdentifiant du workspace

Corps de la requête

ChampTypeRequisDescription
namestringNonNom du workspace
curl -X PUT https://services.gitscrum.com/companies/acme-corp \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corporation"
  }'

Supprimer un workspace

DELETE /companies/{slug}

Supprime définitivement un workspace et toutes ses données. Cette action est irréversible.

Paramètres de chemin

ParamètreTypeRequisDescription
slugstringOuiIdentifiant du workspace
curl -X DELETE https://services.gitscrum.com/companies/acme-corp \
  -H "Authorization: Bearer {token}"

POST /companies/{slug}/logo

Téléverse ou remplace le logo du workspace.

Paramètres de chemin

ParamètreTypeRequisDescription
slugstringOuiIdentifiant du workspace

Corps de la requête (multipart/form-data)

ChampTypeRequisDescription
logofileOuiFichier image (PNG, JPG)

DELETE /companies/{slug}/logo

Supprime le logo du workspace.

Paramètres de chemin

ParamètreTypeRequisDescription
slugstringOuiIdentifiant du workspace

Statistiques du workspace

GET /companies/stats

Retourne les statistiques au niveau du workspace.

curl -X GET https://services.gitscrum.com/companies/stats \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json"

Réponse 200 OK

{
  "data": {
    "projects_count": 12,
    "members_count": 28,
    "tasks_count": 847,
    "completed_tasks_count": 623,
    "active_sprints_count": 3
  }
}

Mon rôle

GET /companies/{slug}/my-role

Retourne le rôle de l'utilisateur authentifié dans le workspace.

Paramètres de chemin

ParamètreTypeRequisDescription
slugstringOuiIdentifiant du workspace
curl -X GET https://services.gitscrum.com/companies/acme-corp/my-role \
  -H "Authorization: Bearer {token}"

Référence des champs

ChampTypeDescription
slugstringIdentifiant unique du workspace
namestringNom d'affichage du workspace
logostringURL de l'image du logo
header_logostringURL du logo d'en-tête
header_colorstringCouleur d'arrière-plan de l'en-tête (hex)
faviconstringURL du favicon
ownerobjectPropriétaire du workspace (name, username)
settingsobjectConfiguration du workspace (timezone, language)
statsobjectStatistiques agrégées (sur demande)