UpdateTargetedResources

 

NotificationService / UpdateTargetedResources

 

Description: Update notification targeted resources

URL: http://{your-server-url}/api/v1/core/notifications/targetedresources

Method: PUT

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 Comment
Account_Management Optional User who does not have Account_Management right only able to modify own notifications

Request:

Type: Nexus.AppSpace.Service.Contract.Messages.AppSpaceIntegration.v1.Notification.NotificationRequest

Parameter Type Nullable
Request.TargetedResources Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.v1.Notifications.TargetedResource[] False

Response:

Type: Nexus.AppSpace.Service.Contract.Messages.AppSpaceIntegration.v1.Notification.NotificationResponse

Parameter Type
Response.TargetedResources Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.v1.Notifications.TargetedResource[]

Enums:
Field Name Values
ResourceType 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

The following is an example request Xml body:
<NotificationRequest xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages.AppSpaceIntegration.v1.Notification" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <TargetedResources xmlns:a="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.v1.Notifications">
    <a:TargetedResource>
      <a:Id>123</a:Id>
      <a:NotificationId>123</a:NotificationId>
      <a:ResourceId>123</a:ResourceId>
      <a:ResourceType>Player_Groups</a:ResourceType>
      <a:RoleId>123</a:RoleId>
    </a:TargetedResource>
  </TargetedResources>
</NotificationRequest>

The following is an example request Json body:
{
	"TargetedResources":[
		{
			"Id":123,
			"NotificationId":123,
			"ResourceId":123,
			"ResourceType":23,
			"RoleId":123
		}
	]
}

The following is an example response Xml body:
<NotificationResponse xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages.AppSpaceIntegration.v1.Notification" 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>
  <TargetedResources xmlns:a="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.v1.Notifications">
    <a:TargetedResource>
      <a:CreatedDateTime>2014-04-24T17:53:43.0841218Z</a:CreatedDateTime>
      <a:Id>123</a:Id>
      <a:NotificationId>123</a:NotificationId>
      <a:ResourceId>123</a:ResourceId>
      <a:ResourceType>Player_Groups</a:ResourceType>
      <a:RoleId>123</a:RoleId>
    </a:TargetedResource>
  </TargetedResources>
</NotificationResponse>

The following is an example response Json body:
{
	"DebugMessage":"String",
	"Errors":[
		{
			"Code":"String",
			"Message":"String",
			"StackTrace":"String"
		}
	],
	"Status":1,
	"TargetedResources":[
		{
			"CreatedDateTime":"\/Date(1398362023084)\/",
			"Id":123,
			"NotificationId":123,
			"ResourceId":123,
			"ResourceType":23,
			"RoleId":123
		}
	]
}