Replies: 5 comments
-
I want to write a bot with a conversational interface for searching my inventory. "Hey, do I have any foo?" "Where is my bar?" And eventually, "Please re-order my baz." |
Beta Was this translation helpful? Give feedback.
-
Just a few thoughts:
I guess the most of us don't want to edit something. Mostly getters |
Beta Was this translation helpful? Give feedback.
-
My use cases for an API would be:
Or:
These are just some ideas.... Electron JS might also be able to just open the part-db website internally and do the changes via normal GET/POST requests like the frontend would do. |
Beta Was this translation helpful? Give feedback.
-
I am currently working on implementing the API. I am using API Platform for this, which allows for an easy implementation of an REST API (so using the HTTP GET, POST, DELETE and PATCH operations). The data is given and returned in JSON or preferably JSON+LD, which allows for a standardized way to link between different objects. API Platforms automatically generates an OpenAPI/Swagger Schema, which documents the API in a standardized way and allows to generate a nice interactive API documentation. You can also use this OpenAPI schema to automatically generate clients to interact with Part-DB in various programming languages. For authentication: A user can generate an API token on his settings page, which then the external application can then use to perform actions on the user behalf. I plan to have different access levels, so that you can for example restrict an API token to read-only access. The API tokens are always acting on behalf of a user (and is limited by its configured), so depending on the use case, you might want to create one (or more) separate users for API access. |
Beta Was this translation helpful? Give feedback.
-
There is now an API for Part-DB starting with Part-DB 1.8: See #393 |
Beta Was this translation helpful? Give feedback.
-
Many users have asked for an API to interface with Part-DB with their own code / software.
What are your applications for that / what do you want to do with the API?
And what features do you see as important for that? What data do you need to access/edit?
Beta Was this translation helpful? Give feedback.
All reactions