Manage Auto-Queries

Login as an administrative user before using these API calls.

get

Get almost every thing related all auto-queries. These include name, configured icons, query settings and list of all available icons.

Parameter Notes
c admin
t query
oper get
?c=admin&t=query&oper=get
{
    "status": "ok",
    "error": "",
    "validate": 0,
    "ids": [
        {
            "name": "All Domains",
            "qicon": "gear.png",
            "query": "",
            "params": "",
            "id": "1"
        },
        {
            "name": "Registry Expiry Date Not Set",
            "qicon": "color-yellow.png",
            "query": "(d.registry_expiry IS NULL)",
            "params": "",
            "id": "5"
        },
        {
            "name": "Domains with Empty Status",
            "qicon": "gear.png",
            "query": "(d.status IS NULL)",
            "params": "",
            "id": "3"
        },
        {
            "name": "Different Registrar\/Registry Expiry",
            "qicon": "gear.png",
            "query": "(d.registry_expiry != d.registrar_expiry)",
            "params": "",
            "id": "4"
        },
        {
            "name": "Unknown Domains (No Whois Lookup Yet)",
            "qicon": "creditcard.png",
            "query": "(d.primary_whois_checked_at IS NULL)",
            "params": "",
            "id": "2"
        },
        {
            "name": "Registrar Expiry Date Not Set",
            "qicon": "gear.png",
            "query": "(d.registrar_expiry IS NULL)",
            "params": "",
            "id": "6"
        },
        {
            "name": "About to Expire (Registrar) in 30 Days",
            "qicon": "gear.png",
            "query": "(d.registrar_expiry < [TODAY+30] AND d.registrar_expiry IS NOT NULL)",
            "params": "",
            "id": "8"
        },
        {
            "name": "COM or NET domains with Empty Registrar Expiry Date",
            "qicon": "gear.png",
            "query": "((d.domain LIKE ? OR d.domain LIKE ?) AND (d.registrar_expiry IS NULL))",
            "params": "%.com,%.net",
            "id": "7"
        },
        {
            "name": "About To Expire (Registry) in 30 Days",
            "qicon": "gear.png",
            "query": "(d.registry_expiry < [TODAY+30] AND  d.registry_expiry IS NOT NULL)",
            "params": "",
            "id": "9"
        },
        {
            "name": "Past Registry Expiry Date",
            "qicon": "gear.png",
            "query": "d.registry_expiry < [TODAY]",
            "params": "",
            "id": "10"
        },
        {
            "name": "Past Registrar Expiry Date",
            "qicon": "gear.png",
            "query": "d.registrar_expiry < [TODAY]",
            "params": "",
            "id": "11"
        },
        {
            "name": "Added within the last day",
            "qicon": "gear.png",
            "query": "d.added_on > [TODAY-1]",
            "params": "",
            "id": "12"
        },
        {
            "name": "Added within the last 5 days",
            "qicon": "gear.png",
            "query": "d.added_on > [TODAY-5]",
            "params": "",
            "id": "13"
        },
        {
            "name": "Added within the last 30 days",
            "qicon": "gear.png",
            "query": "d.added_on > [TODAY-30]",
            "params": "",
            "id": "14"
        },
        {
            "name": "Domains with a Hyphen",
            "qicon": "gear.png",
            "query": "d.domain LIKE ?",
            "params": "%-%",
            "id": "15"
        },
        {
            "name": "International Domains",
            "qicon": "gear.png",
            "query": "d.ascii_domain LIKE ?",
            "params": "xn--%",
            "id": "16"
        },
        {
            "name": "Domains with an IP",
            "qicon": "gear.png",
            "query": "(d.ip IS NOT NULL AND d.ip NOT LIKE ?)",
            "params": "%error%",
            "id": "17"
        },
        {
            "name": "Domains with No IP",
            "qicon": "gear.png",
            "query": "(d.ip IS  NULL OR d.ip = ? OR d.ip = ?)",
            "params": "-,error",
            "id": "18"
        },
        {
            "name": "Available Domains",
            "qicon": "gear.png",
            "query": "(d.status LIKE ? OR d.status = ?)",
            "params": "%available%,not registered",
            "id": "19"
        },
        {
            "name": "Domains with HTTP\/1.1 403 Home Page",
            "qicon": "gear.png",
            "query": "d.home_page_status LIKE ?",
            "params": "%\/1.1 403%",
            "id": "23"
        },
        {
            "name": "Domains with HTTP\/1.1 200 Home Page",
            "qicon": "gear.png",
            "query": "d.home_page_status LIKE ?",
            "params": "%\/1.1 200%",
            "id": "20"
        },
        {
            "name": "Domains with HTTP\/1.1 301 Home Page",
            "qicon": "gear.png",
            "query": "d.home_page_status LIKE ?",
            "params": "%\/1.1 301%",
            "id": "21"
        },
        {
            "name": "Domains with HTTP\/1.1 302 Home Page",
            "qicon": "gear.png",
            "query": "d.home_page_status LIKE ?",
            "params": "%\/1.1 302%",
            "id": "22"
        },
        {
            "name": "Domains with HTTP\/1.1 404 Home Page",
            "qicon": "gear.png",
            "query": "d.home_page_status LIKE ?",
            "params": "%\/1.1 404%",
            "id": "24"
        },
        {
            "name": "Domains with HTTP\/1.1 500 Home Page",
            "qicon": "gear.png",
            "query": "d.home_page_status LIKE ?",
            "params": "%\/1.1 500%",
            "id": "25"
        },
        {
            "name": "Domains Not in Any Category",
            "qicon": "creditcard.png",
            "query": "sid NOT IN (SELECT did FROM [CATCONNTABLE])",
            "params": "",
            "id": "26"
        }
    ],
    "icons": [
        "bulb.png",
        "calculator.png",
        "calendar.png",
        "cart.png",
        "check.png",
        "client.png",
        "clock.png",
        "color-black.png",
        "color-blue.png",
        "color-green.png",
        "color-red.png",
        "color-white.png",
        "color-yellow.png",
        "creditcard.png",
        "flag-green.png",
        "flag-red.png",
        "folder-brown.png",
        "folder-cyan.png",
        "folder-gray.png",
        "folder-green.png",
        "folder-jade.png",
        "folder-ruby.png",
        "folder-yellow.png",
        "gear.png",
        "key.png",
        "lightning.png",
        "lock.png",
        "magnifier.png",
        "star.png",
        "target.png",
        "trash.png"
    ]
}

set

Parameter Notes
c admin
t query
oper set
id auto-query id to set data for.
name Auto-query name to set.
icon Icon file name for the category.
query The query used to get the data.
params The query parameters.
ids List of all auto-query ids in the order they should appear in category list.

Set one or more of auto-query name, sort order, icon file, query settings and sort order.

?c=admin&t=query&oper=set&id=26&name=Domain%20Not%20in%20Any%20Category&icon=target.png&ids=12%2C11%2C3%2C2%2C4%2C9%2C5%2C6%2C8%2C7%2C10
{
    "status": "ok",
    "error": "",
    "validate": 0,
    "icon": "target.png",
    "name": "Domain Not in Any Category",
    "id": 26,
    "changed": 2
}