Developer Documentation Library > Interviewer - Server > UNICOM Intelligence Interviewer architecture > Interview Service tier > Quota web service > Quota web service > /Quota/Projects/[ProjectName]/QuotaGroups/[QuotaGroup]/QuotaTable
 
/Quota/Projects/[ProjectName]/QuotaGroups/[QuotaGroup]/QuotaTable
For quota groups that are Type=”Table”, you can use this URL to request the quotas as a table. (/Quota/Projects/[ProjectName]/QuotaGroups/[QuotaGroup]/Quotas returns the quotas as a flat list.)
This makes it easier to present the quotas as a table, because the information encoded in the name has already been extracted. The table is formed from “axes” that contain “headings”. The headings on the side of the table contain information about the quota cells in that row.
XML example
<QuotaTable Name="SideAndTop" TotalCompleted="45" TotalPending="5" TotalToTarget="50" TotalTarget="100">
<Axis Name="Top">
<Axis Name="OccupationScreener">
<Heading Name="Yes" />
<Heading Name="No" />
</Axis>
</Axis>
<Axis Name="Side">
<Axis Name="UseQ">
<Heading Name="Brand1">
<Quota Name="Side.(0.UseQ).(0.Brand1).Top.(0.OccupationScreener).(0.Yes)" Expression="UseQ.HasAnswer({Brand1}) And OccupationScreener.HasAnswer({Yes})" Pending="0" Completed="0" Target="10" />
<Quota Name="Side.(0.UseQ).(0.Brand1).Top.(0.OccupationScreener).(1.No)" Expression="UseQ.HasAnswer({Brand1}) And OccupationScreener.HasAnswer({No})" Pending="0" Completed="0" Target="10" />
</Heading>
<Heading Name="Brand2">
<Quota Name="Side.(0.UseQ).(1.Brand2).Top.(0.OccupationScreener).(0.Yes)" Expression="UseQ.HasAnswer({Brand2}) And OccupationScreener.HasAnswer({Yes})" Pending="0" Completed="0" Target="10" />
<Quota Name="Side.(0.UseQ).(1.Brand2).Top.(0.OccupationScreener).(1.No)" Expression="UseQ.HasAnswer({Brand2}) And OccupationScreener.HasAnswer({No})" Pending="0" Completed="0" Target="10" />
</Heading>
… cut …
<Heading Name="Brand5">
<Quota Name="Side.(0.UseQ).(4.Brand5).Top.(0.OccupationScreener).(0.Yes)" Expression="UseQ.HasAnswer({Brand5}) And OccupationScreener.HasAnswer({Yes})" Pending="0" Completed="0" Target="10" />
<Quota Name="Side.(0.UseQ).(4.Brand5).Top.(0.OccupationScreener).(1.No)" Expression="UseQ.HasAnswer({Brand5}) And OccupationScreener.HasAnswer({No})" Pending="0" Completed="0" Target="10" />
</Heading>
</Axis>
</Axis>
</QuotaTable>
JSON example
{
"Name": "SideAndTop",
"TotalCompleted": 45,
  "TotalPending": 0,
  "TotalToTarget": 45,
  "TotalTarget": 100,
"Axes": [
{
"Name": "Top",
"Axes": [
{
"Name": "OccupationScreener",
"Headings": [
{
"Name": "Yes"
},
{
"Name": "No"
}
]
}
]
},
{
"Name": "Side",
"Axes": [
{
"Name": "UseQ",
"Headings": [
{
"Name": "Brand1",
"Quotas": [
{
"Name": "Side.(0.UseQ).(0.Brand1).Top.(0.OccupationScreener).(0.Yes)",
"Expression": "UseQ.HasAnswer({Brand1}) And OccupationScreener.HasAnswer({Yes})",
"Pending": 0,
"Completed": 0,
"Target": 10
},
{
"Name": "Side.(0.UseQ).(0.Brand1).Top.(0.OccupationScreener).(1.No)",
"Expression": "UseQ.HasAnswer({Brand1}) And OccupationScreener.HasAnswer({No})",
"Pending": 0,
"Completed": 0,
"Target": 10
}
]
},
{
"Name": "Brand2",
"Quotas": [
{
"Name": "Side.(0.UseQ).(1.Brand2).Top.(0.OccupationScreener).(0.Yes)",
"Expression": "UseQ.HasAnswer({Brand2}) And OccupationScreener.HasAnswer({Yes})",
"Pending": 0,
"Completed": 0,
"Target": 10
},
{
"Name": "Side.(0.UseQ).(1.Brand2).Top.(0.OccupationScreener).(1.No)",
"Expression": "UseQ.HasAnswer({Brand2}) And OccupationScreener.HasAnswer({No})",
"Pending": 0,
"Completed": 0,
"Target": 10
}
]
},
… cut …
{
"Name": "Brand5",
"Quotas": [
{
"Name": "Side.(0.UseQ).(4.Brand5).Top.(0.OccupationScreener).(0.Yes)",
"Expression": "UseQ.HasAnswer({Brand5}) And OccupationScreener.HasAnswer({Yes})",
"Pending": 0,
"Completed": 0,
"Target": 10
},
{
"Name": "Side.(0.UseQ).(4.Brand5).Top.(0.OccupationScreener).(1.No)",
"Expression": "UseQ.HasAnswer({Brand5}) And OccupationScreener.HasAnswer({No})",
"Pending": 0,
"Completed": 0,
"Target": 10
}
]
}
]
}
]
}
]
}
The “top” axis, if present, is always first in the XML/JSON, followed by the “side” axis, if present. The Quota information is always included in the side axis. This enables any rendering code to draw the top axis first, and then draw each row one row at a time with the correct label on the side axis.
If there is no top axis, then each heading on the side only has a single quota cell. For example:
<QuotaTable Name="SideOnly" TotalCompleted="45" TotalPending="0" TotalToTarget="45" TotalTarget="100">
<Axis Name="Side">
<Axis Name="UseQ">
<Heading Name="Brand1">
<Quota Name="Side.(0.UseQ).(0.Brand1)" Expression="UseQ.HasAnswer({Brand1})" Pending="0" Completed="0" Target="10" />
</Heading>
<Heading Name="Brand2">
<Quota Name="Side.(0.UseQ).(1.Brand2)" Expression="UseQ.HasAnswer({Brand2})" Pending="0" Completed="0" Target="20" />
</Heading>
<Heading Name="Brand3">
… cut …
<Heading Name="Brand5">
<Quota Name="Side.(0.UseQ).(4.Brand5)" Expression="UseQ.HasAnswer({Brand5})" Pending="0" Completed="0" Target="30" />
</Heading>
</Axis>
</Axis>
</QuotaTable>
If the quota table only has a top, then the quota cells are included immediately under the side axis. For example:
<QuotaTable Name="TopOnly" TotalCompleted="45" TotalPending="0" TotalToTarget="45" TotalTarget="100">
<Axis Name="Top">
<Axis Name="UseQ">
<Heading Name="Brand1"/>
<Heading Name="Brand2"/>
… cut …
<Heading Name="Brand5"/>
</Axis>
</Axis>
<Axis Name="Side">
<Quota Name="Top.(0.UseQ).(0.Brand1)" Expression="UseQ.HasAnswer({Brand1})" Pending="0" Completed="0" Target="10" />
<Quota Name="Top.(0.UseQ).(1.Brand2)" Expression="UseQ.HasAnswer({Brand2})" Pending="0" Completed="0" Target="20" />
… cut …
<Quota Name="Top.(0.UseQ).(4.Brand5)" Expression="UseQ.HasAnswer({Brand5})" Pending="0" Completed="0" Target="50" />
</Axis>
</QuotaTable>
The XML and JSON also contains PendMode, PendLimit, and Priority attributes if they are applicable.
See also
Reading quotas