{
  "info": {
    "_postman_id": "52f335b9-5136-4d75-9643-7f2a0202607a",
    "name": "GraphJSON Public API",
    "description": "Documented GraphJSON ingestion, data, and visualization requests. Keep the api_key variable private and server-side.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://api.graphjson.com",
      "type": "string"
    },
    {
      "key": "api_key",
      "value": "",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Ingestion",
      "item": [
        {
          "name": "Log one event",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"api_key\": \"{{api_key}}\",\n  \"collection\": \"contract_test_events\",\n  \"timestamp\": {{$timestamp}},\n  \"json\": \"{\\\"event\\\":\\\"contract_test_completed\\\",\\\"event_id\\\":\\\"evt_replace_me\\\",\\\"schema_version\\\":1}\"\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/api/log",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "log"
              ]
            },
            "description": "Log one serialized JSON object. Replace event_id before sending repeated tests."
          }
        },
        {
          "name": "Bulk log events",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"api_key\": \"{{api_key}}\",\n  \"collection\": \"contract_test_events\",\n  \"timestamps\": [{{$timestamp}}, {{$timestamp}}],\n  \"jsons\": [\n    \"{\\\"event\\\":\\\"bulk_test_completed\\\",\\\"event_id\\\":\\\"evt_bulk_1\\\"}\",\n    \"{\\\"event\\\":\\\"bulk_test_completed\\\",\\\"event_id\\\":\\\"evt_bulk_2\\\"}\"\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/api/bulk-log",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "bulk-log"
              ]
            },
            "description": "Log up to 50 serialized JSON objects with corresponding Unix-second timestamps."
          }
        }
      ]
    },
    {
      "name": "Visualization",
      "item": [
        {
          "name": "Get Samples data",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"api_key\": \"{{api_key}}\",\n  \"collection\": \"contract_test_events\",\n  \"IANA_time_zone\": \"UTC\",\n  \"graph_type\": \"Samples\",\n  \"start\": \"7 days ago\",\n  \"end\": \"now\",\n  \"filters\": [],\n  \"order\": \"Descending\",\n  \"customizations\": {}\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/api/visualize/data",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "visualize",
                "data"
              ]
            },
            "description": "Return recent Samples rows from the test collection."
          }
        },
        {
          "name": "Generate iframe URL",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"api_key\": \"{{api_key}}\",\n  \"collection\": \"contract_test_events\",\n  \"IANA_time_zone\": \"UTC\",\n  \"graph_type\": \"Single Line\",\n  \"start\": \"30 days ago\",\n  \"end\": \"now\",\n  \"filters\": [],\n  \"aggregation\": \"Count\",\n  \"metric\": null,\n  \"split\": null,\n  \"granularity\": \"Day\",\n  \"customizations\": {\"title\": \"Contract test events\"}\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/api/visualize/iframe",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "visualize",
                "iframe"
              ]
            },
            "description": "Returns an opaque iframe bearer URL. Do not log or publish sensitive generated URLs."
          }
        },
        {
          "name": "Generate iframe and image URLs",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"api_key\": \"{{api_key}}\",\n  \"collection\": \"contract_test_events\",\n  \"IANA_time_zone\": \"UTC\",\n  \"graph_type\": \"Single Line\",\n  \"start\": \"30 days ago\",\n  \"end\": \"now\",\n  \"filters\": [],\n  \"aggregation\": \"Count\",\n  \"metric\": null,\n  \"split\": null,\n  \"granularity\": \"Day\",\n  \"customizations\": {\"title\": \"Contract test events\"}\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/api/visualize/embed",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "visualize",
                "embed"
              ]
            },
            "description": "Returns iframe_url and image_url bearer capabilities."
          }
        }
      ]
    }
  ]
}
