The test-tcell Developer Hub

Welcome to the test-tcell developer hub. You'll find comprehensive guides and documentation to help you start working with test-tcell as quickly as possible, as well as support if you get stuck. Let's jump right in!

Suggest Edits

How to test API endpoints

 

This tCell API documentation is responsive and you can use it to test the API endpoints before calling them in your applications. To test an API endpoint:

  1. Go to the API Key Management page from your Insight Platform account.
  2. Select the User Key tab.
  3. Click the New User Key button and create a user key with the appropriate permissions.
  1. Copy the new API Key and store it carefully. For security reasons, you will not be able to view your key afterwards.
  2. On this API documentation website, use the left navigation bar to open the API endpoint you wish to test.
  1. If the API endpoint requires parameters, enter the required and optional parameters in the “BODY PARAMS” and “PATH PARAMS” sections.
  2. Click the authentication button that’s beside the Try It button and has an icon of a person with a lock on the side. You will be prompted for the X-API-Key. Enter your API Key.
  3. Click the Try It button.
  4. If all of the information is correct you should get a 200 OK with the response below it.

Note

This site automatically generates code to call the API in various programming languages such as Ruby, JavaScript, and Python. You can copy and paste this code in your applications but you must be careful of the following requirements:

  • The automatically generated code does not contain path or body parameters by default. You must provide the necessary parameters in the required fields in order to add them to the code.
  • After copying the generated code into your application, you must also provide the “X-API-Key” header in your code.
Suggest Edits

Get app name and ID

Fetches the display-name and App ID for the app with the given ID.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id
curl --request GET \
  --url https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id
var request = require("request");

var options = { method: 'GET',
  url:
   'https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id");

xhr.send(data);
import requests

url = "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "MyApp-QX7E7",
  "name": "My App"
}

Path Params

app_id
string
required

The app ID

Response

A JSON object with the app ID and the user-friendly app display name

idstring

The app ID

namestring

The name of the app

No app with the provided ID was found

Suggest Edits

List apps

Fetches app name and app ID for all apps in a customer environment.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://us.api.insight.rapid7.com/tcell/api/v1/apps
curl --request GET \
  --url https://us.api.insight.rapid7.com/tcell/api/v1/apps
var request = require("request");

var options = { method: 'GET',
  url: 'https://us.api.insight.rapid7.com/tcell/api/v1/apps' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://us.api.insight.rapid7.com/tcell/api/v1/apps")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://us.api.insight.rapid7.com/tcell/api/v1/apps");

xhr.send(data);
import requests

url = "https://us.api.insight.rapid7.com/tcell/api/v1/apps"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "total": 2,
  "apps": [
    {
      "id": "MyApp-QX7E7",
      "name": "My App"
    },
    {
      "id": "MyOtherApp-j9Gye",
      "name": "My Other App"
    }
  ]
}

Response

Details for all apps

totalinteger

The number of items returned

appsarray

A list of apps

Suggest Edits

Create app

Create an application

 

Header Auth

 Authentication is required for this endpoint.
posthttps://us.api.insight.rapid7.com/tcell/api/v1/apps
curl --request POST \
  --url https://us.api.insight.rapid7.com/tcell/api/v1/apps
var request = require("request");

var options = { method: 'POST',
  url: 'https://us.api.insight.rapid7.com/tcell/api/v1/apps' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://us.api.insight.rapid7.com/tcell/api/v1/apps")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://us.api.insight.rapid7.com/tcell/api/v1/apps");

xhr.send(data);
import requests

url = "https://us.api.insight.rapid7.com/tcell/api/v1/apps"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "app_id": "MyApp-QX7E7"
}

Body Params

app_display_name
string
required

The display name of your new application (An app id will be derived from this name)

Response

The application ID for the newly created tCell app

app_idstring

The ID of the newly created Application

Suggest Edits

Get the Tags for an app

Fetch the set of tags for a tCell app

 

Header Auth

 Authentication is required for this endpoint.
gethttps://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/tags
curl --request GET \
  --url https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/tags
var request = require("request");

var options = { method: 'GET',
  url:
   'https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/tags' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/tags")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/tags");

xhr.send(data);
import requests

url = "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/tags"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "tags": [
    "production",
    "web-api"
  ]
}

Path Params

app_id
string
required

The app ID

Response

An array of tags for the chosen app

tagsarray

List of strings, presenting the tags for the application

Suggest Edits

Change tags

Assign a complete new set of tags to an app, removing any previously existing tags.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/tags
curl --request POST \
  --url https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/tags
var request = require("request");

var options = { method: 'POST',
  url:
   'https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/tags' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/tags")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/tags");

xhr.send(data);
import requests

url = "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/tags"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

app_id
string
required

The app ID

Body Params

tags
array of strings
required

List of strings, choosing the new tags for the application

Response

Successfully added tags

Suggest Edits

Add tags

All the tags posted in the body will be added to the set of tags the app already has

 

Header Auth

 Authentication is required for this endpoint.
puthttps://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/tags
curl --request PUT \
  --url https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/tags
var request = require("request");

var options = { method: 'PUT',
  url:
   'https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/tags' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/tags")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/tags");

xhr.send(data);
import requests

url = "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/tags"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

app_id
string
required

The app ID

Body Params

tags
array of strings
required

List of strings, choosing the new tags for the application

Response

Successfully updated tags

Suggest Edits

Remove tags

Remove all tags from the application

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/tags
curl --request DELETE \
  --url https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/tags
var request = require("request");

var options = { method: 'DELETE',
  url:
   'https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/tags' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/tags")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/tags");

xhr.send(data);
import requests

url = "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/tags"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

app_id
string
required

The app ID

Response

Successfully removed tags

Suggest Edits

Get agent details

Fetches details for the agent with the given ID.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/agents/agent_id
curl --request GET \
  --url https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/agents/agent_id
var request = require("request");

var options = { method: 'GET',
  url:
   'https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/agents/agent_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/agents/agent_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/agents/agent_id");

xhr.send(data);
import requests

url = "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/agents/agent_id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "webserver1",
  "type": "JVMAgent",
  "version": "1.2.2",
  "from": 1497046105489,
  "to": 1501553245386,
  "active": false
}

Path Params

agent_id
string
required

The agent ID

app_id
string
required

The app ID

Response

Details for the provided agent, including the agent type (ApacheAgent, JVMAgent, etc), version string, earliest and most recent time seen, and whether the agent is currently known to be actively sending data to the tCell service.

idstring

The agent ID

typestring

The agent type (JVMagent, ruby, etc)

versionstring

The version of the agent

frominteger

The Unix timestamp (in ms) when the agent was first seen

tointeger

The Unix timestamp (in ms) when the agent was last seen

last_process_idstring

The most recent process ID associated with the agent

activeboolean

Whether or not the agent is currently active

No agent with the provided ID was found

Suggest Edits

List agents

Fetches details for all seen agents (optionally matching the provided criteria).

 

Header Auth

 Authentication is required for this endpoint.
gethttps://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/agents
curl --request GET \
  --url https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/agents
var request = require("request");

var options = { method: 'GET',
  url:
   'https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/agents' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/agents")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/agents");

xhr.send(data);
import requests

url = "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/agents"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "total": 2,
  "agents": [
    {
      "id": "my-agent0",
      "type": "JVMAgent",
      "version": "0.2.2",
      "from": 1497046105489,
      "to": 1501553245386,
      "active": false
    },
    {
      "id": "my-agent1",
      "type": "JVMAgent",
      "version": "0.2.3",
      "from": 1497046105496,
      "to": 1497369265492,
      "active": true
    }
  ]
}

Path Params

app_id
string
required

The app ID

Query Params

from
integer

The beginning (earliest endpoint) of a time window for known agents. Agents which connected to the tCell service outside this window will not be returned. Value in milliseconds from UNIX epoch. Data is not available for over 30 days into the past.

to
integer

The end (most recent endpoint) of a time window for known agents. Agents which connected to the tCell service outside this window will not be returned. Value in milliseconds from UNIX epoch.

per_page
integer

Specify number of returned results per page, defaults to 10.

page
integer

Select which page is returned, default/first page is 1.

Response

A list of all agents matching the provided criteria

totalinteger

The number of items returned

agentsarray

A list of agents

Suggest Edits

Get route details

Fetches details for the route with the given ID.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/routes/route_id
curl --request GET \
  --url https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/routes/route_id
var request = require("request");

var options = { method: 'GET',
  url:
   'https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/routes/route_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/routes/route_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/routes/route_id");

xhr.send(data);
import requests

url = "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/routes/route_id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": 1029059990,
  "method": "get",
  "pattern": "/path/to/my/route",
  "controller": "my.controller"
}

Path Params

route_id
string
required

The route ID

app_id
string
required

The app ID

Response

Details for the provided route, including the route id, http method, route pattern used by the framework, and a code signature for the controller.

idinteger

The ID of the route

methodstring

The HTTP method (GET, POST, ...) for the route

patternstring

The path pattern for the route

controllerstring

The name of the controller associated with the route (when applicable)

No route with the provided ID was found

Suggest Edits

List routes

Fetches details for all seen routes (matching the provided criteria).

 

Header Auth

 Authentication is required for this endpoint.
gethttps://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/routes
curl --request GET \
  --url https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/routes
var request = require("request");

var options = { method: 'GET',
  url:
   'https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/routes' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/routes")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/routes");

xhr.send(data);
import requests

url = "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/routes"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "total": 2,
  "routes": [
    {
      "id": 1029059990,
      "method": "get",
      "pattern": "/path/to/my/route",
      "controller": "my.controller"
    },
    {
      "id": 1956030401,
      "method": "post",
      "pattern": "/path/to/my/other/route",
      "controller": "my.other.controller"
    }
  ]
}

Path Params

app_id
string
required

The app ID

Query Params

from
integer

The beginning (earliest endpoint) of a time window for known routes. Routes reported by agents outside this window will not be returned. Value in milliseconds from UNIX epoch. Data is not available for over 30 days into the past.

to
integer

The end (most recent endpoint) of a time window for known routes. Routes reported by agents outside this window will not be returned. Value in milliseconds from UNIX epoch.

per_page
integer

The number of results to be returned per page, defaults to 10.

page
integer

Select which page is returned, default/first page is 1.

Response

A list of details for all routes matching the provided criteria including the route id, http method, route pattern used by the framework, and a code signature for the controller.

totalinteger

The number of items returned

routesarray

A list of routes

Suggest Edits

inline scripts

 
Suggest Edits

Get inline script details

Fetches details for the inline script with the given ID.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/inline_scripts/inline_script_id
curl --request GET \
  --url https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/inline_scripts/inline_script_id
var request = require("request");

var options = { method: 'GET',
  url:
   'https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/inline_scripts/inline_script_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/inline_scripts/inline_script_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/inline_scripts/inline_script_id");

xhr.send(data);
import requests

url = "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/inline_scripts/inline_script_id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": "sha256-A08OmFGXGZjnMgeFRMlrNsPQHO33yqMyNZ1vHYNWcBQ=",
  "approved": false,
  "template": "alert(?)",
  "created_at": 1497046027847,
  "last_reported_at\"": 1502944538974
}

Path Params

inline_script_id
string
required

The inline script ID

app_id
string
required

The app ID

Response

Details for the given inline script, including approved: whether the script is marked as intended; template: the script text with literals replaced by ?; created_at: when the script was added to the tCell database; last_reported_at: when the jsagent last reported this script.

idstring

No inline script with the provided ID was found

Suggest Edits

List inline scripts

Fetches details for all seen inline scripts (matching the provided criteria).

 

Header Auth

 Authentication is required for this endpoint.
gethttps://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/inline_scripts
curl --request GET \
  --url https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/inline_scripts
var request = require("request");

var options = { method: 'GET',
  url:
   'https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/inline_scripts' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/inline_scripts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/inline_scripts");

xhr.send(data);
import requests

url = "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/inline_scripts"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "total": 2,
  "inline_scripts": [
    {
      "id": "sha256-A08OmFGXGZjnMgeFRMlrNsPQHO33yqMyNZ1vHYNWcBQ=",
      "approved": false,
      "created_at": 1497046027847,
      "last_reported_at": 1502944422734
    },
    {
      "id": "sha256-rO8xIoxDJxqDH_X33TtZFlHjp5y6BgfT5QBUMSuvQfg=",
      "approved": false,
      "created_at": 1497048192298,
      "last_reported_at": 1502944404240
    }
  ]
}

Path Params

app_id
string
required

The app ID

Query Params

from
integer

The beginning (earliest endpoint) of a time window for inline scripts. Inline scripts reported by agents outside this window will not be returned. Value in milliseconds from UNIX epoch. Data is not available for over 30 days into the past.

to
integer

The end (most recent endpoint) of a time window for inline scripts. Inline scripts reported by agents outside this window will not be returned. Value in milliseconds from UNIX epoch.

per_page
integer

Specify number of returned results per page, defaults to 10.

page
integer

Select which page is returned, default/first page is 1.

Response

A list of all inline scripts matching the provided criteria

totalinteger

The number of items returned

inline_scriptsarray

A list of inline scripts

 
Suggest Edits

Get package details

Fetches details for the package with the given ID.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/packages/package_id
curl --request GET \
  --url https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/packages/package_id
var request = require("request");

var options = { method: 'GET',
  url:
   'https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/packages/package_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/packages/package_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/packages/package_id");

xhr.send(data);
import requests

url = "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/packages/package_id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "id": 2579938,
  "vendor": "org.apache.tomcat",
  "name": "tomcat-catalina-ha",
  "version": "7.0.69",
  "build": "unknown",
  "created_at": 1497046105495
}

Path Params

package_id
string
required

The package ID

app_id
string
required

The app ID

Response

Details for the provided package

idinteger

The ID of the package

vendorstring

The vendor providing the package

namestring

The name of the package

versionstring

The version of the package

buildstring

The build ID of the package

created_atinteger

Unix timestamp (in ms) when the package was first seen

No package with the provided ID was found

Suggest Edits

List packages

Fetches details for all seen packages (matching the provided criteria).

 

Header Auth

 Authentication is required for this endpoint.
gethttps://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/packages
curl --request GET \
  --url https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/packages
var request = require("request");

var options = { method: 'GET',
  url:
   'https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/packages' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/packages")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/packages");

xhr.send(data);
import requests

url = "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/packages"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "total": 2,
  "packages": [
    {
      "id": 2579938,
      "vendor": "org.apache.tomcat",
      "name": "tomcat-catalina-ha",
      "version": "7.0.69",
      "build": "unknown",
      "created_at": 1497046105495
    },
    {
      "id": 2579939,
      "vendor": "org.apache.tomcat",
      "name": "tomcat-juli",
      "version": "7.0.69",
      "build": "unknown",
      "created_at": 1497046105495
    }
  ]
}

Path Params

app_id
string
required

The app ID

Query Params

from
integer

Unix timestamp (in ms; exclusive) from which to fetch events.

to
integer

Unix timestamp (in ms; inclusive) until which to fetch events.

per_page
integer

The number of results to be returned per page

page
integer

Select which page is returned, default/first page is 1.

Response

A list of all packages matching the provided criteria

totalinteger

The number of items returned

packagesarray

A list of packages

Suggest Edits

Get events

Fetches events of the provided type.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/sources/source/table
curl --request GET \
  --url https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/sources/source/table
var request = require("request");

var options = { method: 'GET',
  url:
   'https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/sources/source/table' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/sources/source/table")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/sources/source/table");

xhr.send(data);
import requests

url = "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/sources/source/table"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

{
  "total": 1,
  "table": [
    {
      "method": "Post",
      "city": "Bogotá",
      "full_uri": null,
      "ip": "192.123.123.123",
      "parameter": null,
      "location": {
        "location": {
          "latitude": 4.6492,
          "longitude": -74.0628,
          "city": "Bogotá",
          "country": "Colombia",
          "iso-code": "CO"
        },
        "is-tor": false,
        "asn": {
          "number": "AS3816",
          "name": "TELECOMUNICACIONES S.A. ESP"
        }
      },
      "session_id": "f6e075f9f334a28ab5da8a58bec253450fec0cd212bb7863fd1f72b4f0c6ace8",
      "path": "/some/path/*",
      "detection_point": "s5xx",
      "payload": null,
      "country": "Colombia",
      "stripped_uri": "https://my-side.corp/some/path/*",
      "user_id": null,
      "to": null,
      "pattern_id": null,
      "route_id": 157347626,
      "transaction_id": null,
      "id": "40577ef1-8314-11e7-9d63-8fc126905e2f",
      "from": null,
      "app_id": "DemoB-QX7E7",
      "route": "post /some/path/*",
      "time": 1502950866015
    }
  ]
}

Path Params

source
string
required

The type of events to fetch

app_id
string
required

The app ID

Query Params

timerange
string

Relative time from now (ignored if from is provided).

filter
string

Filters out events based on a predicate.
The syntax is filter=field:operator:value, where:
field is a field present in the data
operator is one of include (equals), exclude (not equals), gt (greater than), and lt (less than)
value is the value to apply the operator to

Examples:
Only return events where id is "foo":
filter=id:include:foo
Don't include events where id is "bar":
filter=id:exclude:bar

group_by
string

Field to group events by.

Examples:
Group by city:
group_by=city

Group by city and user_id:
group_by=city&group_by=user_id

sort_by
string

Field to sort events by

order
string

Order to sort events in

column
string

Selects which fields to include in the results.

Examples:
Only include the id field:
column=id

Only include the id, city, and ip fields:
column=id&column=city&column=ip

Response

A list of matching events.

 
Suggest Edits

Get the active config

Fetches the currently active app config.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/latest
curl --request GET \
  --url https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/latest
var request = require("request");

var options = { method: 'GET',
  url:
   'https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/latest' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/latest")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/latest");

xhr.send(data);
import requests

url = "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/latest"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

app_id
string
required

The app ID

Response

The latest config data

Suggest Edits

Get config

Fetches the config with the given ID.

 

Header Auth

 Authentication is required for this endpoint.
gethttps://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/config_id
curl --request GET \
  --url https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/config_id
var request = require("request");

var options = { method: 'GET',
  url:
   'https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/config_id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/config_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/config_id");

xhr.send(data);
import requests

url = "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/config_id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

undefined

Path Params

config_id
integer
required

The config ID

app_id
string
required

The app ID

Response

The config data for the given config ID

No config with the provided ID was found

Suggest Edits

Add ips to blacklisted list

Add ips to the existing blacklisted ips list inside the blocked ips config

 

Header Auth

 Authentication is required for this endpoint.
posthttps://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/blockedips/blacklistedips
curl --request POST \
  --url https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/blockedips/blacklistedips
var request = require("request");

var options = { method: 'POST',
  url:
   'https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/blockedips/blacklistedips' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/blockedips/blacklistedips")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/blockedips/blacklistedips");

xhr.send(data);
import requests

url = "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/blockedips/blacklistedips"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Config validation failed. 1 invalid IP(s) in blockedips: myIp%*#

Path Params

app_id
string
required

The app ID

Response

The new config id

Validation failure

Suggest Edits

Remove ips from blacklisted list

Remove ips from the existing blacklisted ips list inside the blocked ips config

 

Header Auth

 Authentication is required for this endpoint.
deletehttps://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/blockedips/blacklistedips
curl --request DELETE \
  --url https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/blockedips/blacklistedips
var request = require("request");

var options = { method: 'DELETE',
  url:
   'https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/blockedips/blacklistedips' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/blockedips/blacklistedips")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/blockedips/blacklistedips");

xhr.send(data);
import requests

url = "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/blockedips/blacklistedips"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

undefined

Path Params

app_id
string
required

The app ID

Response

The new config id

Suggest Edits

List configs

Fetches details for all configs (matching the provided criteria).

 

Header Auth

 Authentication is required for this endpoint.
gethttps://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs
curl --request GET \
  --url https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs
var request = require("request");

var options = { method: 'GET',
  url:
   'https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs");

xhr.send(data);
import requests

url = "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

undefined

Path Params

app_id
string
required

The app ID

Query Params

from
integer

Unix timestamp (in ms; exclusive) from which to fetch events

to
integer

Unix timestamp (in ms; inclusive) until which to fetch events

per_page
integer

The number of results to be returned per page

page
integer

Select which page is returned (defaults to 1)

Response

A list of configs matching the provided criteria

totalinteger

The number of items returned

configsarray

A list of configs

Suggest Edits

Post config changes

Rewrites the app config, either in part or in full.

 

Header Auth

 Authentication is required for this endpoint.
posthttps://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs
curl --request POST \
  --url https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs
var request = require("request");

var options = { method: 'POST',
  url:
   'https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs");

xhr.send(data);
import requests

url = "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

app_id
string
required

The app ID

Response

Suggest Edits

Revert config changes

Revert configuration to use configuration from previous iteration

 

Header Auth

 Authentication is required for this endpoint.
posthttps://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/revert/id
curl --request POST \
  --url https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/revert/id
var request = require("request");

var options = { method: 'POST',
  url:
   'https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/revert/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/revert/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/revert/id");

xhr.send(data);
import requests

url = "https://us.api.insight.rapid7.com/tcell/api/v1/apps/app_id/configs/revert/id"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

app_id
string
required

The app ID

id
integer
required

The id of the configuration to use

Response

Revert configuration successful

Syntactically invalid configuration ID

Unknown app_id or configuration ID