Meraki API Create Device Live Tools Throughput Test 404 Error

JChau
New here

Meraki API Create Device Live Tools Throughput Test 404 Error

Good Afternoon;

 

I am following through Meraki's Documentation concerning the Create Device Live Tools Throughput Test VIA API Using the following commands - 

 

import meraki

 

API_KEY = 'XXXXa55b1'

dashboard = meraki.DashboardAPI(API_KEY)

serial = 'XXXX-XXXX-XXXX'

response = dashboard.devices.createDeviceLiveToolsThroughputTest(
serial,
callback={'url': 'https://webhook.site/0a7dc1fb-4029-4f18-8486-f489aab3f457', 'sharedSecret': 'xxxx' , 'payloadTemplate': {'id': 'wpt_2100'}}
)

print(response)

 

However when we run the command we are constantly receive a 404 error. I am not a programmer myself so my python knowledge is limited.

 

From everything I see following through the documentation this should be working however am stuck. Does anyone see any issues with my syntax, or coding for this API request?

 

2 Replies 2
JChau
New here

I have also tried the following in a script I am working on  :

 

import requests
import json

url = "https://api.meraki.com/api/v1/devices/XXXX-XXXX-XXXX/liveTools/throughputTest"

payload = '''{
"callback": {
"payloadTemplate": { "id": "wpt_2100" },
"url": "https://webhook.site/0a7dc1fb-4029-4f18-8486-f489aab3f457",
"sharedSecret": "test123"
}
}'''

headers = {
"Authorization": "Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXX55b1",
"Content-Type": "application/json",
"Accept": "application/json"
}

response = requests.request('POST', url, headers=headers, data = payload)

print(response.text.encode('utf8'))

 

This just returns a b'' response and nothing is reported to our WebHooks Server

 

If anyone could lead me in the right direction would be much appreciated

JChau
New here

I have updated my code and am now receiving - Error: 400 Client Error: Bad Request for url: https://api.meraki.com/api/v1/devices/Q2KY-SY6P-MQCY/liveTools/throughputTest

Get notified when there are additional replies to this discussion.