Typos in API documentation

Hopefully this is the right place to post this. I think there is a typo on the API documentation for the “putgoal” (“Update a goal for a user”) method.

The documentation says the path for the endpoint is:

PUT /users/u/goals/g.json

However, the example on the right-hand side of the page does not follow this format:

PUT /api/v1/users/alice/goals.json?...
1 Like

Thanks! The full URL for all the requests starts with https://www.beeminder.com/api/v1 and the documentation on the left side just gives the rest of the URLs. It seems we’re not consistent about that on the right side. So thank you for reporting this!

Is everything else clear with the API now that that’s clarified?

I actually didn’t notice the difference in the URL prefixes! I was referring to the goals part: the docs say to use “/users/u/goals/g.json”, but the example seems to use “/users/u/goals.json?..”.

2 Likes

That’s totally a typo, and it’s fixed now!

2 Likes

I’ve got some more feedback on the API docs! The autofetch documentation makes it sound like the username/slug info is passed as JSON in the request body, but it looks like it’s actually passed as form data:

If you pass in your api client’s registered name for datasource, and your client has a registered autofetch_callback_url, we will POST {username: u, slug: s} to your callback when this goal wants new data.

The de-authorization callback is not very specific and doesn’t explicitly say what key/format the access token will be passed as:

If you provide a Post De-Authorization Callback URL when you register your client, we will make a POST to your endpoint when a user removes your app. The POST will include the access_token removed in the body of the request.

2 Likes

@csu, thanks again for the bug reports for the API docs! We fixed them:

http://beeminder.com/changelog#2560