# Admin API
The Admin API is available on port 17006
.
Please see the Config Reference for all the supported configurations and descriptions.
# config
# Show
Return a JSON config Object with the current configuration.
GET /config HTTP/1.1
Example curl:
curl http://IMAGIZER_HOSTNAME:17006/config
# Create
Use POST to create a complete new config. Pass a JSON config Object.
WARNING
A POST will overwrite any existing configuration.
POST /config HTTP/1.1
Content-Type: application/json
{
"backend":"http://my.aws.bucket.s3.amazonaws.com",
"backendTimeout":20,
"backendConnectTimeout":3
}
Example curl:
curl -X POST \
-d '{
"backend":"http://my.aws.bucket.s3.amazonaws.com",
"backendTimeout":20,
"backendConnectTimeout":3
}' \
http://IMAGIZER_HOSTNAME:17006/config
# Update
Use PATCH to make partial changes to the configuration. Pass a JSON config Object.
WARNING
Changes may not been seen immediately. You may have to reboot the instance or clear the cache.
PATCH /config HTTP/1.1
Content-Type: application/json
{
"backend":"http://my.aws.bucket.s3.amazonaws.com"
}
Example curl:
curl -X PATCH \
-d '{
"backend":"http://my.aws.bucket.s3.amazonaws.com"
}' \
http://IMAGIZER_HOSTNAME:17006/config
# Debug
System and debugging information
Show the temp disk report
GET /debug/tmp HTTP/1.1
List open files
GET /debug/lsof HTTP/1.1
Show memory process report
GET /debug/memory HTTP/1.1
Show services report
GET /debug/services HTTP/1.1
Show specific service report
GET /debug/services/{service} HTTP/1.1
# Stats
Return a list of current stats.
See the Stats Reference for detailed information on each stat.
# Show
GET /stats HTTP/1.1
Return the current stats.
curl -X GET http://IMAGIZER_HOST:17006/stats
# Logs
GET /logs HTTP/1.1
TIP
You must enable logs first before viewing.
View application, web server, and system logs.
# cache
# Purge
Purge an image from the Imagizer cache.
DELETE ${IMAGE_URL} HTTP/1.1
Purge /image.jpg from the cache.
curl -X DELETE http://IMAGIZER_HOST:17006/image.jpg
# Purge All
Purge all images from the Imagizer cache.
DELETE / HTTP/1.1
Purge all images.
curl -X DELETE http://IMAGIZER_HOST:17006/
# Network
# Show
This endpoint retrieves the current network configuration
GET /network HTTP/1.1
Content-Type: application/json
curl /network
The above command returns JSON structured like this:
{
"static":false,
"ip":"192.168.1.100",
"netmask":"255.255.255.0",
"gateway":"192.168.1.1",
"dnsServers":[
"192.168.1.1"
]
}
Property | Description |
---|---|
static | whether of not the instance is using a static ip. |
ip | The current ip of the instance. |
netmask | The current netmask of the instance. |
gateway | The current gateway address of the instance. |
dnsServers | A list of DNS servers the instance is using. |
# Change
Create and replace the network configuration.
WARNING
The instance's network will be restarted and the old IP address will stop responding.
POST /network HTTP/1.1
Content-Type: application/json
{
"static":true,
"ip":"192.168.1.100",
"netmask":"255.255.255.0",
"gateway":"192.168.1.1",
"dnsServers":[
"192.168.1.1"
]
}
Create a static network.
curl -X POST \
-d '{
"static":true,
"ip":"192.168.1.100",
"netmask":"255.255.255.0",
"gateway":"192.168.1.1",
"dnsServers":[
"192.168.1.1"
]
}' \
http://IMAGIZER_HOST:17006/network
Create DHCP network.
curl -X POST \
-d '{
"static":false
}' \
http://IMAGIZER_HOST:17006/network
# Updates
Patch update files are provided by Nventify support. Contact us (opens new window) if you find an issue that requires patching.
# Apply
Updating an Imagizer instance takes a few minutes and requires a reboot afterwards. Take the provided patch file and upload to the /updates endpoint.
TIP
Reboot the instance after applying the PATCH to ensure all changes take effect.
POST /updates HTTP/1.1
file=@imagizer_patch_file.tar
curl -F "file=@imagizer_patch_file.tar" \
http://IMAGIZER_HOST:17006/updates
# Show
Update status can be monitored by preforming a GET requests on the /updates endpoint.
GET /updates HTTP/1.1
curl http://IMAGIZER_HOST:17006/updates
The above command returns JSON structured like this:
[
{
"filename": "patch2017011915521484949961",
"status": [
"Update has been applied"
]
}
]