ServiceControl API Documentation

573 views
Skip to first unread message

Jesse Inskeep

unread,
Mar 4, 2015, 3:58:01 PM3/4/15
to particula...@googlegroups.com
So I've been poking around at the ServiceControl API and was wondering if documentation has been developed.

I wrote a little script to grab a batch of error messages (from resource /errors ), make a PATCH call to the resource of /errors/archive with a json payload that contains all the ids. (I reverse engineered ServicePulse to see how the archive button worked.....)

After doing all this I receive a 200 and 202 back from the server, but when I got to ServicePulse, none of the messages have been archived.

I know that the service control API is "technology-preview feature" (http://docs.particular.net/servicecontrol/capacity-and-planning) but was wondering if there was any type of even unofficial documentation on it so I can do some tactical scripts to help manage our failed messages.

I'm also working on a dashboard that will pull in the error message count from all of our servers (8 right now) which then provides a link to each server's version of ServicePulse. Basically, a dashboard of dashboards.

Adam Schentag

unread,
Mar 5, 2015, 7:16:23 PM3/5/15
to particula...@googlegroups.com

John Simons

unread,
Mar 5, 2015, 8:29:11 PM3/5/15
to particula...@googlegroups.com
Hi Jesse,

What does you payload look like?
It should look like a json array, eg:
[ 'id1', 'id2', 'id3' ]

Is this what you sending?
Also the ids, make sure you are using the "id" field that is returned from  /errors.

Does this help?

Cheers
John

Jesse Inskeep

unread,
Mar 6, 2015, 8:55:25 PM3/6/15
to particula...@googlegroups.com
So it looks like the problem was on my side....

I was pulling a batch of events from "/errors" resource, which was pulling errors that were not necessarily "unresolved". So my script was passing in a batch of Ids to be marked as "resolved", it's just that I was passing in ids for events that had already been resolved.

I changed the URL to "/errors?status=unresolved" (or something similar, I don't have my code in front of me right now), which would then return only unresolved errors. I then looped through these and passed the list of ids into the "/errors/resolve" with a patch and everything started working just fine.

So first off... It was totally my fault. :)

But secondly, I was really only able to find this by running Fiddler and snooping through the network traffic that ServicePulse was sending to ServiceControl as well as searching through the source code on ServiceControl in GitHub. If this had some documentation around it with how to query the different resources or how to send in PATCH commands it would be a little easier.

Again, I'm making an assumption that there will be some documentation on this in the future, I'm just being impatient and want it now. :)

-Jesse
Reply all
Reply to author
Forward
0 new messages