Skip to content

Get reports from entity ID #23

@azubiolo-filigran

Description

@azubiolo-filigran

The Reports are not linked to other STIX Domain Objects in a very standard way. Indeed, they do not appear in this query:

query StixRelationshipsMapping {
  schemaRelationsTypesMapping {
    key
    values
  }
}

To get the reports linked to an entity with a given ID, one can run:

query GetReports($count: Int!, $orderBy: ContainersOrdering, $orderMode: OrderingMode, $filters: FilterGroup) {
  containers(
    first: $count
    orderBy: $orderBy
    orderMode: $orderMode
    filters: $filters
  ) {
    edges {
      node {
        __typename
        createdBy {
          __typename
          id
          name
          entity_type
        }
        ... on Report {
          name
          published
          description
        }
      }
    }
  }
}

Example variables:

{
		"count": 25,
		"filters": {
			"filterGroups": [],
			"filters": [
				{
					"key": "objects",
					"operator": "eq",
					"values": [
						"a3c24dff-2044-4986-ae01-761d95936aab"
					]
				}
			],
			"mode": "and"
		},
		"orderBy": "created",
		"orderMode": "desc"
}

A tool get_reports needs to be created.
It should take as arguments:

  • entity_id: the ID of the entity whose reports we want to extract
  • count: how many reports we want

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions