I am trying to use the REST API with Octoprint
My code is as follows:
import requests
import json
api_token = '7598509FC2184985B2B230AEE22B388F'
api_url_base = 'http://10.20.10.189/'
api_url = '{}{}'.format(api_url_base, 'api/job')
headers = {
'Content-Type': 'application/json',
'apikey': api_token,
'"command"': '"pause"',
'"action"': '"pause"'
}
response = requests.post(api_url, headers=headers)
print(response)
my result is
<Response [400]>
I am kind of at a loss at the moment