-
Notifications
You must be signed in to change notification settings - Fork 769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Come up with a unified record format for endpoints that combine different records. #5537
Comments
@initvector Believe this is where some of our meeting notes should go. |
The original issue outlined the desired format, pretty well, already. Here, I am attempting to be more explicit and succinct in what's already been stated, in addition to making a couple minor suggestions for improvement. Proposed Solution
|
This looks good. I added "attributes" as another list of fields. I think this would be a good page in our writing APIs documentation as a separate page. This would have to change from a numbered list to a doc page and I would add the definitive list of fields into a proper list under its own heading for easy scanning. |
An issue for the docs page has been added: vanilla/docs#111 An implementation will be added as part of #5535 |
Some endpoints return multiple types of records and we should make sure that API clients can look at them without too much processing. Here are my thoughts:
Row Identification
The row needs to identify the type of record in it. For this we need the following fields:
Common Fields
Common fields that tables already have are left alone.
Other Fields
Each record should leave its own fields in the row so that the client can do something with that row. The fields for each row should be the same as those offered by their own GET endpoints. This means the primary key will be returned twice.
I suspect for this to work well there should be an interface that the various API controllers can implement to fetch their records and join them into a dataset with just recordType and recordID.
The text was updated successfully, but these errors were encountered: