Home

Awesome

dfirtrack-api-client

OpenAPI 3 - Documentation of DFIRTrack API

This Python package is automatically generated by the OpenAPI Generator project:

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

ClassMethodHTTP requestDescription
ApiApicreate_artifactPOST /api/artifact/
ApiApicreate_artifacttypePOST /api/artifacttype/
ApiApicreate_auth_tokenPOST /api/token-auth/
ApiApicreate_casePOST /api/case/
ApiApicreate_casetypePOST /api/casetype/
ApiApicreate_companyPOST /api/company/
ApiApicreate_contactPOST /api/contact/
ApiApicreate_divisionPOST /api/division/
ApiApicreate_dnsnamePOST /api/dnsname/
ApiApicreate_domainPOST /api/domain/
ApiApicreate_domainuserPOST /api/domainuser/
ApiApicreate_headlinePOST /api/headline/
ApiApicreate_ipPOST /api/ip/
ApiApicreate_locationPOST /api/location/
ApiApicreate_notePOST /api/note/
ApiApicreate_osPOST /api/os/
ApiApicreate_osarchPOST /api/osarch/
ApiApicreate_reasonPOST /api/reason/
ApiApicreate_recommendationPOST /api/recommendation/
ApiApicreate_reportitemPOST /api/reportitem/
ApiApicreate_serviceproviderPOST /api/serviceprovider/
ApiApicreate_systemPOST /api/system/
ApiApicreate_systemtypePOST /api/systemtype/
ApiApicreate_systemuserPOST /api/systemuser/
ApiApicreate_tagPOST /api/tag/
ApiApicreate_taskPOST /api/task/
ApiApicreate_tasknamePOST /api/taskname/
ApiApilist_analysisstatusGET /api/analysisstatus/
ApiApilist_artifactprioritysGET /api/artifactpriority/
ApiApilist_artifactsGET /api/artifact/
ApiApilist_artifactstatusGET /api/artifactstatus/
ApiApilist_artifacttypesGET /api/artifacttype/
ApiApilist_caseprioritysGET /api/casepriority/
ApiApilist_casesGET /api/case/
ApiApilist_casestatusGET /api/casestatus/
ApiApilist_casetypesGET /api/casetype/
ApiApilist_companysGET /api/company/
ApiApilist_contactsGET /api/contact/
ApiApilist_divisionsGET /api/division/
ApiApilist_dnsnamesGET /api/dnsname/
ApiApilist_domainsGET /api/domain/
ApiApilist_domainusersGET /api/domainuser/
ApiApilist_headlinesGET /api/headline/
ApiApilist_ipsGET /api/ip/
ApiApilist_locationsGET /api/location/
ApiApilist_notesGET /api/note/
ApiApilist_notestatusGET /api/notestatus/
ApiApilist_osGET /api/os/
ApiApilist_osarchsGET /api/osarch/
ApiApilist_reasonsGET /api/reason/
ApiApilist_recommendationsGET /api/recommendation/
ApiApilist_reportitemsGET /api/reportitem/
ApiApilist_serviceprovidersGET /api/serviceprovider/
ApiApilist_systemsGET /api/system/
ApiApilist_systemstatusGET /api/systemstatus/
ApiApilist_systemtypesGET /api/systemtype/
ApiApilist_systemusersGET /api/systemuser/
ApiApilist_tagcolorsGET /api/tagcolor/
ApiApilist_tagsGET /api/tag/
ApiApilist_tasknamesGET /api/taskname/
ApiApilist_taskprioritysGET /api/taskpriority/
ApiApilist_tasksGET /api/task/
ApiApilist_taskstatusGET /api/taskstatus/
ApiApipartial_update_artifactPATCH /api/artifact/{artifact_id}/
ApiApipartial_update_artifacttypePATCH /api/artifacttype/{artifacttype_id}/
ApiApipartial_update_casePATCH /api/case/{case_id}/
ApiApipartial_update_casetypePATCH /api/casetype/{casetype_id}/
ApiApipartial_update_companyPATCH /api/company/{company_id}/
ApiApipartial_update_contactPATCH /api/contact/{contact_id}/
ApiApipartial_update_divisionPATCH /api/division/{division_id}/
ApiApipartial_update_dnsnamePATCH /api/dnsname/{dnsname_id}/
ApiApipartial_update_domainPATCH /api/domain/{domain_id}/
ApiApipartial_update_domainuserPATCH /api/domainuser/{domainuser_id}/
ApiApipartial_update_headlinePATCH /api/headline/{headline_id}/
ApiApipartial_update_ipPATCH /api/ip/{ip_id}/
ApiApipartial_update_locationPATCH /api/location/{location_id}/
ApiApipartial_update_notePATCH /api/note/{note_id}/
ApiApipartial_update_osPATCH /api/os/{os_id}/
ApiApipartial_update_osarchPATCH /api/osarch/{osarch_id}/
ApiApipartial_update_reasonPATCH /api/reason/{reason_id}/
ApiApipartial_update_recommendationPATCH /api/recommendation/{recommendation_id}/
ApiApipartial_update_reportitemPATCH /api/reportitem/{reportitem_id}/
ApiApipartial_update_serviceproviderPATCH /api/serviceprovider/{serviceprovider_id}/
ApiApipartial_update_systemPATCH /api/system/{system_id}/
ApiApipartial_update_systemtypePATCH /api/systemtype/{systemtype_id}/
ApiApipartial_update_systemuserPATCH /api/systemuser/{systemuser_id}/
ApiApipartial_update_tagPATCH /api/tag/{tag_id}/
ApiApipartial_update_taskPATCH /api/task/{task_id}/
ApiApipartial_update_tasknamePATCH /api/taskname/{taskname_id}/
ApiApiretrieve_analysisstatusGET /api/analysisstatus/{analysisstatus_id}/
ApiApiretrieve_artifactGET /api/artifact/{artifact_id}/
ApiApiretrieve_artifactpriorityGET /api/artifactpriority/{artifactpriority_id}/
ApiApiretrieve_artifactstatusGET /api/artifactstatus/{artifactstatus_id}/
ApiApiretrieve_artifacttypeGET /api/artifacttype/{artifacttype_id}/
ApiApiretrieve_caseGET /api/case/{case_id}/
ApiApiretrieve_casepriorityGET /api/casepriority/{casepriority_id}/
ApiApiretrieve_casestatusGET /api/casestatus/{casestatus_id}/
ApiApiretrieve_casetypeGET /api/casetype/{casetype_id}/
ApiApiretrieve_companyGET /api/company/{company_id}/
ApiApiretrieve_contactGET /api/contact/{contact_id}/
ApiApiretrieve_divisionGET /api/division/{division_id}/
ApiApiretrieve_dnsnameGET /api/dnsname/{dnsname_id}/
ApiApiretrieve_domainGET /api/domain/{domain_id}/
ApiApiretrieve_domainuserGET /api/domainuser/{domainuser_id}/
ApiApiretrieve_headlineGET /api/headline/{headline_id}/
ApiApiretrieve_ipGET /api/ip/{ip_id}/
ApiApiretrieve_locationGET /api/location/{location_id}/
ApiApiretrieve_noteGET /api/note/{note_id}/
ApiApiretrieve_notestatusGET /api/notestatus/{notestatus_id}/
ApiApiretrieve_osGET /api/os/{os_id}/
ApiApiretrieve_osarchGET /api/osarch/{osarch_id}/
ApiApiretrieve_reasonGET /api/reason/{reason_id}/
ApiApiretrieve_recommendationGET /api/recommendation/{recommendation_id}/
ApiApiretrieve_reportitemGET /api/reportitem/{reportitem_id}/
ApiApiretrieve_serviceproviderGET /api/serviceprovider/{serviceprovider_id}/
ApiApiretrieve_systemGET /api/system/{system_id}/
ApiApiretrieve_systemstatusGET /api/systemstatus/{systemstatus_id}/
ApiApiretrieve_systemtypeGET /api/systemtype/{systemtype_id}/
ApiApiretrieve_systemuserGET /api/systemuser/{systemuser_id}/
ApiApiretrieve_tagGET /api/tag/{tag_id}/
ApiApiretrieve_tagcolorGET /api/tagcolor/{tagcolor_id}/
ApiApiretrieve_taskGET /api/task/{task_id}/
ApiApiretrieve_tasknameGET /api/taskname/{taskname_id}/
ApiApiretrieve_taskpriorityGET /api/taskpriority/{taskpriority_id}/
ApiApiretrieve_taskstatusGET /api/taskstatus/{taskstatus_id}/
ApiApiupdate_artifactPUT /api/artifact/{artifact_id}/
ApiApiupdate_artifacttypePUT /api/artifacttype/{artifacttype_id}/
ApiApiupdate_casePUT /api/case/{case_id}/
ApiApiupdate_casetypePUT /api/casetype/{casetype_id}/
ApiApiupdate_companyPUT /api/company/{company_id}/
ApiApiupdate_contactPUT /api/contact/{contact_id}/
ApiApiupdate_divisionPUT /api/division/{division_id}/
ApiApiupdate_dnsnamePUT /api/dnsname/{dnsname_id}/
ApiApiupdate_domainPUT /api/domain/{domain_id}/
ApiApiupdate_domainuserPUT /api/domainuser/{domainuser_id}/
ApiApiupdate_headlinePUT /api/headline/{headline_id}/
ApiApiupdate_ipPUT /api/ip/{ip_id}/
ApiApiupdate_locationPUT /api/location/{location_id}/
ApiApiupdate_notePUT /api/note/{note_id}/
ApiApiupdate_osPUT /api/os/{os_id}/
ApiApiupdate_osarchPUT /api/osarch/{osarch_id}/
ApiApiupdate_reasonPUT /api/reason/{reason_id}/
ApiApiupdate_recommendationPUT /api/recommendation/{recommendation_id}/
ApiApiupdate_reportitemPUT /api/reportitem/{reportitem_id}/
ApiApiupdate_serviceproviderPUT /api/serviceprovider/{serviceprovider_id}/
ApiApiupdate_systemPUT /api/system/{system_id}/
ApiApiupdate_systemtypePUT /api/systemtype/{systemtype_id}/
ApiApiupdate_systemuserPUT /api/systemuser/{systemuser_id}/
ApiApiupdate_tagPUT /api/tag/{tag_id}/
ApiApiupdate_taskPUT /api/task/{task_id}/
ApiApiupdate_tasknamePUT /api/taskname/{taskname_id}/

Documentation For Models

Documentation For Authorization

basicAuth

bearerAuth

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:

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 *