Endpoint | Description |
---|---|
POST /v1/savs | Upload a SAV |
GET /v1/savs | Get SAV |
DELETE /v1/savs | Delete SAV |
Upload a SAV
⚠️ Only 1 SAV may be uploaded at a time. After a successful upload, subsequent uploads will fail unless the SAV is deleted.
Location | Name | Type | Required? | Description |
---|---|---|---|---|
body |
<raw>
|
binary | ✔️ | Game Boy SAV. |
Header:
POST /v1/savs
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Body:
<raw>
Name | Type | Description |
---|---|---|
data
|
object | |
data.id
|
string | SAV ID. |
data.type
|
string | Type of resource. Must be "savs". |
data.attributes
|
object | |
data.links
|
object | |
data.links.self
|
string | Link to current resource. |
links
|
object | |
links.self
|
string | Link to current resource. |
Headers:
HTTP/1.1 201 Created
Content-Type: application/json
Server: pkmnapi/0.1.0
ETag: w/"abcdef0123456789abcdef0123456789"
Body:
{
"data": {
"id": "1337",
"type": "savs",
"attributes": {},
"links": {
"self": "https://api.pkmnapi.com/v1/savs/1337"
}
},
"links": {
"self": "https://api.pkmnapi.com/v1/savs/1337"
}
}
Get SAV
⚠️ There is no way to download a SAV that has been uploaded.
Header:
GET /v1/savs
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Body:
None
Name | Type | Description |
---|---|---|
data
|
object | |
data.id
|
string | SAV ID. |
data.type
|
string | Type of resource. Must be "savs". |
data.attributes
|
object | |
data.links
|
object | |
data.links.self
|
string | Link to current resource. |
links
|
object | |
links.self
|
string | Link to current resource. |
Headers:
HTTP/1.1 200 OK
Content-Type: application/json
Server: pkmnapi/0.1.0
ETag: w/"abcdef0123456789abcdef0123456789"
Body:
{
"data": {
"id": "1337",
"type": "savs",
"attributes": {},
"links": {
"self": "https://api.pkmnapi.com/v1/savs/1337"
}
},
"links": {
"self": "https://api.pkmnapi.com/v1/savs/1337"
}
}
Deletes SAV
Location | Name | Type | Required? | Description |
---|---|---|---|---|
header |
If-Match
|
string | ✔️ | ETag of resource. |
Header:
DELETE /v1/savs
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
If-Match: w/"abcdef0123456789abcdef0123456789"
Body:
None
Headers:
HTTP/1.1 204 No Content
Content-Type: application/json
Server: pkmnapi/0.1.0
Body:
None