The NOC CDN API uses basic CRUD operations. It’s designed to be simple and can be accessed any HTTPS library (e.g., cURL).
Access control is managed via an authentication key, denoted as the “API Key”. This key should be present in all requests and should be managed using encryption protocols (e.g., HTTPS).
Operation | Description |
---|---|
cdn/activate | Activates the CDN for a domain name. |
cdn/add | Adds a website to our CDN. Only to be used for domains without the DNS at NOC.org. |
cdn/deactivate | Deactivates the CDN for a website. |
cdn/delete | Deletes the CDN for a website – only for domains without the DNS at NOC.org. |
cdn/list | List all active websites with the CDN. |
cdn/get | Get the CDN & WAF config for a website. |
cdn/stats | Get the CDN & WAF stats for a specific day. |
cdn/logs | Download the WAF logs for a specific day. |
cdn/logs/last | Get the last logs available. |
cdn/logs/query | Get the last logs since a specified date. |
cdn/uploadssl | Upload a SSL cert/key to be used before the Let’s encrypt certificate is issued. Prevents any down time during the activation. |
cdn_alias_domain/add | Adds an alias domain to redirect to this site. |
cdn/cache/purge | Purge CDN cache for a specific website. |
cdn/set/protectedurls | Set the list of protected URLs (space separated). |
cdn/set/botprotectedurls | Set the list of bot protected URLs (space separated). |
cdn/set/readonlyurls | Set the list of read-only URLs (space separated). |
cdn/set/whitelistedurls | Set the list of whitelistedurls URLs (space separated). |
cdn/set/whitelistedips | Set the list of whitelistedurls IPs (space separated). |
cdn/set/blacklistedips | Set the list of blacklistedips IPs (space separated). |
cdn/set/websocketsurls | Set the list of websocket URLs (space separated). |
cdn/set/noncacheurls | Set the list of noncacheurls URLs (space separated). |
cdn/set/hosting_read_timeout | Set the timeout for reading from the hosting server. |
cdn/set/caching | Set the caching level of the CDN. |
cdn/set/ip | Set the hosting IP address. |
cdn/set/cachingtimestatic | Set the caching period for static assets. |
cdn/set/cachingtimepages | Set the caching period for the website |
cdn/set/OPTION | Enables or disables WAF/CDN options. |
CDN/customrules/add | Creates a new custom rule. |
CDN/customrules/delete | Deletes a custom rule for the website. |
CDN/customrules/list | List all of your custom rules for a website. |
CDN/customrules/api_protect/add_user | Add a user to a protected API URL. |
CDN/customrules/api_protect/list_user | List all users that have access to a protected API URL. |
CDN/customrules/api_protect/delete_user | Delete a user that has access to a protected API URL. |
CDN/Activate
Activates the CDN for a website.
Parameter | Argument |
---|---|
Action | cdn/activate |
Required Value | domain=(valid_domain_name), subdomain=(sub domain or @ for apex) |
Results | {“status” = “success”} |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
https://my.noc.org/api?apikey=[API_KEY]&action=cdn/activate&domain=<https://DOMAINNAME>&subdomain=@
CDN/Add
Adds a website to the WAF/CDN. Only to be used for domains with the DNS not at NOC.org. It will require that you create a CNAME (or ALIAS) record pointing to our CDN address .
Parameter | Argument |
---|---|
Action | cdn/add |
Required Value | website=(valid_website), hosting_ip(hosting IP address for the CDN to proxy) |
Results | {“status” = “success”} |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
https://my.noc.org/api?apikey=[API_KEY]&action=cdn/add&website=<https://DOMAINNAME>&hosting_ip=IPADDRESS
CDN/Deactivate
Disables the CDN for a website.
Parameter | Argument |
---|---|
Action | cdn/deactivate |
Required Value | website=(valid_website) |
Results | {“status” = “success”} |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
https://my.noc.org/api?apikey=[API_KEY]&action=cdn/deactivate&website=<https://DOMAINNAME>
CDN/Delete
Deletes the CDN for a website – if the DNS is not pointed at NOC.org.
Parameter | Argument |
---|---|
Action | cdn/delete |
Required Value | website=(valid_website) |
Results | {“status” = “success”} |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
https://my.noc.org/api?apikey=[API_KEY]&action=cdn/delete&website=<https://DOMAINNAME>
CDN/list
List all websites with the CDN activated in your account.
Parameter | Argument |
---|---|
Action | cdn/list |
Required Value | N/A |
Results | {“status”:”success”,”domains”:[“mytestdomain.com”,”globo.com”]} |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
https://my.noc.org/api?apikey=[API_KEY]&action=cdn/list
CDN/get
Get the CDN & WAF config for a website.
Parameter | Argument |
---|---|
Action | cdn/get |
Required Value | website=(valid_website) |
Results | {“status”:”success”,”config”:{“ip”:[“2.3.4.5″],”proxyto”:”80″, “https_redirect”:true,”upgrade_insecure”:true,”caching_time_static”:”30d”, “caching_time_pages”:”720m”,”gzip”:true,”http2″:true,”optmize_images”:false, “secure_cookie_flags”:false,”floc_out”:false,”waf”:true,”waf_virtual_hardening”:true, “waf_admin_lockdown”:false}} |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
https://my.noc.org/api?apikey=[API_KEY]&action=cdn/get&website=<https://DOMAINNAME>
CDN/stats
Get the CDN & WAF stats for a specific day.
Parameter | Argument |
---|---|
Action | cdn/stats |
Required Value | website=(valid_website), date=yyyy-mm-dd |
Results | {“requests”:{“2021-06-22 00:00”:{“received”:128,”blocked”:12,”bytes”:873477,”bytes_cached”:655017},”2021-06-22 01:00″:{“received”:61,”blocked”:1,”bytes”:386041,”bytes_cached”:300497},”2021-06-22 02:00″:{“received”:59,”blocked”:5,”bytes”:341446,”bytes_cached”:227979},.. |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
https://my.noc.org/api?apikey=[API_KEY]&action=cdn/stats&website=<https://DOMAINNAME>&date=2021-06-22
CDN/logs
Download the CDN & WAF logs for a specific day.
Parameter | Argument |
---|---|
Action | cdn/logs |
Required Value | website=(valid_website), date=yyyy-mm-dd |
Results | 2021-06-22 19:41:17 noc.org cdn-edge-usa-east-ny1 159.89.190.105 403 183 HIT waf:exploit_blocked3 GET /sitio/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin HTTP/1.1 – Mozilla/5.0 .. |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
https://my.noc.org/api?apikey=[API_KEY]&action=cdn/logs&website=<https://DOMAINNAME>&date=2021-06-22
CDN/logs/last
Get the last CDN & WAF logs for a specific site (in reverse order – last one is displayed first).
Parameter | Argument |
---|---|
Action | cdn/logs/last |
Required Value | website=(valid_website) |
Optional Value | limit=(number of log entries) – default is 200 |
Results | 2021-06-22 19:41:17 noc.org cdn-edge-usa-east-ny1 159.89.190.105 403 183 HIT waf:exploit_blocked3 GET /sitio/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin HTTP/1.1 – Mozilla/5.0 .. |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
https://my.noc.org/api?apikey=[API_KEY]&action=cdn/logs/last&website=<https://DOMAINNAME>&limit=10
CDN/logs/query
Get the last CDN & WAF logs for a specific site since a specified time.
Parameter | Argument |
---|---|
Action | cdn/logs/query |
Required Value | website=(valid_website),since=yyyy-mm-dd HH:MM:SS |
Optional Value | limit=(number of log entries) – default is 200 |
Results | 2021-06-22 19:41:17 noc.org cdn-edge-usa-east-ny1 159.89.190.105 403 183 HIT waf:exploit_blocked3 GET /sitio/vendor/phpunit/phpunit/src/Util/PHP/eval-stdin HTTP/1.1 – Mozilla/5.0 .. |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
https://my.noc.org/api?apikey=[API_KEY]&action=cdn/logs/query&website=<https://DOMAINNAME>&limit=10&since=2022-09-09%2013:21:10
CDN/UploadSSL
Uploads a SSL certificate and private key to be used before our certificates are issued. It is used to prevent any downtime during the migration due to the delay of certificate issuance. Note that the SSL certificate should be the full chain.
Parameter | Argument |
---|---|
Action | cdn/uploadssl |
Required Value | website=(valid_domain), public_key=@FILE, private_key=@FILE |
Optional Value | N/A |
Results | {“status” = “success”}; |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
curl -D - "https://my.noc.org/api?apikey=[API_KEY]&action=cdn/uploadssl&website=<https://DOMAINNAME>" -F 'public_key=@./fullchain.pem' -F 'private_key=@./privkey.pem'
CDN/Alias_domain/Add
Adds an additional site to the WAF/CDN as an alias. This site will 301 to the main domain name.
Parameter | Argument |
---|---|
Action | cdn/alias_domain/add |
Required Value | website=(valid_domain), alias_domain=(alias_domain) |
Optional Value | alias_type=301 (recommended) or alias_type=direct |
Results | {“status” = “success”}; |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
curl -D - "https://my.noc.org/api?apikey=[API_KEY]&action=cdn/uploadssl&website=<https://DOMAINNAME>&alias_domain=domain.net"
CDN/Cache/Purge
Purges cache for a website.
Parameter | Argument |
---|---|
Action | cdn/cache/purge |
Required Value | website=(valid_domain) |
Optional Value | N/A |
Results | {“status” = “success”}; |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
curl -D - "https://my.noc.org/api?apikey=[API_KEY]&action=cdn/cache/purge&website=<https://DOMAINNAME>"
CDN/Set/protectedurls
Sets protectedurls.
Parameter | Argument |
---|---|
Action | cdn/set/protectedurls |
Required Value | website=(valid_domain) value=[URLs space separated, eg: /admin or /api] |
Optional Value | N/A |
Results | {“status” = “success”}; |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
curl -D - "https://my.noc.org/api?apikey=[API_KEY]&action=cdn/set/protectedurls&website=<https://DOMAINNAME>&value=/temporary"
CDN/Set/botprotectedurls
Sets bot protected urls.
Parameter | Argument |
---|---|
Action | cdn/set/botprotectedurls |
Required Value | website=(valid_domain) value=[URLs space separated, eg: /admin or /api] |
Optional Value | N/A |
Results | {“status” = “success”}; |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
curl -D - "https://my.noc.org/api?apikey=[API_KEY]&action=cdn/set/botprotectedurls&website=<https://DOMAINNAME>&value=/temporary"
CDN/Set/readonlyurls
Sets ready only urls.
Parameter | Argument |
---|---|
Action | cdn/set/readonlyurls |
Required Value | website=(valid_domain) value=[URLs space separated, eg: /admin or /api] |
Optional Value | N/A |
Results | {“status” = “success”}; |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
curl -D - "https://my.noc.org/api?apikey=[API_KEY]&action=cdn/set/readonlyurls&website=<https://DOMAINNAME>&value=/temporary"
CDN/Set/whitelistedurls
Sets whitelistedurls.
Parameter | Argument |
---|---|
Action | cdn/set/whitelistedurls |
Required Value | website=(valid_domain) value=[URLs space separated, eg: /admin or /api] |
Optional Value | N/A |
Results | {“status” = “success”}; |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
curl -D - "https://my.noc.org/api?apikey=[API_KEY]&action=cdn/set/whitelistedurls&website=<https://DOMAINNAME>&value=/temporary"
CDN/Set/whitelistedips
Sets a list of IP addresses always allowed (space separated). Partial regexes are allowed. You can specify ^1.1., for example to allow 1.1.0.0/16. If you need only one IP, you can do: ^1.2.3.4.
Parameter | Argument |
---|---|
Action | cdn/set/whitelistedips |
Required Value | website=(valid_domain) value=[URLs space separated, eg: /admin or /api] |
Optional Value | N/A |
Results | {“status” = “success”}; |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
curl -D - "https://my.noc.org/api?apikey=[API_KEY]&action=cdn/set/whitelistedips&website=<https://DOMAINNAME>&value=/temporary"
CDN/Set/blacklistedips
Sets a list of IP addresses always blocked (space separated). Partial regexes are allowed. You can specify ^1.1., for example to block 1.1.0.0/16. If you need only one IP, you can do: ^1.2.3.4.
Parameter | Argument |
---|---|
Action | cdn/set/blacklistedips |
Required Value | website=(valid_domain) value=[URLs space separated, eg: /admin or /api] |
Optional Value | N/A |
Results | {“status” = “success”}; |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
curl -D - "https://my.noc.org/api?apikey=[API_KEY]&action=cdn/set/whitelistedips&website=<https://DOMAINNAME>&value=/temporary"
CDN/Set/websocketurls
Sets websocketsurls.
Parameter | Argument |
---|---|
Action | cdn/set/websocketurls |
Required Value | website=(valid_domain) value=[URLs space separated, eg: /admin or /api] |
Optional Value | N/A |
Results | {“status” = “success”}; |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
curl -D - "https://my.noc.org/api?apikey=[API_KEY]&action=cdn/set/websocketsurls&website=<https://DOMAINNAME>&value=/temporary"
CDN/Set/noncacheurls
Sets noncacheurls.
Parameter | Argument |
---|---|
Action | cdn/set/noncacheurls |
Required Value | website=(valid_domain) value=[URLs space separated, eg: /admin or /api] |
Optional Value | N/A |
Results | {“status” = “success”}; |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
curl -D - "https://my.noc.org/api?apikey=[API_KEY]&action=cdn/set/noncacheurls&website=<https://DOMAINNAME>&value=/temporary"
CDN/Set/hosting_read_timeout
Sets the timeout when reading the responses from the hosting server (default to 45s).
Parameter | Argument |
---|---|
Action | cdn/set/hosting_read_timeout |
Required Value | website=(valid_domain) value=10s,30s,45s,60s,120s,180s,300s |
Optional Value | N/A |
Results | {“status” = “success”}; |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
curl -D - "https://my.noc.org/api?apikey=[API_KEY]&action=cdn/set/hosting_read_timeout&website=<https://DOMAINNAME>&value=7d"
CDN/Set/caching
Sets the CDN caching level. We support two modes: default and aggressive. The default caches your static files and pages, respecting your site headers. The aggressive mode (full) tries to cache as much as possible, including some dynamic pages.
Parameter | Argument |
---|---|
Action | cdn/set/caching |
Required Value | website=(valid_domain) value=aggressive or default |
Optional Value | N/A |
Results | {“status” = “success”}; |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
curl -D - "https://my.noc.org/api?apikey=[API_KEY]&action=cdn/set/caching&website=<https://DOMAINNAME>&value=default"
CDN/Set/caching_time_static
Sets the CDN caching period for static assets for your site. It includes images, js and css files.
Parameter | Argument |
---|---|
Action | cdn/set/caching_time_static |
Required Value | website=(valid_domain) value=10m,30m,60m,120m,240m,360m,720m,1d,2d,3d,7d,14d,30d |
Optional Value | N/A |
Results | {“status” = “success”}; |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
curl -D - "https://my.noc.org/api?apikey=[API_KEY]&action=cdn/set/caching_time_static&website=<https://DOMAINNAME>&value=7d"
CDN/Set/caching_time_pages
Sets the CDN caching period for your site.
Parameter | Argument |
---|---|
Action | cdn/set/caching_time_pages |
Required Value | website=(valid_domain) value=10m,30m,60m,120m,240m,360m,720m,1d,2d,3d,7d,14d,30d |
Optional Value | N/A |
Results | {“status” = “success”}; |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
curl -D - "https://my.noc.org/api?apikey=[API_KEY]&action=cdn/set/caching_time_pages&website=<https://DOMAINNAME>&value=7d"
CDN/Set/OPTION
Enables or disables some WAF/CDN options. Setting to “true” will enable it and to “false” to disable. Available actions: https_redirect (to force HTTP to HTTPS), upgrade_insecure (to upgrade HTTP resources to HTTPS), gzip, floc_out (to block Google’s FLOC proposal), optmize_images, secure_cookie_flags, waf, waf_virtual_hardening, waf_admin_lockdown.
Parameter | Argument |
---|---|
Action | cdn/set/https_redirect |
Action | cdn/set/upgrade_insecure |
Action | cdn/set/gzip |
Action | cdn/set/floc_out |
Action | cdn/set/optmize_images |
Action | cdn/set/secure_cookie_flags |
Action | cdn/set/waf |
Action | cdn/set/waf_virtual_hardening |
Action | cdn/set/waf_admin_lockdown |
Required Value | website=(valid_domain) value=[true or false] |
Results | {“status” = “success”}; |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
curl -D - "https://my.noc.org/api?apikey=[API_KEY]&action=cdn/set/gzip&website=<https://DOMAINNAME>&value=true"
CDN/customrules/add
Creates a new custom rule.
Parameter | Argument |
---|---|
rule_name | [a-z0-9-]: Optional name for the rule. If no rule_name is provided, a random one will be selected |
rule_type | honeypot, max_requests, redirect_to, browser_verify, queue_traffic, ip_block, useragent_block. |
–honeypot | Useful to create a honeypot of URLs that should never be visited. Any IP that visits it will be blocked for the time specified (default to 600 seconds). |
–max_requests | Specifies the maximum allow of requests per IP per minute to that URL. Default to 50 if value is not specified. |
–redirect_to | Specifies a 301 redirection page for the specified URL. |
–browser_verify | Attempts to verify if the request is coming from a valid browser (likely a real user) – and not a bot. Bots will be blocked. |
–queue | Sets the maximum allowed current visitors. Any users over the limit will be queued on our waiting room and allowed on a first come first serve, basis. Fair access. |
–country_block | Specifies a set of countries to block to the provided URL (use / to block to the whole site). Countries need to be space separated and using the 2 digit country code (RU CN to block Russian and China, for example). |
–api_protect | Specifies a list of URLs to be covered by our API_protect system. |
url | URLs to apply this new custom rule (use / for the whole site). Multiple URLs can be specified with spaces. |
region | Region to apply this rule (north_america, south_america, europe, asia and oceania). Use all (default) for all regions. |
block_response | What to do in case of a block. default (text-based block message), stealthy_404 (generic 404 error), stealthy_503 (generic 503 error), stealthy_403, html (html block message), empty_200 (empty 200 response), redirect_to:URL |
Required values | website=(valid_domain) rule_type=(), url=() |
Results | {“status” = “success”} |
In case of error | {“status”:”failed”, “reason”:”reason why”} |
Example URL (redirect /testurl to /testurl2)
https://my.noc.org/api?apikey=[API_KEY]&action=cdn/customrules/add&website=<https://domain>&rule_type=redirect_to&url=/testurl&value=/testurl2
Example URL (max requests per IP of 150 to /testurl2):
https://my.noc.org/api?apikey=[API_KEY]&action=cdn/customrules/add&website=<https://domain>&rule_type=max_requests&url=/testurl2&value=150
Example URL (block Russia, Iran and North Korea on the whole site):
https://my.noc.org/api?apikey=[API_KEY]&action=cdn/customrules/add&website=<https://domain>&rule_type=country_block&url=/&value=RU KP IR
Example API protection rule created:
$ curl -D - "https://my.noc.org/api?apikey=YOURAPIKEY&action=cdn/customrules/add&website=YOURSITE&rule_type=api_protect&url=/api&rule_name=my_apiprotected"
{"status":"success", "notice":"CDN/WAF Custom rule added for https://YOURSITE: my_apiprotected"}
CDN/customrules/delete
Deletes a custom rule for the website.
Parameter | Argument |
---|---|
Action | cdn/customrules/delete |
Required Value | website=(valid_website), rule_name=(rule_name) |
Optional Value | N/A |
Results | {“status” = “success”}; |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
curl -D - "https://my.noc.org/api?apikey=[API_KEY]&action=cdn/customrules/delete&website=<https://DOMAINNAME>&rule_name=[RULENAME]
CDN/customrules/list
List all of your custom rules for a website.
Parameter | Argument |
---|---|
Action | cdn/customrules/list |
Required Value | website=(valid_website) |
Optional Value | N/A |
Results | {“status” = “success”}; |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example URL:
curl -D - "https://my.noc.org/api?apikey=[API_KEY]&action=cdn/customrules/list&website=<https://DOMAINNAME>
CDN/customrules/api_protect/add_user
Give user access to your protected API.
Parameter | Argument |
---|---|
Action | cdn/customrules/api_protect/add_user |
Required Value | website=(valid_website) |
Required Value | username=user@yourdomain.com |
Optional Value | max_requests=100 |
Optional Value | expire=1%20week, specify a date in YYYY-MM-DD format or things like “1 month“, “1 year“, “6 months“ |
Optional Value | Create user using this username: username=open_access control number of requests with max_requests |
Results | {“status”:”success”, “notice”:”CDN/WAF API_protect user added for https://YOURSITE: user@yourdomain.com, Access token: NEWTOKEN”} |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example to give a new user access to an API:
$ curl -s "https://my.noc.org/api?apikey=YOURAPIKEY&action=cdn/customrules/api_protect/add_user&website=YOURSITE&username=user@yourdomain.com"
Example to limit the requests that user can make to the API:
$ curl -s "https://my.noc.org/api?apikey=APIKEY&action=cdn/customrules/api_protect/add_user&website=YOURSITE&username=client_enterprise_x&max_requests=100"
Example to set an expiration for a user accessing the API:
$ curl -D - "https://my.noc.org/api?apikey=YOURAPIKEY&action=cdn/customrules/api_protect/add_user&website=YOURSITE&username=client_enterprise_trial_z&max_requests=100&expire=1%20week
Example to open guess access to an API using a fixed number of requests:
curl -D - "https://my.noc.org/api?apikey=YOURAPIKEY&action=cdn/customrules/api_protect/add_user&website=YOURSITE&username=open_access&max_requests=10"
Usage will be tracked in header:
noc-api-access: pass
noc-api-limit-hour: 10
noc-api-usage-hour: 2
Block will also be tracked in the header:
noc-api-access: deny
noc-api-limit-hour: 10
noc-api-usage-hour: 11
{"status":"error", "reason":"API access blocked. You reached your utilization limit per hour: 10"}
CDN/customrules/api_protect/list_users
List all the users that have access to a protect API URL.
Parameter | Argument |
---|---|
Action | cdn/customrules/api_protect/list_user |
Required Value | website=(valid_website) |
Results | {“user@yourdomain.com”:{“access_token”:”XXX”,”max_requests_per_hour”:”20″}..} |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
Example of how to pull a list of users with access to the protect API URL:
$ curl "https://my.noc.org/api?apikey=YOURAPIKEY&action=cdn/customrules/api_protect/list_users&website=YOURSITE"
CDN/customrules/api_protect/delete_users
Delete a user that has access to a protect API URL.
Parameter | Argument |
---|---|
Action | cdn/customrules/api_protect/delete_user |
Required Value | website=(valid_website) |
Required Value | username=user@yourdomain.com |
Results | {“user@yourdomain.com”:{“access_token”:”XXX”,”max_requests_per_hour”:”20″}..} |
In case of error: | {“status”:”failed”, “reason”:”reason why”} |
curl -D - "https://my.noc.org/api?apikey=YOURAPIKEY&action=cdn/customrules/api_protect/delete_user&website=YOURSITE&username=user@yourdomain.com"
{"status":"success", "notice":"CDN/WAF API Protected user deleted for https://YOURSITE: user@yourdomain.com"}