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) ?
There is no relationship. These are 2 separate APIs.
I suggest checking our documentation hub: https://xsoar.pan.dev/ . We have there some excellent resources on developing integrations.
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.
Hi.
When making an integration, we have
demisto
inglobals()
which is an instance of<class 'Demisto'>
.1) What is relationship between
DefaultApi
class andDemisto
class ? In reallity,Demisto
usesDefaultApi
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" insidedemisto/content/Utils/_script_docker_python_loop.py
.3)
Demisto.incidents([incidents_lst])
is helpful whenfetch-incidents
command are fired. If i want to create an incidents using my custom commands fromPlayground - War room
, willDemisto.incidents([incidents_lst])
still be helpful ? Or this case I should useDefaultApi.create_incident(create_incident_request=incident_request)
?Thanks in advance.