0
Look up/search a single record with GET returns array instead of an object
Hello
is the documentation wrong or am I missing something?
There is an endpoint Look up/search a single record with GET that is
GET https://api.ninox.com/v1/teams/{teamid}/databases/{dbid}/tables/{tid}/records
Example code is
curl https://api.ninox.com/v1/teams/u14mwnoutm14yrcnf/databases/w41fzot5t5wt/tables/A/records
-X GET
-H "Content-Type": "application/json"
-H "Authorization": "Bearer e66e5190-14ad-11ec-aa6f-3502731d486c"
-D '{
"filters": {
"L": "Stanley"
}
}'
With an example response like
{
"id": 1,
"sequence": 133,
"createdAt": "",
"createdBy": 0,
"modifiedAt": "2022-02-04T09:51:59",
"modifiedBy": "root",
"fields": {
"Customer No": "K0001",
"Title": "Mr",
"Last Name": "Potts",
"Email": "Stanley.Potts@cba.zyx",
"First Name": "Stanley",
"Image": "shutterstock_1519120589.jpg",
"To Do": [
23
],
"Language": "DE",
"Company": 1,
"Status": "Active",
"Meetings": [
8,
9
]
}
}
And an endpoint Get multiple records
GET https://api.ninox.com/v1/teams/{teamid}/databases/{dbid}/tables/{tid}/records
with an example response
[
{
"id": 1,
"createdAt": "",
"createdBy": 0,
"modifiedAt": "2017-08-01T16:52:12",
"modifiedBy": "EPZ2zSxuC7jt6WF2D",
"fields": {
}
}
{
"id": 4,
"createdAt": "",
"createdBy": "EPZ2zSxuC7jt6WF2D",
"modifiedAt": "2017-08-01T17:06:52",
"modifiedBy": "EPZ2zSxuC7jt6WF2D",
"fields": {
}
}
]
When I request the endpoint to get a SINGLE record and use their example code directly, my response is an array with one object instead of an object directly. Am I doing something wrong or are the docs wrong?
When I execute the request with the Example API Explorer I receive an array as well instead of a single object, will that response change in the future? Is this an error in the docs?
Reply
Content aside
- 10 hrs agoLast active
- 14Views
-
1
Following