Jump to content
HWBOT Community Forums

HWBOT integration broken due to change of response format.


Mysticial

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.

Link to comment
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.

Link to comment
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. :)

Link to comment
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.

Link to comment
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. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...