Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit 308f6c8

Browse files
[client] env var used
1 parent 31412e7 commit 308f6c8

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

examples/create_observable_sshkey.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# coding: utf-8
2+
import os
23

34
from pycti import OpenCTIApiClient
45

56
# Variables
6-
api_url = "http://opencti:4000"
7-
api_token = "bfa014e0-e02e-4aa6-a42b-603b19dcf159"
7+
api_url = os.getenv("OPENCTI_API_URL", "http://opencti:4000")
8+
api_token = os.getenv("OPENCTI_API_TOKEN", "bfa014e0-e02e-4aa6-a42b-603b19dcf159")
89

910
# OpenCTI initialization
1011
opencti_api_client = OpenCTIApiClient(api_url, api_token)

examples/delete_observable_sshkey.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# coding: utf-8
2+
import os
23

34
from pycti import OpenCTIApiClient
45

56
# Variables
6-
api_url = "http://opencti:4000"
7-
api_token = "bfa014e0-e02e-4aa6-a42b-603b19dcf159"
7+
api_url = os.getenv("OPENCTI_API_URL", "http://opencti:4000")
8+
api_token = os.getenv("OPENCTI_API_TOKEN", "bfa014e0-e02e-4aa6-a42b-603b19dcf159")
89

910
# OpenCTI initialization
1011
opencti_api_client = OpenCTIApiClient(api_url, api_token)

0 commit comments

Comments
 (0)