subpage-bg

Documentation de l'API REST

Toutes les fonctionnalités disponibles via la page web et l'interface utilisateur peuvent également être utilisées via l'API REST.
La documentation complète en swagger est disponible ici

Authentification

Pour exécuter un appel, il faut d'abord récupérer le jeton :

POST https://api.wachete.com/thirdparty/v1/user/apilogin Content-type: application/json { "userId": "54c84df2-4432.....Get_from_profile", "apiKey": "fe69a46a82d542a7a....Get_from_profile" } response: { "token": "QSQ26DJM2HPAD4NP4MSAVZGH5FUJGNYZY498XDP9AFLDT95PZJQFKVVFZ35FU3BVU..." }

Créer un nouveau wachet ou mettre à jour un wachet existant

Wachet simple

PUT https://api.wachete.com/thirdparty/v1/task Content-type: application/json Authorization:bearer QWQQQQUW3... { "id": "do_not_specify_if_creating_but_only_when_updating_existing_wachet" "name": "My First Wachet", "url": "http://www.mypage.com", "xPath": "/", "jobType": "SinglePage", # OPTIONAL - Default SinglePage "alerts": [{ "type": "Error" }, { type: "NotEq" }], "recurrenceInSeconds": 86400, "notificationEndpoints": [{ # OPTIONAL - Default all endpoints "type": "Webhook", "value": "https://..." }, { "type": "Email", "value": "email@gmail.com" } ] }

Portail wachet

PUT https://api.wachete.com/thirdparty/v1/task Content-type: application/json Authorization:bearer QWQQQQUW3... { "id": "do_not_specify_if_creating_but_only_when_changing_existing_wachet" "name": "My First Wachet", "url": "http://www.mypage.com", "xPath": "/", "jobType": "Portal", "crawlingDepth": 2, # OPTIONAL - Default is 2 "urlFilter": { # OPTIONAL - Default no filters "include": [{ "filter" : "http://products/catalog/", "type" : "Contains" }], "exclude": [{ "filter" : "cars[0-9]+", "type" : "Regex" }] } "alerts": [{ "type": "Error" }, { type: "NotEq" }], "recurrenceInSeconds": 86400, "notificationEndpoints": [{ # OPTIONAL - Default all endpoints "type": "Webhook", "value": "https://..." }, { "type": "Email", "value": "email@gmail.com" } ] }

jobType - use 'SinglePage' or 'Portal' for crawling
notificationEndpoints - Leave empty to receive notification to all emails by default
proxies - For monitoring from location using proxy use - [{"location": "location"}] - location can be us,gb
dynamicContent - in case your page content which you monitor is rendered with javascript specify - true
crawlingDepth - If you chose jobType 'Portal', automatic crawling, you can specify how deep to crawl. Possible values - 1,2,3
urlFilter - Used for Portal wachet to filter URLs either by simple contains string or by regular expression

Obtenir des informations et des paramètres de base sur le wachet

GET https://api.wachete.com/thirdparty/v1/task/{taskId} Content-type: application/json Authorization:bearer QWQQQQUW3...

taskId spécifier l'ID de la tâche

Recevoir des notifications

GET https://api.wachete.com/thirdparty/v1/notification/list Content-type : application/json Authorization:bearer QWQQQUW3...

taskId: permet de n'afficher que les notifications provenant d'une seule alerte avec l'ID correspondant. Si ce paramètre n'est pas spécifié, toutes les notifications sont affichées. (paramètre de requête)
from: permet de spécifier (facultatif) l'heure de début des notifications au format ISO (paramètre de requête)
to: permet de spécifier (facultatif) l'heure de fin des notifications au format ISO (paramètre de requête)

Obtenir les valeurs de contenu de wachet

GET https://api.wachete.com/thirdparty/v1/data/list/{ID_OF_YOUR_WACHET} Content-type: application/json Authorization:bearer QWQQQQUW3...

returnDiff - le spécifier à vrai si vous voulez, au lieu de simples valeurs, obtenir les différences de google (paramètre de la requête)
continuationToken - pour obtenir le prochain lot de données (paramètre de requête)
de - vous pouvez, si vous le souhaitez, indiquer l'heure de départ au format ISO pour les notifications (paramètre de requête)
à - vous pouvez, si vous le souhaitez, indiquer l'heure de réception des notifications au format ISO (paramètre de requête)

Supprimer wachet

DELETE https://api.wachete.com/thirdparty/v1/task/{ID_OF_YOUR_WACHET} Content-type: application/json Authorization:bearer QWQQQQUW3...

Obtenir le contenu d'un dossier

GET https://api.wachete.com/thirdparty/v1/folder/list Content-type : application/json Authorization:bearer QWQQQUW3...

parentId Spécifie la liste du contenu du dossier avec l'ID spécifique. Si elle n'est pas spécifiée, la racine est listée. (paramètre de la requête)