Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sdabbour-stratio/ff52710ef249f853b9ef85c02348a953 to your computer and use it in GitHub Desktop.
Save sdabbour-stratio/ff52710ef249f853b9ef85c02348a953 to your computer and use it in GitHub Desktop.
ontologyName = "test"
ontologyFile = "file.owl"
headers = {
'accept': '*/*',
'X-RolesID': 'Owner',
'X-TenantID': 'hsbc',
'X-UserID': 'mberrojalbiz',
'Content-Type': 'multipart/form-data',
}
params = (
('ontologyName', ontologyName),
)
files = {
'file': (ontologyFile + ';type', open(ontologyFile + ';type', 'rb')),
}
response = requests.post('https://admin.hsbc.stratio.com/service/dg-ontology-graph-api/ontology/importOntology', headers=headers, params=params, files=files)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment