> For the complete documentation index, see [llms.txt](https://docs.umbraco.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.umbraco.com/sustainability-best-practices/backend/soap-rest-graphql.md).

# SOAP, REST and GraphQL

Viewing APIs through the lens of sustainable development reveals crucial considerations for optimizing their efficiency.

In modern cloud applications, where asynchronous transactions between services are prevalent, the format used for encoding payload data becomes pivotal.

Evaluating the necessity of communication volume and reducing unnecessary chatter emerges as a priority. This perspective aligns well with the principles of the **Green Software Foundation**, particularly energy efficiency. By taking proactive steps, applications can operate in a more resource-conscious manner.

An effective approach encompasses multiple recommendations. Understanding the implications of the **chatty I/O antipattern** is essential to grasp how excessive requests impact performance. To enhance reliability and reduce undue stress on systems, implementing advanced request throttling via API Management is crucial.

Additionally, optimizing the data returned from requests by selective encoding and utilizing message encoding considerations helps minimize unnecessary load. Employing response caching minimizes redundant processing of identical data from the backend, further aligning with the goal of resource efficiency.

The concept of sustainable development in application design, as highlighted by [Microsoft's Azure Well-Architected framework](https://learn.microsoft.com/en-us/azure/well-architected/sustainability/sustainability-application-design), underscores the importance of these practices. It emphasizes the creation of systems that not only fulfill their intended function but also do so with minimal ecological impact.

In addition, comparing **Simple Object Access Protocol (SOAP)**, **REST** (**Representational State Transfer)**, and **GraphQL APIs** accentuates the advantages of **GraphQL**. Particularly in terms of reducing HTTP requests and optimizing data aggregation.

GraphQL's ability to request precisely the needed data for a specific function minimizes unnecessary data transfer, contributing to an ecologically conscious approach.

This streamlined querying aligns with the principles of sustainable development, demonstrating a commitment to resource efficiency and optimal system performance.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.umbraco.com/sustainability-best-practices/backend/soap-rest-graphql.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
