0

We use the on prem version of Business Central so our API URLs are the following: https://<base URL>:<port>/<serverInstance>/api/<API version>/

When we add what Business Central calls "extensions" to it, the URLs look like this: https://<base URL>:<port>/<serverinstance>/api/<API publisher>/<API group>/<API version>

While I the first is my starting point, the latter is somewhat custom since my web application communication with our Business Central API might not know the <API publisher> and <API group>. I know, one way is to hard-code that as soon as our Business Central developer adds a new <API publisher> or <API group> but I was wondering if there's a more efficient and dynamic way to just retrieve a list of all <API publisher> and <API group> via API.

shaedrich
  • 5,457
  • 3
  • 26
  • 42
  • I don't know for sure, but I think there isn't. If there were, how would that help you. Imagine you got the list, how would you tell which group or publisher to use? You'd have to still ask the developer and store it as a parameter somewhere. What's the profit? – Mak Sim Oct 01 '21 at 07:58
  • @MakSim I could loop over it and get the [/$metadata](https://learn.microsoft.com/en-us/dynamics-nav/how-to--use-odata-to-return-obtain-a-service-metadata--edmx--document) – shaedrich Oct 01 '21 at 09:01
  • Would metadata tell you that "this is the api you are looking for"? – Mak Sim Oct 01 '21 at 14:45
  • It's not gonna tell me this but why should it? That's not necessary. I can create a list of all endpoints and turn this list into classes so that the developer can use it like an ORM. That's all I need. – shaedrich Oct 04 '21 at 06:52

0 Answers0