Manager
psengine.enrich.lookup_mgr.LookupMgr
¶
Enrichment of a single or a group of Entities.
PARAMETER | DESCRIPTION |
---|---|
rf_token
|
Recorded Future API token.
TYPE:
|
Source code in psengine/enrich/lookup_mgr.py
lookup
¶
lookup(
entity: str,
entity_type: ALLOWED_ENTITIES,
fields: Optional[list[str]] = None,
) -> EnrichmentData
Perform lookup of an entity based on its ID or name.
The entity
can be either a Recorded Future ID or a readable entity name.
The entity_type
must always be specified. Allowed values include:
company
Company
company_by_domain
CyberVulnerability
domain
hash
Hash
InternetDomainName
ip
IpAddress
malware
Malware
Organization
url
URL
vulnerability
If fields
are specified, they are added to the mandatory fields:
- All entities except malware:
['entity', 'risk', 'timestamps']
- For malware:
['entity', 'timestamps']
PARAMETER | DESCRIPTION |
---|---|
entity
|
Name or Recorded Future ID of the entity.
TYPE:
|
entity_type
|
Type of the entity to enrich.
TYPE:
|
fields
|
Optional additional fields for enrichment.
TYPE:
|
Endpoint
v2/{entity_type}/{entity}
Example
Lookup with additional fields:
If a 404 is received:
If a 200 is received:
RETURNS | DESCRIPTION |
---|---|
EnrichmentData
|
An object containing the enriched entity details. |
Source code in psengine/enrich/lookup_mgr.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 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 |
|
lookup_bulk
¶
lookup_bulk(
entity: list[str],
entity_type: ALLOWED_ENTITIES,
fields: list[str] = ENTITY_FIELDS,
max_workers: Optional[int] = 0,
) -> list[EnrichmentData]
Perform lookup of multiple entities based on IDs or names.
The entity
list can contain Recorded Future IDs or plain entity names.
All entities must be of the same entity_type
.
Allowed entity_type
values include:
company
Company
company_by_domain
CyberVulnerability
domain
hash
Hash
InternetDomainName
ip
IpAddress
malware
Malware
Organization
url
URL
vulnerability
If fields
are specified, they are added to the mandatory fields:
- All entities except malware:
['entity', 'risk', 'timestamps']
- For malware:
['entity', 'timestamps']
PARAMETER | DESCRIPTION |
---|---|
entity
|
List of entity names or Recorded Future IDs.
TYPE:
|
entity_type
|
Type of the entities to enrich.
TYPE:
|
fields
|
Optional additional fields for enrichment.
TYPE:
|
max_workers
|
Number of workers to multithread requests.
TYPE:
|
Endpoint
v2/{entity_type}/{entity}
Example
To save the results:
With multithreading:
If a 404 is received:
If a 200 is received:
RAISES | DESCRIPTION |
---|---|
ValidationError
|
if any supplied parameter is of incorrect type. |
EnrichmentLookupError
|
If a lookup terminates with a non-200 or 404 return code. |
RETURNS | DESCRIPTION |
---|---|
list[EnrichmentData]
|
A list of objects containing the enriched entity details. |
Source code in psengine/enrich/lookup_mgr.py
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 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
|