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.

DANGER

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

Debugging Report

If you are experiencing issues with your Imagizer instance, you may be asked to provide a debugging report to our support team.

v14.1-86.X and above

Generate a debugging report

curl -X POST http://IMAGIZER_HOST:17006/debug/generateReport

The debug report will be available for download by visiting http://IMAGIZER_HOST:17006/debug/reports.

v14.0-85.X and below

Download and run the debugging scriptopen in new window to generate a report.

wget https://docs.imagizer.com/imagizer-debug-report.sh
bash imagizer-debug-report.sh $IMAGIZER_HOST # replace with your Imagizer hostname/IP
Click to see the script
#!/bin/bash

if [ -z "$1" ]
	then
		echo "No Imagizer host/ip supplied"
		echo "Usage: bash imagizer-debug-report.sh <imagizer-host>"
		exit 1
fi

IMAGIZER_HOST="$1"
TIMESTAMP=$(date +%s)

echo Create directory
mkdir "$IMAGIZER_HOST-$TIMESTAMP"

(
  cd "$IMAGIZER_HOST-$TIMESTAMP" || exit

	echo Downloading version
	curl -s "http://$IMAGIZER_HOST:17006/version" -o "$IMAGIZER_HOST-$TIMESTAMP-version.txt"

	echo Downloading health
	curl -s "http://$IMAGIZER_HOST:17006/health" -o "$IMAGIZER_HOST-$TIMESTAMP-health.txt"

	echo Downloading config
	curl -s "http://$IMAGIZER_HOST:17006/config" -o "$IMAGIZER_HOST-$TIMESTAMP-config.json"

	echo Downloading stats snapshot
	curl -s "http://$IMAGIZER_HOST:17006/stats" -o "$IMAGIZER_HOST-$TIMESTAMP-stats.json"

	echo Downloading Cluster report
	curl -s "http://$IMAGIZER_HOST:17006/cluster" -o "$IMAGIZER_HOST-$TIMESTAMP-cluster.json"

	echo Downloading logs
	curl -s "http://$IMAGIZER_HOST:17006/logs/" | grep -E -o "[0-9a-z.-]*(gz|log)" | uniq | xargs -I{} curl -s http://$IMAGIZER_HOST:17006/logs/{} -o {}

	echo Downloading debugging reports
	curl -s "http://$IMAGIZER_HOST:17006/debug/tmp" -o "$IMAGIZER_HOST-$TIMESTAMP-tmp.txt"
	curl -s "http://$IMAGIZER_HOST:17006/debug/lsof" -o "$IMAGIZER_HOST-$TIMESTAMP-lsof.txt"
	curl -s "http://$IMAGIZER_HOST:17006/debug/memory" -o "$IMAGIZER_HOST-$TIMESTAMP-memory.txt"
	curl -s "http://$IMAGIZER_HOST:17006/debug/services" -o "$IMAGIZER_HOST-$TIMESTAMP-services.txt"
	curl -s "http://$IMAGIZER_HOST:17006/debug/services/php-fpm.service" -o "$IMAGIZER_HOST-$TIMESTAMP-services-php-fpm.txt"
	curl -s "http://$IMAGIZER_HOST:17006/debug/services/varnish.service" -o "$IMAGIZER_HOST-$TIMESTAMP-services-varnish.txt"
	curl -s "http://$IMAGIZER_HOST:17006/debug/services/nginx.service" -o "$IMAGIZER_HOST-$TIMESTAMP-services-nginx.txt"
	curl -s "http://$IMAGIZER_HOST:17006/debug/services/haproxy.service" -o "$IMAGIZER_HOST-$TIMESTAMP-services-haproxy.txt"
	curl -s "http://$IMAGIZER_HOST:17006/debug/services/imagizer-app-schedule.service" -o "$IMAGIZER_HOST-$TIMESTAMP-services-imagizer-app-schedule.txt"
	curl -s "http://$IMAGIZER_HOST:17006/debug/services/redis-image-cache.service" -o "$IMAGIZER_HOST-$TIMESTAMP-services-redis-image-cache.txt"
	curl -s "http://$IMAGIZER_HOST:17006/debug/services/imagizer-cloud-stats-collector.service" -o "$IMAGIZER_HOST-$TIMESTAMP-services-imagizer-cloud-stats-collector.txt"
)

echo Downloading tarball
tar -czvf "$IMAGIZER_HOST.$TIMESTAMP.tar.gz" "$IMAGIZER_HOST-$TIMESTAMP"

echo Done. please share the file "$IMAGIZER_HOST.$TIMESTAMP.tar.gz" with Imagizer support.

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.

Metrics

See the Prometheus config documentation for more information.

TIP

Prometheus metrics are also available on port 9100.

GET /metrics HTTP/1.1

cache

When using clustered Imagizer instances, purge requests will be forwarded to all nodes. Make sure the cluster nodes have access to each other's cache purging port.

TIP

Port 17011 may alternatively be used for cache purging.

Purge

Purge an image from the Imagizer cache.

DELETE ${IMAGE_URL} HTTP/1.1

Examples

Purge /image.jpg from the cache.

curl -X DELETE http://$IMAGIZER_HOST:17006/image.jpg

WARNING

With separateHostCache set to true, the hostname will influence the cache key. Use the same hostname for purging, or utilize the hostname parameter to override it when necessary.

Purge /image.jpg from the cache using the hostname override parameter.

curl -X DELETE -d hostname=$IMAGIZER_HOST http://$IMAGIZER_INTERNAL_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"
   ]
}
PropertyDescription
staticwhether of not the instance is using a static ip.
ipThe current ip of the instance.
netmaskThe current netmask of the instance.
gatewayThe current gateway address of the instance.
dnsServersA list of DNS servers the instance is using.

Updates

Minor updates may be applied directly on your Imagizer instance through the /updates endpoint.

TIP

Reboot the instance after applying the update to ensure all changes take effect.

View Available Updates

List available updates (requires v14+)

curl http://IMAGIZER_HOST:17006/updates/available

The above command returns JSON structured like this:

[
    {
        "version": "14.0-83.3",
        "url": "https://updates.imagizer.com/imagizer/imagizer-14.0-83.3.patch"
    },
    {
        "version": "14.0-81.2",
        "url": "https://updates.imagizer.com/imagizer/imagizer-14.0-83.2.patch"
    }
]

Apply Update

Apply the latest update (requires v14+)

curl -d "version=latest" \
http://IMAGIZER_HOST:17006/updates

Apply a specific version (requires v14+)

curl -d "version=14.0-83.2" \
http://IMAGIZER_HOST:17006/updates

Apply an update by URL (requires v14+)

curl -d "url=https://updates.imagizer.com/imagizer/imagizer-14.0-83.1.patch" \
http://IMAGIZER_HOST:17006/updates

Apply an update by file

curl -F "file=@imagizer-14.0-83.1.patch" \
http://IMAGIZER_HOST:17006/updates

Monitor Updates

Updates take a few minutes and may be monitored with GET request.

curl http://IMAGIZER_HOST:17006/updates

The above command returns JSON structured like this:

[
    {
       "filename": "patch2017011915521484949961",
       "status": [
          "Update has been applied"
       ]
    }
]
Last Updated:
Contributors: Nicholas Pettas