Gateways - Delete
  • 16 Jan 2024
  • 1 Minute to read
  • Dark
    Light

Gateways - Delete

  • Dark
    Light

Article summary

Delete Gateway

DELETE /1/gateways/{gateway_id}
Host: https://api.cogniac.io
curl -X DELETE https://api.cogniac.io/1/gateways/7eakrrvd \
-H "Authorization: Bearer abcdefg.hijklmnop.qrstuvwxyz"

import requests
import json
from pprint import pprint

url_prefix = 'https://api.cogniac.io'
api_version = "1"
gateway_id = 'sq581u6o'
token = ''  # add your token here
headers = {'Authorization': 'Bearer %s' % token}
res = requests.delete(url_prefix + '/' + api_version + '/gateways/%s' % (gateway_id), headers=headers)

if res.status_code == 204:
    print(f"Status code = {res.status_code}")
    print(f"Gateway {gateway_id} was deleted successfully.")
else:
    print(f"Error: {res.status_code}, {res.text}")

  • Example Response

Status code = 204
Gateway sq581u6o was deleted successfully.

Admin Requirement

The user must be a member of the Tenant's admin group to delete a gateway


Was this article helpful?