The API is now available on staging for testing and validation. Below are some sample URLs available from the endpoint, with all options denoted in the openapi.yaml file in the repository.
Also noticing the create_date value looks like this: "create_date": "0005-01-13T10:01:59Z". Not sure if that's an issue but that's a weird looking date. On production the dates are formatted like this: 2019-12-02 11:36:47.
As a general reference, this is something @cguindon and I worked on when I first started, but forgot to disseminate...whoops! Its a set of API guidelines for our APIs. I'm fixing some of our APIs now, and going to make plans to introduce the breaking changes needed so that they can be performed at some time in the future.
These guidelines explain at least part of the change, in that resources should be plural. I've fixed the underscore to be a hyphen, so that should be live soon. Otherwise, we bound to this endpoint to avoid collision with the current endpoint.
On production the values are either "1" or "0".
This is just a binary representation of booleans, so it should be directly castable if it's not usable as is. IMO, we shouldn't misrepresent data types in Java because Drupal uses smallint for booleans for whatever reason.
Also noticing the create_date value looks like this: "create_date": "0005-01-13T10:01:59Z". Not sure if that's an issue but that's a weird-looking date. On production, the dates are formatted like this: 2019-12-02 11:36:47.
The format is very intentional, as we are moving to a date standard (RFC 3339, which is a sub-spec of ISO 8601) to standardize formats to something universal. The 0002 bit is weird though...I'll have to try and pull that value out to see why it's doing that.
The JSON is a bit different from prod.
The difference seems to be fields that were previously omitted from the database rather than new data. This data set is based on the same information used in Drupal so this data is all available to you, even if it isn't used. Does drupal fail on unknown fields in serialization? I know that our Java APIs at least skip unknown fields by default, and figured it was probably standard practice.
The part That I find is different from the retrieve is that on production we have an array of items as for staging you are only returning one item. Not saying it's wrong but, if we're expecting an array of items and we only get one, code is going to break on the other end.
This is just a binary representation of booleans, so it should be directly castable if it's not usable as is. IMO, we shouldn't misrepresent data types in Java because Drupal uses small int for booleans for whatever reason.
+1 I prefer we use bool for this rather than a string for 0,1.
The format is very intentional, as we are moving to a date standard (RFC 3339, which is a sub-spec of ISO 8601) to standardize formats to something universal. The 0002 bit is weird though...I'll have to try and pull that value out to see why it's doing that.
However, we are breaking API. If we don't have any internal service using this, we simply inform crossminer of the change and see if they have any concerns. I don't think so but it should be fairly easy to confirm since Boris is now an employee of the foundation.
@bbaldassari2kd we are looking to migrate the mailing-list endpoint to Java with some slight, though still breaking, changes to the format to modernize in some places. These changes aren't large in scope, but we want to try and make this process as smooth as possible! See the above conversations for more details, but the biggest changes are as follows:
date format to include a timestamp (consistency with other APIs)