Routing Requests–Constraint Resource Query
Routing Requests–Constraint Resource Query
#340310
The syntax of the POST is the same as that of the Routing Request Available Capacity Query. The Routing Request Constraint Resource Query accepts UNROUTED or REJECTED Workloads, or REJECTED Routing Requests.
The elements returned are the same as that for the Routing Request Available Capacity Query; however, only the failed Fit-for-Purpose checks (element fit_for_purpose) and only the slot metrics having 0 or negative capacity (i.e. metrics of subslots[], sensor_capacity: subslots[], sensor_capacity: tiers: subslots[] and host_capacity: hosts: subslots[]) are returned.
Options for Returned Details
You can extend the query with one or all of the following, as documented in Options for Returned Details for the Routing Requests–Available Capacity Query:
- ?subslots=true—if true, only the 0 or negative capacity slot metrics are returned.
- ?detailed_sensor_calc=true
- ?ffp_enabled=false—if true, only the failed Fit-for-Purpose checks are returned; if false, returns the same elements as described for the Available Capacity Query including an adjusted hosting_score.
- ?negative_slots=true
- ?detailed_host_calc=true—if true, only the hosts that have a subslots[] entry are included and in turn, only the subslots[] metric entries with 0 or negative capacity are included. See Routing Requests–Constraint Resource Query.
Capacity/Cost Mode Option and Hosting Score
There are three modes that are supported, which can be specified as part of the query. For details, see Capacity/Cost Mode Option and Hosting Score for the Routing Requests–Available Capacity Query.
Resource
/routing-requests/constraint-resource-query
Supported Operations
Table: Routing Requests–Constraint Resource Query Supported Operations
Operation |
HTTP Method |
Input |
Output |
Description |
Query |
POST /routing-requests/constraint-resource-query |
[Routing Requests–Available Capacity Query: Resource Elements] |
This request is exactly the same as the POST to a Routing Requests Available Capacity Query, which is the same as the Routing Request except no objects are created (i.e. Routing Request and specified Workloads). Note that when specifying an inline Workload object, the name element is not required. The Routing Request Constraint Resource Query accepts only UNROUTED or REJECTED Workloads. Otherwise, an error is returned. This post returns the same elements as the Routing Request Available Capacity Query, except only the failed Fit-for-Purpose checks, and only the 0 or negative capacity slot metrics are returned. Note: The specification of only 1 inline workload and 1 inline disk is supported. |
|
Get Individual |
GET /routing-requests/constraint-resource-query/<id> |
None |
Routing Requests–Available Capacity Query: Resource Elements |
Returns the Routing Request Constraint Resource Query elements of the specified Routing Request id. The Routing Request must be in REJECTED status. Otherwise, an error is returned. |
Examples
Example: Getting the Constraints for Rejected Workloads
The following example shows you why Workloads were rejected.

Request:
POST /routing-requests/constraint-resource-query/?subslots=true
{
"scopes": [
{
"control_environment": "Singapore",
"infrastructure_groups": ["Assessment","Densify"]
}
],
"expected_date":1454367388000,
"requester":"John Doe",
"workloads": [
{
"id": "683ea361-e35a-4882-a241-cdeb17b0a666",
"id": "8e8d7a35-ea05-419f-9428-68b4c9a92872"
}
]
}
Response:
[
{
"infrastructure_groups": [
{
"id": "f7a5ef21-3d0a-442e-b65c-541b0084b950",
"name": "Assessment",
"slots": 0,
"cei": 1.15,
"subslots": [
{
"name": "Mem_Utilization_As_Pct",
"value": 0
},
{
"name": "Total_Memory",
"value": 0
}
],
"constraint": "Mem_Utilization_As_Pct",
"constraint_name": "Memory Utilization in Percent",
"href": "/infrastructure-groups/f7a5ef21-3d0a-442e-b65c-541b0084b950",
"control_type": "FULL"
"hosting_cost": 0,
"fit_for_purpose": {
"categories": [
{
"name": "Resource",
"test": [
{
"name": "Operating Systems",
"status_reasons": [
{
"reason": "OS not allowed",
"workload_id": "b56e78eb-9dd9-42b5-80cd-32fcf44771e7",
"workload_name": "SysDec141"
},
],
"status": "FAIL"
}
],
"status": "FAIL"
}
],
"status": "FAIL"
},
"sensor_capacity": [
{
"type": "datastore",
"slots": 0,
"constraint": "98EA05B5-E0E1-4828-A3DD-919C5738D29A",
"constraint_name": "Total Required Space (MB)",
"subslots": [],
"tiers": [
{
"name": "SilverT2",
"slots": 0,
"subslots": [
{
"name": "Total Provisioned Space (MB)",
"value": 0,
"spec_code": "B89E1E20-F71D-4B70-9179-EEA3C6F81D6C"
},
{
"name": "Total Used Space (MB)",
"value": 0,
"spec_code": "B4E008AD-8ECC-43DB-BFA7-6A590873453E"
},
{
"name": "Number of VMs",
"value": 0,
"spec_code": "525F567D-61FC-4A6E-A617-D203FB8E9CDC"
},
{
"name": "Health Status",
"value": 0,
"spec_code": "C17D631D-C584-48AE-B4F1-77D9EAAAAB59"
},
{
"name": "Total Required Space (MB)",
"value": 0,
"spec_code": "98EA05B5-E0E1-4828-A3DD-919C5738D29A"
}
]
}
]
}
],
"hosting_score": 0
},
// ... *SNIP* of Infrastructure Groups...
],
"control_environment": {
"id": "e6cf1672-77ff-4e7d-9dda-5387b0bc95cc",
"name": "Singapore",
"platform": "VMWARE",
"platform_category": "Internal Virtual",
"control_type": "FULL"
"total_slots": 0,
"cei": 1.17,
"href": "/control-environments/e6cf1672-77ff-4e7d-9dda-5387b0bc95cc",
"subslots": [
{
"name": "Mem_Utilization_As_Pct",
"value": 0
},
{
"name": "Total_Memory",
"value": 0
}
],
"sensor_capacity": [
{
"type": "datastore",
"slots": 0,
"constraint": "98EA05B5-E0E1-4828-A3DD-919C5738D29A",
"constraint_name": "Total Required Space (MB)",
"subslots": [],
"tiers": [
{
"name": "SilverT2",
"slots": 0,
"subslots": [
{
"name": "Total Provisioned Space (MB)",
"value": 0,
"spec_code": "B89E1E20-F71D-4B70-9179-EEA3C6F81D6C"
},
{
"name": "Total Used Space (MB)",
"value": 0,
"spec_code": "B4E008AD-8ECC-43DB-BFA7-6A590873453E"
},
{
"name": "Number of VMs",
"value": 0,
"spec_code": "525F567D-61FC-4A6E-A617-D203FB8E9CDC"
},
{
"name": "Health Status",
"value": 0,
"spec_code": "C17D631D-C584-48AE-B4F1-77D9EAAAAB59"
},
{
"name": "Total Required Space (MB)",
"value": 0,
"spec_code": "98EA05B5-E0E1-4828-A3DD-919C5738D29A"
}
]
}
]
}
],
"icon": "/control-environments/e6cf1672-77ff-4e7d-9dda-5387b0bc95cc/icon"
}
}
]
Example: Getting ?detailed_host_calc Details
The following example shows the snippet of the response when ?detailed_host_calc=true is used.

Response:
// ... *SNIP* of rest ...
"host_capacity": {
"slots": 10,
"hosts": [
{
"name": "esxcrb07.int.Densify.com",
"constraint": "Mem_Utilization_As_Pct",
"constraint_name": "Memory Utilization in Percent",
"id": "a4373e0f-2553-4755-baec-5acf7a745af1",
"slots": 0,
"subslots": [
{
"name": "Mem_Utilization_As_Pct",
"value": 0
}
]
}
]
},
// ... *SNIP* of rest ...