> For the complete documentation index, see [llms.txt](https://docs.sportradar.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sportradar.com/basketball/rest-api-1/overview/using-the-rest-api.md).

# Using the REST API

The REST API follows standard REST patterns.

Applications can interact with resources through HTTPS requests to specific URLs. Our REST API is designed exclusively for business-to-business (B2B) applications, and direct connections to the DDE using our data are not permitted to maintain data integrity and security.

### Making API Calls:

To interact with a resource, send an HTTPS request, including the resource URL, necessary headers (such as the access token), the method, request body, and query parameters. For example:

{% code fullWidth="false" %}

```bash
curl https://dde-api.data.srarena.io/basketball/seasons \
  -X GET \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'Content-Type: application/json'
```

{% endcode %}

### Resource URL:

Access resources via URLs, which vary for production ([https://dde-api.data.srarena.io](https://dde-api.data.srarena.io/)) and simulation ([https://dde-api-sims.data.srarena.io](https://dde-api.data.srarena.io/)) environments.

### HTTP Methods:

The request should specify the HTTP method, with options including:

* GET for reading or listing resources
* POST for creating resources
* PUT for updating resources
* DELETE for removing resources

### Headers and Query Parameters:

Incorporate HTTP and query parameters to convey additional call details, like authorisation and data format, or for specific needs in listing operations like sorting or filtering. For instance:

{% code overflow="wrap" %}

```bash
curl 'https://dde-api.data.srarena.io/basketball/fixtures?status=Completed&type=Official' \
  -X GET \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'Accept: application/json' 
```

{% endcode %}

### Response Handling:

* API calls yield JSON objects with the requested resources or an error list. Successful responses display an HTTP 200 status code, while errors have non-200 codes.
* The response for single object operations includes a JSON object with the resource type (like season or fixture).
* For list and search operations, expect a named array of objects (like seasons) and a cursor value for pagination. Please always check the cursor value in these operations to ensure it's finished item retrieval.

### Enrichment:

In our REST API, each action packet is enriched by adding player and team names. If the system doesn't find a player or team linked to a particular fixture in the enrichment packet, it logs a warning. The warning message will indicate `"Unknown player code: …"` or `"Unknown team code: …"` based on the missing information. When this occurs, the system replaces the missing name with an empty string `("")`. This approach alerts users to any inconsistencies while preserving the structural integrity of the data packet.


---

# 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.sportradar.com/basketball/rest-api-1/overview/using-the-rest-api.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.
