Here you can find some Postman collections that exemplify usage of Xray Test Management public APIs. The idea is to have some concrete examples of how to make certain, basic requests. Then you can play with them and adapt to your needs. It's easier to learn by example, isn't it?
APIs are used to obtain and update data; in Xray, most times they are used to import results from automation frameworks. However, APIs allow to do a lot more: obtain entities, their relations and modify/delete them.
Although similar, Xray server/datacenter and Xray on Jira cloud are two different products with also slight different characteristics. Xray on Jira server/DC has a pubic REST API. Xray on Jira Cloud has a REST API along with a GraphQL API. We'll discuss this ahead.