Burp Suite User Forum

Create new post

Graphql

GONIN | Last updated: May 15, 2020 05:06PM UTC

Hello, I am creating scans through si API and a have the following error : "Variable 'email_recipients' has an invalid value. Expected type 'Map' but was 'String'. Variables for input objects must be an instance of type 'Map'.", With those parameters : { "input": { "name": "test", "parent_id": "1", "scope": { "included_urls": [ "http://example.com" ], "excluded_urls": [] }, "application_logins": [], "scan_configuration_ids": ["whateverconf"], "email_recipients": [ "blabla@toto.com" ] } }

Uthman, PortSwigger Agent | Last updated: May 18, 2020 09:17AM UTC

Hi Michael, Can you please send me a copy of the full mutation you are sending? I would suggest creating a site first with all the relevant information: mutation CreateSite { create_site(input: {name: "test", scope: {included_urls: "http://example.com"}, parent_id: "1", scan_configuration_ids: "9e67821f-6cd2-45a1-8381-c931fe2c32cd", email_recipients: {email: "test@example.com"}}) { site { id parent_id email_recipients { email } scope { included_urls } } } } You can then use the create_schedule_item mutation to create the scan (you should see the site ID by sending the mutation above). This will be launched straight away: mutation CreateScheduleItem { create_schedule_item(input: {site_id: "5"}) { schedule_item { id } } }

GONIN | Last updated: May 21, 2020 04:55PM UTC

thanks

GONIN | Last updated: Jun 02, 2020 03:57PM UTC

Ok thank you it works with 1 email but I cannot manage to have 2 emails

Uthman, PortSwigger Agent | Last updated: Jun 04, 2020 08:08AM UTC

You need to specify them separately in an array, like below: mutation CreateSite { create_site(input: {name: "Test", parent_id: 1, scope: {included_urls: "www.example.com"}, email_recipients: [{email: "test@test.com"}, {email: "test1@test.com"}]}) { site { id parent_id scope { included_urls } email_recipients { email } } } }

GONIN | Last updated: Jun 09, 2020 08:33AM UTC

how, thank you I was almost there, missed '['

You must be an existing, logged-in customer to reply to a thread. Please email us for additional support.