Stock.Ressource
En bref
8 opérations sur 4 chemins. Préfixe /v2. Authentification JWT (voir Démarrer).
Opérations
| Méthode | Chemin | Rôle |
|---|---|---|
GET |
/v2/ressource |
Lister les enregistrements |
POST |
/v2/ressource |
Créer l'enregistrement |
PUT |
/v2/ressource |
Mettre à jour l'enregistrement |
DELETE |
/v2/ressource |
Supprimer l'enregistrement |
GET |
/v2/ressource/count |
Compter les enregistrements |
POST |
/v2/ressource/count |
Compter les enregistrements |
POST |
/v2/ressource/recherche |
Rechercher des enregistrements |
POST |
/v2/ressource/save |
Créer ou mettre à jour l'enregistrement (upsert) |
Rôle déduit
La spécification ne porte ni summary ni description d'opération : la colonne Rôle est déduite mécaniquement de la méthode HTTP et du chemin.
Détail
GET /v2/ressource
Lister les enregistrements.
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
sort |
query | string |
non | - |
where |
query | string |
non | - |
Réponses
| Code | Description | Schéma de data |
|---|---|---|
200 |
OK | - |
401 |
Unauthorized | - |
403 |
Forbidden | - |
Exemple
curl -s -X GET "https://<votre-connecteur>/v2/ressource?sort=<sort>&where=<where>" \
-H "Authorization: Bearer <jeton>" \
-H "Accept: application/json"
POST /v2/ressource
Créer l'enregistrement.
Corps de la requête (application/json)
Schéma RessourceDto - 22 propriétés (détail : Schémas).
Écriture partielle : seules les propriétés présentes dans le corps sont écrites (voir Conventions).
Réponses
| Code | Description | Schéma de data |
|---|---|---|
200 |
OK | - |
401 |
Unauthorized | - |
403 |
Forbidden | - |
Exemple
curl -s -X POST "https://<votre-connecteur>/v2/ressource" \
-H "Authorization: Bearer <jeton>" \
-H "Content-Type: application/json" \
-d '{"code": "…", "type": 0, "typeRessource": 0}'
PUT /v2/ressource
Mettre à jour l'enregistrement.
Corps de la requête (application/json)
Schéma RessourceDto - 22 propriétés (détail : Schémas).
Écriture partielle : seules les propriétés présentes dans le corps sont écrites (voir Conventions).
Réponses
| Code | Description | Schéma de data |
|---|---|---|
200 |
OK | - |
401 |
Unauthorized | - |
403 |
Forbidden | - |
Exemple
curl -s -X PUT "https://<votre-connecteur>/v2/ressource" \
-H "Authorization: Bearer <jeton>" \
-H "Content-Type: application/json" \
-d '{"code": "…", "type": 0, "typeRessource": 0}'
DELETE /v2/ressource
Supprimer l'enregistrement.
Corps de la requête (application/json)
Schéma RessourceDto - 22 propriétés (détail : Schémas).
Écriture partielle : seules les propriétés présentes dans le corps sont écrites (voir Conventions).
Réponses
| Code | Description | Schéma de data |
|---|---|---|
200 |
OK | - |
401 |
Unauthorized | - |
403 |
Forbidden | - |
Exemple
curl -s -X DELETE "https://<votre-connecteur>/v2/ressource" \
-H "Authorization: Bearer <jeton>" \
-H "Content-Type: application/json" \
-d '{"code": "…", "type": 0, "typeRessource": 0}'
GET /v2/ressource/count
Compter les enregistrements.
Paramètres
| Nom | Emplacement | Type | Obligatoire | Description |
|---|---|---|---|---|
where |
query | string |
non | - |
Réponses
| Code | Description | Schéma de data |
|---|---|---|
200 |
OK | - |
401 |
Unauthorized | - |
403 |
Forbidden | - |
Exemple
curl -s -X GET "https://<votre-connecteur>/v2/ressource/count?where=<where>" \
-H "Authorization: Bearer <jeton>" \
-H "Accept: application/json"
POST /v2/ressource/count
Compter les enregistrements.
Réponses
| Code | Description | Schéma de data |
|---|---|---|
200 |
OK | - |
401 |
Unauthorized | - |
403 |
Forbidden | - |
Exemple
curl -s -X POST "https://<votre-connecteur>/v2/ressource/count" \
-H "Authorization: Bearer <jeton>" \
-H "Accept: application/json"
POST /v2/ressource/recherche
Rechercher des enregistrements.
Réponses
| Code | Description | Schéma de data |
|---|---|---|
200 |
OK | - |
401 |
Unauthorized | - |
403 |
Forbidden | - |
Exemple
curl -s -X POST "https://<votre-connecteur>/v2/ressource/recherche" \
-H "Authorization: Bearer <jeton>" \
-H "Accept: application/json"
POST /v2/ressource/save
Créer ou mettre à jour l'enregistrement (upsert).
Corps de la requête (application/json)
Schéma RessourceDto - 22 propriétés (détail : Schémas).
Écriture partielle : seules les propriétés présentes dans le corps sont écrites (voir Conventions).
Réponses
| Code | Description | Schéma de data |
|---|---|---|
200 |
OK | - |
401 |
Unauthorized | - |
403 |
Forbidden | - |
Exemple
curl -s -X POST "https://<votre-connecteur>/v2/ressource/save" \
-H "Authorization: Bearer <jeton>" \
-H "Content-Type: application/json" \
-d '{"code": "…", "type": 0, "typeRessource": 0}'
Schémas
Schémas résolus à un niveau : les propriétés qui référencent un autre schéma sont citées par leur nom, sans être dépliées.
RessourceDto
RessourceDto - 22 propriétés
| Propriété | Type | Notes |
|---|---|---|
code |
string |
nullable, Code de la ressource (clé). |
type |
integer (int32) |
Type de ressource (RessourceProdType : Machine=0, Homme=1, Outil=2, Central=3). |
typeRessource |
integer (int32) |
Type d'entité (RessourceType : Ressource=0, CentreCharge=1). Lecture (fixé par la factory). |
intitule |
string |
nullable, Intitulé. |
complement |
string |
nullable, Complément d'intitulé. |
commentaire |
string |
nullable, Commentaire. |
sommeil |
boolean |
Mise en sommeil. |
coutStandard |
number (double) |
Coût standard horaire. |
capacite |
integer (int32) |
Capacité. |
codeExterne |
string |
nullable, Code externe. |
adresse |
string |
nullable, Adresse (sous-objet Adresse). |
complementAdresse |
string |
nullable, Complément d'adresse (sous-objet Adresse). |
codePostal |
string |
nullable, Code postal (sous-objet Adresse). |
ville |
string |
nullable, Ville (sous-objet Adresse). |
region |
string |
nullable, Région (sous-objet Adresse). |
pays |
string |
nullable, Pays (sous-objet Adresse). |
telephone |
string |
nullable, Téléphone (sous-objet Telecom). |
portable |
string |
nullable, Portable (sous-objet Telecom). |
email |
string |
nullable, Email (sous-objet Telecom). |
facebook |
string |
nullable, Compte Facebook. |
linkedIn |
string |
nullable, Compte LinkedIn. |
skype |
string |
nullable, Compte Skype. |