-
Notifications
You must be signed in to change notification settings - Fork 6
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
json_node_export
API is different in NewCantus
#1031
Comments
json_node_export
API returns unexpected 404 errorsjson_node_export
API is different in NewCantus
Another side note, this one unrelated: It seems that Drupal and Django handle duplicate slashes ( I've changed CantusUltimus so that we don't send requests to these bad url's anymore (ie. the NewCantus behaviour seems correct to me) but thought it an funny find! |
So the
This is basically true - |
Now that the documentation/wiki has been updated (and since adding support for duplicate slashes is probably not necessary), I'm going to close this. |
Thanks for the info. I've updated Cantus Ultimus accordingly. (And yes, don't support double slashes) |
Discovered in the course of a subdiscussion of an unrelated issue and investigating the failing tests when Cantus Ultimus was modified to use links to NewCantus.
The json object returned by the
json_node_export
API (at least for sources) has a different structure in Old and NewCantus. See the export for source123981
in OldCantus and NewCantus. It looks to me like the response from the OldCantus API is provided in the returned object at the keyjson_info
and adds a bunch of other (at times duplicate) top-level keys.I don't know how many entities other than Cantus Ultimus use this API, so it is fairly easy to adjust what we do to the new format. I would at least add a note to this effect in the wiki (since it seems like a lot to modify the API to conform to OldCantus without knowing anyone else is using it), as what is currently there makes it sound like you should just be able to point to the new url. Maybe to relevant entry add something like an italicized "Note: Field names in the response object have changed between the
json-node
API and this API."A related side note: I see there are other issues (eg. #840, #564) in an ongoing discussion about this API endpoint and whether or not it is used, how and whether or not to update the API to work with the ID assignment scheme in NewCantus. Cantus Ultimus does need this API to obtain source metadata, but could, of course, switch to a new API if one were available in NewCantus. So, for one, I don't know when we will have a published source in NewCantus with an ID > 1000000, but as it currently stands we would need this API to support that source.
The text was updated successfully, but these errors were encountered: