> For the complete documentation index, see [llms.txt](https://documentation.efalia.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.efalia.com/documentations/efalia-process/vue-ensemble-api/sdks-bibliotheques.md).

# SDKs et Bibliothèques

Cette page recense les SDKs, clients et bibliothèques disponibles pour interagir avec Efalia Process depuis différents langages et plateformes.

***

## API REST — Clients HTTP Standard

L'API REST Efalia Process est une **API HTTP standard**. Elle peut être consommée depuis n'importe quel langage ou framework supportant les requêtes HTTP, sans SDK propriétaire.

### Clients Recommandés par Langage

{% tabs %}
{% tab title="Python" %}
**`requests`** — bibliothèque HTTP standard Python

```bash
pip install requests
```

```python
import requests
from requests.auth import HTTPBasicAuth

auth = HTTPBasicAuth("service_account", "mot_de_passe")
base_url = "https://process.example.com/workey/api"

# Lister les documents
response = requests.get(f"{base_url}/documents", auth=auth)
documents = response.json()

# Créer un document
payload = {
    "processName": "Validation_Facture",
    "documentType": "Facture",
    "state": "Saisie",
    "role": "Comptable",
    "fields": {
        "Montant": "1250.00",
        "Fournisseur": "Société ABC"
    }
}
response = requests.post(f"{base_url}/documents", json=payload, auth=auth)
doc_id = response.json()["id"]
```

{% endtab %}

{% tab title="JavaScript / Node.js" %}
**`axios`** ou **`fetch`** (natif navigateur/Node 18+)

```bash
npm install axios
```

```javascript
const axios = require('axios');

const client = axios.create({
    baseURL: 'https://process.example.com/workey/api',
    auth: { username: 'service_account', password: 'mot_de_passe' }
});

// Récupérer un document
async function getDocument(id) {
    const response = await client.get(`/documents/${id}`);
    return response.data;
}

// Déclencher une opération
async function triggerOperation(docId, operation) {
    await client.post(`/documents/${docId}/operations/${operation}`);
}
```

{% endtab %}

{% tab title="Java" %}
**`OkHttp`** ou **`HttpClient`** (Java 11+)

```java
// Java 11+ HttpClient
HttpClient client = HttpClient.newHttpClient();

String credentials = Base64.getEncoder()
    .encodeToString("login:password".getBytes());

HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://process.example.com/workey/api/documents"))
    .header("Authorization", "Basic " + credentials)
    .header("Accept", "application/json")
    .GET()
    .build();

HttpResponse<String> response = client.send(
    request, HttpResponse.BodyHandlers.ofString()
);
String json = response.body();
```

{% endtab %}

{% tab title="PHP" %}
**`Guzzle`** — client HTTP PHP

```bash
composer require guzzlehttp/guzzle
```

```php
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://process.example.com/workey/api/',
    'auth' => ['service_account', 'mot_de_passe'],
    'headers' => ['Accept' => 'application/json']
]);

// Lister les documents
$response = $client->get('documents');
$documents = json_decode($response->getBody(), true);

// Créer un document
$response = $client->post('documents', [
    'json' => [
        'processName' => 'Validation_Facture',
        'documentType' => 'Facture',
        'state' => 'Saisie',
        'role' => 'Comptable',
        'fields' => ['Montant' => '1250.00']
    ]
]);
```

{% endtab %}

{% tab title="cURL" %}
**`curl`** — outil en ligne de commande

```bash
# GET — Lister les documents
curl -u login:password \
  https://process.example.com/workey/api/documents

# POST — Créer un document
curl -X POST \
  -u login:password \
  -H "Content-Type: application/json" \
  -d '{"processName":"Validation_Facture","documentType":"Facture","state":"Saisie","role":"Comptable","fields":{"Montant":"1250.00"}}' \
  https://process.example.com/workey/api/documents

# Uploader une pièce jointe
curl -X POST \
  -u login:password \
  -F "file=@facture.pdf" \
  -F "fieldName=PJ_Facture" \
  https://process.example.com/workey/api/documents/uuid/attachments
```

{% endtab %}
{% endtabs %}

***

## Bibliothèque WKYJS (côté client)

WKYJS est la bibliothèque JavaScript **embarquée dans Efalia Process**. Elle est automatiquement disponible dans les composants Script JS des formulaires — aucune installation requise.

Pour la référence complète : [Référence WKYJS](/documentations/efalia-process/vue-ensemble-api/reference-wkyjs.md)

***

## Spécification OpenAPI

L'API Efalia Process expose une spécification **OpenAPI 3.0** (Swagger) accessible à :

```
https://<votre-serveur>/workey/api-docs
```

Cette spécification peut être importée dans :

* **Postman** pour créer une collection de tests
* **Insomnia** pour l'exploration de l'API
* Des générateurs de clients SDK (openapi-generator) pour créer automatiquement un client dans votre langage

```bash
# Générer un client Python depuis la spec OpenAPI
openapi-generator generate \
  -i https://process.example.com/workey/api-docs \
  -g python \
  -o ./efalia-process-client
```

***

## Intégration avec des Outils No-Code / Low-Code

### Zapier / Make (Integromat)

Ces outils peuvent interagir avec l'API REST Efalia Process via leur module **HTTP/Webhook générique** :

1. Configurez un module HTTP POST avec les credentials Basic Auth
2. Définissez le payload JSON selon la [documentation API](/documentations/efalia-process/vue-ensemble-api/documentation-api-rest.md)
3. Utilisez les webhooks Efalia Process comme déclencheurs

### Power Automate (Microsoft)

Microsoft Power Automate supporte les connecteurs HTTP personnalisés. Créez un connecteur pointant vers l'API Efalia Process pour l'utiliser dans vos flux.

***

Pour aller plus loin :

* [Documentation API REST](/documentations/efalia-process/vue-ensemble-api/documentation-api-rest.md)
* [Webhooks et Événements](/documentations/efalia-process/vue-ensemble-api/webhooks-evenements.md)
* [Vue d'Ensemble API](/documentations/efalia-process/vue-ensemble-api.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://documentation.efalia.com/documentations/efalia-process/vue-ensemble-api/sdks-bibliotheques.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
