I have having a go at my first api call for a specific filter.
the url is fine when i open json via explorer, so no issue there.
i have the following error.
[WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions
with the following python code run via Sql Server management studio.
EXECUTE sp_execute_external_script @language = N’Python’
, @script = N’
import requests
from requests.auth import HTTPBasicAuth
import json
url = “https://domain/rest/api/3/search?jql=filter=11033&startAt=2&maxResults=100”
auth = HTTPBasicAuth(“emailAddress”, “api key”)
headers = {
“Accept”: “application/json”
}
response = requests.request(
“GET”,
url,
headers=headers,
auth=auth
)
print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(“,”, ": ")))
any idea anyone. ?