API Documentation available in the gridX Developer Community

As you might have read in our Product Release Notes for August 2024, we have completed a major step towards significantly improving the experience in consuming our HTTP APIs.

Here is what happened:

  • The implementation of our public facing APIs is now :100: aligned with the API specification and will stay that way. All of the endpoints now use the models generated from the specifications.
  • We segregated input and response models, making it more transparent in which case which fields are required/supported, thus saving API consumers some amount of business/validation logic on their end and reduce room for misunderstandings.
  • Validation has been improved and made more strict to reduce the amount of potential errors when making requests.
  • The OpenAPI specification can now be downloaded and used for code generation on the consumer side.

Going forward, the latest API specifcations will be made available in API Documentation . You might see a little (non-breaking) churn, as we iron out the last kinks. Make sure to check in from time to time.

If you spot something that is off, please to not hesitate to reach out in the forum and we’ll be on it.

Happy hacking!

3 Likes

And in case you’re interested how we do this, feel free to poke around in the repository with the web component that renders the API specifications in the community and the GitHub action that publishes it.

1 Like

You spoke, we listened. Thanks @Ana_Kosareva & @pleidl.

Now every endpoint has code samples generated for the following languages:

  • Python (requests library)
  • Shell (curl)
  • Go (native)
  • Java (OkHttp)
  • Kotlin (OkHttp)
  • Swift (native)
  • C# (RestSharp)

Check it out, and let us know whether it works for you: Backend API Documentation.

And, guessing you might want use it for your own API specs at some point, we have you covered :heart_hands: : We made it available under the MIT licence :point_down:

3 Likes

You kept on speaking, and we didn’t stop listening. @s.wuerth nudged us to finally push out changelogs for API changes.You might already have noticed it, depending on which private API categories you have access to.
If you haven’t: We’re generating changelogs for each API change automagically now on each release.

For stable APIs, we still make non-breaking changes that will be described in the logs.
Beta APIs might be subject to breaking changes, too. We’ll dig deeper into our currently evolving versioning strategy soon.

You can find them here:

Don’t worry if they are still empty - not all of the APIs have seen changes recently. But you can already subscribe to the logs relevant for you and stay in the know.

Here's a contrived example of how they (will) look like

POST /systems

  • :warning: removed the required property ‘createdAt’ from the response with the ‘201’ status
  • :warning: removed the optional property ‘productOptionUpdatedAt’ from the response with the ‘201’ status
  • added the optional property ‘productOptionUpdatedAtFoo’ to the response with the ‘201’ status

GET /systems/{systemID}

  • :warning: removed the required property ‘createdAt’ from the response with the ‘200’ status
  • :warning: removed the optional property ‘productOptionUpdatedAt’ from the response with the ‘200’ status
  • added the optional property ‘productOptionUpdatedAtFoo’ to the response with the ‘200’ status

PATCH /systems/{systemID}

  • :warning: removed the required property ‘createdAt’ from the response with the ‘200’ status
  • :warning: removed the optional property ‘productOptionUpdatedAt’ from the response with the ‘200’ status
  • added the optional property ‘productOptionUpdatedAtFoo’ to the response with the ‘200’ status

You can use the information from the changelogs to quickly see new features or updates in the APIs as they become available and see whether you can optimize your API usage based on that. As always: If you notice any odd behavior, let us know!

And if you’re curious how we built this: We use oasdiff wrapped into a GitHub action and another one to post the result to the forum. Similar to what we did with the specs and snippets as described :point_up_2:. It’s evolved into a nice toolchain, and we’ll probably write it down in detail somewhere. Would you be interested? Let us know!