> For the complete documentation index, see [llms.txt](https://riteshs4hu.gitbook.io/infosec-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://riteshs4hu.gitbook.io/infosec-notes/api-sec/soap-rest-and-graphql.md).

# SOAP, REST, and GraphQL

| Feature            | SOAP                                  | REST                             | GraphQL                          |
| ------------------ | ------------------------------------- | -------------------------------- | -------------------------------- |
| Protocol           | Usually over HTTP, but can use others | Over HTTP, but not limited to it | Over HTTP, but not limited to it |
| Data Format        | XML                                   | Typically JSON, XML, or others   | JSON query                       |
| Request Method     | Primarily POST                        | GET, POST, PUT, DELETE, and more | Single POST request              |
| Response Structure | Typically rigid schema                | More flexible, no strict schema  | Flexible based on query/response |
| Endpoint           | Specific URL endpoints for functions  | Uses URLs as endpoints           | Single endpoint for all queries  |
| Performance        | May have higher XML overhead          | Generally lightweight            | Efficient data retrieval         |
