Ajouter une clé Api
POST /settings/apikeys
Paramètres :
Nom | Description | Type | Obligatoire |
---|---|---|---|
description | Description de la clé API | String | Oui |
iPFilterEnabled | Restriction IP | Boolean | Non |
allowedIPs | Tableau d'IP | Array de String | Non |
Réponse :
Nom | Description | Type |
---|---|---|
id | Id de clé API | String |
hash | Login | String |
key | Mot de passe | String |
iPFilterEnabled | Si le filtre d'adresse IP est activé | Boolean |
allowedIPs | Tableau d'adresse IP | Array |
description | Description | String |
createdAt | Date au format timestamp | Int |
updatedAt | Date au format timestamp | Int |
enabled | Si la clé API est activée ou non | String |
Langage de programmation :
Exemple de requête :
1 2 3 4 | { "description" : "My first API key" } |
Exemple de réponse :
1 2 3 4 5 6 7 8 9 10 11 | { "id" : "5f6ze54f6ze54f6ze5f4ze74" , "hash" : "fe6z45f6ze5f4ez6f4ze6f54zef9c5d8" , "key" : "3fzefze987f9ze8f7ze65f4ze654fzeb0" , "iPFilterEnabled" : true , "allowedIPs" : [192.168.1.1], "description" : "Application" , "updatedAt" : 1438768285, "enabled" : true } |