{
  "info": {
    "_postman_id": "9309801f-31ae-4b5a-9cfb-34826d605651",
    "name": "Get Started with GTT Ticketing API",
    "description": "This API enables third‑party systems to interact with the GTT Ticketing System, which is powered by ServiceNow. It uses JSON‑based transactions and is secured through Token Authentication.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_exporter_id": "20347117"
  },
  "item": [
    {
      "name": "Authentication",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "pm.collectionVariables.set(\"Token\", pm.response.json().access_token);"
            ],
            "type": "text/javascript",
            "packages": {},
            "requests": {}
          }
        }
      ],
      "request": {
        "auth": {
          "type": "basic",
          "basic": [
            {
              "key": "password",
              "value": "{{Client Secret}}",
              "type": "string"
            },
            {
              "key": "username",
              "value": "{{Client ID}}",
              "type": "string"
            }
          ]
        },
        "method": "POST",
        "header": [],
        "body": {
          "mode": "urlencoded",
          "urlencoded": [
            {
              "key": "grant_type",
              "value": "client_credentials",
              "type": "text",
              "uuid": "f308d6df-323f-4b73-9633-057eedf05094"
            }
          ]
        },
        "url": {
          "raw": "https://test.auth.gtt.services/realms/dx/protocol/openid-connect/token",
          "protocol": "https",
          "host": [
            "test",
            "auth",
            "gtt",
            "services"
          ],
          "path": [
            "realms",
            "dx",
            "protocol",
            "openid-connect",
            "token"
          ]
        }
      },
      "response": []
    },
    {
      "name": "List All Cases",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{Test_URL}}/apis/v1alpha/namespaces/{{namespace}}/case",
          "host": [
            "{{Test_URL}}"
          ],
          "path": [
            "apis",
            "v1alpha",
            "namespaces",
            "{{namespace}}",
            "case"
          ],
          "query": [
            {
              "key": "case_type",
              "value": "incident",
              "description": "Filters the results to include only the specified type of ticket.  Possible values:  \n•\tincident\n•\trequest",
              "type": "text",
              "disabled": true
            },
            {
              "key": "active",
              "value": "true",
              "description": "Filters the results to return only active tickets. When set to true tickets with the status Closed or Cancelled are excluded.",
              "type": "text",
              "disabled": true
            },
            {
              "key": "state",
              "value": "1",
              "description": "Filters the results to include only tickets matching the specified state value. This parameter accepts a string containing a numeric value.\nPossible values:\n1 - Open/New\n10 - Work in Progress\n18 - Pending\n199 - Monitor Fix\n6 - Resolved \n3 - Closed \n7 - Cancelled",
              "disabled": true
            },
            {
              "key": "from",
              "value": "",
              "description": "Specifies the start date for filtering tickets based on their ticket open date. Accepts dates in ISO or ServiceNow (SN) format.  \nDefault: current date minus 6 months (if not provided). \nNote: The timeframe between from and to cannot exceed 12 months \nSample formats: \n•\tYYYY-MM-DD \n•\tYYYY-MM-DD HH:mm:ss \n•\tYYYY-MM-DDThh:mm:ssZ",
              "type": "text",
              "disabled": true
            },
            {
              "key": "to",
              "value": "",
              "description": "Specifies the end date for filtering tickets based on their ticket open date.\nNote: The timeframe between from and to cannot exceed 12 months.\nSample formats: \n•\tYYYY-MM-DD \n•\tYYYY-MM-DD HH:mm:ss \n•\tYYYY-MM-DDThh:mm:ssZ \n",
              "type": "text",
              "disabled": true
            }
          ]
        }
      },
      "response": []
    },
    {
      "name": "Single Case Details",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{Test_URL}}/apis/v1alpha/namespaces/{{namespace}}/case/{case_name}",
          "host": [
            "{{Test_URL}}"
          ],
          "path": [
            "apis",
            "v1alpha",
            "namespaces",
            "{{namespace}}",
            "case",
            "{case_name}"
          ]
        }
      },
      "response": []
    },
    {
      "name": "List Case Updates",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{Test_URL}}/apis/v1alpha/namespaces/{{namespace}}/case/{case_name}/note",
          "host": [
            "{{Test_URL}}"
          ],
          "path": [
            "apis",
            "v1alpha",
            "namespaces",
            "{{namespace}}",
            "case",
            "{case_name}",
            "note"
          ]
        }
      },
      "response": []
    },
    {
      "name": "List Case Attachments",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{Test_URL}}/apis/v1alpha/namespaces/{{namespace}}/case/{case_name}/attachment",
          "host": [
            "{{Test_URL}}"
          ],
          "path": [
            "apis",
            "v1alpha",
            "namespaces",
            "{{namespace}}",
            "case",
            "{case_name}",
            "attachment"
          ]
        }
      },
      "response": []
    },
    {
      "name": "List Services",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{Test_URL}}/apis/v1alpha/namespaces/{{namespace}}/service",
          "host": [
            "{{Test_URL}}"
          ],
          "path": [
            "apis",
            "v1alpha",
            "namespaces",
            "{{namespace}}",
            "service"
          ]
        }
      },
      "response": []
    },
    {
      "name": "List Category",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{Test_URL}}/apis/v1alpha/namespaces/gtt/casecategory",
          "host": [
            "{{Test_URL}}"
          ],
          "path": [
            "apis",
            "v1alpha",
            "namespaces",
            "gtt",
            "casecategory"
          ]
        }
      },
      "response": []
    },
    {
      "name": "Create Case - Incident",
      "request": {
        "method": "POST",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\r\n    \"kind\": \"case\",\r\n    \"version\": \"v1alpha\",\r\n    \"namespace\": \"{{namespace}}\",\r\n    \"name\": \"test 1\",\r\n    \"metadata\": {},\r\n    \"spec\": {\r\n        \"short_description\": \"POST API call - service down\",\r\n        \"description\": \"Site ABC unreachable\",\r\n        \"case_type\": \"Incident\",\r\n        \"customer_ticket_reference\": \"\",\r\n        \"contact_email\": \"test.contact@test.net\",\r\n        \"category\": \"Managed Networking\",\r\n        \"subcategory\": \"Line Down\",\r\n        \"gnid\": 1234567\r\n    }\r\n}\r\n",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{Test_URL}}/apis/v1alpha/namespaces/{{namespace}}/case",
          "host": [
            "{{Test_URL}}"
          ],
          "path": [
            "apis",
            "v1alpha",
            "namespaces",
            "{{namespace}}",
            "case"
          ]
        }
      },
      "response": []
    },
    {
      "name": "Create Case - Request",
      "request": {
        "method": "POST",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\r\n    \"kind\": \"case\",\r\n    \"version\": \"v1alpha\",\r\n    \"namespace\": \"{{namespace}}\",\r\n    \"name\": \"test 1\",\r\n    \"metadata\": {},\r\n    \"spec\": {\r\n        \"short_description\": \"Post API call - Management IPs\",\r\n        \"description\": \"Add network interface for IP 10.10.10.111\",\r\n        \"case_type\": \"Request\",\r\n        \"customer_ticket_reference\": \"Test4567\",\r\n        \"contact_email\": \"test.contact@test.net\",\r\n        \"category\": \"Change Service Configuration\",\r\n        \"subcategory\": \"Configuration Change\",\r\n        \"gnid\": 1234567\r\n    }\r\n}\r\n",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{Test_URL}}/apis/v1alpha/namespaces/{{namespace}}/case",
          "host": [
            "{{Test_URL}}"
          ],
          "path": [
            "apis",
            "v1alpha",
            "namespaces",
            "{{namespace}}",
            "case"
          ]
        }
      },
      "response": []
    },
    {
      "name": "Update Case",
      "request": {
        "method": "PATCH",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "[\r\n    {\r\n        \"op\": \"replace\",\r\n        \"path\": \"/spec/customer_ticket_reference\",\r\n        \"value\": \"Ticket123\"\r\n    }\r\n]\r\n",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{Test_URL}}/apis/v1alpha/namespaces/{{namespace}}/case/{case_name}",
          "host": [
            "{{Test_URL}}"
          ],
          "path": [
            "apis",
            "v1alpha",
            "namespaces",
            "{{namespace}}",
            "case",
            "{case_name}"
          ]
        }
      },
      "response": []
    },
    {
      "name": "Add Comment",
      "request": {
        "method": "POST",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\r\n    \"kind\": \"note\",\r\n    \"version\": \"v1alpha\",\r\n    \"namespace\": \"{{namespace}}\",\r\n    \"name\": \"{case_name}\",\r\n    \"metadata\": {},\r\n    \"spec\": {\r\n        \"comment\": \"New comment added via the API.\"\r\n    }\r\n}\r\n",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{Test_URL}}/apis/v1alpha/namespaces/{{namespace}}/case/{case_name}/note",
          "host": [
            "{{Test_URL}}"
          ],
          "path": [
            "apis",
            "v1alpha",
            "namespaces",
            "{{namespace}}",
            "case",
            "{case_name}",
            "note"
          ]
        }
      },
      "response": []
    },
    {
      "name": "Upload Attachment",
      "request": {
        "method": "POST",
        "header": [],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "files",
              "type": "file",
              "uuid": "d67ff196-9d66-4be0-ac9f-0d2cd1792c2c",
              "value": null
            }
          ]
        },
        "url": {
          "raw": "{{Test_URL}}/apis/v1alpha/namespaces/{{namespace}}/case/{case_name}/attachment",
          "host": [
            "{{Test_URL}}"
          ],
          "path": [
            "apis",
            "v1alpha",
            "namespaces",
            "{{namespace}}",
            "case",
            "{case_name}",
            "attachment"
          ]
        }
      },
      "response": []
    },
    {
      "name": "Request Case Closure",
      "request": {
        "method": "PATCH",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "[\r\n    {\r\n        \"op\": \"add\",\r\n        \"path\": \"/spec/state\",\r\n        \"value\": \"request closure\"\r\n    }\r\n]",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{Test_URL}}/apis/v1alpha/namespaces/{{namespace}}/case/{case_name}",
          "host": [
            "{{Test_URL}}"
          ],
          "path": [
            "apis",
            "v1alpha",
            "namespaces",
            "{{namespace}}",
            "case",
            "{case_name}"
          ]
        }
      },
      "response": []
    },
    {
      "name": "Subscribe for Webhook New Case",
      "request": {
        "method": "POST",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\r\n    \"kind\": \"webhook\",\r\n    \"version\": \"v1\",\r\n    \"namespace\": \"{{namespace}}\",\r\n    \"name\": \"case-v1alpha-create\",\r\n    \"metadata\": {},\r\n    \"spec\": {\r\n        \"url\": \"https://testendpoint.net/create\",\r\n        \"version\": \"v1alpha\",\r\n        \"kind\": \"case\",\r\n        \"action\": \"create\",\r\n        \"credential\": {\r\n            \"type\": \"basic\",\r\n            \"secrets\": {\r\n                \"type\": \"plaintext\",\r\n                \"values\": [\r\n                    {\r\n                        \"value\": \"myusername\",\r\n                        \"name\": \"username\"\r\n                    },\r\n                    {\r\n                        \"value\": \"mypassword\",\r\n                        \"name\": \"password\"\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    }\r\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{Test_URL}}/apis/v1/namespaces/{{namespace}}/webhook",
          "host": [
            "{{Test_URL}}"
          ],
          "path": [
            "apis",
            "v1",
            "namespaces",
            "{{namespace}}",
            "webhook"
          ]
        }
      },
      "response": []
    },
    {
      "name": "Update Webhook Subscription New Case",
      "request": {
        "method": "PUT",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\r\n    \"kind\": \"webhook\",\r\n    \"version\": \"v1\",\r\n    \"namespace\": \"{{namespace}}\",\r\n    \"name\": \"case-v1alpha-create\",\r\n    \"metadata\": {},\r\n    \"spec\": {\r\n        \"url\": \"https://testendpoint.net/create\",\r\n        \"version\": \"v1alpha\",\r\n        \"kind\": \"case\",\r\n        \"action\": \"create\",\r\n        \"credential\": {\r\n            \"type\": \"basic\",\r\n            \"secrets\": {\r\n                \"type\": \"plaintext\",\r\n                \"values\": [\r\n                    {\r\n                        \"value\": \"myusername2\",\r\n                        \"name\": \"username\"\r\n                    },\r\n                    {\r\n                        \"value\": \"mypassword2\",\r\n                        \"name\": \"password\"\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    }\r\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{Test_URL}}/apis/v1/namespaces/{{namespace}}/webhook/case-v1alpha-create",
          "host": [
            "{{Test_URL}}"
          ],
          "path": [
            "apis",
            "v1",
            "namespaces",
            "{{namespace}}",
            "webhook",
            "case-v1alpha-create"
          ]
        }
      },
      "response": []
    },
    {
      "name": "Subscribe for Webhook Update Case",
      "request": {
        "method": "POST",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\r\n    \"kind\": \"webhook\",\r\n    \"version\": \"v1\",\r\n    \"namespace\": \"{{namespace}}\",\r\n    \"name\": \"case-v1alpha-update\",\r\n    \"metadata\": {},\r\n    \"spec\": {\r\n        \"url\": \"https://testendpoint.net/update\",\r\n        \"version\": \"v1alpha\",\r\n        \"kind\": \"case\",\r\n        \"action\": \"update\",\r\n        \"credential\": {\r\n            \"type\": \"basic\",\r\n            \"secrets\": {\r\n                \"type\": \"plaintext\",\r\n                \"values\": [\r\n                    {\r\n                        \"value\": \"myusername\",\r\n                        \"name\": \"username\"\r\n                    },\r\n                    {\r\n                        \"value\": \"mypassword\",\r\n                        \"name\": \"password\"\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    }\r\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{Test_URL}}/apis/v1/namespaces/{{namespace}}/webhook",
          "host": [
            "{{Test_URL}}"
          ],
          "path": [
            "apis",
            "v1",
            "namespaces",
            "{{namespace}}",
            "webhook"
          ]
        }
      },
      "response": []
    },
    {
      "name": "Update Webhook Subscription Update Case",
      "request": {
        "method": "PUT",
        "header": [],
        "body": {
          "mode": "raw",
          "raw": "{\r\n    \"kind\": \"webhook\",\r\n    \"version\": \"v1\",\r\n    \"namespace\": \"{{namespace}}\",\r\n    \"name\": \"case-v1alpha-update\",\r\n    \"metadata\": {},\r\n    \"spec\": {\r\n        \"url\": \"https://testendpoint.net/update\",\r\n        \"version\": \"v1alpha\",\r\n        \"kind\": \"case\",\r\n        \"action\": \"update\",\r\n        \"credential\": {\r\n            \"type\": \"basic\",\r\n            \"secrets\": {\r\n                \"type\": \"plaintext\",\r\n                \"values\": [\r\n                    {\r\n                        \"value\": \"myusername2\",\r\n                        \"name\": \"username\"\r\n                    },\r\n                    {\r\n                        \"value\": \"mypassword2\",\r\n                        \"name\": \"password\"\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    }\r\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{Test_URL}}/apis/v1/namespaces/{{namespace}}/webhook/case-v1alpha-update",
          "host": [
            "{{Test_URL}}"
          ],
          "path": [
            "apis",
            "v1",
            "namespaces",
            "{{namespace}}",
            "webhook",
            "case-v1alpha-update"
          ]
        }
      },
      "response": []
    },
    {
      "name": "List Webhook Subscriptions",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json",
            "type": "text"
          }
        ],
        "url": {
          "raw": "{{Test_URL}}/apis/v1/namespaces/{{namespace}}/webhook",
          "host": [
            "{{Test_URL}}"
          ],
          "path": [
            "apis",
            "v1",
            "namespaces",
            "{{namespace}}",
            "webhook"
          ]
        }
      },
      "response": []
    }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{Token}}",
        "type": "string"
      }
    ]
  },
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "packages": {},
        "requests": {},
        "exec": [
          ""
        ]
      }
    },
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "packages": {},
        "requests": {},
        "exec": [
          ""
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "namespace",
      "value": ""
    },
    {
      "key": "Test_URL",
      "value": ""
    },
    {
      "key": "Token",
      "value": ""
    },
    {
      "key": "Client ID",
      "value": ""
    },
    {
      "key": "Client Secret",
      "value": ""
    }
  ]
}