RetrieveMediaZoneAllocRulesByMediaZoneId

 

DatasourceService / RetrieveMediaZoneAllocRulesByMediaZoneId

 

Description: Get media zone allocation rules by mediazone id

URL: http://{your-server-url}/api/v1/core/datasources/mediazones/{mzId}/allocrules

Method: GET

Token Required: True


Request Headers:
content-type: application/json or content-type: application/xml
token: {token}
currentaccountid: {accountid - optional and default value is user's own account}
Request Query Parameters:
Parameter Type Nullable Description
appids int[] True comma separated values, eg. appids=1,2,3
ugids int[] True user group ids, comma separated values, eg. mediazoneids=1,2,3
page int True page number
rpp int True records per page, default = 50, max = 500

Example: http://{your-server-url}/api/v1/core/datasources/mediazones/{mzId}/allocrules?appids=1,2,3&ugids=1,2,3&page=100


Response:

Type: Nexus.AppSpace.Service.Contract.Messages.AppSpaceIntegration.v1.Datasource.DatasourceResponse

Parameter Type
Response.AllocRules Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.v1.DataSources.MediaZone.AllocRule[]
Response.CurrentPage int
Response.TotalPages int
Response.Rpp int

The following is an example response Xml body:
<DatasourceResponse xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages.AppSpaceIntegration.v1.Datasource" 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>
  <AllocRules xmlns:a="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.v1.DataSources.MediaZone">
    <a:AllocRule>
      <a:ApplicationId>123</a:ApplicationId>
      <a:Id>123</a:Id>
      <a:MaxNumber>123</a:MaxNumber>
      <a:MediaZoneId>123</a:MediaZoneId>
      <a:NoApprovalRequired>true</a:NoApprovalRequired>
      <a:UserGroupId>123</a:UserGroupId>
    </a:AllocRule>
  </AllocRules>
  <CurrentPage>123</CurrentPage>
  <Rpp>123</Rpp>
  <TotalPages>123</TotalPages>
</DatasourceResponse>

The following is an example response Json body:
{
	"DebugMessage":"String",
	"Errors":[
		{
			"Code":"String",
			"Message":"String",
			"StackTrace":"String"
		}
	],
	"Status":1,
	"AllocRules":[
		{
			"ApplicationId":123,
			"Id":123,
			"MaxNumber":123,
			"MediaZoneId":123,
			"NoApprovalRequired":true,
			"UserGroupId":123
		}
	],
	"CurrentPage":123,
	"Rpp":123,
	"TotalPages":123
}