Gurren API

Gurren API

Intégrez Gurren dans vos applications avec l'API REST publique.

Gurren API

L'API publique Gurren vous permet de déclencher et monitorer vos automations navigateur depuis n'importe quelle application.

Base URL

https://api.gurren.leandre.io/api/v1

Quickstart

1. Obtenir une clé API

Connectez-vous au dashboard Gurren, puis allez dans Settings > API Keys et créez une nouvelle clé avec les scopes souhaités.

Ou via l'API interne :

# Login
curl -X POST https://api.gurren.leandre.io/auth/login \
  -H "Content-Type: application/json" \
  -d '{ "email": "vous@example.com", "password": "votre-mot-de-passe" }'
 
# Créer une clé API
curl -X POST https://api.gurren.leandre.io/api-keys \
  -H "Authorization: Bearer <jwt_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Mon app",
    "scopes": ["automation:read", "automation:execute"]
  }'

Conservez la clé retournée (gfac_...), elle ne sera plus affichée.

2. Lister vos automations

curl https://api.gurren.leandre.io/api/v1/automations \
  -H "x-api-key: gfac_votre_cle_api"

3. Déclencher une automation

curl -X POST https://api.gurren.leandre.io/api/v1/automations/AUTOMATION_ID/trigger \
  -H "x-api-key: gfac_votre_cle_api" \
  -H "Content-Type: application/json" \
  -d '{
    "values": {
      "0": "email@example.com",
      "1": "MonMotDePasse"
    }
  }'

Réponse :

{
  "success": true,
  "executionId": "665a1b2c3d4e5f6a7b8c9d0e",
  "statusUrl": "/api/v1/executions/665a1b2c3d4e5f6a7b8c9d0e"
}

L'automation s'exécute en arrière-plan. Utilisez l'executionId pour suivre le résultat.

Sections

On this page