Вернуться   AXForum > Microsoft Dynamics NAV > NAV: Blogs
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

Опции темы Поиск в этой теме Опции просмотра
Старый 19.02.2021, 11:11   #1  
Blog bot is offline
Blog bot
24,060 / 809 (75) +++++++
Регистрация: 28.10.2006
waldo: Which API’s are available in my Business Central environment?

Here’s a short post with a small tip about something a lot of you probably already know. How’s that for an intro .

If you remember these posts:
Then you know there’s quite a lot of information .. just under your fingertips of the web client.

And that’s also the case for API information. Because really .. figuring out het available API’s in your system isn’t that easy at first sight. It is easy when you know where to look, though.

Well, if you want, you can get that info from a system-table. Namely table “API Web Service”, which is table 2000000193. So, if you would add “?table=2000000193” in the URL .. you’d get a list of all available APIs :-).

At least … if you’re working OnPrem. For some dark reason, I (admin) am not allowed to read that table in SaaS .. .

I wonder why .. I really am … . If anyone has a clue why – please put it in the comments.

Does that mean there is no solution in SaaS? Can’t I list all API endpoints simply from the web client? Well .. still yes, but a little bit with a detour. In fact, it was the API guru AJ that gave an alternative table that also has quite a lot of metadata: namely table “page metadata” (2000000138). If you filter the data on pagetype “API”, you get almost exactly the same as with the “API Web service” table – although, only pages, not queries – but at least it works in SaaS.

But then you might wonder .. Isn’t there a table “query metadata” that I could use as well? Sure, that would be table 2000000142 :-). But … that one is again only available OnPrem for another dark reason :(.

Last but not least, you might wonder if there was an API way to get to all APIs. Yep! And it was again the API guru himself that showed me this undocumented feature. The URL you’ll need for this is:{{tenantid}}/{{env}}/api/microsoft/runtime/beta/companes({{CompanyId}}/apiRoutes

It will basically give you a list of the “routes” to the different APIs (shows the publisher/group/version):

So, let’s say we’ll take the last entry. To form a decent URL, it’s simply:{{tenantid}}/{{env}}/api/waldo/trainings/v1.0

Which will, in its turn, give me a list of “API entities” that I can use for this publisher/group/version.

That’s it. Thanks AJ for helping to make the post a bit more complete ;-). Enjoy!

Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
waldo: Microsoft Dynamics 365: 2020 release wave 2 plan Blog bot NAV: Blogs 0 14.07.2020 21:16
waldo: Deploying from DevOps the right way (Part 2): Deploying to OnPrem Business Central environments with the automation API Blog bot NAV: Blogs 0 14.07.2020 21:16
waldo: Microsoft Dynamics 365 Business Central – 2019 Spring Release Blog bot NAV: Blogs 0 02.04.2019 09:11
alexef: How to add a field to Item Card in Business Central Blog bot NAV: Blogs 0 22.05.2018 20:11
waldo: Microsoft Dynamics 365 Business central – Resources Blog bot NAV: Blogs 0 02.04.2018 11:11
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Часовой пояс GMT +3, время: 20:10.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.