{ "aid": "packetfabric.com:main-2.0.0", "name": "PacketFabric API", "type": "Index", "description": "Use [/v2/auth/login](https://api.packetfabric.com) endpoint to get the token.\n\n\nUse that token and \"Authorize\" button to authenticate your requests.\n\n\nYou can also use that token to authorize your `curl` request:\n\n```\ncurl -X GET \"https://api.packetfabric.com/v2/activity-logs\" -H \"accept: */*\" -H \"Authorization: Bearer 12a30d30-20c0-4f62-a982-eb1424631094\"\n```\n\nPython code to authenticate and utilize the\n[Bearer token](https://swagger.io/docs/specification/authentication/bearer-authentication/):\n\n```\nimport requests\nlogin_url = 'https://api.packetfabric.com/v2/auth/login'\nlogin_payload = {\n 'login': 'admin',\n 'password': 'p4ssw0rd'\n}\nr = requests.post(login_url, json=login_payload)\nauth_token = r.json()['token']\nrequest_header = {\n 'Authorization': f'Bearer {auth_token}'\n}\ncontacts_url = 'https://api.packetfabric.com/v2/contacts'\nr = requests.get(contacts_url, headers=request_header)\n```\n\n*For resellers only*:\n\nTo make the request on behalf of reseller's customer - add `On-Behalf: customer UUID` header to the request:\n\n```\ncurl -X GET \"https://api.packetfabric.com/v2/activity-logs\" -H \"accept: */*\" -H \"Authorization: Bearer 12a30d30-20c0-4f62-a982-eb1424631094\" -H \"On-Behalf: 11111111-2222-3333-4444-eb1424631094\"\n```\n\n*For API Key Authentication*\nTo utilize an API Key instead of login/password, you will need to generate a key and save the token.\nUsing that token, as the Bearer token, you can then login.\n\n```\napi_key = \nrequest_header = {\n 'Authorization': f'Bearer {api_key}'\n}\ncontacts_url = 'https://api.packetfabric.com/v2/contacts'\nr = requests.get(contacts_url, headers=request_header)\n```\n", "url": "https://raw.githubusercontent.com/jentic/jentic-public-apis/refs/heads/main/apis/openapi/packetfabric.com/main/2.0.0/apis.json", "tags": [ "packetfabric.com", "main" ], "created": "2026-04-01", "modified": "2026-04-01", "specificationVersion": "0.19", "access": "3rd-Party", "maintainers": [ { "FN": "Jentic", "X-github": "jentic", "url": "https://github.com/jentic" } ], "apis": [ { "aid": "packetfabric.com:main-2.0.0", "name": "PacketFabric API", "description": "Use [/v2/auth/login](https://api.packetfabric.com) endpoint to get the token.\n\n\nUse that token and \"Authorize\" button to authenticate your requests.\n\n\nYou can also use that token to authorize your `curl` request:\n\n```\ncurl -X GET \"https://api.packetfabric.com/v2/activity-logs\" -H \"accept: */*\" -H \"Authorization: Bearer 12a30d30-20c0-4f62-a982-eb1424631094\"\n```\n\nPython code to authenticate and utilize the\n[Bearer token](https://swagger.io/docs/specification/authentication/bearer-authentication/):\n\n```\nimport requests\nlogin_url = 'https://api.packetfabric.com/v2/auth/login'\nlogin_payload = {\n 'login': 'admin',\n 'password': 'p4ssw0rd'\n}\nr = requests.post(login_url, json=login_payload)\nauth_token = r.json()['token']\nrequest_header = {\n 'Authorization': f'Bearer {auth_token}'\n}\ncontacts_url = 'https://api.packetfabric.com/v2/contacts'\nr = requests.get(contacts_url, headers=request_header)\n```\n\n*For resellers only*:\n\nTo make the request on behalf of reseller's customer - add `On-Behalf: customer UUID` header to the request:\n\n```\ncurl -X GET \"https://api.packetfabric.com/v2/activity-logs\" -H \"accept: */*\" -H \"Authorization: Bearer 12a30d30-20c0-4f62-a982-eb1424631094\" -H \"On-Behalf: 11111111-2222-3333-4444-eb1424631094\"\n```\n\n*For API Key Authentication*\nTo utilize an API Key instead of login/password, you will need to generate a key and save the token.\nUsing that token, as the Bearer token, you can then login.\n\n```\napi_key = \nrequest_header = {\n 'Authorization': f'Bearer {api_key}'\n}\ncontacts_url = 'https://api.packetfabric.com/v2/contacts'\nr = requests.get(contacts_url, headers=request_header)\n```\n", "image": "", "baseURL": "https://api.packetfabric.com", "humanURL": "https://github.com/jentic/jentic-public-apis/tree/main/apis/openapi/packetfabric.com/main/2.0.0", "version": "2.0.0", "tags": [ "packetfabric.com", "main" ], "properties": [ { "type": "OpenAPI", "name": "OpenAPI definition", "url": "https://raw.githubusercontent.com/jentic/jentic-public-apis/refs/heads/main/apis/openapi/packetfabric.com/main/2.0.0/openapi.json", "mediaType": "application/openapi+json" }, { "type": "GitHubRepo", "url": "https://github.com/jentic/jentic-public-apis/tree/main/apis/openapi/packetfabric.com/main/2.0.0" } ] } ] }