編集

次の方法で共有


API development overview

Note

We're working on improving the onboarding experience for AL developers. If you've input for this article, we'd love to hear from you. Please use the Feedback section at the bottom of this article to help us make improvements that you’d like to see.

We also welcome contributions to our docs. New to contributing to docs? Don't worry, read more about contributing here Contribute to the help.

RESTful web services are typically created to interchange data between Business Central and external systems. The acronym REST stands for REpresentational State Transfer. Any coding language capable of calling REST APIs can be used to use this feature. The Business Central API stack have been optimized for performance and is the preferred way to integrate with Business Central.

Business Central comes with an extensive list of built-in APIs that requires no code and minimal setup to use. You can also develop your own custom APIs using the AL object types API pages and API queries. This article helps you get started developing your own APIs.

Note

Extending API pages and queries isn't currently possible in Business Central.

Creating APIs

When creating an API, you need to consider how the API is intended to be used:

  • If you need to read and write data, use a page of the type API
  • If you just need to read data, possibly from multiple tables, use a query of the type API

The two approaches come with different characteristics as described in this table:

Method to expose data as an API Properties
API Page Support read-write operations
Webhook-supported
Can't be extended
Expose data from one table
API Query Read-only operations
Can't be extended
Can expose data from multiple tables

Tip

For inspiration and examples, see the open source ALAppExtensions repo. Here you'll find examples of API pages written in AL.

Getting started

The following table includes links to help you get started with designing and working with APIs.

To See
Create APIs using an API page API pages
Create APIs using an API query API queries
Go through an example on how to develop a custom API page Walkthrough: developing a custom API
Learn how to create performant APIs API performance
Learn how to query APIs API client performance
Tips for working with APIs
Using filters with API calls
Troubleshoot API call failures Troubleshooting API calls
Monitor API calls with telemetry API telemetry
Learn about existing (built-in) APIs Overview
Learn about the difference between APIs and exposing UI pages as OData/SOAP webservices Web services overview

See also

API page type
API queries
Walkthrough: Developing a custom API
Troubleshooting API calls
API performance
API client performance
Tips for working with APIs
Using filters with API calls
API telemetry
Built-in API overview
Web services overview (APIs, SOAP/OData)