Introduction
This documentation aims to provide all the information you need to work with our API.
Base URL
https://astolfo.rocks
Authenticating requests
This API is not authenticated.
Home
GET api/v1/health_check
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://astolfo.rocks/api/v1/health_check',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
access-control-allow-origin: *
[]
Received response:
Request failed with error:
GET api/v1/version
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://astolfo.rocks/api/v1/version',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 58
access-control-allow-origin: *
{}
Received response:
Request failed with error:
GET api/v1/stats
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://astolfo.rocks/api/v1/stats',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 57
access-control-allow-origin: *
{
"images": {
"total": 2117,
"": 0
},
"tags": {
"total": 711
}
}
Received response:
Request failed with error:
Image
GET api/v1/images/random/{rating?}
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://astolfo.rocks/api/v1/images/random/safe',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"id": 4246,
"rating": "safe",
"created_at": "2021-12-06T08:30:38.000000Z",
"updated_at": "2021-12-06T08:30:38.000000Z",
"views": 0,
"source": "https://www.pixiv.net/en/artworks/86487950",
"file_extension": "jpeg",
"mimetype": "image/jpeg",
"file_size": 421671,
"width": 1414,
"height": 2000,
"tags": []
}
Received response:
Request failed with error:
GET api/v1/images/{id}
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://astolfo.rocks/api/v1/images/4246',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"id": 4246,
"rating": "safe",
"created_at": "2021-12-06T08:30:38.000000Z",
"updated_at": "2021-12-06T08:30:38.000000Z",
"views": 0,
"source": "https://www.pixiv.net/en/artworks/86487950",
"file_extension": "jpeg",
"mimetype": "image/jpeg",
"file_size": 421671,
"width": 1414,
"height": 2000,
"tags": []
}
Received response:
Request failed with error:
GET api/v1/images
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://astolfo.rocks/api/v1/images',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
[
{
"id": 4246,
"rating": "safe",
"created_at": "2021-12-06T08:30:38.000000Z",
"updated_at": "2021-12-06T08:30:38.000000Z",
"views": 0,
"source": "https://www.pixiv.net/en/artworks/86487950",
"file_extension": "jpeg",
"mimetype": "image/jpeg",
"file_size": 421671,
"width": 1414,
"height": 2000,
"tags": []
}
]
Received response:
Request failed with error:
GET api/v1/images/rating/{rating}
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://astolfo.rocks/api/v1/images/rating/nostrum',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
[
{
"id": 4246,
"rating": "safe",
"created_at": "2021-12-06T08:30:38.000000Z",
"updated_at": "2021-12-06T08:30:38.000000Z",
"views": 0,
"source": "https://www.pixiv.net/en/artworks/86487950",
"file_extension": "jpeg",
"mimetype": "image/jpeg",
"file_size": 421671,
"width": 1414,
"height": 2000,
"tags": []
}
]
Received response:
Request failed with error:
Tag
GET api/v1/tags
GET api/v1/tags/{id}