Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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!
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.
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`?
Hi @GuilhermeMorett ,
Thank you Naila-Rais and anilelmastasi for the insightful responses!
Hope this resolve your query.If so,give us kudos and consider accepting it as solution.
Regards,
Pallavi G.
Hi @GuilhermeMorett ,
Just checking in — did the solution provided help resolve your issue? If yes, please consider marking it as the accepted answer so it can help others facing a similar challenge.If still needed further assistance, feel free to reachout!
Thank you.
Hello @GuilhermeMorett ,
Thank you for detailed description of your issue. Custom fields on Azure DevOps OData are often slower or less stable because they are pulled from an extended schema. Not all custom fields are fully exposed or optimized in the OData layer. OData feed performance degrades with wide and complex queries, especially when many fields are included, and especially across large datasets. 503 error usually means the backend service is overwhelmed or unable to process your request. When you include the custom parameter (especially if it’s a custom Date field), the OData query becomes more complex, and the API may hit resource limits, take too long to respond (timeout) or hit throttling thresholds.
To fix this you may reduce the scope of the query
Try pulling only the ID and the custom field (Custom Date) — no other columns — and test if that works.
This helps isolate if the problem is the field itself or the combination of fields.
If this solved your issue, please mark it as the accepted solution. ✅
Hi @anilelmastasi !
The suggestion given helped solve the problem.
I added WorkItemType and Status in my case to reduce the amount of returns and jobs.
I was using one query with all the parameters I needed (including the custom parameter), but now I split one query for the custom parameter and another query for the other parameters.
Fun fact:
I had been using the full query for a few months without any problems, but overnight this error appeared.