Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
Updates to headers to include async operations.
  • Loading branch information
Jayarr03 authored Nov 19, 2024
1 parent 1825533 commit 15d6bab
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Integrations/Templates_Manager/templates_manager_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@
}
headers = {
'Accept': 'application/hal+json',
'api-token': args.api_token
'api-token': args.api_token,
'X-Irius-Async': 'true'
}
response = requests.post(api_url_libraries, headers=headers, files=files)
result_message = f"{file_name} imported as a library into {args.subdomain}. Status: {response.status_code}"
Expand All @@ -86,8 +87,8 @@
}
headers = {
'Accept': 'application/hal+json',
'X-Irius-Async': 'false',
'api-token': args.api_token
'api-token': args.api_token,
'X-Irius-Async': 'true'
}
response = requests.post(api_url_templates, headers=headers, files=files)
result_message = f"{file_name} imported as a template into {args.subdomain}. Status: {response.status_code}"
Expand Down

0 comments on commit 15d6bab

Please sign in to comment.