# 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.

# 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"
       ]
    }
]