Mysticial Posted January 21, 2018 Share Posted January 21, 2018 I just noticed that submissions to the HWBOT via the API are now breaking because the API seems to have changed. In the past, the server responds with JSON. Now it responds with XML. Why did this change? And why wasn't there a notification to all the benchmark maintainers that depend on the API. ----- Unrelated note, the version whitelisting seems to be broken. I'm no longer able to specify multiple versions to whitelist. It's either no filtering, or one version only. Quote Link to comment Share on other sites More sharing options...
Administrators websmile Posted January 21, 2018 Administrators Share Posted January 21, 2018 Hi, I anwered this partially at support thread. You might have noticed massman left and richbastard now is general manager and we upgrade revision, it might help if you contact him with pm although I created a ticket internally Quote Link to comment Share on other sites More sharing options...
Mysticial Posted January 22, 2018 Author Share Posted January 22, 2018 Thanks. I am aware of Massman's departure and the new revision. But I thought the revision was mainly points-related and not have anything to do with the submission APIs. While I *can* switch y-cruncher's HWBOT submitter to handle the new XML response, it will take time. And I figured that this could be breaking more than just y-cruncher. Quote Link to comment Share on other sites More sharing options...
richba5tard Posted January 22, 2018 Share Posted January 22, 2018 I just noticed that submissions to the HWBOT via the API are now breaking because the API seems to have changed. In the past, the server responds with JSON. Now it responds with XML. Why did this change? And why wasn't there a notification to all the benchmark maintainers that depend on the API. ----- Unrelated note, the version whitelisting seems to be broken. I'm no longer able to specify multiple versions to whitelist. It's either no filtering, or one version only. Hi! The libraries used for the API have been updated, due to the old ones no longer being maintained. I've checked a few 3rd party apps but not all. The issue is likely because you don't explicitly mention application/json in your Accept header. Can you check? Thanks. Quote Link to comment Share on other sites More sharing options...
richba5tard Posted January 22, 2018 Share Posted January 22, 2018 I found a way to mark json as primary media type, so json is returned instead of xml if you don't specify accept headers. I'm pushing the change to prod tomorrow morning. Quote Link to comment Share on other sites More sharing options...
Mysticial Posted January 22, 2018 Author Share Posted January 22, 2018 I found a way to mark json as primary media type, so json is returned instead of xml if you don't specify accept headers. I'm pushing the change to prod tomorrow morning. Thanks! I was going to say that I currently don't set the accept header. (I actually have no idea what that even is.) I'll figure out how to do it later for a future release. But it should start working again once the server-side change rolls out. Quote Link to comment Share on other sites More sharing options...
richba5tard Posted January 23, 2018 Share Posted January 23, 2018 Thanks! I was going to say that I currently don't set the accept header. (I actually have no idea what that even is.) I'll figure out how to do it later for a future release. But it should start working again once the server-side change rolls out. When using a REST api, you client should specify which format it wants to use. This is typically done by adding the "Accept: application/json" or "Accept: */*" or "Accept: application/xml" header. If not specified, "Accept: */*" is implied (i can accept anything). The default behavior for "accept anything" was changed in rev7, but this change has been reverted. Nonetheless, it is more robust to add the header anyway. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.