Hi, I'm must beginning to play with the v5 API. I'm wondering if I'm simply confused, some endpoints haven't been implemented, or something is broken.
I've defined the following variables:
{{SpeciesID}} = 8 // Dog
{{BreedID}} = 74 // Affenpinscher
{{RG_API_KEY}} = <my API Key>
Headers:
Authorization {{RG_API_KEY}}
Content-Type application/vnd.api+json
Using Postman, I GET the following URL
{{v5Url}}/public/animals/species/{{SpeciesID}}/breeds/
And receive good data:
{
"meta": {
"count": 291,
"countReturned": 25,
"pageReturned": 1,
"pages": 12,
"limit": 25,
"transactionId": "QBfnkAcwMITP"
},
"data": [
{
"type": "breeds",
"id": "74",
"attributes": {
"name": "Affenpinscher"
},
"relationships": {
"species": {
"data": [
{
"type": "species",
"id": "8",
"links": {
"self": "/public/breeds/74/species/8"
}
}
],
"links": {
"self": "/public/breeds/74/species/"
}
}
}
},
...
}
However, when I call any of the self links, I get an invalid endpoint error
{
"errors": [
{
"status": 400,
"source": {
"path": ""
},
"title": "Invalid endpoint",
"detail": "The endpoint URL you requested was not found"
}
],
"meta": {
"transactionId": "AsqNLrAZfihK"
}
}
From what I can see, it appears that the
self link is wrong. Based on the
endpoint documentation the self links should be as follows:
/public/animals/breeds/{{BreedID}}/ // for Breed object
/public/animals/species/{{SpeciesID}}/ // for Species object