Manager
psengine.links.links_mgr.LinksMgr
¶
Manager for interacting with the Recorded Future Links API.
| PARAMETER | DESCRIPTION |
|---|---|
rf_token
|
Recorded Future API token.
TYPE:
|
Source code in psengine/links/links_mgr.py
list_sections
¶
list_sections() -> list[IdName]
List all sections that can be used to filter a Link search.
Sections are the high-level categories the Links API groups results into, for example Actors, Tools & TTPs or Indicators & Detection Rules.
Endpoint
/links/metadata/sections
| RAISES | DESCRIPTION |
|---|---|
ValidationError
|
If any supplied parameter is of incorrect type. |
LinksMetadataError
|
If an API or connection error occurs. |
| RETURNS | DESCRIPTION |
|---|---|
list[IdName]
|
List of section objects with id and name. |
Source code in psengine/links/links_mgr.py
list_events
¶
list_events() -> list[IdName]
List all event types that can be used to filter technical Link searches.
Event types describe the kind of analytical evidence that produced a
technical link (for example TTPAnalysis or InfrastructureAnalysis).
Endpoint
/links/metadata/events
| RAISES | DESCRIPTION |
|---|---|
ValidationError
|
If any supplied parameter is of incorrect type. |
LinksMetadataError
|
If an API or connection error occurs. |
| RETURNS | DESCRIPTION |
|---|---|
list[IdName]
|
List of event objects with id and name. |
Source code in psengine/links/links_mgr.py
list_entity_types
¶
list_entity_types() -> list[IdName]
List all entity types that can be used to filter a Link search.
The returned values are the supported types for connected entities
(for example Malware, Company, IpAddress).
Endpoint
/links/metadata/entities
| RAISES | DESCRIPTION |
|---|---|
ValidationError
|
If any supplied parameter is of incorrect type. |
LinksMetadataError
|
If an API or connection error occurs. |
| RETURNS | DESCRIPTION |
|---|---|
list[IdName]
|
List of entity-type objects with id and name. |
Source code in psengine/links/links_mgr.py
search
¶
search(
entities: str | list[str],
sections: str | list[str] | None = None,
entity_types: str | list[str] | None = None,
sources: str | list[LinkSource] | None = None,
timeframe: str | None = None,
events: str | list[str] | None = None,
connected_entities: str | list[str] | None = None,
search_scope: SearchScope | None = 'medium',
per_entity_type: int | None = None,
) -> list[EntityLinks]
Search for technically validated relationships between threat intelligence entities in the Recorded Future Intelligence Cloud — connections established through sandbox analysis, infrastructure analysis, network traffic analysis, and Insikt Group research.
Issues a single batched request: the response contains one
EntityLinks per entity in entities, in the same order. If the
API failed for a specific entity, that result's error is populated
and links is empty — the rest of the batch still succeeds.
Entities must be supplied as Recorded Future entity IDs; if you only have
a name, resolve it with EntityMatchMgr first.
| PARAMETER | DESCRIPTION |
|---|---|
entities
|
One or more Recorded Future entity IDs to look up links for.
TYPE:
|
sections
|
Filter results to these link section IDs.
TYPE:
|
entity_types
|
Restrict linked entities to these entity types (e.g. "type:IpAddress").
TYPE:
|
sources
|
Limit to source type(s): "technical", "insikt", or both if argument omitted.
TYPE:
|
timeframe
|
Technical-link timeframe (e.g. "-30d", default "-30d", max "-90d").
TYPE:
|
events
|
Restrict technical links to these event types (e.g. "type:MalwareAnalysis").
TYPE:
|
connected_entities
|
Only return technical links that connect to these entities.
TYPE:
|
search_scope
|
Result-volume scope: "small", "medium" (default), or "large".
TYPE:
|
per_entity_type
|
Max linked entities returned per entity type (>= 1 <= 1,000,000,000).
TYPE:
|
Endpoint
/links/search
If the API failed for a specific entity in the batch, its result looks like:
| RAISES | DESCRIPTION |
|---|---|
ValidationError
|
If any supplied parameter is of incorrect type. |
LinksSearchError
|
If an API or connection error occurs at the request level. |
| RETURNS | DESCRIPTION |
|---|---|
list[EntityLinks]
|
A list of EntityLinks objects |
Source code in psengine/links/links_mgr.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | |