Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

Latest commit

 

History

History
104 lines (61 loc) · 4.42 KB

HooksApi.md

File metadata and controls

104 lines (61 loc) · 4.42 KB

\HooksApi

All URIs are relative to https://api.meltwater.com

Method HTTP request Description
CreateHook Post /v2/hooks Creates a hook for one of your predefined searches.
DeleteHook Delete /v2/hooks/{hook_id} Delete an existing hook.
GetAllHooks Get /v2/hooks List all hooks.

CreateHook

Hook CreateHook($userKey, $authorization, $v2Hooks, $xHookSecret)

Creates a hook for one of your predefined searches.

Creates a hook for one of your predefined searches. Delivers search results for the query referenced by the search_id to the target_url via HTTP POST. Note that a hook_id will be returned on successful creation, this id is needed to delete the hook. We are also returning the header: X-Hook-Secret, a shared secret used to sign the document body pushed to your target_url. Requires an OAuth access token.

Parameters

Name Type Description Notes
userKey string The `user_key` from developer.meltwater.com.
authorization string `Oauth Access Token` OAuth access token (RFC 6749). Must contain the access token type `Bearer` followed by an OAuth access token. #### Example: Bearer KKwmfHwxsEoeMDTMAfxOpO...
v2Hooks PostV2Hooks
xHookSecret string Shared secret for content signing/verification. The shared secret header is optional and can be provided by the user or will be set by the API. Must be between 16 and 64 characters. Obtain the shared secret from the response header `X-Hook-Secret`. #### Example: e2d264b524240b9572ebc2fc7eebd980 [optional]

Return type

Hook

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteHook

DeleteHook($userKey, $authorization, $hookId)

Delete an existing hook.

Delete an existing hook. Removes the hook and stops sending any search results to the target_url. Requires an OAuth access token.

Parameters

Name Type Description Notes
userKey string The `user_key` from developer.meltwater.com.
authorization string `Oauth Access Token` OAuth access token (RFC 6749). Must contain the access token type `Bearer` followed by an OAuth access token. #### Example: Bearer KKwmfHwxsEoeMDTMAfxOpO...
hookId string Hook ID received from creating a hook

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetAllHooks

HooksCollection GetAllHooks($userKey, $authorization)

List all hooks.

List all hooks. Delivers all previously generated hooks. Requires an OAuth access token.

Parameters

Name Type Description Notes
userKey string The `user_key` from developer.meltwater.com.
authorization string `Oauth Access Token` OAuth access token (RFC 6749). Must contain the access token type `Bearer` followed by an OAuth access token. #### Example: Bearer KKwmfHwxsEoeMDTMAfxOpO...

Return type

HooksCollection

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]