RetrieveWidgetsDatasourceAllocations

 

ApplicationService / RetrieveWidgetsDatasourceAllocations

 

Description: Retrieve user's widgets datasource allocations. Result which is Allocations array is arrange by mediazone allocations first, and then follow by the other type of datasource allocations.

URL: http://{your-server-url}/api/v1/core/applications/widgets/datasources/allocations

Method: GET

Token Required: True


Request Headers:
currentaccountid: {accountid - optional and default value is user's own account}
content-type: application/json or content-type: application/xml
token: {token}
Required Roles:

Portal Administrator, Account Administrator, Account Owner, Content Administrator, Widget Manager

Rights:

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

Right Require
Widget Management Yes

Request Query Parameters:
Parameter Type Nullable Description
networkids int[] True comma separated values, eg. networkids=1,2,3
page int True page number
rpp int True records per page, default = 50, max = 500
toprecords int True number of latest records, which will disable paging and order descending by allocation createddate
sort string True sort by createddate, e.g. sort=createddate
sortdir string True sort by ascending or descending, e.g. sortdir=desc or sortdir=asc
includereadonly boolean True include read only resources, eg. includereadonly=true

Example: http://{your-server-url}/api/v1/core/applications/widgets/datasources/allocations?networkids=1,2,3&page=100&rpp=100


Response:

Type: Nexus.AppSpace.Service.Contract.Messages.AppSpaceIntegration.v1.Application.ApplicationResponse

Parameter Type
Response.Allocations Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.v1.DataSources.Allocation[]

The following is an example response Xml body:
<ApplicationResponse xmlns="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Messages.AppSpaceIntegration.v1.Application" 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>
  <Allocations xmlns:a="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.v1.DataSources">
    <a:Allocation>
      <a:Application xmlns:b="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.v1.Applications">
        <b:AppClassId>123</b:AppClassId>
        <b:CreatedDate>2014-11-20T17:57:37.2245385Z</b:CreatedDate>
        <b:Guid>11111111-1111-1111-1111-111111111111</b:Guid>
        <b:Height>1000</b:Height>
        <b:Id>123</b:Id>
        <b:LayoutSchedules>
          <b:LayoutSchedule>
            <b:ApplicationId>123</b:ApplicationId>
            <b:Disable>true</b:Disable>
            <b:EndDate>2014-11-20T17:57:37.2255389Z</b:EndDate>
            <b:Id>123</b:Id>
            <b:IsExclusive>true</b:IsExclusive>
            <b:IsNoEndDate>true</b:IsNoEndDate>
            <b:Name>String</b:Name>
            <b:Position>123</b:Position>
            <b:RecurrencePatterns xmlns:c="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.v1.Applications.Schedule">
              <c:RecurrencePattern>
                <c:DaysToPlay xmlns:d="http://schemas.datacontract.org/2004/07/System">
                  <d:DayOfWeek>Saturday</d:DayOfWeek>
                </c:DaysToPlay>
                <c:EndTime>2014-11-20T17:57:37.2255389Z</c:EndTime>
                <c:IsAllDayEvent>true</c:IsAllDayEvent>
                <c:PlayOnAllDays>true</c:PlayOnAllDays>
                <c:StartTime>2014-11-20T17:57:37.2255389Z</c:StartTime>
              </c:RecurrencePattern>
            </b:RecurrencePatterns>
            <b:ScheduleItems xmlns:c="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.v1.Applications.Schedule">
              <c:ScheduleItem>
                <c:Disable>true</c:Disable>
                <c:Duration>123</c:Duration>
                <c:LayoutId>123</c:LayoutId>
                <c:LayoutName>String</c:LayoutName>
                <c:Properties xmlns:d="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO">
                  <d:KeyValuePair>
                    <d:Key>String</d:Key>
                    <d:Value>String</d:Value>
                  </d:KeyValuePair>
                </c:Properties>
                <c:position>123</c:position>
              </c:ScheduleItem>
            </b:ScheduleItems>
            <b:ScheduleMode>roundRobin</b:ScheduleMode>
            <b:StartDate>2014-11-20T17:57:37.2255389Z</b:StartDate>
            <b:TagExpression>String</b:TagExpression>
            <b:UseRecurrencePattern>true</b:UseRecurrencePattern>
          </b:LayoutSchedule>
        </b:LayoutSchedules>
        <b:Layouts>
          <b:Layout>
            <b:ApplicationId>123</b:ApplicationId>
            <b:AspectRatio>1000</b:AspectRatio>
            <b:Guid>11111111-1111-1111-1111-111111111111</b:Guid>
            <b:Id>123</b:Id>
            <b:Name>String</b:Name>
            <b:Properties xmlns:c="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO">
              <c:KeyValuePair>
                <c:Key>String</c:Key>
                <c:Value>String</c:Value>
              </c:KeyValuePair>
            </b:Properties>
            <b:WidgetPlacements>
              <b:WidgetPlacement>
                <b:Color>String</b:Color>
                <b:Height>1000</b:Height>
                <b:Left>1000</b:Left>
                <b:MetaData xmlns:c="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO">
                  <c:KeyValuePair>
                    <c:Key>String</c:Key>
                    <c:Value>String</c:Value>
                  </c:KeyValuePair>
                </b:MetaData>
                <b:Opacity>1000</b:Opacity>
                <b:Top>1000</b:Top>
                <b:TransitionInType>String</b:TransitionInType>
                <b:TransitionOutType>String</b:TransitionOutType>
                <b:WidgetId>123</b:WidgetId>
                <b:WidgetName>String</b:WidgetName>
                <b:Width>1000</b:Width>
              </b:WidgetPlacement>
            </b:WidgetPlacements>
          </b:Layout>
        </b:Layouts>
        <b:Name>String</b:Name>
        <b:NetworkId>123</b:NetworkId>
        <b:Properties xmlns:c="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO">
          <c:KeyValuePair>
            <c:Key>String</c:Key>
            <c:Value>String</c:Value>
          </c:KeyValuePair>
        </b:Properties>
        <b:TemplateType>LayoutTemplate</b:TemplateType>
        <b:Triggers xmlns:c="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.v1.Applications.Triggers">
          <c:Trigger>
            <c:Actions>
              <c:Action>
                <c:Name>String</c:Name>
                <c:Parameters xmlns:d="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO">
                  <d:KeyValuePair>
                    <d:Key>String</d:Key>
                    <d:Value>String</d:Value>
                  </d:KeyValuePair>
                </c:Parameters>
                <c:TargetName>String</c:TargetName>
              </c:Action>
            </c:Actions>
            <c:ConditionalJoinOperator>String</c:ConditionalJoinOperator>
            <c:Conditions>
              <c:Condition>
                <c:ConditionalExpressions>
                  <c:Expression>
                    <c:Arguments xmlns:d="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
                      <d:string>String</d:string>
                    </c:Arguments>
                    <c:Operation>String</c:Operation>
                  </c:Expression>
                </c:ConditionalExpressions>
                <c:ExpressionJoinOperator>String</c:ExpressionJoinOperator>
              </c:Condition>
            </c:Conditions>
            <c:RoutedEvent>String</c:RoutedEvent>
            <c:Scope>String</c:Scope>
            <c:SourceName>String</c:SourceName>
          </c:Trigger>
        </b:Triggers>
        <b:Type>VideoWall</b:Type>
        <b:Widgets>
          <b:Widget>
            <b:ApplicationId>123</b:ApplicationId>
            <b:AssetDatasourceId>123</b:AssetDatasourceId>
            <b:DatasourceId>123</b:DatasourceId>
            <b:Guid>11111111-1111-1111-1111-111111111111</b:Guid>
            <b:Id>123</b:Id>
            <b:Name>String</b:Name>
            <b:Properties xmlns:c="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO">
              <c:KeyValuePair>
                <c:Key>String</c:Key>
                <c:Value>String</c:Value>
              </c:KeyValuePair>
            </b:Properties>
            <b:Type>SIPWidget</b:Type>
          </b:Widget>
        </b:Widgets>
        <b:Width>1000</b:Width>
      </a:Application>
      <a:Content xmlns:b="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO.AppSpaceIntegration.v1.Contents">
        <b:BaseFile>String</b:BaseFile>
        <b:CreatedDate>2014-11-20T17:57:37.2245385Z</b:CreatedDate>
        <b:Description>String</b:Description>
        <b:ExternalId>String</b:ExternalId>
        <b:Filter>Allocated</b:Filter>
        <b:GroupId>123</b:GroupId>
        <b:Height>123</b:Height>
        <b:Id>123</b:Id>
        <b:IsDeleted>true</b:IsDeleted>
        <b:LastUsed>2014-11-20T17:57:37.2245385Z</b:LastUsed>
        <b:MetaData xmlns:c="http://schemas.datacontract.org/2004/07/Nexus.AppSpace.Service.Contract.Model.DTO">
          <c:KeyValuePair>
            <c:Key>String</c:Key>
            <c:Value>String</c:Value>
          </c:KeyValuePair>
        </b:MetaData>
        <b:Size>1000</b:Size>
        <b:Source>String</b:Source>
        <b:Tags>String</b:Tags>
        <b:Title>String</b:Title>
        <b:Type>HTML_Text</b:Type>
        <b:Usage>123</b:Usage>
        <b:Width>123</b:Width>
      </a:Content>
      <a:CreatedDate>2014-11-20T17:57:37.2245385Z</a:CreatedDate>
      <a:Datasource>
        <a:Guid>11111111-1111-1111-1111-111111111111</a:Guid>
        <a:Id>123</a:Id>
        <a:Name>String</a:Name>
        <a:Type>MediaZone</a:Type>
      </a:Datasource>
      <a:Id>123</a:Id>
      <a:UserGroupId>123</a:UserGroupId>
    </a:Allocation>
  </Allocations>
</ApplicationResponse>

The following is an example response Json body:
{
	"DebugMessage":"String",
	"Errors":[
		{
			"Code":"String",
			"Message":"String",
			"StackTrace":"String"
		}
	],
	"Status":1,
	"Allocations":[
		{
			"Application":{
				"AppClassId":123,
				"CreatedDate":"\/Date(1416506257224)\/",
				"Guid":"11111111-1111-1111-1111-111111111111",
				"Height":1000,
				"Id":123,
				"LayoutSchedules":[
					{
						"ApplicationId":123,
						"Disable":true,
						"EndDate":"\/Date(1416506257225)\/",
						"Id":123,
						"IsExclusive":true,
						"IsNoEndDate":true,
						"Name":"String",
						"Position":123,
						"RecurrencePatterns":[
							{
								"DaysToPlay":[
									6
								],
								"EndTime":"\/Date(1416506257225)\/",
								"IsAllDayEvent":true,
								"PlayOnAllDays":true,
								"StartTime":"\/Date(1416506257225)\/"
							}
						],
						"ScheduleItems":[
							{
								"Disable":true,
								"Duration":123,
								"LayoutId":123,
								"LayoutName":"String",
								"Properties":[
									{
										"Key":"String",
										"Value":"String"
									}
								],
								"position":123
							}
						],
						"ScheduleMode":1,
						"StartDate":"\/Date(1416506257225)\/",
						"TagExpression":"String",
						"UseRecurrencePattern":true
					}
				],
				"Layouts":[
					{
						"ApplicationId":123,
						"AspectRatio":1000,
						"Guid":"11111111-1111-1111-1111-111111111111",
						"Id":123,
						"Name":"String",
						"Properties":[
							{
								"Key":"String",
								"Value":"String"
							}
						],
						"WidgetPlacements":[
							{
								"Color":"String",
								"Height":1000,
								"Left":1000,
								"MetaData":[
									{
										"Key":"String",
										"Value":"String"
									}
								],
								"Opacity":1000,
								"Top":1000,
								"TransitionInType":"String",
								"TransitionOutType":"String",
								"WidgetId":123,
								"WidgetName":"String",
								"Width":1000
							}
						]
					}
				],
				"Name":"String",
				"NetworkId":123,
				"Properties":[
					{
						"Key":"String",
						"Value":"String"
					}
				],
				"TemplateType":2,
				"Triggers":[
					{
						"Actions":[
							{
								"Name":"String",
								"Parameters":[
									{
										"Key":"String",
										"Value":"String"
									}
								],
								"TargetName":"String"
							}
						],
						"ConditionalJoinOperator":"String",
						"Conditions":[
							{
								"ConditionalExpressions":[
									{
										"Arguments":[
											"String"
										],
										"Operation":"String"
									}
								],
								"ExpressionJoinOperator":"String"
							}
						],
						"RoutedEvent":"String",
						"Scope":"String",
						"SourceName":"String"
					}
				],
				"Type":3,
				"Widgets":[
					{
						"ApplicationId":123,
						"AssetDatasourceId":123,
						"DatasourceId":123,
						"Guid":"11111111-1111-1111-1111-111111111111",
						"Id":123,
						"Name":"String",
						"Properties":[
							{
								"Key":"String",
								"Value":"String"
							}
						],
						"Type":21
					}
				],
				"Width":1000
			},
			"Content":{
				"BaseFile":"String",
				"CreatedDate":"\/Date(1416506257224)\/",
				"Description":"String",
				"ExternalId":"String",
				"Filter":3,
				"GroupId":123,
				"Height":123,
				"Id":123,
				"IsDeleted":true,
				"LastUsed":"\/Date(1416506257224)\/",
				"MetaData":[
					{
						"Key":"String",
						"Value":"String"
					}
				],
				"Size":1000,
				"Source":"String",
				"Tags":"String",
				"Title":"String",
				"Type":17,
				"Usage":123,
				"Width":123
			},
			"CreatedDate":"\/Date(1416506257224)\/",
			"Datasource":{
				"Guid":"11111111-1111-1111-1111-111111111111",
				"Id":123,
				"Name":"String",
				"Type":22
			},
			"Id":123,
			"UserGroupId":123
		}
	]
}