AI Studio Agent with External REST Tool with Fields is not working
Summary:
I am trying to use below URI for external rest
/api/invoices?fields=["id", "invoice-number","invoice-date","handling-amount","status",{"supplier":["name"]},{ "invoice_lines": ["po_number"] }]
When ever I am passing Supplier and invoice lines in fields the error message is "Sorry assistant is unavailable at this time"
This is working from postman.
Content (please ensure you mask any confidential information):
Actual Response payload without field restriction looks like below :
{
"id": "123",
"invoice-number": "INV-456",
"invoice-date": "2025-10-01",
"handling-amount": 150.00,
"status": "Paid",
"supplier": {
"name": "ABC Supplies",
"id": "12"
},
"invoice_lines": [
{
"po_number": "PO-789",
"created-at": "2024-12-12T17:36:32-06:00",
"updated-at": "2024-12-12T17:36:32-06:00",
"accounting-total": 0
}
]
}
Code Snippet (add any code snippets that support your topic, if applicable