2024-11-01 - REST API Design - Chewing the Fat 📈 #9512
Replies: 43 comments
-
First post |
Beta Was this translation helpful? Give feedback.
-
Great topic and very relevant! API design (particularly Rest API's) is super important, making sure that the developer can easily, efficiently and securely access the required data. As for good API's, none really come to mind - Its the bad ones that are memorable. I recently had to work with the Google maps API and hated it. It seemed to be too opinionated for our use case. |
Beta Was this translation helpful? Give feedback.
-
The Dynamics API is cool
Return useful error messages with tips on how to fix - this makes it easier to chatgpt it |
Beta Was this translation helpful? Give feedback.
-
I loved working with the Stripe API. Well thought out, well structured and well documented.
Try documenting your API before releasing it, its a true sign of how easy your API will be to implement. |
Beta Was this translation helpful? Give feedback.
-
Never built an API. Have gathered data from a few bad and good ones though. The worst I think that I've found so far was the YouTube API. Took me hours to try and understand how to get data from it. Could have been the poor documentation though. |
Beta Was this translation helpful? Give feedback.
-
None - I only worked with private ones
Return useful error messages for debugging |
Beta Was this translation helpful? Give feedback.
-
n/a - only worked with private
Correct error handling, validation and error returning are key! |
Beta Was this translation helpful? Give feedback.
-
I'm not a developer however, I learnt that API's are the backbone of a lot of developer work and not having clear names can easily cause headaches down the line. |
Beta Was this translation helpful? Give feedback.
-
Error Handling - Use a consistent format, including status codes and error messages gives user better experience and easier to debug |
Beta Was this translation helpful? Give feedback.
-
None - haven't really dealt with public APIs much
Returning relevant and detailed error messages instead of generic error messages for easier debugging in the future. |
Beta Was this translation helpful? Give feedback.
-
cant think of a good one atm, but Xero API is not great |
Beta Was this translation helpful? Give feedback.
-
I've only used the Microsoft Graph API to automate some SysAdmin tasks, It's pretty easy to work with for my needs. |
Beta Was this translation helpful? Give feedback.
-
I've worked with the ChatGPT completions API. It provides a really robust set of features:
Use path parameters for retrieving resources and query params for filtering e.g. use this api/posts/1 not this api/posts?id=1 |
Beta Was this translation helpful? Give feedback.
-
Binance - https://www.binance.com/en-NZ/binance-api This has great documentation that covers both rest and websocket APIs, and also higher-level general documentation.
No, I put everything I could think of in the rule. 😄 |
Beta Was this translation helpful? Give feedback.
-
Clear documentation!
Use colon for custom verbs |
Beta Was this translation helpful? Give feedback.
-
NASA
Don't use API keys, use client credentials |
Beta Was this translation helpful? Give feedback.
-
This was a great video and excellent for the devs, but I haven't got enough background knowledge to answer these questions :) |
Beta Was this translation helpful? Give feedback.
-
I've learned that I don't know anything about this, so I can't contribute to the discussion...I trust it's an excellent topic for the devs |
Beta Was this translation helpful? Give feedback.
-
Spotify - It has an online playground.
Documentation |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
keep your API as flat as you can. No more than 2 layers if you can manage it i.e. /{something}/{something} |
Beta Was this translation helpful? Give feedback.
-
None. Haven't worked on public API yet.
Consistent response format with response code / error code |
Beta Was this translation helpful? Give feedback.
-
I think GitHub's REST API is quite good to work with because it has rich documentation and is beautifully designed meaning every standard a good API should have.
Use GET less and replace it with POST as many as possible, cause it will help to reduce CORS attack. |
Beta Was this translation helpful? Give feedback.
-
GitHub API, because it is well-documented with useful ready commands for each endpoints and tools to test them out
Standard status code - using status codes that matches outcome: 200 OK, 201 Created, 400 Bad Request, 404 Not Found, 500 Internal Server Error Error handling - helpful error messages can help to understand what went wrong |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Modern eCommerce Gateways such as Stripe and Square, Microsoft Graph API, Dynamics 365 API - they have follow most of the tips and have a great documentation. Although, for Dynamics 365 API query string parameters can get very long and messy....
Good error handling - clearly explain what the problem is with the request. |
Beta Was this translation helpful? Give feedback.
-
https://radarr.video/docs/api/ Very clear documentation, accessible logs, ... |
Beta Was this translation helpful? Give feedback.
-
Github API is very good and well documented! |
Beta Was this translation helpful? Give feedback.
-
None - I only worked with the private ones.
Error handling - Provide clear, structured error responses with relevant HTTP status codes and helpful messages to guide clients in resolving issues. |
Beta Was this translation helpful? Give feedback.
-
None - Only worked on private ones
Recent work taught me that clear error handling and logging them is crucial |
Beta Was this translation helpful? Give feedback.
-
Hey programmers,
Today we're talking about API design - Do you know the key principles of REST API Design?
Beta Was this translation helpful? Give feedback.
All reactions