General Purpose APIs

General purpose configuration queries have the configure resource name as part of the query string. You can retrieve configuration information (GET), and perform any changes (POST, DELETE) in the configuration data.

Synopsis

GET /wsa/api/v2.0/configure/system/smtp
POST /wsa/api/v2.0/configure/system/smtp 
PUT /wsa/api/v2.0/configure/system/smtp
DELETE /wsa/api/v2.0/configure/system/smtp

Supported Resource Attributes

For more information, see AsyncOS API - Addendum to the Getting Started Guide for Secure Web Appliance.

Request Headers

Host, Accept, Authorization

Response Headers

Content-Type, Content-Length, Connection

Retrieving SMTP Relay Host Details

Sample Request

GET /wsa/api/v2.0/configure/system/smtp 
HTTP/1.1
Content-Type: application/json
Authorization: Basic YWRtaW46aXJvbnBvcnQ=
User-Agent: PostmanRuntime/7.24.1
Accept: */*
Cache-Control: no-cache
Postman-Token: 4dd1c428-a4b7-4df9-94d7-7e29e4e0dd2d
Host: 10.8.159.34:6080
Accept-Encoding: gzip, deflate, br
Connection: keep-alive

Sample Response

HTTP/1.1 200 OK
Date: Tue, 12 May 2020 06:10:34 GMT
Content-type: application/json
Content-Length: 129
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: content-type, jwttoken, mid, h, email
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS
Access-Control-Expose-Headers: Content-Disposition, jwtToken

{"res_data": {"routing_table": "Management", "relay_hosts": []}, 
"res_message": "Data received successfully.", "res_code": "200"}

Adding New SMTP Relay Hosts

Sample Request

POST /wsa/api/v2.0/configure/system/smtp 
HTTP/1.1
Content-Type: application/json
Authorization: Basic YWRtaW46aXJvbnBvcnQ=
User-Agent: PostmanRuntime/7.24.1
Accept: */*
Cache-Control: no-cache
Postman-Token: 30ad35bc-253d-4787-8e18-4cdfa3ff3d1f
Host: 10.8.159.34:6080
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 549

{
    "routing_table": "management",
    "relay_hosts": [
        {
            "host": "191.10.55.255"
        },
        {
            "host": "10.10.55.8",
            "port": "3"
        },
        {
            "host": "google1.com",
            "port": "13"
        },
        {
            "host": "ggtalk.com",
            "port": "11"
        },
        {
            "host": "google.com",
            "port": "35"
        },
         {
            "host": "google.com",
            "port": "37"
        }
    ]
}

Sample Response

HTTP/1.1 200 OK
Date: Tue, 12 May 2020 07:08:30 GMT
Content-type: application/json
Content-Length: 215
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: content-type, jwttoken, mid, h, email
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS
Access-Control-Expose-Headers: Content-Disposition, jwtToken

{"res_data": {"add_failure": [], "add_success": ["10.10.55.8:3", "191.10.55.255:25", 
"ggtalk.com:11", "google1.com:13", "google.com:37", "google.com:35"]}, 
"res_message": "Success:6, Failure: 0.", "res_code": "201"}

Modifying SMTP Relay Host Details

Sample Request

PUT /wsa/api/v2.0/configure/system/smtp 
HTTP/1.1
Content-Type: application/json
Authorization: Basic YWRtaW46aXJvbnBvcnQ=
User-Agent: PostmanRuntime/7.24.1
Accept: */*
Cache-Control: no-cache
Postman-Token: 8c18cbba-8ff3-4993-a5f3-5562fd854fde
Host: 10.8.159.34:6080
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 537

{
    "routing_table": "management",
    "relay_hosts": [
        {
            "old_host": "google.com",
            "old_port": "35",
            "new_host": "google.com",
            "new_port":"37"
        },
        {
            "old_host": "ggtalk.com",
            "old_port": "11",
            "new_host": "10.10.194.12",
            "new_port": "23"
        },
        {
            "old_host": "10.10.194.12",
            "old_port": "28",
            "new_host": "10.10.194.12",
            "new_port": "27"
        }
    ]
}

Sample Response

HTTP/1.1 200 OK
Date: Tue, 12 May 2020 07:09:47 GMT
Content-type: application/json
Content-Length: 450
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: content-type, jwttoken, mid, h, email
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS
Access-Control-Expose-Headers: Content-Disposition, jwtToken

{"res_data": {"update_success": [{"relay_host_old": "ggtalk.com:11", 
"relay_host_new": "10.10.194.12:23"}], "update_failure": [{"relay_host_old": 
"google.com:35", "relay_host_new": "google.com:37", "err_message": 
"Given new host or port is already exist."}, {"relay_host_old": 
"10.10.194.12:28", "relay_host_new": "10.10.194.12:27", "err_message": 
"Given old host or port is not found."}]}, "res_message": "Success:1, 
Failure: 2.", "res_code": "201"}

Deleting Multiple SMTP Relay Hosts

Sample Request

DELETE /wsa/api/v2.0/configure/system/smtp 
HTTP/1.1
Content-Type: application/json
Authorization: Basic YWRtaW46aXJvbnBvcnQ=
User-Agent: PostmanRuntime/7.24.1
Accept: */*
Cache-Control: no-cache
Postman-Token: 282c385c-1804-4cd7-be25-5b62a923e175
Host: 10.8.159.34:6080
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 132

[
    {
        "host": "10.10.194.12",
        "port": "23"
    },
    {
        "host": "google.com",
        "port": "37"
    }
]

Sample Response

HTTP/1.1 200 OK
Date: Tue, 12 May 2020 07:14:00 GMT
Content-type: application/json
Content-Length: 150
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: content-type, jwttoken, mid, h, email
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS
Access-Control-Expose-Headers: Content-Disposition, jwtToken

{"res_data": {"delete_success": ["10.10.194.12:23", "google.com:37"], 
"delete_failure": []}, "res_message": "Success:2, 
Failure:0", "res_code": "200"}

Deleting All SMTP Relay Hosts

Sample Request

DELETE /wsa/api/v2.0/configure/system/smtp HTTP/1.1
Content-Type: application/json
Authorization: Basic YWRtaW46aXJvbnBvcnQ=
User-Agent: PostmanRuntime/7.24.1
Accept: */*
Cache-Control: no-cache
Postman-Token: c1514e19-b401-499d-9b29-47ada4f6981e
Host: 10.8.159.34:6080
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 22

{
	"delete_all":true
}

Sample Response

HTTP/1.1 200 OK
Date: Tue, 12 May 2020 07:35:12 GMT
Content-type: application/json
Content-Length: 68
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: content-type, jwttoken, mid, h, email
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS
Access-Control-Expose-Headers: Content-Disposition, jwtToken

{"res_message": "Successfully deleted all hosts", "res_code": "200"}

Retrieving APIs Accessible to a User Role

You can retrieve a list of APIs that are available for a currently logged in user.

Synopsis

GET /api/v2.0/login/privileges

Request Headers

Host, Accept, Authorization

Response Headers

Content-Type, Content-Length, Connection

Sample Request

GET /wsa/api/v2.0/login/privileges HTTP/1.1
cache-control: no-cache
Postman-Token: 0cd8d318-e29b-40e0-bdc8-473f09cbd2b2
Authorization: Basic YWRtaW46aXJvbnBvcnQ=
User-Agent: PostmanRuntime/7.6.0
Accept: */*
Host: pod1224-wsa04.ibwsa.sgg.cisco.com:6080
accept-encoding: gzip, deflate
Connection: keep-alive

Sample Response

HTTP/1.1 200 OK
Date: Sat, 11 Apr 2020 07:35:16 GMT
Content-type: application/json
Content-Length: 2342
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: content-type, jwttoken, mid, h, email
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS
Access-Control-Expose-Headers: Content-Disposition, jwtToken

{"data": ["w_preferences_preferences", "w_config_user_dashboard", "w_config_cpu_threshold", 
"w_config_memory_threshold", "config_detail", "w_reporting_web_webcat_detail", 
"w_reporting_web_ytcat_detail", "w_reporting_domains", "w_reporting_web_user_detail", 
"w_reporting_web_application_type_detail", "w_reporting_web_malware_category", 
"w_reporting_web_user_by_traffic_monitor", "w_reporting_web_amp_detail_by_filename", 
"w_reporting_web_wbrs_score_detail", "w_reporting_web_malware_name_malware_category_detail", 
"w_reporting_web_application_name_application_type_detail", "w_reporting_web_port_detail", 
"w_reporting_web_host_by_traffic_monitor", "w_reporting_web_amp_summary", 
"w_reporting_web_amp_detail_summary", "w_reporting_web_amp_file_analysis_by_filename", 
"w_reporting_web_wbrs_threat_type_detail", "w_reporting_users_by_app_type", 
"w_reporting_web_socks_destinations", "w_reporting_web_user_application_detail", 
"w_reporting_web_socks_users", "w_reporting_users_by_category", "w_reporting_web_services_summary", 
"w_reporting_web_application_type_application_name_detail", "w_reporting_web_user_webcat_detail", 
"w_reporting_web_user_amp_detail", "w_reporting_web_user_malware_name_malware_category_detail", 
"w_reporting_policy_by_user", "w_reporting_web_malware_category_malware_name_detail", 
"w_reporting_web_users_by_sha_detail", "w_reporting_web_malware_category_malware_name_user_detail", 
"w_reporting_web_filenames_by_sha", "w_reporting_web_amp_reputation_update", 
"w_reporting_users_by_app", "w_reporting_web_application_name_detail", 
"w_reporting_web_application_name_application_behavior_detail", "w_reporting_web_transaction", 
"w_reporting_web_transaction_type", "w_reporting_web_cipher_detail_client", 
"w_reporting_web_cipher_detail_server", "w_reporting_web_reporting_system", "w_percent_cpu_utilized", 
"w_percent_ram_utilized", "w_percent_disk_utilized", "w_system_uptime", "w_alerts", "w_disk_usage", 
"w_raid_status", "w_proxy_cpu_usage", "w_proxy_disk_io_util", "w_proxy_status", "w_high_availbility", 
"w_proxy_traffic_charateristics", "w_system_cpu_usage", "w_system_memory_usage", "w_bandwidth", 
"w_rps", "w_cpu_usage_by_function", "w_server_connection", "w_client_connection", "w_bandwidth_count", 
"w_rps_count", "w_decryption_count", "w_services", "w_web_tracking_web_transaction", "ctr_token", 
"ctr_client_info"]}

Retrieving the SecureX Files

You can retrieve the details of the registered user.

Synopsis

GET /wsa/api/v2.0/ctr/user_info

Supported Resource Attributes

See AsyncOS API - Addendum to the Getting Started Guide for Secure Web Appliance for more information.

Request Headers

Host, Accept, Authorization

Response Headers

Content-Type, Content-Length, Connection

Example

This example shows a query to retrieve the user information of the registered user.

Sample Request

GET/wsa/api/v2.0/ctr/user_info

HTTP/1.1

Sample Response

HTTP/1.1

Response

HTTP/1.1 200 OK

Date: Thu, 25 Mar 2021 07:48:19 GMT
Content-type: application/json
Content-Length: 92
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: content-type, jwttoken, mid, h, email


{
    "client_id": "client-4c50a1ca-34ad-47c8-a37b-9b16153db578",
    "server": "apjc"
}

Sample Request for Token Request

GET/wsa/api/v2.0/ctr/token

HTTP/1.1

Sample Response for Token Request

HTTP/1.1 200 OK
Date: Thu, 25 Mar 2021 07:51:19 GMT
Content-type: application/json
Content-Length: 87
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: content-type, jwttoken, mid, h, email
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS
Access-Control-Expose-Headers: Content-Disposition, jwtToken
{ 
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.
eyJodHRwczpcL1wvc2NoZW1hcy5jaXNjby5jb21cL2lyb2hcL2lkZW50aXR5XC9jbGFpbXNcL3VzZXJcL2VtYWls IjoiYWhhcmluYXQrYXBqY0BjaXNjby5jb20iLCJodHRwczpcL1wvc2NoZW1hcy5jaXNjby5jb21cL2lyb2hcL2lk
ZW50aXR5XC9jbGFpbXNcL3VzZXJcL3Njb3BlcyI6WyJpcm9oLWFkbWluI iwiaW50ZWdyYXRpb24iLCJwcml2YXRlLWludGVsIiwiYWRtaW4iLCJwcm9maWxlIiwiaW5zcGVjdCIsImlyb2gt
YXV0aCIsInNzZSIsInVzZXJzIiwiY2lzY28iLCJjYXNlYm9vayIsIm9yYml 0YWwiLCJlbnJpY2giLCJvYXV0aCIsImdsb2JhbC1pbnRlbCIsImNvbGxlY3QiLCJyZXNwb25zZSIsInVpLXNldH
RpbmdzIl0sImh0dHBzOlwvXC9zY2hlbWFzLmNpc2NvLmNvbVwvaXJvaFwvaWRlbnRpdHl cL2NsYWltc1wvdXNlclwvbmljayI6IkFkaGl0aHlhIEhhIiwiZW1haWwiOiJhaGFyaW5hdCthc
GpjQGNpc2NvLmNvbSIsInN1YiI6ImRiNGFiYTc0LWRiZWYtNGMxMC1iZDE4LTgzNjQ1NGJiZjU2MyIsImlzcyI6IklS T0ggQXV0aCIsImh0dHBzOlwvXC9zY2hlbWFzLmNpc2NvLmNvbVwvaXJvaFwvaWRlbnRpdHlcL2NsYWltc1wvc2NvcGVzI
jpbImVucmljaDpyZWFkIiwicmVzcG9uc2UiXSwiZXhwIjoxNTYzNzg4NjU5LCJodHRwczpcL1 hcy5jaXNjby5jb21cL2lyb2hcL2lkZW50aXR5XC9jbGFpbXNcL29hdXRoXC9jbGllbnRcL2lkIjoiY2xpZW50LTRjNTBhMWNhL
TM0YWQtNDdjOC1hMzdiLTliMTYxNTNkYjU3OCIsImh0dHBzOlwvXC9zY2hlbWFzLmNpc2NvLm NvbVwvaXJvaFwvaWRlbnRpdHlcL2NsYWltc1wvdmVyc2lvbiI6InYxLjIwLjAtOTNjMTkyOGIzMmEwZWRiNDk1ZTUiL
CJpYXQiOjE1NjM3ODgwNTksImh0dHBzOlwvXC9zY2hlbWFzLmNpc2NvLmNvbVwvaXJvaFwvaWRlbnRpd HlcL2NsYWltc1wvb2F1dGhcL2tpbmQiOiJhY2Nlc3MtdG9rZW4ifQ.SfSzvuAJbwf4gz72KPT2HEYB8D_1g8Xlk8E0O8q9Hrlre
EMl6M9nyFY3YPJueaE6J30mw258Pg8ISoG2b1mN4O5N1hnHe-0zIEmOZbYWfp9puz-0FMfQJ ysXZ1mRJkxwxWaMJ4c0rPGaPPEuw
ER2Qi6Ql8Xg9FZgp9-s5mEebeWFRbvLW9Zly1h7mjICoNF9n1y1bU8QZt0g549kIj-s047lf2qatkeoRWxinLPGtIeGl9M1s
Cvqya1sGgpGf-hFBB2KvU4JZ-c94vIYdMOHeeh7QtMIpJhy isClanrq7ke6NJlQHyi2WYifcnRnhe5BVl6MiVE89xq3CmkNBYxG5g", 
"token_type": "bearer", "expires_in": 600, "scope": "enrich:read response" 
}

Modifying the SecureX File Settings

You can modify the registered user details.

Synopsis

PUT /wsa/api/v2.0/ctr/user_info

Supported Resource Attributes

See AsyncOS API - Addendum to the Getting Started Guide for Secure Web Appliance for more information.

Request Headers

Host, Accept, Authorization

Response Headers

Content-Type, Content-Length, Connection

Example

This example shows how to modify the registered user details for SecureX.

Sample Request

PUT /wsa/api/v2.0/ctr/user_info

HTTP/1.1

Sample Response

HTTP/1.1 200 OK

Date: Thu, 25 Mar 2021 07:48:19 GMT
Content-type: application/json
Content-Length: 92
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: content-type, jwttoken, mid, h, email
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS
Access-Control-Expose-Headers: Content-Disposition, jwtToken

{"data":{"client_id":"Y2xpZW50LWY2NzQzNjdlLTJhOTMtNDI3Yy05MGVmLWJjZmFhMGVkY2RjNA==",

"client_secret":"QmlHbGlpeFlENXNxQWVkb0R1NFprSTdzaDVGaVc5OEJMYVhEWkcydlBtWWJnR3Bud0pVZUF3",

"server":"YXBqYw=="}

}

Adding the User Information Details for SecureX

You can add the user information details for SecureX. This operation allows you to login to the SecureX ribbon.

Synopsis

POST /wsa/api/v2.0/ctr/user_info

Supported Resource Attributes

See AsyncOS API - Addendum to the Getting Started Guide for Secure Web Appliance for more information.

Request Headers

Host, Accept, Authorization

Response Headers

Content-Type, Content-Length, Connection

Example

This example shows how to create the user information.

Sample Request

HTTP/1.1



{"data":{"client_id":"Y2xpZW50LWY2NzQzNjdlLTJhOTMtNDI3Yy05MGVmLWJjZmFhMGVkY2RjNA==",

"client_secret":"MFVTTS05cERieVh0RDF5RGE2dzZvMnlJTWtwNkZ1eFU2YnJIY1VkcW1wdzZ0M1pNMTVVWGNn",

"server":"YXBqYw=="}

}

Sample Response

HTTP/1.1 200 OK

Date: Thu, 25 Mar 2021 07:32:19 GMT
Content-type: application/json
Content-Length: 32
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: content-type, jwttoken, mid, h, email
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS
Access-Control-Expose-Headers: Content-Disposition, jwtToken
 OK

Retrieving Auth Settings

You can retrieve the basic information about current authentication related configurations in Secure Web Appliance. The syntax and supported attributes are as follows:

Synopsis

GET /wsa/api/v3.0/generic_resources/auth_settings

Supported Resource Attributes

See AsyncOS API - Addendum to the Getting Started Guide for Secure Web Appliance for more information.

Request Headers

Host, Accept, Authorization

Response Headers

Content-Type, Content-Length, Connection

Example

This example shows a query to retrieve authentication settings configuration on the device.

Sample Request

GET /wsa/api/v3.0/generic_resources/auth_settings
HTTP/1.1
Host: wsa.example.com:6443
User-Agent: curl/7.55.1
Accept: */*
Authorization: Basic YWRtaW46Q2lzY28xMjMk

Sample Response

HTTP/1.1 200 OK
Date: Mon, 11 Jan 2021 08:22:28 GMT
Content-type: application/json
Content-Length: 1339
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: content-type, jwttoken, mid, h, email
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Content-Disposition, jwtToken

{
    "header_based_auth": "disable",
    "realms": [
        {
            "schemes": [
                "Basic"
            ],
            "type": "LDAP",
            "name": "AuthLDAP",
            "supportes_tui": false
        },
        {
            "schemes": [
                "Basic"
            ],
            "type": "LDAP",
            "name": "AuthLDAPTUI",
            "supportes_tui": true
        },
        {
            "schemes": [
                "Kerberos",
                "NTLMSSP",
                "Basic",
                "Header"
            ],
            "type": "AD",
            "name": "AuthADTUI",
            "supportes_tui": true
        },
        {
            "schemes": [
                "Kerberos",
                "NTLMSSP",
                "Basic",
                "Header"
            ],
            "type": "AD",
            "name": "AuthAD",
            "supportes_tui": false
        }
    ],
    "sequences": [
        {
            "schemes": [
                "NTLMSSP",
                "Basic",
                "Header",
                "Kerberos"
            ],
            "name": "All Realms"
        },
        {
            "schemes": [
                "Basic",
                "Header",
                "Kerberos"
            ],
            "name": "myAuthSequence"
        }
    ]
}

Retrieving User Agents

You can retrieve all allowed user agents recognized by Secure Web Appliance. The syntax and supported attributes are as follows:

Synopsis

GET /wsa/api/v3.0/generic_resources/user_agents

Supported Resource Attributes

See AsyncOS API - Addendum to the Getting Started Guide for Secure Web Appliance for more information.

Request Headers

Host, Accept, Authorization

Response Headers

Content-Type, Content-Length, Connection

Example

This example shows a query to retrieve all user agents recognized by the device.

Sample Request

GET /wsa/api/v3.0/generic_resources/user_agents
HTTP/1.1
Host: wsa.example.com:6443
User-Agent: curl/7.55.1
Accept: */*
Authorization: Basic YWRtaW46Q2lzY28xMjMk

Sample Response

HTTP/1.1 200 OK
Date: Mon, 11 Jan 2021 08:22:28 GMT
Content-type: application/json
Content-Length: 616
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: content-type, jwttoken, mid, h, email
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Content-Disposition, jwtToken

{
    "user_agents": [
        "Chrome/48",
        "windows_updater",
        "Firefox/40",
        "Firefox/41",
        "Firefox/42",
        "Firefox/43",
        "Chrome/45",
        "Chrome/46",
        "Chrome/47",
        "Chrome",
        "Safari",
        "adobe_updater",
        "MSIE",
        "Safari/5",
        "Safari/4",
        "Safari/7",
        "Safari/6",
        "Opera",
        "Safari/9",
        "Safari/8",
        "MSIE/11",
        "MSIE/10",
        "Firefox",
        "MSIE/9",
        "MSIE/8",
        "Opera/33",
        "Opera/32",
        "Opera/35",
        "Opera/34"
    ]
}

Retrieving URL Categories

You can retrieve all allowed URL categories that are defined by Secure Web Appliance. This API also contains some user defined categories. The syntax and supported attributes are as follows:

Synopsis

GET /wsa/api/v3.0/generic_resources/url_categories

Supported Resource Attributes

For more information, see AsyncOS API - Addendum to the Getting Started Guide for Secure Web Appliance.

Request Headers

Host, Accept, Authorization

Response Headers

Content-Type, Content-Length, Connection

Example

This example shows a query to retrieve all URL categories (predefined and custom) configured on the device.

Sample Request

GET /wsa/api/v3.0/generic_resources/url_categories
HTTP/1.1
Host: wsa.example.com:6443
User-Agent: curl/7.55.1
Accept: */*
Authorization: Basic YWRtaW46Q2lzY28xMjMk

Sample Response

HTTP/1.1 200 OK
Date: Mon, 11 Jan 2021 08:22:28 GMT
Content-type: application/json
Content-Length: 2316
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: content-type, jwttoken, mid, h, email
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Content-Disposition, jwtToken

{
    "predefined": [
        "Adult",
        "Advertisements",
        "Alcohol",
        "Arts",
        "Astrology",
        "Auctions",
        "Business and Industry",
        "Chat and Instant Messaging",
        "Cheating and Plagiarism",
        "Child Abuse Content",
        "Computer Security",
        "Computers and Internet",
        "DIY Projects",
        "Dating",
        "Digital Postcards",
        "Dining and Drinking",
        "Dynamic and Residential",
        "Education",
        "Entertainment",
        "Extreme",
        "Fashion",
        "File Transfer Services",
        "Filter Avoidance",
        "Finance",
        "Freeware and Shareware",
        "Gambling",
        "Games",
        "Government and Law",
        "Hacking",
        "Hate Speech",
        "Health and Nutrition",
        "Humor",
        "Hunting",
        "Illegal Activities",
        "Illegal Downloads",
        "Illegal Drugs",
        "Infrastructure and Content Delivery Networks",
        "Internet Telephony",
        "Job Search",
        "Lingerie and Swimsuits",
        "Lotteries",
        "Military",
        "Mobile Phones",
        "Nature",
        "News",
        "Non-governmental Organizations",
        "Non-sexual Nudity",
        "Online Communities",
        "Online Meetings",
        "Online Storage and Backup",
        "Online Trading",
        "Organizational Email",
        "Paranormal",
        "Parked Domains",
        "Peer File Transfer",
        "Personal Sites",
        "Personal VPN",
        "Photo Search and Images",
        "Politics",
        "Pornography",
        "Professional Networking",
        "Real Estate",
        "Reference",
        "Religion",
        "SaaS and B2B",
        "Safe for Kids",
        "Science and Technology",
        "Search Engines and Portals",
        "Sex Education",
        "Shopping",
        "Social Networking",
        "Social Science",
        "Society and Culture",
        "Software Updates",
        "Sports and Recreation",
        "Streaming Audio",
        "Streaming Video",
        "Tobacco",
        "Transportation",
        "Travel",
        "Weapons",
        "Web Hosting",
        "Web Page Translation",
        "Web-based Email"
    ],
    "custom": [
        "mycategory",
        "mycategoryo365"
    ]
}

Retrieving Time Ranges

You can retrieve list of time ranges that are configured in Secure Web Appliance. The syntax and supported attributes are as follows:

Synopsis

GET /wsa/api/v3.0/web_security/time_ranges

Supported Resource Attributes

See AsyncOS API - Addendum to the Getting Started Guide for Secure Web Appliance for more information.

Request Headers

Host, Accept, Authorization

Response Headers

Content-Type, Content-Length, Connection

Example

This example shows a query to retrieve configured time ranges on the device.

Sample Request

GET /wsa/api/v3.0/web_security/time_ranges
HTTP/1.1
Host: wsa.example.com:6443
User-Agent: curl/7.55.1
Accept: */*
Authorization: Basic YWRtaW46Q2lzY28xMjMk

Sample Response

HTTP/1.1 200 OK
Date: Mon, 11 Jan 2021 08:22:28 GMT
Content-type: application/json
Content-Length: 971
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: content-type, jwttoken, mid, h, email
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Content-Disposition, jwtToken

{
    "time_ranges": [
        {
            "time_values": [
                {
                    "time_of_day": "all_day",
                    "valid_days": [
                        "Saturday",
                        "Friday",
                        "Thursday",
                        "Monday",
                        "Tuesday",
                        "Wednesday"
                    ]
                }
            ],
            "name": "TestTimeRange",
            "time_zone": "America/Los_Angeles"
        },
        {
            "time_values": [
                {
                    "time_of_day": {
                        "to": "18:00",
                        "from": "10:00"
                    },
                    "valid_days": [
                        "Monday",
                        "Sunday"
                    ]
                }
            ],
            "name": "mytimerange",
            "time_zone": "Asia/Shanghai"
        }
    ]
}


Retrieving Quotas

You can retrieve list of quotas that are configured in Secure Web Appliance. The syntax and supported attributes are as follows:

Synopsis

GET /wsa/api/v3.0/web_security/quotas

Supported Resource Attributes

For more information, see AsyncOS API - Addendum to the Getting Started Guide for Secure Web Appliance.

Request Headers

Host, Accept, Authorization

Response Headers

Content-Type, Content-Length, Connection

Example

This example shows a query to retrieve configured quotas on the device.

Sample Request

GET /wsa/api/v3.0/web_security/quotas
HTTP/1.1
Host: wsa.example.com:6443
User-Agent: curl/7.55.1
Accept: */*
Authorization: Basic YWRtaW46Q2lzY28xMjMk

Sample Response

HTTP/1.1 200 OK
Date: Mon, 11 Jan 2021 08:22:28 GMT
Content-type: application/json
Content-Length: 607
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: content-type, jwttoken, mid, h, email
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Content-Disposition, jwtToken

{
    "quotas": [
        {
            "reset_time": "0:00",
            "volume_quota": 1073741824,
            "time_quota_secs": 0,
            "name": "myquota2",
            "time_zone": "America/Los_Angeles"
        },
        {
            "volume_quota": 0,
            "time_quota_secs": 54000,
            "name": "myquota",
            "time_range": "mytimerange"
        },
        {
            "reset_time": "0:00",
            "volume_quota": 60129542144,
            "time_quota_secs": 58560,
            "name": "myquota3",
            "time_zone": "America/Los_Angeles"
        }
    ]
}

Retrieving Proxy Settings

You can retrieve proxy (web proxy, socks proxy, and so on) related configurations in Secure Web Appliance. The response indicates whether a particular type of proxy is enabled or not. It also provides information about the mode of the proxy, like transparent or forward (only applicable in web proxy). The syntax and supported attributes are as follows:

Synopsis

GET /wsa/api/v3.0/generic_resources/proxy_settings

Supported Resource Attributes

See AsyncOS API - Addendum to the Getting Started Guide for Secure Web Appliance for more information.

Request Headers

Host, Accept, Authorization

Response Headers

Content-Type, Content-Length, Connection

Example

This example shows a query to retrieve proxy (web proxy, socks proxy etc.) related configurations on the device.

Sample Request

GET /wsa/api/v3.0/generic_resources/proxy_settings
HTTP/1.1
Host: wsa.example.com:6443
User-Agent: curl/7.55.1
Accept: */*
Authorization: Basic YWRtaW46Q2lzY28xMjMk

Sample Response

HTTP/1.1 200 OK
Date: Mon, 11 Jan 2021 08:22:28 GMT
Content-type: application/json
Content-Length: 207
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: content-type, jwttoken, mid, h, email
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Content-Disposition, jwtToken

{
    "proxy_settings": {
        "web": {
            "status": "enable",
            "mode": "transparent"
        },
        "socks": "disable",
        "https": "enable",
        "ftp": "enable"
    }
}

Retrieving Identification Methods

You can retrieve allowed and not allowed identification methods information which can be used while creating identification profiles. The syntax and supported attributes are as follows:

Synopsis

GET /wsa/api/v3.0/generic_resources/identification_methods

Supported Resource Attributes

See AsyncOS API - Addendum to the Getting Started Guide for Secure Web Appliance for more information.

Request Headers

Host, Accept, Authorization

Response Headers

Content-Type, Content-Length, Connection

Example

This example shows a query to get identification methods configured on the device.

Sample Request

GET /wsa/api/v3.0/generic_resources/identification_methods
HTTP/1.1
Host: wsa.example.com:6443
User-Agent: curl/7.55.1
Accept: */*
Authorization: Basic YWRtaW46Q2lzY28xMjMk

Sample Response

HTTP/1.1 200 OK
Date: Mon, 11 Jan 2021 08:22:28 GMT
Content-type: application/json
Content-Length: 154
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: content-type, jwttoken, mid, h, email
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: Content-Disposition, jwtToken

{
    "identification_methods": {
        "tui": "disable",
        "authentication": "enable",
        "asa": "enable",
        "ise": "disable"
    }
}