--- label: 'Enabling web services' top_level: true related: - core.content_structure --- {% set content_structure_topic = render_var(help_topic_link('core.content_structure')) %}

{% trans %}What is a web service?{% endtrans %}

{% trans %}A web service allows your site to provide its content and data to other web sites and applications. Typically, the data is transported via HTTP in a serialized machine-readable format.{% endtrans %}

{% trans %}What is serialization?{% endtrans %}

{% trans %}Serialization is the process of converting complex data structures into text strings, so that they can be exchanged and stored. The reverse process is called deserialization. JSON and XML are the two most-commonly-used data serialization formats for web services.{% endtrans %}

{% trans %}What is Hypertext Application Language (HAL)?{% endtrans %}

{% trans %}Hypertext Application Language (HAL) is a serialization format that supports linking, which enables web applications to follow links and explore relationships between the data and content items that are provided by the web service. Serialized HAL data can be provided in either JSON or XML format.{% endtrans %}

{% trans %}What is HTTP Basic authentication?{% endtrans %}

{% trans %}HTTP Basic authentication is a method for authenticating requests by sending a user name and password along with the request.{% endtrans %}

{% trans %}What modules provide web services?{% endtrans %}

{% trans %}The following Drupal core modules provide web services:{% endtrans %}

{% trans %}JSON:API module{% endtrans %}
{% trans %}Exposes entities to other applications using a fully compliant implementation of the JSON:API Specification. See {{ content_structure_topic }} for more information on content entities and fields.{% endtrans %}
{% trans %}RESTful Web Services module{% endtrans %}
{% trans %}Exposes entities and other resources to other applications using a REST implementation. Data is exchanged using a serialization format such as HAL, and transferred using an authentication method such as HTTP Basic Authentication.{% endtrans %}
{% trans %}Serialization module{% endtrans %}
{% trans %}Provides a framework for adding specific serialization formats for other modules to use.{% endtrans %}
{% trans %}HAL module{% endtrans %}
{% trans %}Adds support for serializing content entities using the JSON version of HAL.{% endtrans %}
{% trans %}HTTP Basic Authentication module{% endtrans %}
{% trans %}Provides a way for web services to be authenticated using HTTP Basic authentication against Drupal user accounts.{% endtrans %}
{% trans %}RDF module{% endtrans %}
{% trans %}Enriches your content with metadata to let other applications (e.g., search engines, aggregators, and so on) better understand its relationships and attributes. This semantically enriched, machine-readable output for your website uses the RDFa specification, which allows RDF data to be embedded in HTML markup.{% endtrans %}

{% trans %}There are also contributed modules that provide web services.{% endtrans %}

{% trans %}Additional resources{% endtrans %}