The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WebService::ThreatStack - Threat Stack API client

VERSION

Version 1.00

SYNOPSIS

Threat Stack is a provider of cloud security management and compliance solutions delivered using a Software as a service model. This API client interfaces with the Threat Stack REST API.

CONFIGURATION

    use WebService::ThreatStack;
 
    my $ts = WebService::ThreatStack->new(
        api_key => '[your-api-key]',
        debug   => 1
     );

SUBROUTINES/METHODS

agents

List all agents assigned to your active organization.

    my $agent_list = $ts->agents(
        page  => 0,
        count => 20,
        start => '2015-04-01',
        end   => '2017-07-01'
    );

agent_by_id

Get details of a specific agent resource. The id to use is id, not agent_id.

    my $agent_info = $ts->agent_by_id(id => $id);

alerts

This URI retrieves all recent alerts related to your current active organization.

    my $alerts = $ts->alerts(
        count => 20,
        start => "2017-07-01",
        end   => "2017-07-20"
    );

alert_by_id

Every alert has a URI to fetch specific information about it. Additionally, each alert has a latest_events and rule attributes that provides events related to that alert and rule triggered respectively.

    my $alert_info = $ts->alert_by_id(id => $alert_id);

policies

Policies object manage the alerts that will be triggered when certain events matches. A default policy is applied to each agent on creation and custom ones can be created or assigned via the User Interface. Note that we’ve introduced the term ruleset to supersede policies – the API will be updated shortly, but any existing references to policies will still work as expected.

    my $policies = $ts->policies();

policy_by_id

Retrieve details of a single policy object.

    my $policy_info = $ts->policy_by_id(id => $policy_id);

organizations

This resource retrieve all organizations you own or are part of.

    my $organizations = $ts->organizations();

organization_users

This resource retrieves all users that are part of your default or active (if you use the organization parameter). To change the context just add organization={ORG_ID} to do requests on that organization context.

    my $organization_users = $ts->organization_users(id => $organization_id);

audit_logs

Get all audit logs

    my $audit_logs = $ts->audit_logs(
        page  => 0,
        count => 20,
        start => "2015-04-01",
        end   => "2017-07-01"
    );

search_logs

Using the q parameter you can do arbitrary search on logs that match that specific string pattern. For example, you can do search of q=queue, q=john.doe@example.com, etc.

    my $log_results = $ts->search_logs(q => "PCI");

_call

Private method that makes call to API web service.

AUTHOR

Dino Simone, <dino at simone.is>

BUGS

Please report any bugs or feature requests to bug-webservice-castleio at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WebService-CastleIO. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc WebService::ThreatStack

You can also look for information at:

LICENSE AND COPYRIGHT

Copyright 2017 Dino Simone - dinosimone.com

This program is distributed under the MIT (X11) License: http://www.opensource.org/licenses/mit-license.php

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 183:

Non-ASCII character seen before =encoding in 'we’ve'. Assuming UTF-8