Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple Postman Collection for TAXII 1.1 Requests
{
"variables": [],
"info": {
"name": "TAXII-1.1 (0.1)",
"_postman_id": "f355c2a2-5d3e-6f5b-f957-afe4d5646d7a",
"description": "Simple collection of TAXII 1.1 requests.\nYou need an environment with the following keys to run this:\n- hostname: hostname of the TAXII server\n- collection: name of the collection to poll (needed only for Poll Request)\n\nDiscovery request points to {{hostname}}/taxii-discovery-service\n\nCollection Information Request points to {{hostname}}/taxii-collection-management-service\n\nPoll Request to {{hostname}}/taxii-poll-service",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
"name": "Discovery Request",
"event": [
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": "\n\n"
}
}
],
"request": {
"url": "https://{{hostname}}/taxii-discovery-service",
"method": "POST",
"header": [
{
"key": "X-TAXII-Content-Type",
"value": "urn:taxii.mitre.org:message:xml:1.1",
"description": ""
},
{
"key": "X-TAXII-Accept",
"value": "urn:taxii.mitre.org:message:xml:1.1",
"description": ""
},
{
"key": "X-TAXII-Services",
"value": "urn:taxii.mitre.org:services:1.1",
"description": ""
},
{
"key": "X-TAXII-Protocol",
"value": "urn:taxii.mitre.org:protocol:http:1.0",
"description": ""
},
{
"key": "Content-Type",
"value": "application/xml",
"description": ""
}
],
"body": {
"mode": "raw",
"raw": "<Discovery_Request xmlns=\"http://taxii.mitre.org/messages/taxii_xml_binding-1.1\" message_id=\"1\"/>"
},
"description": ""
},
"response": []
},
{
"name": "Poll Request",
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": "now = new Date();\nbegin = now.getTime() - 6 * 60 * 60 * 1000;\nbegin = new Date(begin);\n\npostman.setEnvironmentVariable(\"begin\", begin.toISOString());\npostman.setEnvironmentVariable(\"end\", now.toISOString());\n"
}
}
],
"request": {
"url": "https://{{hostname}}/taxii-poll-service",
"method": "POST",
"header": [
{
"key": "X-TAXII-Content-Type",
"value": "urn:taxii.mitre.org:message:xml:1.1",
"description": ""
},
{
"key": "X-TAXII-Accept",
"value": "urn:taxii.mitre.org:message:xml:1.1",
"description": ""
},
{
"key": "X-TAXII-Services",
"value": "urn:taxii.mitre.org:services:1.1",
"description": ""
},
{
"key": "X-TAXII-Protocol",
"value": "urn:taxii.mitre.org:protocol:http:1.0",
"description": ""
},
{
"key": "Content-Type",
"value": "application/xml",
"description": ""
}
],
"body": {
"mode": "raw",
"raw": "<taxii_11:Poll_Request \n xmlns:taxii_11=\"http://taxii.mitre.org/messages/taxii_xml_binding-1.1\"\n message_id=\"42158\"\n collection_name=\"{{collection}}\">\n <taxii_11:Exclusive_Begin_Timestamp>{{begin}}</taxii_11:Exclusive_Begin_Timestamp>\n <taxii_11:Inclusive_End_Timestamp>{{end}}</taxii_11:Inclusive_End_Timestamp>\n <taxii_11:Poll_Parameters allow_asynch=\"false\">\n <taxii_11:Response_Type>FULL</taxii_11:Response_Type>\n </taxii_11:Poll_Parameters>\n</taxii_11:Poll_Request>"
},
"description": ""
},
"response": []
},
{
"name": "Collection Information Request",
"request": {
"url": "https://{{hostname}}/taxii-collection-management-service",
"method": "POST",
"header": [
{
"key": "X-TAXII-Content-Type",
"value": "urn:taxii.mitre.org:message:xml:1.1",
"description": ""
},
{
"key": "X-TAXII-Accept",
"value": "urn:taxii.mitre.org:message:xml:1.1",
"description": ""
},
{
"key": "X-TAXII-Services",
"value": "urn:taxii.mitre.org:services:1.1",
"description": ""
},
{
"key": "X-TAXII-Protocol",
"value": "urn:taxii.mitre.org:protocol:http:1.0",
"description": ""
},
{
"key": "Content-Type",
"value": "application/xml",
"description": ""
}
],
"body": {
"mode": "raw",
"raw": "<taxii_11:Collection_Information_Request xmlns:taxii_11=\"http://taxii.mitre.org/messages/taxii_xml_binding-1.1\" message_id=\"26300\"/>"
},
"description": ""
},
"response": []
}
]
}
@jtschichold

This comment has been minimized.

Copy link
Owner Author

commented Oct 19, 2016

How to use:

  • install Postman app (https://www.getpostman.com/)
  • import collection into Postman (easier way is to Import from Link and point to the Raw gist link)
  • define an environment with hostname and collection keys
  • BAM ! launch the requests

Example environment file for this Collection:

{
  "id": "30dfb9e4-f684-820e-c414-1f5f65a74549",
  "name": "MineMeld",
  "values": [
    {
      "key": "hostname",
      "value": "<hostname>",
      "type": "text",
      "enabled": true
    },
    {
      "key": "collection",
      "value": "<collection name>",
      "type": "text",
      "enabled": true
    },
    {
      "key": "begin",
      "type": "text",
      "value": "2016-10-18T21:49:03.757Z",
      "enabled": true
    },
    {
      "key": "end",
      "type": "text",
      "value": "2016-10-19T03:49:03.757Z",
      "enabled": true
    }
  ],
  "timestamp": 1476848943766,
  "_postman_variable_scope": "environment",
  "_postman_exported_at": "2016-10-19T04:07:55.609Z",
  "_postman_exported_using": "Postman/4.8.0"
}
@Kaushal28

This comment has been minimized.

Copy link

commented Aug 28, 2018

Nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.