Endpoint | Description |
---|---|
POST /v1/roms | Upload a ROM |
GET /v1/roms | Get ROM |
DELETE /v1/roms | Delete ROM |
Upload a ROM
⚠️ Only 1 ROM may be uploaded at a time. After a successful upload, subsequent uploads will fail unless the ROM is deleted.
Location | Name | Type | Required? | Description |
---|---|---|---|---|
body |
<raw>
|
binary | ✔️ | Game Boy ROM. |
Header:
POST /v1/roms
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Body:
<raw>
Name | Type | Description |
---|---|---|
data
|
object | |
data.id
|
string | ROM ID. |
data.type
|
string | Type of resource. Must be "roms". |
data.attributes
|
object | |
data.attributes.name
|
string | Name in ROM header. |
data.attributes.hash
|
string | ROM hash. (MD5) |
data.attributes.valid
|
bool | True if valid Pokémon Gen 1 ROM, false if not. |
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": "roms",
"attributes": {
"name": "POKEMON RED",
"hash": "3d45c1ee9abd5738df46d2bdda8b57dc",
"valid": true
},
"links": {
"self": "https://api.pkmnapi.com/v1/roms"
}
},
"links": {
"self": "https://api.pkmnapi.com/v1/roms"
}
}
Get ROM
⚠️ There is no way to download a ROM that has been uploaded. See the Disclaimer for the reasons why.
Header:
GET /v1/roms
Host: api.pkmnapi.com
Authorization: Bearer <access_token>
Body:
None
Name | Type | Description |
---|---|---|
data
|
object | |
data.id
|
string | ROM ID. |
data.type
|
string | Type of resource. Must be "roms". |
data.attributes
|
object | |
data.attributes.name
|
string | Name in ROM header. |
data.attributes.hash
|
string | ROM hash. (MD5) |
data.attributes.valid
|
bool | True if valid Pokémon Gen 1 ROM, false if not. |
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": "roms",
"attributes": {
"name": "POKEMON RED",
"hash": "3d45c1ee9abd5738df46d2bdda8b57dc",
"valid": true
},
"links": {
"self": "https://api.pkmnapi.com/v1/roms"
}
},
"links": {
"self": "https://api.pkmnapi.com/v1/roms"
}
}
Deletes ROM
Location | Name | Type | Required? | Description |
---|---|---|---|---|
header |
If-Match
|
string | ✔️ | ETag of resource. |
Header:
DELETE /v1/roms
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