Jump to content
HWBOT Community Forums
Mysticial

HWBOT integration broken due to change of response format.

Recommended Posts

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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. :)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×