Documentación de la API REST

Toda la funcionalidad que está disponible a través de la página web y la interfaz de usuario también se puede utilizar a través de REST API
La documentación completa en swagger se puede encontrar aquí

Autenticación

Para ejecutar cualquier llamada primero hay que recuperar el token:

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..." }

Cree un nuevo sitio wachet o actualice uno existente

Simple 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_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" } ] }

Portal 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

Obtén información y ajustes básicos de wachet

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

taskId especificar wachet ID

Recibir notificaciones

GET https://api.wachete.com/thirdparty/v1/notification/list Content-type: application/json Autorización:portador QWQQQQUW3...

taskId Especificar para listar notificaciones sólo de un wachet con ID. Si no se especifica, se listan todas. (parámetro de consulta)
from - especifique opcionalmente en formato ISO la hora FROM de las notificaciones (parámetro de consulta)
to - opcional especificar en formato ISO TO hora de las notificaciones (query param)

Obtener valores de contenido de wachet

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

returnDiff - especifique esto a verdadero si quieres en lugar de sólo valores para obtener google diff (parámetro de consulta)
continuationToken - para obtener el siguiente lote de datos (parámetro de consulta)
de - opcionalmente, especificar en formato ISO la hora FROM para las notificaciones (parámetro de consulta)
a - especificar opcionalmente en formato ISO la hora de llegada de las notificaciones (parámetro de consulta)

Eliminar wachet

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

Obtener el contenido de la carpeta

GET https://api.wachete.com/thirdparty/v1/carpeta/lista Content-type: application/json Autorización:portador QWQQQQUW3...

parentId Especificar para listar el contenido de la carpeta con un ID específico. Si no se especifica, se mostrará la raíz. (parámetro de consulta)