Forum Discussion
OData 503 Error in Power BI When Using Custom Parameter from Azure DevOps
- Anonymous1 year ago
Hi GuilhermeMorett ,
Thank you Naila-Rais and anilelmastasi for the insightful responses!- When using $expand, ensure you're selecting only the necessary fields to reduce the complexity of the query. This can help mitigate performance issues and potential 503 errors.
- Instead of expanding the parent work item within your main query, consider executing a separate query to fetch the parent work item's custom date field. You can then merge this data with your child work items in Power BI.
- Be aware of Azure DevOps service might limits and throttling policies. Exceeding these limits might result in 503 errors. It's advisable to pause operations and retry after some time.
Hope this resolve your query.If so,give us kudos and consider accepting it as solution.
Regards,
Pallavi G.
Hello again, anilelmastasi 🙂
I’ve optimized my OData query by reducing the number of selected fields and limiting the request to only what’s necessary — specifically WorkItemId and a crucial custom date field.
Here’s the current query:
_odata/v3.0/WorkItems?$select=WorkItemId&$expand=Parent($select=WorkItemId,Custom_a081288e__00jdas35__00sdfghj44d__002D99b7__002D9e80aee11c31),AssignedTo($select=UserName),Area($select=AreaPath)&$filter=AssignedTo/UserName eq 'Bob'
Despite the optimization, I’m still receiving a 503 Service Unavailable error.
The custom date field (Custom_a081288e__00jdas35__00sdfghj44d__002D99b7__002D9e80aee11c31) is essential to my analysis.
Is there anything else I can do to resolve this issue? Could this be related to system limits or performance throttling?
Any guidance would be greatly appreciated. Thank you in advance!
- Naila-Rais1 year agoAdvocate IV
Add pagination (most common fix):
&$top=500
Simplify query (remove unnecessary expansions):
/_odata/v3.0/WorkItems?$select=WorkItemId,CustomDateField&$filter=AssignedTo/UserName eq 'Bob'&$top=500
If still failing, try:
/_odata/v3.0/WorkItems?$select=WorkItemId&$filter=AssignedTo/UserName eq 'Bob'&$top=100
Then get details in separate calls per WorkItemId.
Note: 503 usually means server overload - smaller requests work best.
- GuilhermeMorett1 year agoNew Member
Hello Naila,
Thank you for your suggestion. Unfortunately, it did not work for me. I need to retrieve the Custom Date field from the parent record, and if I remove the `$expand` clause, the query fails.
Could you please advise how I can obtain the Custom Date from the parent without removing `$expand`?
- Anonymous1 year agoNot applicable
Hi GuilhermeMorett ,
Thank you Naila-Rais and anilelmastasi for the insightful responses!- When using $expand, ensure you're selecting only the necessary fields to reduce the complexity of the query. This can help mitigate performance issues and potential 503 errors.
- Instead of expanding the parent work item within your main query, consider executing a separate query to fetch the parent work item's custom date field. You can then merge this data with your child work items in Power BI.
- Be aware of Azure DevOps service might limits and throttling policies. Exceeding these limits might result in 503 errors. It's advisable to pause operations and retry after some time.
Hope this resolve your query.If so,give us kudos and consider accepting it as solution.
Regards,
Pallavi G.