RetrieveWebhookEvents

 

WebhookService / RetrieveWebhookEvents

 

Description: Retrieve webhook events

URL: http://{your-server-url}/api/v1/webhooks/events

Method: GET

Token Required: True


Request Headers:
content-type: application/json or content-type: application/xml
token: {token}
Rights:

Type: Nexus.AppSpace.Service.Contract.Model.Enums.Rights.Rights

Right Require
Basic Yes

Request Query Parameters:
Parameter Type Nullable Description
resourcescope Contract.Model.Enums.Resource.Scope True resource scope, eg. resourcescope=contentfolders
resourceids int[] True resource ids, must paired with resorucescope, comma separated values, eg. resourceids=1,2,3
action Contract.Model.Enums.Webhook.ActionType True action type, eg. action=updated
page int True page number
rpp int True records per page, default = 50, max = 500
guids Guid[] True event guids, comma separated values, eg. guids=xxxx-xxxx-xxxx-xxxx,xxxx-xxxx-xxxx-xxxx
accids int[] True account ids, only portal admin and account admin can access other account else will return own account comma separated values, eg. accids=1,2,3
allaccounts boolean True include webhook events from all accessible accounts, eg. allaccounts=true

Example: http://{your-server-url}/api/v1/webhooks/events?resourceids=1,2,3&page=100&rpp=100


Response:

Type: Nexus.AppSpace.Service.Contract.Messages.AppSpaceIntegration.Webhook.WebhookResponse

Parameter Type
Response.Events Nexus.AppSpace.Service.Contract.Model.DTO.Webhook.Event.Event[]

Enums:
Field Name Values
ResourceScope Nexus.AppSpace.Service.Contract.Model.Enums.Resource.Scope Undefined = 0, Portal = 1, Account_Groups = 2, Accounts = 3, Networks = 4, Applications = 5, Players = 6, User_Groups = 7, Users = 8, Zones = 9, DataSources = 10, ContentSize = 11, Server = 12, Content = 13, Campaign = 14, Client = 15, Site = 16, Widget = 17, LayoutSchedule = 18, CampaignEntity = 19, ContentFolders = 20, Layouts = 21, MediaZone = 22, Player_Groups = 23, Space = 24
Action Nexus.AppSpace.Service.Contract.Model.Enums.Webhook.ActionType Undefined = 0, Created = 2, Updated = 4, Deleted = 8, All = 14

The following is an example response Xml body:
<WebhookResponse xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages.AppSpaceIntegration.Webhook" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <DebugMessage xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages">String</DebugMessage>
  <Errors xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages">
    <Error>
      <Code>String</Code>
      <Message>String</Message>
      <StackTrace>String</StackTrace>
    </Error>
  </Errors>
  <Status xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages">Success</Status>
  <Events xmlns:a="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO.Webhook.Event">
    <a:Event>
      <a:AccountId>123</a:AccountId>
      <a:Action>All</a:Action>
      <a:CreatedBy>123</a:CreatedBy>
      <a:CreatedDate>2015-06-04T11:10:01.7226488Z</a:CreatedDate>
      <a:Description>String</a:Description>
      <a:Guid>11111111-1111-1111-1111-111111111111</a:Guid>
      <a:Id>123</a:Id>
      <a:LastUpdated>2015-06-04T11:10:01.7226488Z</a:LastUpdated>
      <a:ResourceIds xmlns:b="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <b:int>123</b:int>
      </a:ResourceIds>
      <a:ResourceScope>Player_Groups</a:ResourceScope>
      <a:URL>String</a:URL>
    </a:Event>
  </Events>
</WebhookResponse>

The following is an example response Json body:
{
	"DebugMessage":"String",
	"Errors":[
		{
			"Code":"String",
			"Message":"String",
			"StackTrace":"String"
		}
	],
	"Status":1,
	"Events":[
		{
			"AccountId":123,
			"Action":14,
			"CreatedBy":123,
			"CreatedDate":"\/Date(1433416201722)\/",
			"Description":"String",
			"Guid":"11111111-1111-1111-1111-111111111111",
			"Id":123,
			"LastUpdated":"\/Date(1433416201722)\/",
			"ResourceIds":[
				123
			],
			"ResourceScope":23,
			"URL":"String"
		}
	]
}