Skip to content

hopesea/rest-api-examples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Threatstack Rest Api Example Clients

This repository provides examples of the Threat Stack v2 API. The examples center on setting up Hawk authentication.

All sample projects require the same environment variables to be set:

  • TS_USER_ID - User id of the api key holder
  • TS_API_KEY - API key for the user specified by TS_USER_ID
  • TS_ORGANIZATION_ID - Organization id of the organization to access

Python

Install Python 3 to run the python example. To install dependencies, run pip:

pip install -r requirements.txt

Run the following python command using the environment variables:

TS_USER_ID=x TS_ORGANIZATION_ID=x TS_API_KEY=x python3 example.py

Ruby

Before you can install the dependencies, you must install Ruby and bundler: To install dependencies, run bundle:

bundle install

Run the following ruby command using the environment variables:

TS_USER_ID=x TS_ORGANIZATION_ID=x TS_API_KEY=x ruby example.rb

Java

Before you can install the dependencies, you must install Java and Maven 3. To install dependencies, run mvn:

mvn compile

Run the following mvn command using the environment variables:

TS_USER_ID=x TS_ORGANIZATION_ID=x TS_API_KEY=x mvn exec:java

Node JS

Before you can install the dependencies, you must install Node and npm. To install dependencies, run npm:

npm install

Run the following node command using the environment variables:

TS_USER_ID=x TS_ORGANIZATION_ID=x TS_API_KEY=x node example.js

About

Examples for using the Threat Stack V2 api.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 34.6%
  • Ruby 25.3%
  • JavaScript 22.8%
  • Python 17.3%