demisto / demisto-py

Demisto Client for Python
Apache License 2.0
70 stars 41 forks source link

DefaultApi class relationship with Demisto class #41

Closed gachdavit closed 4 years ago

gachdavit commented 4 years ago

Hi.

When making an integration, we have demisto in globals() which is an instance of <class 'Demisto'>.

1) What is relationship between DefaultApi class and Demisto class ? In reallity, Demisto uses DefaultApi to make an operations, like create incidents and so on ?

2) Where can i see the actual implementation of Demisto class ? As I see it is provided as "template code" inside demisto/content/Utils/_script_docker_python_loop.py.

3) Demisto.incidents([incidents_lst]) is helpful when fetch-incidents command are fired. If i want to create an incidents using my custom commands from Playground - War room, will Demisto.incidents([incidents_lst]) still be helpful ? Or this case I should use DefaultApi.create_incident(create_incident_request=incident_request) ?

Thanks in advance.

glicht commented 4 years ago
  1. There is no relationship. These are 2 separate APIs.
  2. I suggest checking our documentation hub: https://xsoar.pan.dev/ . We have there some excellent resources on developing integrations.
  3. Again. I suggest following the docs. If you still encounter questions follow with our support team. Also please check our DFIR Community: https://www.demisto.com/community/ . This issue tracker is not meant for such questions.
gachdavit commented 4 years ago

I understand.

Thanks.