How to implement
In order to use the (Undefined variable: ALVariables.WSM_OutBndWaf_2) (WSM) REST API, an API user must be created on the WSM. This user can be created through the REST API itself, the WSM Management UI, or an Amazon CloudFormation template.
Create an API user via the WSM REST API
An API user can be created during the provisioning process using the WSM REST API. The provisioning API call is the only one which does not require API user credentials, so an API username and password can be supplied along with the WSM license key. See Provision an Appliance for an example.
Create an API user via the WSM UI
After the WSM appliance has been provisioned, log into the Management UI. Then use the navigation bar on the left to go to the System > Users page. At the bottom of this page are the WSM System Users.
To create the API user, enter a username, password, and select 'API' from the Type dropdown menu. Click 'Save Changes' and your new API user will be ready for use.
Create an API user via a CloudFormation template
CloudFormation templates for autoscaling WSM appliances can be modified to automatically create an API user upon spinning up the stack. To do so, find the "UserData" block in the template under "Resources" > "lcMaster" > "UserData":
"UserData": { "Fn::Base64": { "Fn::Join": ["", ["{\"alertlogic\": {\"wsm\": {\"role\" : \"master\", \"license\" : \"", { "Ref": "wsmLicense" }, "\", \"user\" : \"", { "Ref": "wsmUser" }, "\", \"password\" : \"", { "Ref": "wsmPassword" }, "\", \"S3BucketName\" : \"", { "Ref": "s3Bucket" }, "\", \"EbsLogVolume\" : \"", { "Ref": "volumeLog" }, "\", \"MasterElbDnsName\" : \"", { "Fn::GetAtt": ["elbMaster" , "DNSName"] }, "\", \"WorkerElbDnsName\" : \"", { "Fn::GetAtt": ["elbWorker" , "DNSName"] }, "\", \"BackendElbDnsName\" : \"", { "Ref": "elbBackend" }, "\"}}}" ] ] } }
Next, define the API user's username and password within the Fn::Join function as follows:
"UserData": { "Fn::Base64": { "Fn::Join": ["", ["{\"alertlogic\": {\"wsm\": {\"role\" : \"master\", \"api_user\" : \"api_ninja\", \"api_password\" : \"ninja_password\", \"license\" : \"", { "Ref": "wsmLicense" }, "\", \"user\" : \"", { "Ref": "wsmUser" }, "\", \"password\" : \"", { "Ref": "wsmPassword" }, "\", \"S3BucketName\" : \"", { "Ref": "s3Bucket" }, "\", \"EbsLogVolume\" : \"", { "Ref": "volumeLog" }, "\", \"MasterElbDnsName\" : \"", { "Fn::GetAtt": ["elbMaster" , "DNSName"] }, "\", \"WorkerElbDnsName\" : \"", { "Fn::GetAtt": ["elbWorker" , "DNSName"] }, "\", \"BackendElbDnsName\" : \"", { "Ref": "elbBackend" }, "\"}}}" ] ] } }
The API user will now be automatically created when using this CloudFormation template.
Base Path | HTTP Method | Links |
---|---|---|
/website/ | GET | Get Available Websites
Get Website Details Get Website Denylog Test Connectivity of a Website |
POST | Add a Website | |
PUT | Change Website's Proxy Mode Update a Website's SSL Certificate Import a Proxy Template for a Website |
|
DELETE | Delete a Website | |
/appliance/ | POST | Provision an Appliance Set Synchronization Configuration |
GET | Get Synchronization Configuration | |
/interface/ | POST | Add VRRP Interface |
GET | Get VRRP Interfaces Get Interfaces |
|
DELETE | Delete VRRP Interface |