unterseite-bg

REST-API-Dokumentation

Alle Funktionen, die über die Webseite und die Benutzeroberfläche verfügbar sind, können auch über die REST API genutzt werden.
Die vollständige Dokumentation in Swagger finden Sie hier

Authentifizierung

Um einen Aufruf auszuführen, müssen Sie zunächst das Token abrufen:

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

Neuen Monitor erstellen oder bestehenden aktualisieren

Einfacher Monitor

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 Monitor", "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-Monitor

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 Monitor", "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 monitor to filter URLs either by simple contains string or by regular expression

Grundlegende Informationen und Einstellungen zum Monitor abrufen

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

taskId: Monitor-ID angeben

Benachrichtigungen erhalten

GET https://api.wachete.com/thirdparty/v1/notification/list Inhaltstyp: application/json Autorisierung:Inhaber QWQQQQQUW3...

taskId: Gibt an, dass nur Benachrichtigungen von einem Monitor mit der angegebenen ID aufgelistet werden sollen. Wenn nichts angegeben wird, werden alle aufgelistet. (Abfrageparameter)
from – optionale Angabe des Startzeitpunkts für Benachrichtigungen im ISO-Format (Abfrageparameter)
to – optionale Angabe des Endzeitpunkts für Benachrichtigungen im ISO-Format (Abfrageparameter)

Inhaltswerte des Monitors abrufen

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

returnDiff - dies angeben zu wahr wenn Sie statt nur Werte zu erhalten google diff (Abfrage-Param) wollen
continuationToken - um den nächsten Datenstapel zu erhalten (Abfrage-Parameter)
von - optional die Startzeit für Benachrichtigungen im ISO-Format angeben (Abfrageparameter)
zu - optional die Uhrzeit für Benachrichtigungen im ISO-Format angeben (Abfrageparameter)

Monitor löschen

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

Inhalt eines Ordners abrufen

GET https://api.wachete.com/thirdparty/v1/folder/list Inhaltstyp: application/json Autorisierung:Überbringer QWQQQQUW3...

parentId Angeben, dass der Inhalt des Ordners mit einer bestimmten ID aufgelistet werden soll. Wenn nicht angegeben, wird das Stammverzeichnis aufgelistet. (Abfrage-Parameter)