diff --git a/pycti/api/opencti_api_client.py b/pycti/api/opencti_api_client.py index 26562475..84afc184 100644 --- a/pycti/api/opencti_api_client.py +++ b/pycti/api/opencti_api_client.py @@ -4,6 +4,7 @@ import io import json from typing import Union +from urllib.parse import urljoin import magic import requests @@ -129,7 +130,7 @@ def __init__( # Define API self.api_token = token - self.api_url = url + "/graphql" + self.api_url = urljoin(url, "/graphql") self.request_headers = { "User-Agent": "pycti/" + __version__, "Authorization": "Bearer " + token,