PHP client library for SEMSTORM API
Switch branches/tags
Clone or download
semstorm v3.0.1 - new endpoints
New endpoints for Explorer and Monitoring.
Create ExplorerDomains->visibility endpoint - copy of ExplorerVisiblity->getData for backwards compability.
Latest commit 923b933 Aug 14, 2018
Permalink
Failed to load latest commit information.
docs/examples add technology examples Jun 22, 2018
src/SemstormApi v3.0.1 - new endpoints Aug 14, 2018
.gitattributes Initial commit Jun 28, 2017
.gitignore gitignore Jun 29, 2017
CHANGELOG.md v3.0.1 - new endpoints Aug 14, 2018
LICENSE license and readme Jun 29, 2017
README.md v0.0.7 Jun 19, 2018
composer.json v0.0.5 Jan 23, 2018

README.md

SEMSTORM PHP SDK v3

Installing using composer:

Via composer require command

composer require semstorm/semstorm-php-sdk

Via composer.json file

{
    "require": {
        "semstorm/semstorm-php-sdk": ">=3.0"
    }
}

and then run update

composer update

Usage

Basic example

include_once 'vendor/autoload.php';

use SemstormApi\Semstorm;
use SemstormApi\Monitoring\MonitoringCampaign;
Semstorm::init( __ACCESS_TOKEN__ );
$monitoringCampaign = new MonitoringCampaign();

print_r($monitoringCampaign->retrieve(12345));

Monitoring examples

In docs/examples/Monitoring directory you can find examples with description and possible output.

Furthermore you can use MonitoringExamples.php file which will run multiple scripts and return its results. Just open docs/examples/MonitoringExamples.php file, fill config data and run script to see how API works.

More examples

For more examples see docs/examples directory, where are many samples with exhaustive comment.

Documentation

Documentation can be found in SEMSTORM API documentation pages.

SEMSTORM API

Access

Access token

In order to use SEMSTORM API, it is required to have valid access token. Access tokens are granted only to registered users in SEMSTORM. If you are registered user, log in to SEMSTORM panel, and go to access token page in profile. There you can generate or refresh your access token. When you have your access token you are ready to use SEMSTORM API.

API

API endpoint

Official API endpoint is http://api.semstorm.com/api-v3/. All requests goes through this endpoint, and all of them must be authenticated by including 'services_token' parameter.

Throttling

API have request limits. It is 1 request per second. If you make too many requests at once you will get error stating '503 Service Temporarily Unavailable. You are requesting too fast,(...)', this means you have to optimize your script to prevent further blocking.