This page will help you get started with the Intrigue.io Collection Management API.

The Collections API allows you to create collections, schedule them for data refresh, and ultimately, get insights out of a given collection.

Collections are containers for a set of data such as domains, hosts, applications and vulnerabilities and are generally . They are seeded by the user, so let's create first create a new collection

Listing collections

This endpoint lists the collections across all teams of which the user is a member. The return value is an array of collection names.

ACCESS_KEY=aaabbbccc &&\
SECRET_KEY=xxxyyyzzz &&\
curl -H "INTRIGUE_ACCESS_KEY: $ACCESS_KEY" \
     -H "INTRIGUE_SECRET_KEY: $SECRET_KEY" \
     -X GET \
  https://api.intrigue.io/api/collections

Creating a new collection

This endpoint exists to allow the creation of a new collection and its initial seeds. Simply post the collection name and seeds to the endpoint. If you'd like to assign the collection to a particular team, you can specify a team_id parameter.

ACCESS_KEY=aaabbbccc &&\
SECRET_KEY=xxxyyyzzz &&\
curl -H "INTRIGUE_ACCESS_KEY: $ACCESS_KEY" \
     -H "INTRIGUE_SECRET_KEY: $SECRET_KEY" \
     -X POST \
     -d '{
    "name": "my_acme_collection",
    "seeds": [
      { "type": "Domain", "name": "acmecorp.com" }
    ]
  }' \
  https://api.intrigue.io/api/collections

Adjusting settings & adding seeds to a collection

The same endpoint allows you to add additional seeds to an existing collection. The allowed seed types are listed here.

COLLECTION_NAME=acme_corp
ACCESS_KEY=aaabbbccc &&\
SECRET_KEY=xxxyyyzzz &&\
curl -H "INTRIGUE_ACCESS_KEY: $ACCESS_KEY" \
     -H "INTRIGUE_SECRET_KEY: $SECRET_KEY" \
     -X POST \
     -d '{
    "name": "my_acme_collection",
    "seeds": [
      { "type": "Domain", "name": "acmecorp.com" },
      { "type": "Domain", "name": "acme.com" },
      { "type": "DnsRecord", "name": "www.acmecorp.com" },
      { "type": "IpAddress", "name": "6.6.6.6" },
      { "type": "Nameserver", "name": "ns1.acme.com" },
    ]
  }' \
  https://api.intrigue.io/api/collections/$COLLECTION_NAME

Deleting all seeds from a collection

The following endpoint allows you to clear all seeds from a given collection.

COLLECTION_NAME=acme_corp
ACCESS_KEY=aaabbbccc &&\
SECRET_KEY=xxxyyyzzz &&\
curl -H "INTRIGUE_ACCESS_KEY: $ACCESS_KEY" \
     -H "INTRIGUE_SECRET_KEY: $SECRET_KEY" \
     -X DELETE \
     https://api.intrigue.io/api/collections/$COLLECTION_NAME/seeds

Creating a new collection run

Collection scheduling is handled automatically depending on the status of the account, but if you'd like to schedule a collection for immediate data refresh, you can use this endpoint to force a collection.

ACCESS_KEY=aaabbbccc &&\
SECRET_KEY=xxxyyyzzz &&\
curl -H "INTRIGUE_ACCESS_KEY: $ACCESS_KEY" \
     -H "INTRIGUE_SECRET_KEY: $SECRET_KEY" \
  https://api.intrigue.io/api/collections/$COLLECTION_NAME/schedule
  
 {
  "success": true,
  "message": "success",
  "result": { 
    'id' : '1012323'
  }
}

Listing existing collection runs

Use the following endpoint to list runs. When the status for a given collection is "finished". it's ready to be retrieved using the relevant Collections Results endpoint.

ACCESS_KEY=aaabbbccc &&\
SECRET_KEY=xxxyyyzzz &&\
curl -H "INTRIGUE_ACCESS_KEY: $ACCESS_KEY" \
     -H "INTRIGUE_SECRET_KEY: $SECRET_KEY" \
  https://api.intrigue.io/api/collections/$COLLECTION_NAME/runs
 
 {
  "success": true,
  "message": "success",
  "result": [
    {
      "id": 253344,
      "status": "finished",
      "created_at": "2019-09-10 01:00:09 UTC",
      "priority": 1
    },
    {
      "id": 253344,
      "status": "started",
      "created_at": "2019-09-10 01:00:09 UTC",
      "priority": 1
    }
  ]
 }