Topics

Updates


 

Hi All,

I've made some changes to the API with respect to how updates/deletes are going to be made. The docs previously said that you would post a JSON object to update something. I have changed that so that instead you POST specific fields to update. I think this will reduce the chance of errors. It's also how the Stripe API works.

Also, now the /updateuser endpoint is working, for a subset of possible values.

Thanks, Mark


James Milligan
 

To me, the 'standard' (for some definition of standard online these days!) is for POSTs on creation, PUTs for providing whole objects for update (or creation), and PATCHes for providing partial objects for update.

In practice, I don't think it really matters as long as the request types and expected behaviour are documented appropriately.


James Milligan
 

Hi Mark,

The /updateuser endpoint seems to accept (200 OK) my requests, but doesn't actually proceed to update the user:

curl -X POST \
  https://api.groups.io/v1/updateuser \
  -H 'authorization: Basic ...' \
  -H 'cache-control: no-cache' \
  -d time_pref=time_absolute
It just returns the existing user as it was beforehand. I did try with a password=1 request to see whether it would return password_too_short but no luck :(

It would be really nice (rather, simpler for me!) if the API accepted JSON on the way in as well as for the response.

--
Kind regards,

James Milligan
Need to integrate with the Groups.io API in Java? Check out the Groups.io API Java client


 

Hi James,

On Thu, Aug 17, 2017 at 11:15 AM, James Milligan <james@...> wrote:
Hi Mark,

The /updateuser endpoint seems to accept (200 OK) my requests, but doesn't actually proceed to update the user:

Please try it now. I've also updated it to take some additional parameters.

Error objects now have an "object" field, to be consistent with the other objects. I also changed user_status_notconfirmed to user_status_not_confirmed, to be more consistent.

 
It would be really nice (rather, simpler for me!) if the API accepted JSON on the way in as well as for the response.

Understood. For at least the time being, I need to keep the calls as they are. I'm doing the API this way because I can repurpose the existing web code, with not a lot of change, to also run the api server, and I can have both servers share the same code. A lot less development risk, and I'm able to get more done quickly. Plus it's how Stripe's API works, and I try to copy them whenever I can because I think their API is very well thought out. :)

I hope tomorrow to have a system in place where you can easily diff different versions of the API docs, so you can see what's changed.


Thanks,
Mark


James Milligan
 

On Thu, Aug 17, 2017 at 04:08 pm, Mark Fletcher wrote:
Please try it now. I've also updated it to take some additional parameters.
Hmm, still getting 200 OK but the object hasn't changed :-/
 
It would be really nice (rather, simpler for me!) if the API accepted JSON on the way in as well as for the response.
Understood. For at least the time being, I need to keep the calls as they are. I'm doing the API this way because I can repurpose the existing web code, with not a lot of change, to also run the api server, and I can have both servers share the same code. A lot less development risk, and I'm able to get more done quickly. Plus it's how Stripe's API works, and I try to copy them whenever I can because I think their API is very well thought out. :)
No worries - #wishlist for the future then!
I hope tomorrow to have a system in place where you can easily diff different versions of the API docs, so you can see what's changed.
Smashing - that'll really help.
 
--
Kind regards,

James Milligan
Need to integrate with the Groups.io API in Java? Check out the Groups.io API Java client


 

On Fri, Aug 18, 2017 at 9:33 AM, James Milligan <james@...> wrote:
On Thu, Aug 17, 2017 at 04:08 pm, Mark Fletcher wrote:
Please try it now. I've also updated it to take some additional parameters.
Hmm, still getting 200 OK but the object hasn't changed :-/

Ok, I think it's fixed now for sure.

Thanks,
Mark 


James Milligan
 

Yep, working for me too. Cheers!
--
Kind regards,

James Milligan
Need to integrate with the Groups.io API in Java? Check out the Groups.io API Java client