The Burp Suite User Forum was discontinued on the 1st November 2024.

Burp Suite User Forum

For support requests, go to the Support Center. To discuss with other Burp users, head to our Discord page.

SUPPORT CENTER DISCORD

GraphQL Create Site Error (Python)

Andrzejewski, | Last updated: Jul 15, 2021 01:14PM UTC

I am getting the below error when attempting to add a site to burp enterprise via a python script. #Error "errors": [ { "message": "Variable 'input' has coerced Null value for NonNull type 'CreateSiteInput!'", "extensions": { "code": 77 #Python Script import requests import json #Query to run query = """mutation CreateSite($input: CreateSiteInput!) { create_site(input: $input){ site { id name parent_id scope { included_urls excluded_urls } } } } """ variables = { "input": { "name": "<redacted>", "parent_id": "31", "scope": { "included_urls": ["<redacted>"] }, "scan_configuration_ids": ["<redacted>"] } } # Select your transport with a defined url endpoint url = "https://<redacted>/graphql/v1" r = requests.post(url, verify=False, json={'query': query}, headers={'Authorization': '<redacted>'}) # Execute the query on the transport print(r.status_code) #print(r.text) if r.status_code == 200: print(json.dumps(r.json(), indent=2)) else: raise Exception(f"Query failed to run with a {r.status_code}.")

James, PortSwigger Agent | Last updated: Jul 19, 2021 09:58AM UTC