Dynamics 365 Business Central: A simple way to view the list of all APIs

Dynamics 365 Business Central

Hi, Readers.
I was asked a question recently, is there any simple way to view the current list of all APIs in Business Central?

As you might know, we can get a list of APIs by accessing the endpoint.
For example:
1. Standard APIs (v2.0)
Endpoint: https://api.businesscentral.dynamics.com/v2.0/d8f36038-1f93-4543-affc-5dc92b6ee871/Sandbox01/api/v2.0/
More details: Endpoints for the APIs for Dynamics 365 Business Central On-Premises and Online

List: (2022/03/01)

{"@odata.context":"https://api.businesscentral.dynamics.com/v2.0/d8f36038-1f93-4543-affc-5dc92b6ee871/Sandbox01/api/v2.0/$metadata","value":[{"name":"entityDefinitions","kind":"EntitySet","url":"entityDefinitions"},{"name":"companies","kind":"EntitySet","url":"companies"},{"name":"subscriptions","kind":"EntitySet","url":"subscriptions"},{"name":"items","kind":"EntitySet","url":"items"},{"name":"inventoryPostingGroups","kind":"EntitySet","url":"inventoryPostingGroups"},{"name":"generalProductPostingGroups","kind":"EntitySet","url":"generalProductPostingGroups"},{"name":"unitsOfMeasure","kind":"EntitySet","url":"unitsOfMeasure"},{"name":"pictures","kind":"EntitySet","url":"pictures"},{"name":"defaultDimensions","kind":"EntitySet","url":"defaultDimensions"},{"name":"itemVariants","kind":"EntitySet","url":"itemVariants"},{"name":"customers","kind":"EntitySet","url":"customers"},{"name":"customerFinancialDetails","kind":"EntitySet","url":"customerFinancialDetails"},{"name":"agedAccountsReceivables","kind":"EntitySet","url":"agedAccountsReceivables"},{"name":"contactsInformation","kind":"EntitySet","url":"contactsInformation"},{"name":"contacts","kind":"EntitySet","url":"contacts"},{"name":"vendors","kind":"EntitySet","url":"vendors"},{"name":"agedAccountsPayables","kind":"EntitySet","url":"agedAccountsPayables"},{"name":"companyInformation","kind":"EntitySet","url":"companyInformation"},{"name":"salesInvoices","kind":"EntitySet","url":"salesInvoices"},{"name":"dimensionSetLines","kind":"EntitySet","url":"dimensionSetLines"},{"name":"salesInvoiceLines","kind":"EntitySet","url":"salesInvoiceLines"},{"name":"locations","kind":"EntitySet","url":"locations"},{"name":"pdfDocument","kind":"EntitySet","url":"pdfDocument"},{"name":"attachments","kind":"EntitySet","url":"attachments"},{"name":"customerPaymentJournals","kind":"EntitySet","url":"customerPaymentJournals"},{"name":"customerPayments","kind":"EntitySet","url":"customerPayments"},{"name":"accounts","kind":"EntitySet","url":"accounts"},{"name":"taxGroups","kind":"EntitySet","url":"taxGroups"},{"name":"journals","kind":"EntitySet","url":"journals"},{"name":"journalLines","kind":"EntitySet","url":"journalLines"},{"name":"employees","kind":"EntitySet","url":"employees"},{"name":"timeRegistrationEntries","kind":"EntitySet","url":"timeRegistrationEntries"},{"name":"generalLedgerEntries","kind":"EntitySet","url":"generalLedgerEntries"},{"name":"currencies","kind":"EntitySet","url":"currencies"},{"name":"paymentMethods","kind":"EntitySet","url":"paymentMethods"},{"name":"dimensions","kind":"EntitySet","url":"dimensions"},{"name":"dimensionValues","kind":"EntitySet","url":"dimensionValues"},{"name":"paymentTerms","kind":"EntitySet","url":"paymentTerms"},{"name":"shipmentMethods","kind":"EntitySet","url":"shipmentMethods"},{"name":"itemCategories","kind":"EntitySet","url":"itemCategories"},{"name":"cashFlowStatements","kind":"EntitySet","url":"cashFlowStatements"},{"name":"countriesRegions","kind":"EntitySet","url":"countriesRegions"},{"name":"salesOrders","kind":"EntitySet","url":"salesOrders"},{"name":"salesOrderLines","kind":"EntitySet","url":"salesOrderLines"},{"name":"retainedEarningsStatements","kind":"EntitySet","url":"retainedEarningsStatements"},{"name":"balanceSheets","kind":"EntitySet","url":"balanceSheets"},{"name":"trialBalances","kind":"EntitySet","url":"trialBalances"},{"name":"incomeStatements","kind":"EntitySet","url":"incomeStatements"},{"name":"taxAreas","kind":"EntitySet","url":"taxAreas"},{"name":"salesQuotes","kind":"EntitySet","url":"salesQuotes"},{"name":"salesQuoteLines","kind":"EntitySet","url":"salesQuoteLines"},{"name":"salesCreditMemos","kind":"EntitySet","url":"salesCreditMemos"},{"name":"salesCreditMemoLines","kind":"EntitySet","url":"salesCreditMemoLines"},{"name":"purchaseInvoices","kind":"EntitySet","url":"purchaseInvoices"},{"name":"purchaseInvoiceLines","kind":"EntitySet","url":"purchaseInvoiceLines"},{"name":"projects","kind":"EntitySet","url":"projects"},{"name":"bankAccounts","kind":"EntitySet","url":"bankAccounts"},{"name":"vendorPayments","kind":"EntitySet","url":"vendorPayments"},{"name":"applyVendorEntries","kind":"EntitySet","url":"applyVendorEntries"},{"name":"vendorPaymentJournals","kind":"EntitySet","url":"vendorPaymentJournals"},{"name":"salesShipments","kind":"EntitySet","url":"salesShipments"},{"name":"salesShipmentLines","kind":"EntitySet","url":"salesShipmentLines"},{"name":"purchaseReceipts","kind":"EntitySet","url":"purchaseReceipts"},{"name":"purchaseReceiptLines","kind":"EntitySet","url":"purchaseReceiptLines"},{"name":"purchaseOrders","kind":"EntitySet","url":"purchaseOrders"},{"name":"purchaseOrderLines","kind":"EntitySet","url":"purchaseOrderLines"},{"name":"itemLedgerEntries","kind":"EntitySet","url":"itemLedgerEntries"},{"name":"opportunities","kind":"EntitySet","url":"opportunities"},{"name":"customerReturnReasons","kind":"EntitySet","url":"customerReturnReasons"},{"name":"customerSales","kind":"EntitySet","url":"customerSales"},{"name":"vendorPurchases","kind":"EntitySet","url":"vendorPurchases"}]}

2. Automation APIs (v2.0)
Endpoint: https://api.businesscentral.dynamics.com/v2.0/d8f36038-1f93-4543-affc-5dc92b6ee871/Sandbox01/api/microsoft/automation/v2.0/

List: (2022/03/01)

{"@odata.context":"https://api.businesscentral.dynamics.com/v2.0/d8f36038-1f93-4543-affc-5dc92b6ee871/Sandbox01/api/microsoft/automation/v2.0/$metadata","value":[{"name":"entityDefinitions","kind":"EntitySet","url":"entityDefinitions"},{"name":"companies","kind":"EntitySet","url":"companies"},{"name":"subscriptions","kind":"EntitySet","url":"subscriptions"},{"name":"configurationPackages","kind":"EntitySet","url":"configurationPackages"},{"name":"file","kind":"EntitySet","url":"file"},{"name":"automationCompanies","kind":"EntitySet","url":"automationCompanies"},{"name":"extensions","kind":"EntitySet","url":"extensions"},{"name":"userGroups","kind":"EntitySet","url":"userGroups"},{"name":"profiles","kind":"EntitySet","url":"profiles"},{"name":"userGroupPermissions","kind":"EntitySet","url":"userGroupPermissions"},{"name":"users","kind":"EntitySet","url":"users"},{"name":"userGroupMembers","kind":"EntitySet","url":"userGroupMembers"},{"name":"userPermissions","kind":"EntitySet","url":"userPermissions"},{"name":"scheduledJobs","kind":"EntitySet","url":"scheduledJobs"},{"name":"permissionSets","kind":"EntitySet","url":"permissionSets"},{"name":"extensionUpload","kind":"EntitySet","url":"extensionUpload"},{"name":"extensionDeploymentStatus","kind":"EntitySet","url":"extensionDeploymentStatus"}]}

Yes, this is one way to do it, but it is very inconvenient, you need to set up the authentication method first and you also need to use a tool to access it. In this post, I will share a very simple way, hope it will help.

This time we need to use Page Metadata Virtual Table.

Page Metadata Virtual Table: The Page Metadata virtual table (ID 2000000138) contains data about the pages in database.

table 2000000138 “Page Metadata”:

The following are the fields in the Page Metadata virtual table.

You can see that there is a PageType field here. More details about PageType.

So you can force Business Central to run “Page Metadata” table by adding the ?table=2000000138 parameter to the URL, such as in the following example: 
https://businesscentral.dynamics.com/d8f36038-1f93-4543-affc-5dc92b6ee871/Sandbox01?table=2000000138

You can filter the API PageType to see a list of all APIs.

Give it a try!!!😁

PS: You can also see APIPublisher, APIGroup, APIVersion, EntityName, EntitySetName, SourceTable, etc. directly on this page. More details about API Page Type.

END

Hope this will help.

Thanks for reading.

ZHU

コメント

タイトルとURLをコピーしました