Retrieve data from the API.
The endpoint suffix to retrieve data from.
Optional
Optional bearer token for authorization.
Optional data type to specify how to parse the response (e.g., "json", "text").
Promise
Retrieve data from the API.