Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit 068925b

Browse files
[client] add push_analysis in stix core object (opencti/6803)
1 parent e5f6120 commit 068925b

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

pycti/entities/opencti_stix_core_object.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1507,6 +1507,40 @@ def push_list_export(
15071507
},
15081508
)
15091509

1510+
def push_analysis(
1511+
self,
1512+
entity_id,
1513+
file_name,
1514+
data,
1515+
content_source,
1516+
content_type,
1517+
analysis_type,
1518+
):
1519+
query = """
1520+
mutation StixCoreObjectEdit(
1521+
$id: ID!, $file: Upload!, $contentSource: String!, $contentType: AnalysisContentType!, $analysisType: String!
1522+
) {
1523+
stixCoreObjectEdit(id: $id) {
1524+
analysisPush(file: $file,contentSource: $contentSource,contentType: $contentType,analysisType: $analysisType){
1525+
id
1526+
name
1527+
}
1528+
}
1529+
}
1530+
"""
1531+
1532+
file = self.file(file_name, data)
1533+
self.opencti.query(
1534+
query,
1535+
{
1536+
"id": entity_id,
1537+
"file": file,
1538+
"contentSource": content_source,
1539+
"contentType": content_type,
1540+
"analysisType": analysis_type,
1541+
},
1542+
)
1543+
15101544
"""
15111545
Get the reports about a Stix-Core-Object object
15121546

0 commit comments

Comments
 (0)