Awesome
dfirtrack-api-client
OpenAPI 3 - Documentation of DFIRTrack API
This Python package is automatically generated by the OpenAPI Generator project:
- API version: v2.4.1
- Package version: 2.4.1
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Requirements.
Python >=3.6
Installation & Usage
pip install
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/dfirtrack/dfirtrack-api-python-client.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/dfirtrack/dfirtrack-api-python-client.git
)
Then import the package:
import dfirtrackapi_client
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import dfirtrackapi_client
Getting Started
Please follow the installation procedure and then run the following:
import time
import dfirtrackapi_client
from pprint import pprint
from dfirtrackapi_client.api import api_api
from dfirtrackapi_client.model.analysisstatus import Analysisstatus
from dfirtrackapi_client.model.artifact import Artifact
from dfirtrackapi_client.model.artifactpriority import Artifactpriority
from dfirtrackapi_client.model.artifactstatus import Artifactstatus
from dfirtrackapi_client.model.artifacttype import Artifacttype
from dfirtrackapi_client.model.auth_token import AuthToken
from dfirtrackapi_client.model.case import Case
from dfirtrackapi_client.model.casepriority import Casepriority
from dfirtrackapi_client.model.casestatus import Casestatus
from dfirtrackapi_client.model.casetype import Casetype
from dfirtrackapi_client.model.company import Company
from dfirtrackapi_client.model.contact import Contact
from dfirtrackapi_client.model.division import Division
from dfirtrackapi_client.model.dnsname import Dnsname
from dfirtrackapi_client.model.domain import Domain
from dfirtrackapi_client.model.domainuser import Domainuser
from dfirtrackapi_client.model.headline import Headline
from dfirtrackapi_client.model.ip import Ip
from dfirtrackapi_client.model.location import Location
from dfirtrackapi_client.model.note import Note
from dfirtrackapi_client.model.notestatus import Notestatus
from dfirtrackapi_client.model.os import Os
from dfirtrackapi_client.model.osarch import Osarch
from dfirtrackapi_client.model.reason import Reason
from dfirtrackapi_client.model.recommendation import Recommendation
from dfirtrackapi_client.model.reportitem import Reportitem
from dfirtrackapi_client.model.serviceprovider import Serviceprovider
from dfirtrackapi_client.model.system import System
from dfirtrackapi_client.model.systemstatus import Systemstatus
from dfirtrackapi_client.model.systemtype import Systemtype
from dfirtrackapi_client.model.systemuser import Systemuser
from dfirtrackapi_client.model.tag import Tag
from dfirtrackapi_client.model.tagcolor import Tagcolor
from dfirtrackapi_client.model.task import Task
from dfirtrackapi_client.model.taskname import Taskname
from dfirtrackapi_client.model.taskpriority import Taskpriority
from dfirtrackapi_client.model.taskstatus import Taskstatus
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = dfirtrackapi_client.Configuration(
host = "http://localhost"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = dfirtrackapi_client.Configuration(
username = 'YOUR_USERNAME',
password = 'YOUR_PASSWORD'
)
# Configure Bearer authorization: bearerAuth
configuration = dfirtrackapi_client.Configuration(
access_token = 'YOUR_BEARER_TOKEN'
)
# Enter a context with an instance of the API client
with dfirtrackapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = api_api.ApiApi(api_client)
artifact = Artifact(
artifact_name="artifact_name_example",
artifactpriority=1,
artifactstatus=1,
artifacttype=1,
case=1,
system=1,
tag=[
1,
],
artifact_md5="artifact_md5_example",
artifact_sha1="artifact_sha1_example",
artifact_sha256="artifact_sha256_example",
artifact_source_path="artifact_source_path_example",
artifact_acquisition_time=dateutil_parser('1970-01-01T00:00:00.00Z'),
artifact_requested_time=dateutil_parser('1970-01-01T00:00:00.00Z'),
artifact_created_by_user_id=1,
artifact_modified_by_user_id=1,
artifact_assigned_to_user_id=1,
) # Artifact | (optional)
try:
api_response = api_instance.create_artifact(artifact=artifact)
pprint(api_response)
except dfirtrackapi_client.ApiException as e:
print("Exception when calling ApiApi->create_artifact: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to http://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
ApiApi | create_artifact | POST /api/artifact/ | |
ApiApi | create_artifacttype | POST /api/artifacttype/ | |
ApiApi | create_auth_token | POST /api/token-auth/ | |
ApiApi | create_case | POST /api/case/ | |
ApiApi | create_casetype | POST /api/casetype/ | |
ApiApi | create_company | POST /api/company/ | |
ApiApi | create_contact | POST /api/contact/ | |
ApiApi | create_division | POST /api/division/ | |
ApiApi | create_dnsname | POST /api/dnsname/ | |
ApiApi | create_domain | POST /api/domain/ | |
ApiApi | create_domainuser | POST /api/domainuser/ | |
ApiApi | create_headline | POST /api/headline/ | |
ApiApi | create_ip | POST /api/ip/ | |
ApiApi | create_location | POST /api/location/ | |
ApiApi | create_note | POST /api/note/ | |
ApiApi | create_os | POST /api/os/ | |
ApiApi | create_osarch | POST /api/osarch/ | |
ApiApi | create_reason | POST /api/reason/ | |
ApiApi | create_recommendation | POST /api/recommendation/ | |
ApiApi | create_reportitem | POST /api/reportitem/ | |
ApiApi | create_serviceprovider | POST /api/serviceprovider/ | |
ApiApi | create_system | POST /api/system/ | |
ApiApi | create_systemtype | POST /api/systemtype/ | |
ApiApi | create_systemuser | POST /api/systemuser/ | |
ApiApi | create_tag | POST /api/tag/ | |
ApiApi | create_task | POST /api/task/ | |
ApiApi | create_taskname | POST /api/taskname/ | |
ApiApi | list_analysisstatus | GET /api/analysisstatus/ | |
ApiApi | list_artifactprioritys | GET /api/artifactpriority/ | |
ApiApi | list_artifacts | GET /api/artifact/ | |
ApiApi | list_artifactstatus | GET /api/artifactstatus/ | |
ApiApi | list_artifacttypes | GET /api/artifacttype/ | |
ApiApi | list_caseprioritys | GET /api/casepriority/ | |
ApiApi | list_cases | GET /api/case/ | |
ApiApi | list_casestatus | GET /api/casestatus/ | |
ApiApi | list_casetypes | GET /api/casetype/ | |
ApiApi | list_companys | GET /api/company/ | |
ApiApi | list_contacts | GET /api/contact/ | |
ApiApi | list_divisions | GET /api/division/ | |
ApiApi | list_dnsnames | GET /api/dnsname/ | |
ApiApi | list_domains | GET /api/domain/ | |
ApiApi | list_domainusers | GET /api/domainuser/ | |
ApiApi | list_headlines | GET /api/headline/ | |
ApiApi | list_ips | GET /api/ip/ | |
ApiApi | list_locations | GET /api/location/ | |
ApiApi | list_notes | GET /api/note/ | |
ApiApi | list_notestatus | GET /api/notestatus/ | |
ApiApi | list_os | GET /api/os/ | |
ApiApi | list_osarchs | GET /api/osarch/ | |
ApiApi | list_reasons | GET /api/reason/ | |
ApiApi | list_recommendations | GET /api/recommendation/ | |
ApiApi | list_reportitems | GET /api/reportitem/ | |
ApiApi | list_serviceproviders | GET /api/serviceprovider/ | |
ApiApi | list_systems | GET /api/system/ | |
ApiApi | list_systemstatus | GET /api/systemstatus/ | |
ApiApi | list_systemtypes | GET /api/systemtype/ | |
ApiApi | list_systemusers | GET /api/systemuser/ | |
ApiApi | list_tagcolors | GET /api/tagcolor/ | |
ApiApi | list_tags | GET /api/tag/ | |
ApiApi | list_tasknames | GET /api/taskname/ | |
ApiApi | list_taskprioritys | GET /api/taskpriority/ | |
ApiApi | list_tasks | GET /api/task/ | |
ApiApi | list_taskstatus | GET /api/taskstatus/ | |
ApiApi | partial_update_artifact | PATCH /api/artifact/{artifact_id}/ | |
ApiApi | partial_update_artifacttype | PATCH /api/artifacttype/{artifacttype_id}/ | |
ApiApi | partial_update_case | PATCH /api/case/{case_id}/ | |
ApiApi | partial_update_casetype | PATCH /api/casetype/{casetype_id}/ | |
ApiApi | partial_update_company | PATCH /api/company/{company_id}/ | |
ApiApi | partial_update_contact | PATCH /api/contact/{contact_id}/ | |
ApiApi | partial_update_division | PATCH /api/division/{division_id}/ | |
ApiApi | partial_update_dnsname | PATCH /api/dnsname/{dnsname_id}/ | |
ApiApi | partial_update_domain | PATCH /api/domain/{domain_id}/ | |
ApiApi | partial_update_domainuser | PATCH /api/domainuser/{domainuser_id}/ | |
ApiApi | partial_update_headline | PATCH /api/headline/{headline_id}/ | |
ApiApi | partial_update_ip | PATCH /api/ip/{ip_id}/ | |
ApiApi | partial_update_location | PATCH /api/location/{location_id}/ | |
ApiApi | partial_update_note | PATCH /api/note/{note_id}/ | |
ApiApi | partial_update_os | PATCH /api/os/{os_id}/ | |
ApiApi | partial_update_osarch | PATCH /api/osarch/{osarch_id}/ | |
ApiApi | partial_update_reason | PATCH /api/reason/{reason_id}/ | |
ApiApi | partial_update_recommendation | PATCH /api/recommendation/{recommendation_id}/ | |
ApiApi | partial_update_reportitem | PATCH /api/reportitem/{reportitem_id}/ | |
ApiApi | partial_update_serviceprovider | PATCH /api/serviceprovider/{serviceprovider_id}/ | |
ApiApi | partial_update_system | PATCH /api/system/{system_id}/ | |
ApiApi | partial_update_systemtype | PATCH /api/systemtype/{systemtype_id}/ | |
ApiApi | partial_update_systemuser | PATCH /api/systemuser/{systemuser_id}/ | |
ApiApi | partial_update_tag | PATCH /api/tag/{tag_id}/ | |
ApiApi | partial_update_task | PATCH /api/task/{task_id}/ | |
ApiApi | partial_update_taskname | PATCH /api/taskname/{taskname_id}/ | |
ApiApi | retrieve_analysisstatus | GET /api/analysisstatus/{analysisstatus_id}/ | |
ApiApi | retrieve_artifact | GET /api/artifact/{artifact_id}/ | |
ApiApi | retrieve_artifactpriority | GET /api/artifactpriority/{artifactpriority_id}/ | |
ApiApi | retrieve_artifactstatus | GET /api/artifactstatus/{artifactstatus_id}/ | |
ApiApi | retrieve_artifacttype | GET /api/artifacttype/{artifacttype_id}/ | |
ApiApi | retrieve_case | GET /api/case/{case_id}/ | |
ApiApi | retrieve_casepriority | GET /api/casepriority/{casepriority_id}/ | |
ApiApi | retrieve_casestatus | GET /api/casestatus/{casestatus_id}/ | |
ApiApi | retrieve_casetype | GET /api/casetype/{casetype_id}/ | |
ApiApi | retrieve_company | GET /api/company/{company_id}/ | |
ApiApi | retrieve_contact | GET /api/contact/{contact_id}/ | |
ApiApi | retrieve_division | GET /api/division/{division_id}/ | |
ApiApi | retrieve_dnsname | GET /api/dnsname/{dnsname_id}/ | |
ApiApi | retrieve_domain | GET /api/domain/{domain_id}/ | |
ApiApi | retrieve_domainuser | GET /api/domainuser/{domainuser_id}/ | |
ApiApi | retrieve_headline | GET /api/headline/{headline_id}/ | |
ApiApi | retrieve_ip | GET /api/ip/{ip_id}/ | |
ApiApi | retrieve_location | GET /api/location/{location_id}/ | |
ApiApi | retrieve_note | GET /api/note/{note_id}/ | |
ApiApi | retrieve_notestatus | GET /api/notestatus/{notestatus_id}/ | |
ApiApi | retrieve_os | GET /api/os/{os_id}/ | |
ApiApi | retrieve_osarch | GET /api/osarch/{osarch_id}/ | |
ApiApi | retrieve_reason | GET /api/reason/{reason_id}/ | |
ApiApi | retrieve_recommendation | GET /api/recommendation/{recommendation_id}/ | |
ApiApi | retrieve_reportitem | GET /api/reportitem/{reportitem_id}/ | |
ApiApi | retrieve_serviceprovider | GET /api/serviceprovider/{serviceprovider_id}/ | |
ApiApi | retrieve_system | GET /api/system/{system_id}/ | |
ApiApi | retrieve_systemstatus | GET /api/systemstatus/{systemstatus_id}/ | |
ApiApi | retrieve_systemtype | GET /api/systemtype/{systemtype_id}/ | |
ApiApi | retrieve_systemuser | GET /api/systemuser/{systemuser_id}/ | |
ApiApi | retrieve_tag | GET /api/tag/{tag_id}/ | |
ApiApi | retrieve_tagcolor | GET /api/tagcolor/{tagcolor_id}/ | |
ApiApi | retrieve_task | GET /api/task/{task_id}/ | |
ApiApi | retrieve_taskname | GET /api/taskname/{taskname_id}/ | |
ApiApi | retrieve_taskpriority | GET /api/taskpriority/{taskpriority_id}/ | |
ApiApi | retrieve_taskstatus | GET /api/taskstatus/{taskstatus_id}/ | |
ApiApi | update_artifact | PUT /api/artifact/{artifact_id}/ | |
ApiApi | update_artifacttype | PUT /api/artifacttype/{artifacttype_id}/ | |
ApiApi | update_case | PUT /api/case/{case_id}/ | |
ApiApi | update_casetype | PUT /api/casetype/{casetype_id}/ | |
ApiApi | update_company | PUT /api/company/{company_id}/ | |
ApiApi | update_contact | PUT /api/contact/{contact_id}/ | |
ApiApi | update_division | PUT /api/division/{division_id}/ | |
ApiApi | update_dnsname | PUT /api/dnsname/{dnsname_id}/ | |
ApiApi | update_domain | PUT /api/domain/{domain_id}/ | |
ApiApi | update_domainuser | PUT /api/domainuser/{domainuser_id}/ | |
ApiApi | update_headline | PUT /api/headline/{headline_id}/ | |
ApiApi | update_ip | PUT /api/ip/{ip_id}/ | |
ApiApi | update_location | PUT /api/location/{location_id}/ | |
ApiApi | update_note | PUT /api/note/{note_id}/ | |
ApiApi | update_os | PUT /api/os/{os_id}/ | |
ApiApi | update_osarch | PUT /api/osarch/{osarch_id}/ | |
ApiApi | update_reason | PUT /api/reason/{reason_id}/ | |
ApiApi | update_recommendation | PUT /api/recommendation/{recommendation_id}/ | |
ApiApi | update_reportitem | PUT /api/reportitem/{reportitem_id}/ | |
ApiApi | update_serviceprovider | PUT /api/serviceprovider/{serviceprovider_id}/ | |
ApiApi | update_system | PUT /api/system/{system_id}/ | |
ApiApi | update_systemtype | PUT /api/systemtype/{systemtype_id}/ | |
ApiApi | update_systemuser | PUT /api/systemuser/{systemuser_id}/ | |
ApiApi | update_tag | PUT /api/tag/{tag_id}/ | |
ApiApi | update_task | PUT /api/task/{task_id}/ | |
ApiApi | update_taskname | PUT /api/taskname/{taskname_id}/ |
Documentation For Models
- Analysisstatus
- Artifact
- Artifactpriority
- Artifactstatus
- Artifacttype
- AuthToken
- Case
- Casepriority
- Casestatus
- Casetype
- Company
- Contact
- Division
- Dnsname
- Domain
- Domainuser
- Headline
- Ip
- Location
- Note
- Notestatus
- Os
- Osarch
- Reason
- Recommendation
- Reportitem
- Serviceprovider
- System
- Systemstatus
- Systemtype
- Systemuser
- Tag
- Tagcolor
- Task
- Taskname
- Taskpriority
- Taskstatus
Documentation For Authorization
basicAuth
- Type: HTTP basic authentication
bearerAuth
- Type: Bearer authentication
Author
Notes for Large OpenAPI documents
If the OpenAPI document is large, imports in dfirtrackapi_client.apis and dfirtrackapi_client.models may fail with a RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:
Solution 1: Use specific imports for apis and models like:
from dfirtrackapi_client.api.default_api import DefaultApi
from dfirtrackapi_client.model.pet import Pet
Solution 2: Before importing the package, adjust the maximum recursion limit as shown below:
import sys
sys.setrecursionlimit(1500)
import dfirtrackapi_client
from dfirtrackapi_client.apis import *
from dfirtrackapi_client.models import *