opportify-sdk 0.1.1__py3-none-any.whl → 0.3.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of opportify-sdk might be problematic. Click here for more details.

Files changed (113) hide show
  1. openapi_client/__init__.py +186 -0
  2. openapi_client/api/email_insights_api.py +1491 -0
  3. openapi_client/api/ip_insights_api.py +1494 -0
  4. {lib/v1/openapi_client → openapi_client}/api_client.py +14 -7
  5. {lib/v1/openapi_client → openapi_client}/configuration.py +16 -5
  6. {lib/v1/openapi_client → openapi_client}/exceptions.py +18 -1
  7. openapi_client/models/__init__.py +84 -0
  8. {lib/v1/openapi_client → openapi_client}/models/abuse_contact.py +1 -1
  9. openapi_client/models/address_signals.py +99 -0
  10. {lib/v1/openapi_client → openapi_client}/models/admin_contact.py +1 -1
  11. openapi_client/models/analyze_email200_response.py +127 -0
  12. lib/v1/openapi_client/models/analyze_email400_response_error.py → openapi_client/models/analyze_email400_response.py +9 -9
  13. openapi_client/models/analyze_email403_response.py +207 -0
  14. openapi_client/models/analyze_email500_response.py +89 -0
  15. openapi_client/models/analyze_email_request.py +94 -0
  16. {lib/v1/openapi_client → openapi_client}/models/analyze_ip200_response.py +4 -4
  17. lib/v1/openapi_client/models/analyze_ip400_response_error.py → openapi_client/models/analyze_ip400_response.py +20 -20
  18. {lib/v1/openapi_client → openapi_client}/models/analyze_ip_request.py +1 -1
  19. {lib/v1/openapi_client → openapi_client}/models/asn.py +1 -1
  20. openapi_client/models/batch_analyze_emails202_response.py +93 -0
  21. openapi_client/models/batch_analyze_emails400_response.py +137 -0
  22. openapi_client/models/batch_analyze_emails401_response.py +89 -0
  23. openapi_client/models/batch_analyze_emails402_response.py +137 -0
  24. openapi_client/models/batch_analyze_emails403_response.py +193 -0
  25. openapi_client/models/batch_analyze_emails413_response.py +89 -0
  26. openapi_client/models/batch_analyze_emails429_response.py +89 -0
  27. openapi_client/models/batch_analyze_emails_request.py +93 -0
  28. openapi_client/models/batch_analyze_ips202_response.py +93 -0
  29. openapi_client/models/batch_analyze_ips400_response.py +137 -0
  30. openapi_client/models/batch_analyze_ips_request.py +91 -0
  31. {lib/v1/openapi_client → openapi_client}/models/block_listed.py +3 -4
  32. openapi_client/models/create_email_batch_export400_response.py +89 -0
  33. openapi_client/models/create_email_batch_export403_response.py +89 -0
  34. openapi_client/models/create_email_batch_export404_response.py +89 -0
  35. openapi_client/models/create_email_batch_export409_response.py +137 -0
  36. openapi_client/models/email_dns.py +97 -0
  37. openapi_client/models/email_domain.py +113 -0
  38. openapi_client/models/export_created_response.py +91 -0
  39. openapi_client/models/export_filter.py +95 -0
  40. openapi_client/models/export_request.py +92 -0
  41. openapi_client/models/export_status_response.py +119 -0
  42. openapi_client/models/exportnotfound.py +89 -0
  43. openapi_client/models/forbidden.py +89 -0
  44. {lib/v1/openapi_client → openapi_client}/models/geo.py +1 -1
  45. openapi_client/models/get_email_batch_export_status400_response.py +89 -0
  46. openapi_client/models/get_email_batch_export_status404_response.py +137 -0
  47. openapi_client/models/get_email_batch_status200_response.py +101 -0
  48. openapi_client/models/get_email_batch_status200_response_download_urls.py +93 -0
  49. openapi_client/models/get_email_batch_status404_response.py +89 -0
  50. openapi_client/models/get_ip_batch_status200_response.py +101 -0
  51. openapi_client/models/internalerror.py +89 -0
  52. openapi_client/models/internalerror1.py +89 -0
  53. openapi_client/models/invaliddata.py +89 -0
  54. openapi_client/models/invaliddata1.py +89 -0
  55. openapi_client/models/invalidemail.py +89 -0
  56. openapi_client/models/invalidplan.py +89 -0
  57. openapi_client/models/invalidplan1.py +89 -0
  58. openapi_client/models/invalidtoken.py +89 -0
  59. openapi_client/models/ipvalidationfailed.py +89 -0
  60. openapi_client/models/jobnotfound.py +89 -0
  61. openapi_client/models/jobnotready.py +89 -0
  62. openapi_client/models/malformedrequest.py +89 -0
  63. openapi_client/models/malformedrequest1.py +89 -0
  64. openapi_client/models/malformedrequest2.py +89 -0
  65. openapi_client/models/malformedrequest3.py +89 -0
  66. openapi_client/models/manifestnotavailable.py +89 -0
  67. openapi_client/models/notfound.py +89 -0
  68. {lib/v1/openapi_client → openapi_client}/models/organization.py +1 -1
  69. openapi_client/models/quotaexceeded.py +89 -0
  70. openapi_client/models/risk_report_email.py +92 -0
  71. openapi_client/models/risk_report_ip.py +89 -0
  72. {lib/v1/openapi_client → openapi_client}/models/tech_contact.py +1 -1
  73. openapi_client/models/toomanyrequests.py +89 -0
  74. {lib/v1/openapi_client → openapi_client}/models/trusted_provider.py +1 -1
  75. {lib/v1/openapi_client → openapi_client}/models/whois.py +2 -2
  76. {lib/v1/openapi_client → openapi_client}/rest.py +2 -1
  77. opportify_sdk/email_insights.py +427 -0
  78. opportify_sdk/ip_insights.py +410 -0
  79. opportify_sdk-0.3.1.dist-info/METADATA +300 -0
  80. opportify_sdk-0.3.1.dist-info/RECORD +86 -0
  81. {opportify_sdk-0.1.1.dist-info → opportify_sdk-0.3.1.dist-info}/WHEEL +1 -1
  82. opportify_sdk-0.3.1.dist-info/top_level.txt +2 -0
  83. lib/__init__.py +0 -0
  84. lib/v1/__init__.py +0 -0
  85. lib/v1/openapi_client/__init__.py +0 -63
  86. lib/v1/openapi_client/api/email_insights_api.py +0 -317
  87. lib/v1/openapi_client/api/ip_insights_api.py +0 -322
  88. lib/v1/openapi_client/models/__init__.py +0 -45
  89. lib/v1/openapi_client/models/analyze_email200_response.py +0 -113
  90. lib/v1/openapi_client/models/analyze_email400_response.py +0 -91
  91. lib/v1/openapi_client/models/analyze_email500_response.py +0 -91
  92. lib/v1/openapi_client/models/analyze_email500_response_error.py +0 -89
  93. lib/v1/openapi_client/models/analyze_email_request.py +0 -92
  94. lib/v1/openapi_client/models/analyze_ip400_response.py +0 -91
  95. lib/v1/openapi_client/models/analyze_ip404_response.py +0 -91
  96. lib/v1/openapi_client/models/analyze_ip500_response.py +0 -91
  97. lib/v1/openapi_client/models/email_dns.py +0 -87
  98. lib/v1/openapi_client/models/internalerror.py +0 -89
  99. lib/v1/openapi_client/models/invalidemail.py +0 -89
  100. lib/v1/openapi_client/models/ipvalidationfailed.py +0 -89
  101. lib/v1/openapi_client/models/malformedrequest.py +0 -89
  102. lib/v1/openapi_client/models/malformedrequest1.py +0 -89
  103. lib/v1/openapi_client/models/notfound.py +0 -89
  104. lib/v1/openapi_client/models/risk_report.py +0 -89
  105. opportify_sdk-0.1.1.dist-info/METADATA +0 -108
  106. opportify_sdk-0.1.1.dist-info/RECORD +0 -49
  107. opportify_sdk-0.1.1.dist-info/top_level.txt +0 -2
  108. src/email_insights.py +0 -97
  109. src/ip_insights.py +0 -93
  110. {lib/v1/openapi_client → openapi_client}/api/__init__.py +0 -0
  111. {lib/v1/openapi_client → openapi_client}/api_response.py +0 -0
  112. {lib/v1/openapi_client → openapi_client}/py.typed +0 -0
  113. {src → opportify_sdk}/__init__.py +0 -0
@@ -0,0 +1,1494 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Opportify Insights API
5
+
6
+ ## Overview The **Opportify Insights API** provides access to a powerful and up-to-date platform. With advanced data warehousing and AI-driven capabilities, this API is designed to empower your business to make informed, data-driven decisions and effectively assess potential risks. ### Base URL Use the following base URL for all API requests: ```plaintext https://api.opportify.ai/insights/v1/<service>/<endpoint> ``` ### Features - [**Email Insights:**](/docs/api/api-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable, private or unknown). - Real time verifications: - Reachable: Confirms if the email domain has valid MX DNS records using DNS lookup. - Deliverable: Simulates an SMTP handshake to check if the email address exists and is deliverable. - Catch-All: Detects if the domain accepts all emails (catch-all configuration). - Intelligent Error Correction: Automatically corrects well-known misspelled email addresses. - Risk Report: Provides an AI-driven normalized score (200-1000) to evaluate email risk, using predefined thresholds. [Access Documentation >>](/docs/api/api-reference/email-insights) - [**IP Insights:**](/docs/api/api-reference/ip-insights) - Connection types: Detects connection types such as `wired`, `mobile`, `enterprise`, `satellite`, `VPN`, `cloud-provider`, `open-proxy`, or `Tor`. - Geo location: Delivers detailed insights such as country, city, timezone, language preferences, and additional location-based information to enhance regional understanding. - WHOIS: Provides main details including RIR, ASN, organization, and abuse/admin/technical contacts. - Trusted Provider Recognition: Identifies if the IP is part of a known trusted provider (e.g., ZTNA - Zero Trust Network Access). - Blocklist Reports: Retrieves up-to-date blocklist statuses, active reports, and the latest detections. - Risk Report: Delivers an AI-driven normalized score (200-1000) to evaluate IP risk, supported by predefined thresholds. [Access Documentation >>](/docs/api/api-reference/ip-insights) ### Authentication & Security - **API Key:** Access to the API requires an API key, which must be included in the request headers. Businesses can generate unlimited API keys directly from their account, offering flexibility and ease of use. - **ACL Rules:** Enhance security with Access Control Lists (ACL), allowing you to restrict API access from specific IP addresses or ranges. This feature provides an additional layer of protection by ensuring only authorized IPs can interact with the API. - **No Query Parameters:** As a precautionary measure, our API avoids the use of query parameters for all operations, including authentication and handling Personally Identifiable Information (PII). This approach minimizes security risks by preventing sensitive data from being exposed in access logs, browser history, cached URLs, debugging tools, or inadvertently shared URLs. All sensitive information is securely transmitted through headers or the request body.
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictStr
20
+ from typing import Optional
21
+ from typing_extensions import Annotated
22
+ from openapi_client.models.analyze_ip200_response import AnalyzeIp200Response
23
+ from openapi_client.models.analyze_ip_request import AnalyzeIpRequest
24
+ from openapi_client.models.batch_analyze_ips202_response import BatchAnalyzeIps202Response
25
+ from openapi_client.models.batch_analyze_ips_request import BatchAnalyzeIpsRequest
26
+ from openapi_client.models.export_created_response import ExportCreatedResponse
27
+ from openapi_client.models.export_request import ExportRequest
28
+ from openapi_client.models.export_status_response import ExportStatusResponse
29
+ from openapi_client.models.get_ip_batch_status200_response import GetIpBatchStatus200Response
30
+
31
+ from openapi_client.api_client import ApiClient, RequestSerialized
32
+ from openapi_client.api_response import ApiResponse
33
+ from openapi_client.rest import RESTResponseType
34
+
35
+
36
+ class IPInsightsApi:
37
+ """NOTE: This class is auto generated by OpenAPI Generator
38
+ Ref: https://openapi-generator.tech
39
+
40
+ Do not edit the class manually.
41
+ """
42
+
43
+ def __init__(self, api_client=None) -> None:
44
+ if api_client is None:
45
+ api_client = ApiClient.get_default()
46
+ self.api_client = api_client
47
+
48
+
49
+ @validate_call
50
+ def analyze_ip(
51
+ self,
52
+ analyze_ip_request: AnalyzeIpRequest,
53
+ _request_timeout: Union[
54
+ None,
55
+ Annotated[StrictFloat, Field(gt=0)],
56
+ Tuple[
57
+ Annotated[StrictFloat, Field(gt=0)],
58
+ Annotated[StrictFloat, Field(gt=0)]
59
+ ]
60
+ ] = None,
61
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
62
+ _content_type: Optional[StrictStr] = None,
63
+ _headers: Optional[Dict[StrictStr, Any]] = None,
64
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
65
+ ) -> AnalyzeIp200Response:
66
+ """Analyze IP
67
+
68
+ The **Analyze IP** endpoint provides comprehensive insights into a specified IP address, leveraging AI-driven analysis to deliver actionable intelligence. This includes connection type identification, detailed geolocation data, WHOIS information, trusted provider verification, up-to-date blocklist reports, and a robust risk assessment. Compatible with both IPv4 and IPv6, this endpoint is designed to empower businesses with precise and reliable IP data. ### Features: - Connection types: Detects connection types such as `wired`, `mobile`, `enterprise`, `satellite`, `vpn`, `cloud-provider`, `open-proxy`, or `Tor`. - Geo location: Delivers detailed insights such as country, city, timezone, language preferences, and additional location-based information to enhance regional understanding. - WHOIS: Provides main details including RIR, ASN, organization, and abuse/admin/technical contacts. - Trusted Provider Recognition: Identifies if the IP is part of a known trusted provider (e.g., ZTNA - Zero Trust Network Access). - Blocklist Reports: Retrieves up-to-date blocklist statuses, active reports, and the latest detections. - Risk Report: Delivers an AI-driven normalized score (200-1000) to evaluate IP risk, supported by predefined thresholds. ### Example Request Body: ```json { \"ip\": \"192.168.0.1\", \"enableAI\": true } ``` ### Authentication & Security - **API Key:** Access to the API requires an API key, which must be included in the request headers. Businesses can generate unlimited API keys directly from their account, offering flexibility and ease of use. - **ACL Rules:** Enhance security with Access Control Lists (ACL), allowing you to restrict API access from specific IP addresses or ranges. This feature provides an additional layer of protection by ensuring only authorized IPs can interact with the API. - **No Query Parameters:** As a precautionary measure, our API avoids the use of query parameters for all operations, including authentication and handling Personally Identifiable Information (PII). This approach minimizes security risks by preventing sensitive data from being exposed in access logs, browser history, cached URLs, debugging tools, or inadvertently shared URLs. All sensitive information is securely transmitted through headers or the request body.
69
+
70
+ :param analyze_ip_request: (required)
71
+ :type analyze_ip_request: AnalyzeIpRequest
72
+ :param _request_timeout: timeout setting for this request. If one
73
+ number provided, it will be total request
74
+ timeout. It can also be a pair (tuple) of
75
+ (connection, read) timeouts.
76
+ :type _request_timeout: int, tuple(int, int), optional
77
+ :param _request_auth: set to override the auth_settings for an a single
78
+ request; this effectively ignores the
79
+ authentication in the spec for a single request.
80
+ :type _request_auth: dict, optional
81
+ :param _content_type: force content-type for the request.
82
+ :type _content_type: str, Optional
83
+ :param _headers: set to override the headers for a single
84
+ request; this effectively ignores the headers
85
+ in the spec for a single request.
86
+ :type _headers: dict, optional
87
+ :param _host_index: set to override the host_index for a single
88
+ request; this effectively ignores the host_index
89
+ in the spec for a single request.
90
+ :type _host_index: int, optional
91
+ :return: Returns the result object.
92
+ """ # noqa: E501
93
+
94
+ _param = self._analyze_ip_serialize(
95
+ analyze_ip_request=analyze_ip_request,
96
+ _request_auth=_request_auth,
97
+ _content_type=_content_type,
98
+ _headers=_headers,
99
+ _host_index=_host_index
100
+ )
101
+
102
+ _response_types_map: Dict[str, Optional[str]] = {
103
+ '200': "AnalyzeIp200Response",
104
+ '400': "AnalyzeIp400Response",
105
+ '404': "NOTFOUND",
106
+ '403': "AnalyzeEmail403Response",
107
+ '500': "INTERNALERROR1",
108
+ }
109
+ response_data = self.api_client.call_api(
110
+ *_param,
111
+ _request_timeout=_request_timeout
112
+ )
113
+ response_data.read()
114
+ return self.api_client.response_deserialize(
115
+ response_data=response_data,
116
+ response_types_map=_response_types_map,
117
+ ).data
118
+
119
+
120
+ @validate_call
121
+ def analyze_ip_with_http_info(
122
+ self,
123
+ analyze_ip_request: AnalyzeIpRequest,
124
+ _request_timeout: Union[
125
+ None,
126
+ Annotated[StrictFloat, Field(gt=0)],
127
+ Tuple[
128
+ Annotated[StrictFloat, Field(gt=0)],
129
+ Annotated[StrictFloat, Field(gt=0)]
130
+ ]
131
+ ] = None,
132
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
133
+ _content_type: Optional[StrictStr] = None,
134
+ _headers: Optional[Dict[StrictStr, Any]] = None,
135
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
136
+ ) -> ApiResponse[AnalyzeIp200Response]:
137
+ """Analyze IP
138
+
139
+ The **Analyze IP** endpoint provides comprehensive insights into a specified IP address, leveraging AI-driven analysis to deliver actionable intelligence. This includes connection type identification, detailed geolocation data, WHOIS information, trusted provider verification, up-to-date blocklist reports, and a robust risk assessment. Compatible with both IPv4 and IPv6, this endpoint is designed to empower businesses with precise and reliable IP data. ### Features: - Connection types: Detects connection types such as `wired`, `mobile`, `enterprise`, `satellite`, `vpn`, `cloud-provider`, `open-proxy`, or `Tor`. - Geo location: Delivers detailed insights such as country, city, timezone, language preferences, and additional location-based information to enhance regional understanding. - WHOIS: Provides main details including RIR, ASN, organization, and abuse/admin/technical contacts. - Trusted Provider Recognition: Identifies if the IP is part of a known trusted provider (e.g., ZTNA - Zero Trust Network Access). - Blocklist Reports: Retrieves up-to-date blocklist statuses, active reports, and the latest detections. - Risk Report: Delivers an AI-driven normalized score (200-1000) to evaluate IP risk, supported by predefined thresholds. ### Example Request Body: ```json { \"ip\": \"192.168.0.1\", \"enableAI\": true } ``` ### Authentication & Security - **API Key:** Access to the API requires an API key, which must be included in the request headers. Businesses can generate unlimited API keys directly from their account, offering flexibility and ease of use. - **ACL Rules:** Enhance security with Access Control Lists (ACL), allowing you to restrict API access from specific IP addresses or ranges. This feature provides an additional layer of protection by ensuring only authorized IPs can interact with the API. - **No Query Parameters:** As a precautionary measure, our API avoids the use of query parameters for all operations, including authentication and handling Personally Identifiable Information (PII). This approach minimizes security risks by preventing sensitive data from being exposed in access logs, browser history, cached URLs, debugging tools, or inadvertently shared URLs. All sensitive information is securely transmitted through headers or the request body.
140
+
141
+ :param analyze_ip_request: (required)
142
+ :type analyze_ip_request: AnalyzeIpRequest
143
+ :param _request_timeout: timeout setting for this request. If one
144
+ number provided, it will be total request
145
+ timeout. It can also be a pair (tuple) of
146
+ (connection, read) timeouts.
147
+ :type _request_timeout: int, tuple(int, int), optional
148
+ :param _request_auth: set to override the auth_settings for an a single
149
+ request; this effectively ignores the
150
+ authentication in the spec for a single request.
151
+ :type _request_auth: dict, optional
152
+ :param _content_type: force content-type for the request.
153
+ :type _content_type: str, Optional
154
+ :param _headers: set to override the headers for a single
155
+ request; this effectively ignores the headers
156
+ in the spec for a single request.
157
+ :type _headers: dict, optional
158
+ :param _host_index: set to override the host_index for a single
159
+ request; this effectively ignores the host_index
160
+ in the spec for a single request.
161
+ :type _host_index: int, optional
162
+ :return: Returns the result object.
163
+ """ # noqa: E501
164
+
165
+ _param = self._analyze_ip_serialize(
166
+ analyze_ip_request=analyze_ip_request,
167
+ _request_auth=_request_auth,
168
+ _content_type=_content_type,
169
+ _headers=_headers,
170
+ _host_index=_host_index
171
+ )
172
+
173
+ _response_types_map: Dict[str, Optional[str]] = {
174
+ '200': "AnalyzeIp200Response",
175
+ '400': "AnalyzeIp400Response",
176
+ '404': "NOTFOUND",
177
+ '403': "AnalyzeEmail403Response",
178
+ '500': "INTERNALERROR1",
179
+ }
180
+ response_data = self.api_client.call_api(
181
+ *_param,
182
+ _request_timeout=_request_timeout
183
+ )
184
+ response_data.read()
185
+ return self.api_client.response_deserialize(
186
+ response_data=response_data,
187
+ response_types_map=_response_types_map,
188
+ )
189
+
190
+
191
+ @validate_call
192
+ def analyze_ip_without_preload_content(
193
+ self,
194
+ analyze_ip_request: AnalyzeIpRequest,
195
+ _request_timeout: Union[
196
+ None,
197
+ Annotated[StrictFloat, Field(gt=0)],
198
+ Tuple[
199
+ Annotated[StrictFloat, Field(gt=0)],
200
+ Annotated[StrictFloat, Field(gt=0)]
201
+ ]
202
+ ] = None,
203
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
204
+ _content_type: Optional[StrictStr] = None,
205
+ _headers: Optional[Dict[StrictStr, Any]] = None,
206
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
207
+ ) -> RESTResponseType:
208
+ """Analyze IP
209
+
210
+ The **Analyze IP** endpoint provides comprehensive insights into a specified IP address, leveraging AI-driven analysis to deliver actionable intelligence. This includes connection type identification, detailed geolocation data, WHOIS information, trusted provider verification, up-to-date blocklist reports, and a robust risk assessment. Compatible with both IPv4 and IPv6, this endpoint is designed to empower businesses with precise and reliable IP data. ### Features: - Connection types: Detects connection types such as `wired`, `mobile`, `enterprise`, `satellite`, `vpn`, `cloud-provider`, `open-proxy`, or `Tor`. - Geo location: Delivers detailed insights such as country, city, timezone, language preferences, and additional location-based information to enhance regional understanding. - WHOIS: Provides main details including RIR, ASN, organization, and abuse/admin/technical contacts. - Trusted Provider Recognition: Identifies if the IP is part of a known trusted provider (e.g., ZTNA - Zero Trust Network Access). - Blocklist Reports: Retrieves up-to-date blocklist statuses, active reports, and the latest detections. - Risk Report: Delivers an AI-driven normalized score (200-1000) to evaluate IP risk, supported by predefined thresholds. ### Example Request Body: ```json { \"ip\": \"192.168.0.1\", \"enableAI\": true } ``` ### Authentication & Security - **API Key:** Access to the API requires an API key, which must be included in the request headers. Businesses can generate unlimited API keys directly from their account, offering flexibility and ease of use. - **ACL Rules:** Enhance security with Access Control Lists (ACL), allowing you to restrict API access from specific IP addresses or ranges. This feature provides an additional layer of protection by ensuring only authorized IPs can interact with the API. - **No Query Parameters:** As a precautionary measure, our API avoids the use of query parameters for all operations, including authentication and handling Personally Identifiable Information (PII). This approach minimizes security risks by preventing sensitive data from being exposed in access logs, browser history, cached URLs, debugging tools, or inadvertently shared URLs. All sensitive information is securely transmitted through headers or the request body.
211
+
212
+ :param analyze_ip_request: (required)
213
+ :type analyze_ip_request: AnalyzeIpRequest
214
+ :param _request_timeout: timeout setting for this request. If one
215
+ number provided, it will be total request
216
+ timeout. It can also be a pair (tuple) of
217
+ (connection, read) timeouts.
218
+ :type _request_timeout: int, tuple(int, int), optional
219
+ :param _request_auth: set to override the auth_settings for an a single
220
+ request; this effectively ignores the
221
+ authentication in the spec for a single request.
222
+ :type _request_auth: dict, optional
223
+ :param _content_type: force content-type for the request.
224
+ :type _content_type: str, Optional
225
+ :param _headers: set to override the headers for a single
226
+ request; this effectively ignores the headers
227
+ in the spec for a single request.
228
+ :type _headers: dict, optional
229
+ :param _host_index: set to override the host_index for a single
230
+ request; this effectively ignores the host_index
231
+ in the spec for a single request.
232
+ :type _host_index: int, optional
233
+ :return: Returns the result object.
234
+ """ # noqa: E501
235
+
236
+ _param = self._analyze_ip_serialize(
237
+ analyze_ip_request=analyze_ip_request,
238
+ _request_auth=_request_auth,
239
+ _content_type=_content_type,
240
+ _headers=_headers,
241
+ _host_index=_host_index
242
+ )
243
+
244
+ _response_types_map: Dict[str, Optional[str]] = {
245
+ '200': "AnalyzeIp200Response",
246
+ '400': "AnalyzeIp400Response",
247
+ '404': "NOTFOUND",
248
+ '403': "AnalyzeEmail403Response",
249
+ '500': "INTERNALERROR1",
250
+ }
251
+ response_data = self.api_client.call_api(
252
+ *_param,
253
+ _request_timeout=_request_timeout
254
+ )
255
+ return response_data.response
256
+
257
+
258
+ def _analyze_ip_serialize(
259
+ self,
260
+ analyze_ip_request,
261
+ _request_auth,
262
+ _content_type,
263
+ _headers,
264
+ _host_index,
265
+ ) -> RequestSerialized:
266
+
267
+ _host = None
268
+
269
+ _collection_formats: Dict[str, str] = {
270
+ }
271
+
272
+ _path_params: Dict[str, str] = {}
273
+ _query_params: List[Tuple[str, str]] = []
274
+ _header_params: Dict[str, Optional[str]] = _headers or {}
275
+ _form_params: List[Tuple[str, str]] = []
276
+ _files: Dict[
277
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
278
+ ] = {}
279
+ _body_params: Optional[bytes] = None
280
+
281
+ # process the path parameters
282
+ # process the query parameters
283
+ # process the header parameters
284
+ # process the form parameters
285
+ # process the body parameter
286
+ if analyze_ip_request is not None:
287
+ _body_params = analyze_ip_request
288
+
289
+
290
+ # set the HTTP header `Accept`
291
+ if 'Accept' not in _header_params:
292
+ _header_params['Accept'] = self.api_client.select_header_accept(
293
+ [
294
+ 'application/json'
295
+ ]
296
+ )
297
+
298
+ # set the HTTP header `Content-Type`
299
+ if _content_type:
300
+ _header_params['Content-Type'] = _content_type
301
+ else:
302
+ _default_content_type = (
303
+ self.api_client.select_header_content_type(
304
+ [
305
+ 'application/json'
306
+ ]
307
+ )
308
+ )
309
+ if _default_content_type is not None:
310
+ _header_params['Content-Type'] = _default_content_type
311
+
312
+ # authentication setting
313
+ _auth_settings: List[str] = [
314
+ 'opportifyToken'
315
+ ]
316
+
317
+ return self.api_client.param_serialize(
318
+ method='POST',
319
+ resource_path='/ip/analyze',
320
+ path_params=_path_params,
321
+ query_params=_query_params,
322
+ header_params=_header_params,
323
+ body=_body_params,
324
+ post_params=_form_params,
325
+ files=_files,
326
+ auth_settings=_auth_settings,
327
+ collection_formats=_collection_formats,
328
+ _host=_host,
329
+ _request_auth=_request_auth
330
+ )
331
+
332
+
333
+
334
+
335
+ @validate_call
336
+ def batch_analyze_ips(
337
+ self,
338
+ batch_analyze_ips_request: BatchAnalyzeIpsRequest,
339
+ _request_timeout: Union[
340
+ None,
341
+ Annotated[StrictFloat, Field(gt=0)],
342
+ Tuple[
343
+ Annotated[StrictFloat, Field(gt=0)],
344
+ Annotated[StrictFloat, Field(gt=0)]
345
+ ]
346
+ ] = None,
347
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
348
+ _content_type: Optional[StrictStr] = None,
349
+ _headers: Optional[Dict[StrictStr, Any]] = None,
350
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
351
+ ) -> BatchAnalyzeIps202Response:
352
+ """Batch Analyze IPs
353
+
354
+ The **Batch Analyze IPs** endpoint enables processing of large volumes of IP addresses asynchronously. This endpoint accepts various input formats and returns a job ID for tracking the analysis progress. ### Features: - **Asynchronous Processing**: Submit large lists of IP addresses for background processing. - **Multiple Input Formats**: Submit data as JSON arrays, tabular CSV/TSV/XLSX uploads, or line-separated text. - **Job Tracking**: Monitor processing status using the returned job ID. ### Example JSON Request: ```json { \"ips\": [ \"192.168.0.1\", \"10.0.0.1\", \"172.16.0.1\" ], \"name\": \"my list of IPs\", \"enableAI\": true } ``` ### Authentication & Security - **API Key:** Access requires an API key in the request headers. - **ACL Rules:** Optional IP-based access restrictions for enhanced security. - **No Query Parameters:** All data is transmitted securely through headers or request body. ### Payload Limits - Maximum payload size: 3MB
355
+
356
+ :param batch_analyze_ips_request: (required)
357
+ :type batch_analyze_ips_request: BatchAnalyzeIpsRequest
358
+ :param _request_timeout: timeout setting for this request. If one
359
+ number provided, it will be total request
360
+ timeout. It can also be a pair (tuple) of
361
+ (connection, read) timeouts.
362
+ :type _request_timeout: int, tuple(int, int), optional
363
+ :param _request_auth: set to override the auth_settings for an a single
364
+ request; this effectively ignores the
365
+ authentication in the spec for a single request.
366
+ :type _request_auth: dict, optional
367
+ :param _content_type: force content-type for the request.
368
+ :type _content_type: str, Optional
369
+ :param _headers: set to override the headers for a single
370
+ request; this effectively ignores the headers
371
+ in the spec for a single request.
372
+ :type _headers: dict, optional
373
+ :param _host_index: set to override the host_index for a single
374
+ request; this effectively ignores the host_index
375
+ in the spec for a single request.
376
+ :type _host_index: int, optional
377
+ :return: Returns the result object.
378
+ """ # noqa: E501
379
+
380
+ _param = self._batch_analyze_ips_serialize(
381
+ batch_analyze_ips_request=batch_analyze_ips_request,
382
+ _request_auth=_request_auth,
383
+ _content_type=_content_type,
384
+ _headers=_headers,
385
+ _host_index=_host_index
386
+ )
387
+
388
+ _response_types_map: Dict[str, Optional[str]] = {
389
+ '202': "BatchAnalyzeIps202Response",
390
+ '400': "BatchAnalyzeIps400Response",
391
+ '401': "BatchAnalyzeEmails401Response",
392
+ '402': "BatchAnalyzeEmails402Response",
393
+ '403': "BatchAnalyzeEmails403Response",
394
+ '413': "BatchAnalyzeEmails413Response",
395
+ '429': "BatchAnalyzeEmails429Response",
396
+ '500': "AnalyzeEmail500Response",
397
+ }
398
+ response_data = self.api_client.call_api(
399
+ *_param,
400
+ _request_timeout=_request_timeout
401
+ )
402
+ response_data.read()
403
+ return self.api_client.response_deserialize(
404
+ response_data=response_data,
405
+ response_types_map=_response_types_map,
406
+ ).data
407
+
408
+
409
+ @validate_call
410
+ def batch_analyze_ips_with_http_info(
411
+ self,
412
+ batch_analyze_ips_request: BatchAnalyzeIpsRequest,
413
+ _request_timeout: Union[
414
+ None,
415
+ Annotated[StrictFloat, Field(gt=0)],
416
+ Tuple[
417
+ Annotated[StrictFloat, Field(gt=0)],
418
+ Annotated[StrictFloat, Field(gt=0)]
419
+ ]
420
+ ] = None,
421
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
422
+ _content_type: Optional[StrictStr] = None,
423
+ _headers: Optional[Dict[StrictStr, Any]] = None,
424
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
425
+ ) -> ApiResponse[BatchAnalyzeIps202Response]:
426
+ """Batch Analyze IPs
427
+
428
+ The **Batch Analyze IPs** endpoint enables processing of large volumes of IP addresses asynchronously. This endpoint accepts various input formats and returns a job ID for tracking the analysis progress. ### Features: - **Asynchronous Processing**: Submit large lists of IP addresses for background processing. - **Multiple Input Formats**: Submit data as JSON arrays, tabular CSV/TSV/XLSX uploads, or line-separated text. - **Job Tracking**: Monitor processing status using the returned job ID. ### Example JSON Request: ```json { \"ips\": [ \"192.168.0.1\", \"10.0.0.1\", \"172.16.0.1\" ], \"name\": \"my list of IPs\", \"enableAI\": true } ``` ### Authentication & Security - **API Key:** Access requires an API key in the request headers. - **ACL Rules:** Optional IP-based access restrictions for enhanced security. - **No Query Parameters:** All data is transmitted securely through headers or request body. ### Payload Limits - Maximum payload size: 3MB
429
+
430
+ :param batch_analyze_ips_request: (required)
431
+ :type batch_analyze_ips_request: BatchAnalyzeIpsRequest
432
+ :param _request_timeout: timeout setting for this request. If one
433
+ number provided, it will be total request
434
+ timeout. It can also be a pair (tuple) of
435
+ (connection, read) timeouts.
436
+ :type _request_timeout: int, tuple(int, int), optional
437
+ :param _request_auth: set to override the auth_settings for an a single
438
+ request; this effectively ignores the
439
+ authentication in the spec for a single request.
440
+ :type _request_auth: dict, optional
441
+ :param _content_type: force content-type for the request.
442
+ :type _content_type: str, Optional
443
+ :param _headers: set to override the headers for a single
444
+ request; this effectively ignores the headers
445
+ in the spec for a single request.
446
+ :type _headers: dict, optional
447
+ :param _host_index: set to override the host_index for a single
448
+ request; this effectively ignores the host_index
449
+ in the spec for a single request.
450
+ :type _host_index: int, optional
451
+ :return: Returns the result object.
452
+ """ # noqa: E501
453
+
454
+ _param = self._batch_analyze_ips_serialize(
455
+ batch_analyze_ips_request=batch_analyze_ips_request,
456
+ _request_auth=_request_auth,
457
+ _content_type=_content_type,
458
+ _headers=_headers,
459
+ _host_index=_host_index
460
+ )
461
+
462
+ _response_types_map: Dict[str, Optional[str]] = {
463
+ '202': "BatchAnalyzeIps202Response",
464
+ '400': "BatchAnalyzeIps400Response",
465
+ '401': "BatchAnalyzeEmails401Response",
466
+ '402': "BatchAnalyzeEmails402Response",
467
+ '403': "BatchAnalyzeEmails403Response",
468
+ '413': "BatchAnalyzeEmails413Response",
469
+ '429': "BatchAnalyzeEmails429Response",
470
+ '500': "AnalyzeEmail500Response",
471
+ }
472
+ response_data = self.api_client.call_api(
473
+ *_param,
474
+ _request_timeout=_request_timeout
475
+ )
476
+ response_data.read()
477
+ return self.api_client.response_deserialize(
478
+ response_data=response_data,
479
+ response_types_map=_response_types_map,
480
+ )
481
+
482
+
483
+ @validate_call
484
+ def batch_analyze_ips_without_preload_content(
485
+ self,
486
+ batch_analyze_ips_request: BatchAnalyzeIpsRequest,
487
+ _request_timeout: Union[
488
+ None,
489
+ Annotated[StrictFloat, Field(gt=0)],
490
+ Tuple[
491
+ Annotated[StrictFloat, Field(gt=0)],
492
+ Annotated[StrictFloat, Field(gt=0)]
493
+ ]
494
+ ] = None,
495
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
496
+ _content_type: Optional[StrictStr] = None,
497
+ _headers: Optional[Dict[StrictStr, Any]] = None,
498
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
499
+ ) -> RESTResponseType:
500
+ """Batch Analyze IPs
501
+
502
+ The **Batch Analyze IPs** endpoint enables processing of large volumes of IP addresses asynchronously. This endpoint accepts various input formats and returns a job ID for tracking the analysis progress. ### Features: - **Asynchronous Processing**: Submit large lists of IP addresses for background processing. - **Multiple Input Formats**: Submit data as JSON arrays, tabular CSV/TSV/XLSX uploads, or line-separated text. - **Job Tracking**: Monitor processing status using the returned job ID. ### Example JSON Request: ```json { \"ips\": [ \"192.168.0.1\", \"10.0.0.1\", \"172.16.0.1\" ], \"name\": \"my list of IPs\", \"enableAI\": true } ``` ### Authentication & Security - **API Key:** Access requires an API key in the request headers. - **ACL Rules:** Optional IP-based access restrictions for enhanced security. - **No Query Parameters:** All data is transmitted securely through headers or request body. ### Payload Limits - Maximum payload size: 3MB
503
+
504
+ :param batch_analyze_ips_request: (required)
505
+ :type batch_analyze_ips_request: BatchAnalyzeIpsRequest
506
+ :param _request_timeout: timeout setting for this request. If one
507
+ number provided, it will be total request
508
+ timeout. It can also be a pair (tuple) of
509
+ (connection, read) timeouts.
510
+ :type _request_timeout: int, tuple(int, int), optional
511
+ :param _request_auth: set to override the auth_settings for an a single
512
+ request; this effectively ignores the
513
+ authentication in the spec for a single request.
514
+ :type _request_auth: dict, optional
515
+ :param _content_type: force content-type for the request.
516
+ :type _content_type: str, Optional
517
+ :param _headers: set to override the headers for a single
518
+ request; this effectively ignores the headers
519
+ in the spec for a single request.
520
+ :type _headers: dict, optional
521
+ :param _host_index: set to override the host_index for a single
522
+ request; this effectively ignores the host_index
523
+ in the spec for a single request.
524
+ :type _host_index: int, optional
525
+ :return: Returns the result object.
526
+ """ # noqa: E501
527
+
528
+ _param = self._batch_analyze_ips_serialize(
529
+ batch_analyze_ips_request=batch_analyze_ips_request,
530
+ _request_auth=_request_auth,
531
+ _content_type=_content_type,
532
+ _headers=_headers,
533
+ _host_index=_host_index
534
+ )
535
+
536
+ _response_types_map: Dict[str, Optional[str]] = {
537
+ '202': "BatchAnalyzeIps202Response",
538
+ '400': "BatchAnalyzeIps400Response",
539
+ '401': "BatchAnalyzeEmails401Response",
540
+ '402': "BatchAnalyzeEmails402Response",
541
+ '403': "BatchAnalyzeEmails403Response",
542
+ '413': "BatchAnalyzeEmails413Response",
543
+ '429': "BatchAnalyzeEmails429Response",
544
+ '500': "AnalyzeEmail500Response",
545
+ }
546
+ response_data = self.api_client.call_api(
547
+ *_param,
548
+ _request_timeout=_request_timeout
549
+ )
550
+ return response_data.response
551
+
552
+
553
+ def _batch_analyze_ips_serialize(
554
+ self,
555
+ batch_analyze_ips_request,
556
+ _request_auth,
557
+ _content_type,
558
+ _headers,
559
+ _host_index,
560
+ ) -> RequestSerialized:
561
+
562
+ _host = None
563
+
564
+ _collection_formats: Dict[str, str] = {
565
+ }
566
+
567
+ _path_params: Dict[str, str] = {}
568
+ _query_params: List[Tuple[str, str]] = []
569
+ _header_params: Dict[str, Optional[str]] = _headers or {}
570
+ _form_params: List[Tuple[str, str]] = []
571
+ _files: Dict[
572
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
573
+ ] = {}
574
+ _body_params: Optional[bytes] = None
575
+
576
+ # process the path parameters
577
+ # process the query parameters
578
+ # process the header parameters
579
+ # process the form parameters
580
+ # process the body parameter
581
+ if batch_analyze_ips_request is not None:
582
+ _body_params = batch_analyze_ips_request
583
+
584
+
585
+ # set the HTTP header `Accept`
586
+ if 'Accept' not in _header_params:
587
+ _header_params['Accept'] = self.api_client.select_header_accept(
588
+ [
589
+ 'application/json'
590
+ ]
591
+ )
592
+
593
+ # set the HTTP header `Content-Type`
594
+ if _content_type:
595
+ _header_params['Content-Type'] = _content_type
596
+ else:
597
+ _default_content_type = (
598
+ self.api_client.select_header_content_type(
599
+ [
600
+ 'application/json',
601
+ 'multipart/form-data',
602
+ 'text/plain'
603
+ ]
604
+ )
605
+ )
606
+ if _default_content_type is not None:
607
+ _header_params['Content-Type'] = _default_content_type
608
+
609
+ # authentication setting
610
+ _auth_settings: List[str] = [
611
+ 'opportifyToken'
612
+ ]
613
+
614
+ return self.api_client.param_serialize(
615
+ method='POST',
616
+ resource_path='/ip/batch',
617
+ path_params=_path_params,
618
+ query_params=_query_params,
619
+ header_params=_header_params,
620
+ body=_body_params,
621
+ post_params=_form_params,
622
+ files=_files,
623
+ auth_settings=_auth_settings,
624
+ collection_formats=_collection_formats,
625
+ _host=_host,
626
+ _request_auth=_request_auth
627
+ )
628
+
629
+
630
+
631
+
632
+ @validate_call
633
+ def create_ip_batch_export(
634
+ self,
635
+ job_id: Annotated[StrictStr, Field(description="The unique identifier of the completed batch job. Format: uuid. Example: \"52b36b1f-0c21-41fa-8a4f-423d25a9a8e2\". ")],
636
+ export_request: Optional[ExportRequest] = None,
637
+ _request_timeout: Union[
638
+ None,
639
+ Annotated[StrictFloat, Field(gt=0)],
640
+ Tuple[
641
+ Annotated[StrictFloat, Field(gt=0)],
642
+ Annotated[StrictFloat, Field(gt=0)]
643
+ ]
644
+ ] = None,
645
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
646
+ _content_type: Optional[StrictStr] = None,
647
+ _headers: Optional[Dict[StrictStr, Any]] = None,
648
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
649
+ ) -> ExportCreatedResponse:
650
+ """Create IP Batch Export
651
+
652
+ The **Create IP Batch Export** endpoint allows you to request a custom export of completed batch analysis results. You can apply filters, select specific columns, and choose the output format (CSV or JSON). ### Features: - **Format Options**: Export results as CSV or JSON - **Filtering**: Apply filters on any field in the response data - **Column Selection**: Choose specific fields to include in the export - **Async Processing**: Export requests are processed asynchronously ### Filter Syntax: - **String filters**: Exact match, comma-separated values, or arrays - **Numeric filters**: Exact values, arrays, or range objects with `min`/`max` - **Nested fields**: Use dot notation (e.g., `result.riskReport.score`) ### Example Request: ```json { \"exportType\": \"json\", \"filters\": { \"result.riskReport.level\": \"low,medium\", \"result.riskReport.score\": { \"max\": 500 }, \"result.geo.countryCode\": [\"US\", \"CA\", \"GB\"] } } ```
653
+
654
+ :param job_id: The unique identifier of the completed batch job. Format: uuid. Example: \"52b36b1f-0c21-41fa-8a4f-423d25a9a8e2\". (required)
655
+ :type job_id: str
656
+ :param export_request:
657
+ :type export_request: ExportRequest
658
+ :param _request_timeout: timeout setting for this request. If one
659
+ number provided, it will be total request
660
+ timeout. It can also be a pair (tuple) of
661
+ (connection, read) timeouts.
662
+ :type _request_timeout: int, tuple(int, int), optional
663
+ :param _request_auth: set to override the auth_settings for an a single
664
+ request; this effectively ignores the
665
+ authentication in the spec for a single request.
666
+ :type _request_auth: dict, optional
667
+ :param _content_type: force content-type for the request.
668
+ :type _content_type: str, Optional
669
+ :param _headers: set to override the headers for a single
670
+ request; this effectively ignores the headers
671
+ in the spec for a single request.
672
+ :type _headers: dict, optional
673
+ :param _host_index: set to override the host_index for a single
674
+ request; this effectively ignores the host_index
675
+ in the spec for a single request.
676
+ :type _host_index: int, optional
677
+ :return: Returns the result object.
678
+ """ # noqa: E501
679
+
680
+ _param = self._create_ip_batch_export_serialize(
681
+ job_id=job_id,
682
+ export_request=export_request,
683
+ _request_auth=_request_auth,
684
+ _content_type=_content_type,
685
+ _headers=_headers,
686
+ _host_index=_host_index
687
+ )
688
+
689
+ _response_types_map: Dict[str, Optional[str]] = {
690
+ '202': "ExportCreatedResponse",
691
+ '400': "CreateEmailBatchExport400Response",
692
+ '403': "CreateEmailBatchExport403Response",
693
+ '404': "CreateEmailBatchExport404Response",
694
+ '409': "CreateEmailBatchExport409Response",
695
+ }
696
+ response_data = self.api_client.call_api(
697
+ *_param,
698
+ _request_timeout=_request_timeout
699
+ )
700
+ response_data.read()
701
+ return self.api_client.response_deserialize(
702
+ response_data=response_data,
703
+ response_types_map=_response_types_map,
704
+ ).data
705
+
706
+
707
+ @validate_call
708
+ def create_ip_batch_export_with_http_info(
709
+ self,
710
+ job_id: Annotated[StrictStr, Field(description="The unique identifier of the completed batch job. Format: uuid. Example: \"52b36b1f-0c21-41fa-8a4f-423d25a9a8e2\". ")],
711
+ export_request: Optional[ExportRequest] = None,
712
+ _request_timeout: Union[
713
+ None,
714
+ Annotated[StrictFloat, Field(gt=0)],
715
+ Tuple[
716
+ Annotated[StrictFloat, Field(gt=0)],
717
+ Annotated[StrictFloat, Field(gt=0)]
718
+ ]
719
+ ] = None,
720
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
721
+ _content_type: Optional[StrictStr] = None,
722
+ _headers: Optional[Dict[StrictStr, Any]] = None,
723
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
724
+ ) -> ApiResponse[ExportCreatedResponse]:
725
+ """Create IP Batch Export
726
+
727
+ The **Create IP Batch Export** endpoint allows you to request a custom export of completed batch analysis results. You can apply filters, select specific columns, and choose the output format (CSV or JSON). ### Features: - **Format Options**: Export results as CSV or JSON - **Filtering**: Apply filters on any field in the response data - **Column Selection**: Choose specific fields to include in the export - **Async Processing**: Export requests are processed asynchronously ### Filter Syntax: - **String filters**: Exact match, comma-separated values, or arrays - **Numeric filters**: Exact values, arrays, or range objects with `min`/`max` - **Nested fields**: Use dot notation (e.g., `result.riskReport.score`) ### Example Request: ```json { \"exportType\": \"json\", \"filters\": { \"result.riskReport.level\": \"low,medium\", \"result.riskReport.score\": { \"max\": 500 }, \"result.geo.countryCode\": [\"US\", \"CA\", \"GB\"] } } ```
728
+
729
+ :param job_id: The unique identifier of the completed batch job. Format: uuid. Example: \"52b36b1f-0c21-41fa-8a4f-423d25a9a8e2\". (required)
730
+ :type job_id: str
731
+ :param export_request:
732
+ :type export_request: ExportRequest
733
+ :param _request_timeout: timeout setting for this request. If one
734
+ number provided, it will be total request
735
+ timeout. It can also be a pair (tuple) of
736
+ (connection, read) timeouts.
737
+ :type _request_timeout: int, tuple(int, int), optional
738
+ :param _request_auth: set to override the auth_settings for an a single
739
+ request; this effectively ignores the
740
+ authentication in the spec for a single request.
741
+ :type _request_auth: dict, optional
742
+ :param _content_type: force content-type for the request.
743
+ :type _content_type: str, Optional
744
+ :param _headers: set to override the headers for a single
745
+ request; this effectively ignores the headers
746
+ in the spec for a single request.
747
+ :type _headers: dict, optional
748
+ :param _host_index: set to override the host_index for a single
749
+ request; this effectively ignores the host_index
750
+ in the spec for a single request.
751
+ :type _host_index: int, optional
752
+ :return: Returns the result object.
753
+ """ # noqa: E501
754
+
755
+ _param = self._create_ip_batch_export_serialize(
756
+ job_id=job_id,
757
+ export_request=export_request,
758
+ _request_auth=_request_auth,
759
+ _content_type=_content_type,
760
+ _headers=_headers,
761
+ _host_index=_host_index
762
+ )
763
+
764
+ _response_types_map: Dict[str, Optional[str]] = {
765
+ '202': "ExportCreatedResponse",
766
+ '400': "CreateEmailBatchExport400Response",
767
+ '403': "CreateEmailBatchExport403Response",
768
+ '404': "CreateEmailBatchExport404Response",
769
+ '409': "CreateEmailBatchExport409Response",
770
+ }
771
+ response_data = self.api_client.call_api(
772
+ *_param,
773
+ _request_timeout=_request_timeout
774
+ )
775
+ response_data.read()
776
+ return self.api_client.response_deserialize(
777
+ response_data=response_data,
778
+ response_types_map=_response_types_map,
779
+ )
780
+
781
+
782
+ @validate_call
783
+ def create_ip_batch_export_without_preload_content(
784
+ self,
785
+ job_id: Annotated[StrictStr, Field(description="The unique identifier of the completed batch job. Format: uuid. Example: \"52b36b1f-0c21-41fa-8a4f-423d25a9a8e2\". ")],
786
+ export_request: Optional[ExportRequest] = None,
787
+ _request_timeout: Union[
788
+ None,
789
+ Annotated[StrictFloat, Field(gt=0)],
790
+ Tuple[
791
+ Annotated[StrictFloat, Field(gt=0)],
792
+ Annotated[StrictFloat, Field(gt=0)]
793
+ ]
794
+ ] = None,
795
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
796
+ _content_type: Optional[StrictStr] = None,
797
+ _headers: Optional[Dict[StrictStr, Any]] = None,
798
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
799
+ ) -> RESTResponseType:
800
+ """Create IP Batch Export
801
+
802
+ The **Create IP Batch Export** endpoint allows you to request a custom export of completed batch analysis results. You can apply filters, select specific columns, and choose the output format (CSV or JSON). ### Features: - **Format Options**: Export results as CSV or JSON - **Filtering**: Apply filters on any field in the response data - **Column Selection**: Choose specific fields to include in the export - **Async Processing**: Export requests are processed asynchronously ### Filter Syntax: - **String filters**: Exact match, comma-separated values, or arrays - **Numeric filters**: Exact values, arrays, or range objects with `min`/`max` - **Nested fields**: Use dot notation (e.g., `result.riskReport.score`) ### Example Request: ```json { \"exportType\": \"json\", \"filters\": { \"result.riskReport.level\": \"low,medium\", \"result.riskReport.score\": { \"max\": 500 }, \"result.geo.countryCode\": [\"US\", \"CA\", \"GB\"] } } ```
803
+
804
+ :param job_id: The unique identifier of the completed batch job. Format: uuid. Example: \"52b36b1f-0c21-41fa-8a4f-423d25a9a8e2\". (required)
805
+ :type job_id: str
806
+ :param export_request:
807
+ :type export_request: ExportRequest
808
+ :param _request_timeout: timeout setting for this request. If one
809
+ number provided, it will be total request
810
+ timeout. It can also be a pair (tuple) of
811
+ (connection, read) timeouts.
812
+ :type _request_timeout: int, tuple(int, int), optional
813
+ :param _request_auth: set to override the auth_settings for an a single
814
+ request; this effectively ignores the
815
+ authentication in the spec for a single request.
816
+ :type _request_auth: dict, optional
817
+ :param _content_type: force content-type for the request.
818
+ :type _content_type: str, Optional
819
+ :param _headers: set to override the headers for a single
820
+ request; this effectively ignores the headers
821
+ in the spec for a single request.
822
+ :type _headers: dict, optional
823
+ :param _host_index: set to override the host_index for a single
824
+ request; this effectively ignores the host_index
825
+ in the spec for a single request.
826
+ :type _host_index: int, optional
827
+ :return: Returns the result object.
828
+ """ # noqa: E501
829
+
830
+ _param = self._create_ip_batch_export_serialize(
831
+ job_id=job_id,
832
+ export_request=export_request,
833
+ _request_auth=_request_auth,
834
+ _content_type=_content_type,
835
+ _headers=_headers,
836
+ _host_index=_host_index
837
+ )
838
+
839
+ _response_types_map: Dict[str, Optional[str]] = {
840
+ '202': "ExportCreatedResponse",
841
+ '400': "CreateEmailBatchExport400Response",
842
+ '403': "CreateEmailBatchExport403Response",
843
+ '404': "CreateEmailBatchExport404Response",
844
+ '409': "CreateEmailBatchExport409Response",
845
+ }
846
+ response_data = self.api_client.call_api(
847
+ *_param,
848
+ _request_timeout=_request_timeout
849
+ )
850
+ return response_data.response
851
+
852
+
853
+ def _create_ip_batch_export_serialize(
854
+ self,
855
+ job_id,
856
+ export_request,
857
+ _request_auth,
858
+ _content_type,
859
+ _headers,
860
+ _host_index,
861
+ ) -> RequestSerialized:
862
+
863
+ _host = None
864
+
865
+ _collection_formats: Dict[str, str] = {
866
+ }
867
+
868
+ _path_params: Dict[str, str] = {}
869
+ _query_params: List[Tuple[str, str]] = []
870
+ _header_params: Dict[str, Optional[str]] = _headers or {}
871
+ _form_params: List[Tuple[str, str]] = []
872
+ _files: Dict[
873
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
874
+ ] = {}
875
+ _body_params: Optional[bytes] = None
876
+
877
+ # process the path parameters
878
+ if job_id is not None:
879
+ _path_params['jobId'] = job_id
880
+ # process the query parameters
881
+ # process the header parameters
882
+ # process the form parameters
883
+ # process the body parameter
884
+ if export_request is not None:
885
+ _body_params = export_request
886
+
887
+
888
+ # set the HTTP header `Accept`
889
+ if 'Accept' not in _header_params:
890
+ _header_params['Accept'] = self.api_client.select_header_accept(
891
+ [
892
+ 'application/json'
893
+ ]
894
+ )
895
+
896
+ # set the HTTP header `Content-Type`
897
+ if _content_type:
898
+ _header_params['Content-Type'] = _content_type
899
+ else:
900
+ _default_content_type = (
901
+ self.api_client.select_header_content_type(
902
+ [
903
+ 'application/json'
904
+ ]
905
+ )
906
+ )
907
+ if _default_content_type is not None:
908
+ _header_params['Content-Type'] = _default_content_type
909
+
910
+ # authentication setting
911
+ _auth_settings: List[str] = [
912
+ 'opportifyToken'
913
+ ]
914
+
915
+ return self.api_client.param_serialize(
916
+ method='POST',
917
+ resource_path='/ip/batch/{jobId}/exports',
918
+ path_params=_path_params,
919
+ query_params=_query_params,
920
+ header_params=_header_params,
921
+ body=_body_params,
922
+ post_params=_form_params,
923
+ files=_files,
924
+ auth_settings=_auth_settings,
925
+ collection_formats=_collection_formats,
926
+ _host=_host,
927
+ _request_auth=_request_auth
928
+ )
929
+
930
+
931
+
932
+
933
+ @validate_call
934
+ def get_ip_batch_export_status(
935
+ self,
936
+ job_id: Annotated[StrictStr, Field(description="The unique identifier of the batch job. Format: uuid. Example: \"52b36b1f-0c21-41fa-8a4f-423d25a9a8e2\". ")],
937
+ export_id: Annotated[StrictStr, Field(description="The unique identifier of the export job. Format: uuid. Example: \"3b90d156-a0d8-4630-8230-f59e9a4e9e33\". ")],
938
+ _request_timeout: Union[
939
+ None,
940
+ Annotated[StrictFloat, Field(gt=0)],
941
+ Tuple[
942
+ Annotated[StrictFloat, Field(gt=0)],
943
+ Annotated[StrictFloat, Field(gt=0)]
944
+ ]
945
+ ] = None,
946
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
947
+ _content_type: Optional[StrictStr] = None,
948
+ _headers: Optional[Dict[StrictStr, Any]] = None,
949
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
950
+ ) -> ExportStatusResponse:
951
+ """Get IP Batch Export Status
952
+
953
+ The **Get IP Batch Export Status** endpoint retrieves the status and download URL for a previously requested export job. ### Export Status Values: - `QUEUED`: Export request received, waiting for processing - `PROCESSING`: Worker is filtering and generating the export file - `COMPLETED`: Export ready, `downloadUrl` available - `FAILED`: Export failed, check `errorCode` and `errorMessage`
954
+
955
+ :param job_id: The unique identifier of the batch job. Format: uuid. Example: \"52b36b1f-0c21-41fa-8a4f-423d25a9a8e2\". (required)
956
+ :type job_id: str
957
+ :param export_id: The unique identifier of the export job. Format: uuid. Example: \"3b90d156-a0d8-4630-8230-f59e9a4e9e33\". (required)
958
+ :type export_id: str
959
+ :param _request_timeout: timeout setting for this request. If one
960
+ number provided, it will be total request
961
+ timeout. It can also be a pair (tuple) of
962
+ (connection, read) timeouts.
963
+ :type _request_timeout: int, tuple(int, int), optional
964
+ :param _request_auth: set to override the auth_settings for an a single
965
+ request; this effectively ignores the
966
+ authentication in the spec for a single request.
967
+ :type _request_auth: dict, optional
968
+ :param _content_type: force content-type for the request.
969
+ :type _content_type: str, Optional
970
+ :param _headers: set to override the headers for a single
971
+ request; this effectively ignores the headers
972
+ in the spec for a single request.
973
+ :type _headers: dict, optional
974
+ :param _host_index: set to override the host_index for a single
975
+ request; this effectively ignores the host_index
976
+ in the spec for a single request.
977
+ :type _host_index: int, optional
978
+ :return: Returns the result object.
979
+ """ # noqa: E501
980
+
981
+ _param = self._get_ip_batch_export_status_serialize(
982
+ job_id=job_id,
983
+ export_id=export_id,
984
+ _request_auth=_request_auth,
985
+ _content_type=_content_type,
986
+ _headers=_headers,
987
+ _host_index=_host_index
988
+ )
989
+
990
+ _response_types_map: Dict[str, Optional[str]] = {
991
+ '200': "ExportStatusResponse",
992
+ '400': "GetEmailBatchExportStatus400Response",
993
+ '403': "CreateEmailBatchExport403Response",
994
+ '404': "GetEmailBatchExportStatus404Response",
995
+ }
996
+ response_data = self.api_client.call_api(
997
+ *_param,
998
+ _request_timeout=_request_timeout
999
+ )
1000
+ response_data.read()
1001
+ return self.api_client.response_deserialize(
1002
+ response_data=response_data,
1003
+ response_types_map=_response_types_map,
1004
+ ).data
1005
+
1006
+
1007
+ @validate_call
1008
+ def get_ip_batch_export_status_with_http_info(
1009
+ self,
1010
+ job_id: Annotated[StrictStr, Field(description="The unique identifier of the batch job. Format: uuid. Example: \"52b36b1f-0c21-41fa-8a4f-423d25a9a8e2\". ")],
1011
+ export_id: Annotated[StrictStr, Field(description="The unique identifier of the export job. Format: uuid. Example: \"3b90d156-a0d8-4630-8230-f59e9a4e9e33\". ")],
1012
+ _request_timeout: Union[
1013
+ None,
1014
+ Annotated[StrictFloat, Field(gt=0)],
1015
+ Tuple[
1016
+ Annotated[StrictFloat, Field(gt=0)],
1017
+ Annotated[StrictFloat, Field(gt=0)]
1018
+ ]
1019
+ ] = None,
1020
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1021
+ _content_type: Optional[StrictStr] = None,
1022
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1023
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1024
+ ) -> ApiResponse[ExportStatusResponse]:
1025
+ """Get IP Batch Export Status
1026
+
1027
+ The **Get IP Batch Export Status** endpoint retrieves the status and download URL for a previously requested export job. ### Export Status Values: - `QUEUED`: Export request received, waiting for processing - `PROCESSING`: Worker is filtering and generating the export file - `COMPLETED`: Export ready, `downloadUrl` available - `FAILED`: Export failed, check `errorCode` and `errorMessage`
1028
+
1029
+ :param job_id: The unique identifier of the batch job. Format: uuid. Example: \"52b36b1f-0c21-41fa-8a4f-423d25a9a8e2\". (required)
1030
+ :type job_id: str
1031
+ :param export_id: The unique identifier of the export job. Format: uuid. Example: \"3b90d156-a0d8-4630-8230-f59e9a4e9e33\". (required)
1032
+ :type export_id: str
1033
+ :param _request_timeout: timeout setting for this request. If one
1034
+ number provided, it will be total request
1035
+ timeout. It can also be a pair (tuple) of
1036
+ (connection, read) timeouts.
1037
+ :type _request_timeout: int, tuple(int, int), optional
1038
+ :param _request_auth: set to override the auth_settings for an a single
1039
+ request; this effectively ignores the
1040
+ authentication in the spec for a single request.
1041
+ :type _request_auth: dict, optional
1042
+ :param _content_type: force content-type for the request.
1043
+ :type _content_type: str, Optional
1044
+ :param _headers: set to override the headers for a single
1045
+ request; this effectively ignores the headers
1046
+ in the spec for a single request.
1047
+ :type _headers: dict, optional
1048
+ :param _host_index: set to override the host_index for a single
1049
+ request; this effectively ignores the host_index
1050
+ in the spec for a single request.
1051
+ :type _host_index: int, optional
1052
+ :return: Returns the result object.
1053
+ """ # noqa: E501
1054
+
1055
+ _param = self._get_ip_batch_export_status_serialize(
1056
+ job_id=job_id,
1057
+ export_id=export_id,
1058
+ _request_auth=_request_auth,
1059
+ _content_type=_content_type,
1060
+ _headers=_headers,
1061
+ _host_index=_host_index
1062
+ )
1063
+
1064
+ _response_types_map: Dict[str, Optional[str]] = {
1065
+ '200': "ExportStatusResponse",
1066
+ '400': "GetEmailBatchExportStatus400Response",
1067
+ '403': "CreateEmailBatchExport403Response",
1068
+ '404': "GetEmailBatchExportStatus404Response",
1069
+ }
1070
+ response_data = self.api_client.call_api(
1071
+ *_param,
1072
+ _request_timeout=_request_timeout
1073
+ )
1074
+ response_data.read()
1075
+ return self.api_client.response_deserialize(
1076
+ response_data=response_data,
1077
+ response_types_map=_response_types_map,
1078
+ )
1079
+
1080
+
1081
+ @validate_call
1082
+ def get_ip_batch_export_status_without_preload_content(
1083
+ self,
1084
+ job_id: Annotated[StrictStr, Field(description="The unique identifier of the batch job. Format: uuid. Example: \"52b36b1f-0c21-41fa-8a4f-423d25a9a8e2\". ")],
1085
+ export_id: Annotated[StrictStr, Field(description="The unique identifier of the export job. Format: uuid. Example: \"3b90d156-a0d8-4630-8230-f59e9a4e9e33\". ")],
1086
+ _request_timeout: Union[
1087
+ None,
1088
+ Annotated[StrictFloat, Field(gt=0)],
1089
+ Tuple[
1090
+ Annotated[StrictFloat, Field(gt=0)],
1091
+ Annotated[StrictFloat, Field(gt=0)]
1092
+ ]
1093
+ ] = None,
1094
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1095
+ _content_type: Optional[StrictStr] = None,
1096
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1097
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1098
+ ) -> RESTResponseType:
1099
+ """Get IP Batch Export Status
1100
+
1101
+ The **Get IP Batch Export Status** endpoint retrieves the status and download URL for a previously requested export job. ### Export Status Values: - `QUEUED`: Export request received, waiting for processing - `PROCESSING`: Worker is filtering and generating the export file - `COMPLETED`: Export ready, `downloadUrl` available - `FAILED`: Export failed, check `errorCode` and `errorMessage`
1102
+
1103
+ :param job_id: The unique identifier of the batch job. Format: uuid. Example: \"52b36b1f-0c21-41fa-8a4f-423d25a9a8e2\". (required)
1104
+ :type job_id: str
1105
+ :param export_id: The unique identifier of the export job. Format: uuid. Example: \"3b90d156-a0d8-4630-8230-f59e9a4e9e33\". (required)
1106
+ :type export_id: str
1107
+ :param _request_timeout: timeout setting for this request. If one
1108
+ number provided, it will be total request
1109
+ timeout. It can also be a pair (tuple) of
1110
+ (connection, read) timeouts.
1111
+ :type _request_timeout: int, tuple(int, int), optional
1112
+ :param _request_auth: set to override the auth_settings for an a single
1113
+ request; this effectively ignores the
1114
+ authentication in the spec for a single request.
1115
+ :type _request_auth: dict, optional
1116
+ :param _content_type: force content-type for the request.
1117
+ :type _content_type: str, Optional
1118
+ :param _headers: set to override the headers for a single
1119
+ request; this effectively ignores the headers
1120
+ in the spec for a single request.
1121
+ :type _headers: dict, optional
1122
+ :param _host_index: set to override the host_index for a single
1123
+ request; this effectively ignores the host_index
1124
+ in the spec for a single request.
1125
+ :type _host_index: int, optional
1126
+ :return: Returns the result object.
1127
+ """ # noqa: E501
1128
+
1129
+ _param = self._get_ip_batch_export_status_serialize(
1130
+ job_id=job_id,
1131
+ export_id=export_id,
1132
+ _request_auth=_request_auth,
1133
+ _content_type=_content_type,
1134
+ _headers=_headers,
1135
+ _host_index=_host_index
1136
+ )
1137
+
1138
+ _response_types_map: Dict[str, Optional[str]] = {
1139
+ '200': "ExportStatusResponse",
1140
+ '400': "GetEmailBatchExportStatus400Response",
1141
+ '403': "CreateEmailBatchExport403Response",
1142
+ '404': "GetEmailBatchExportStatus404Response",
1143
+ }
1144
+ response_data = self.api_client.call_api(
1145
+ *_param,
1146
+ _request_timeout=_request_timeout
1147
+ )
1148
+ return response_data.response
1149
+
1150
+
1151
+ def _get_ip_batch_export_status_serialize(
1152
+ self,
1153
+ job_id,
1154
+ export_id,
1155
+ _request_auth,
1156
+ _content_type,
1157
+ _headers,
1158
+ _host_index,
1159
+ ) -> RequestSerialized:
1160
+
1161
+ _host = None
1162
+
1163
+ _collection_formats: Dict[str, str] = {
1164
+ }
1165
+
1166
+ _path_params: Dict[str, str] = {}
1167
+ _query_params: List[Tuple[str, str]] = []
1168
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1169
+ _form_params: List[Tuple[str, str]] = []
1170
+ _files: Dict[
1171
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1172
+ ] = {}
1173
+ _body_params: Optional[bytes] = None
1174
+
1175
+ # process the path parameters
1176
+ if job_id is not None:
1177
+ _path_params['jobId'] = job_id
1178
+ if export_id is not None:
1179
+ _path_params['exportId'] = export_id
1180
+ # process the query parameters
1181
+ # process the header parameters
1182
+ # process the form parameters
1183
+ # process the body parameter
1184
+
1185
+
1186
+ # set the HTTP header `Accept`
1187
+ if 'Accept' not in _header_params:
1188
+ _header_params['Accept'] = self.api_client.select_header_accept(
1189
+ [
1190
+ 'application/json'
1191
+ ]
1192
+ )
1193
+
1194
+
1195
+ # authentication setting
1196
+ _auth_settings: List[str] = [
1197
+ 'opportifyToken'
1198
+ ]
1199
+
1200
+ return self.api_client.param_serialize(
1201
+ method='GET',
1202
+ resource_path='/ip/batch/{jobId}/exports/{exportId}',
1203
+ path_params=_path_params,
1204
+ query_params=_query_params,
1205
+ header_params=_header_params,
1206
+ body=_body_params,
1207
+ post_params=_form_params,
1208
+ files=_files,
1209
+ auth_settings=_auth_settings,
1210
+ collection_formats=_collection_formats,
1211
+ _host=_host,
1212
+ _request_auth=_request_auth
1213
+ )
1214
+
1215
+
1216
+
1217
+
1218
+ @validate_call
1219
+ def get_ip_batch_status(
1220
+ self,
1221
+ job_id: Annotated[StrictStr, Field(description="The unique identifier of the batch job to retrieve status for.")],
1222
+ _request_timeout: Union[
1223
+ None,
1224
+ Annotated[StrictFloat, Field(gt=0)],
1225
+ Tuple[
1226
+ Annotated[StrictFloat, Field(gt=0)],
1227
+ Annotated[StrictFloat, Field(gt=0)]
1228
+ ]
1229
+ ] = None,
1230
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1231
+ _content_type: Optional[StrictStr] = None,
1232
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1233
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1234
+ ) -> GetIpBatchStatus200Response:
1235
+ """Get IP Batch Status
1236
+
1237
+ The **Get IP Batch Status** endpoint allows you to retrieve the current status of a previously submitted batch processing job. Use this endpoint to track the progress of your batch IP analysis request and retrieve results when processing is complete. ### Response Information: - When status is `QUEUED`: The job is in the processing queue waiting to be processed. - When status is `PROCESSING`: The job is actively being processed. - When status is `COMPLETED`: The job has finished successfully. - When status is `ERROR`: An issue occurred during processing; check the statusDescription for details.
1238
+
1239
+ :param job_id: The unique identifier of the batch job to retrieve status for. (required)
1240
+ :type job_id: str
1241
+ :param _request_timeout: timeout setting for this request. If one
1242
+ number provided, it will be total request
1243
+ timeout. It can also be a pair (tuple) of
1244
+ (connection, read) timeouts.
1245
+ :type _request_timeout: int, tuple(int, int), optional
1246
+ :param _request_auth: set to override the auth_settings for an a single
1247
+ request; this effectively ignores the
1248
+ authentication in the spec for a single request.
1249
+ :type _request_auth: dict, optional
1250
+ :param _content_type: force content-type for the request.
1251
+ :type _content_type: str, Optional
1252
+ :param _headers: set to override the headers for a single
1253
+ request; this effectively ignores the headers
1254
+ in the spec for a single request.
1255
+ :type _headers: dict, optional
1256
+ :param _host_index: set to override the host_index for a single
1257
+ request; this effectively ignores the host_index
1258
+ in the spec for a single request.
1259
+ :type _host_index: int, optional
1260
+ :return: Returns the result object.
1261
+ """ # noqa: E501
1262
+
1263
+ _param = self._get_ip_batch_status_serialize(
1264
+ job_id=job_id,
1265
+ _request_auth=_request_auth,
1266
+ _content_type=_content_type,
1267
+ _headers=_headers,
1268
+ _host_index=_host_index
1269
+ )
1270
+
1271
+ _response_types_map: Dict[str, Optional[str]] = {
1272
+ '200': "GetIpBatchStatus200Response",
1273
+ '401': "BatchAnalyzeEmails401Response",
1274
+ '402': "BatchAnalyzeEmails402Response",
1275
+ '403': "BatchAnalyzeEmails403Response",
1276
+ '404': "GetEmailBatchStatus404Response",
1277
+ '429': "BatchAnalyzeEmails429Response",
1278
+ '500': "AnalyzeEmail500Response",
1279
+ }
1280
+ response_data = self.api_client.call_api(
1281
+ *_param,
1282
+ _request_timeout=_request_timeout
1283
+ )
1284
+ response_data.read()
1285
+ return self.api_client.response_deserialize(
1286
+ response_data=response_data,
1287
+ response_types_map=_response_types_map,
1288
+ ).data
1289
+
1290
+
1291
+ @validate_call
1292
+ def get_ip_batch_status_with_http_info(
1293
+ self,
1294
+ job_id: Annotated[StrictStr, Field(description="The unique identifier of the batch job to retrieve status for.")],
1295
+ _request_timeout: Union[
1296
+ None,
1297
+ Annotated[StrictFloat, Field(gt=0)],
1298
+ Tuple[
1299
+ Annotated[StrictFloat, Field(gt=0)],
1300
+ Annotated[StrictFloat, Field(gt=0)]
1301
+ ]
1302
+ ] = None,
1303
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1304
+ _content_type: Optional[StrictStr] = None,
1305
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1306
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1307
+ ) -> ApiResponse[GetIpBatchStatus200Response]:
1308
+ """Get IP Batch Status
1309
+
1310
+ The **Get IP Batch Status** endpoint allows you to retrieve the current status of a previously submitted batch processing job. Use this endpoint to track the progress of your batch IP analysis request and retrieve results when processing is complete. ### Response Information: - When status is `QUEUED`: The job is in the processing queue waiting to be processed. - When status is `PROCESSING`: The job is actively being processed. - When status is `COMPLETED`: The job has finished successfully. - When status is `ERROR`: An issue occurred during processing; check the statusDescription for details.
1311
+
1312
+ :param job_id: The unique identifier of the batch job to retrieve status for. (required)
1313
+ :type job_id: str
1314
+ :param _request_timeout: timeout setting for this request. If one
1315
+ number provided, it will be total request
1316
+ timeout. It can also be a pair (tuple) of
1317
+ (connection, read) timeouts.
1318
+ :type _request_timeout: int, tuple(int, int), optional
1319
+ :param _request_auth: set to override the auth_settings for an a single
1320
+ request; this effectively ignores the
1321
+ authentication in the spec for a single request.
1322
+ :type _request_auth: dict, optional
1323
+ :param _content_type: force content-type for the request.
1324
+ :type _content_type: str, Optional
1325
+ :param _headers: set to override the headers for a single
1326
+ request; this effectively ignores the headers
1327
+ in the spec for a single request.
1328
+ :type _headers: dict, optional
1329
+ :param _host_index: set to override the host_index for a single
1330
+ request; this effectively ignores the host_index
1331
+ in the spec for a single request.
1332
+ :type _host_index: int, optional
1333
+ :return: Returns the result object.
1334
+ """ # noqa: E501
1335
+
1336
+ _param = self._get_ip_batch_status_serialize(
1337
+ job_id=job_id,
1338
+ _request_auth=_request_auth,
1339
+ _content_type=_content_type,
1340
+ _headers=_headers,
1341
+ _host_index=_host_index
1342
+ )
1343
+
1344
+ _response_types_map: Dict[str, Optional[str]] = {
1345
+ '200': "GetIpBatchStatus200Response",
1346
+ '401': "BatchAnalyzeEmails401Response",
1347
+ '402': "BatchAnalyzeEmails402Response",
1348
+ '403': "BatchAnalyzeEmails403Response",
1349
+ '404': "GetEmailBatchStatus404Response",
1350
+ '429': "BatchAnalyzeEmails429Response",
1351
+ '500': "AnalyzeEmail500Response",
1352
+ }
1353
+ response_data = self.api_client.call_api(
1354
+ *_param,
1355
+ _request_timeout=_request_timeout
1356
+ )
1357
+ response_data.read()
1358
+ return self.api_client.response_deserialize(
1359
+ response_data=response_data,
1360
+ response_types_map=_response_types_map,
1361
+ )
1362
+
1363
+
1364
+ @validate_call
1365
+ def get_ip_batch_status_without_preload_content(
1366
+ self,
1367
+ job_id: Annotated[StrictStr, Field(description="The unique identifier of the batch job to retrieve status for.")],
1368
+ _request_timeout: Union[
1369
+ None,
1370
+ Annotated[StrictFloat, Field(gt=0)],
1371
+ Tuple[
1372
+ Annotated[StrictFloat, Field(gt=0)],
1373
+ Annotated[StrictFloat, Field(gt=0)]
1374
+ ]
1375
+ ] = None,
1376
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1377
+ _content_type: Optional[StrictStr] = None,
1378
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1379
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1380
+ ) -> RESTResponseType:
1381
+ """Get IP Batch Status
1382
+
1383
+ The **Get IP Batch Status** endpoint allows you to retrieve the current status of a previously submitted batch processing job. Use this endpoint to track the progress of your batch IP analysis request and retrieve results when processing is complete. ### Response Information: - When status is `QUEUED`: The job is in the processing queue waiting to be processed. - When status is `PROCESSING`: The job is actively being processed. - When status is `COMPLETED`: The job has finished successfully. - When status is `ERROR`: An issue occurred during processing; check the statusDescription for details.
1384
+
1385
+ :param job_id: The unique identifier of the batch job to retrieve status for. (required)
1386
+ :type job_id: str
1387
+ :param _request_timeout: timeout setting for this request. If one
1388
+ number provided, it will be total request
1389
+ timeout. It can also be a pair (tuple) of
1390
+ (connection, read) timeouts.
1391
+ :type _request_timeout: int, tuple(int, int), optional
1392
+ :param _request_auth: set to override the auth_settings for an a single
1393
+ request; this effectively ignores the
1394
+ authentication in the spec for a single request.
1395
+ :type _request_auth: dict, optional
1396
+ :param _content_type: force content-type for the request.
1397
+ :type _content_type: str, Optional
1398
+ :param _headers: set to override the headers for a single
1399
+ request; this effectively ignores the headers
1400
+ in the spec for a single request.
1401
+ :type _headers: dict, optional
1402
+ :param _host_index: set to override the host_index for a single
1403
+ request; this effectively ignores the host_index
1404
+ in the spec for a single request.
1405
+ :type _host_index: int, optional
1406
+ :return: Returns the result object.
1407
+ """ # noqa: E501
1408
+
1409
+ _param = self._get_ip_batch_status_serialize(
1410
+ job_id=job_id,
1411
+ _request_auth=_request_auth,
1412
+ _content_type=_content_type,
1413
+ _headers=_headers,
1414
+ _host_index=_host_index
1415
+ )
1416
+
1417
+ _response_types_map: Dict[str, Optional[str]] = {
1418
+ '200': "GetIpBatchStatus200Response",
1419
+ '401': "BatchAnalyzeEmails401Response",
1420
+ '402': "BatchAnalyzeEmails402Response",
1421
+ '403': "BatchAnalyzeEmails403Response",
1422
+ '404': "GetEmailBatchStatus404Response",
1423
+ '429': "BatchAnalyzeEmails429Response",
1424
+ '500': "AnalyzeEmail500Response",
1425
+ }
1426
+ response_data = self.api_client.call_api(
1427
+ *_param,
1428
+ _request_timeout=_request_timeout
1429
+ )
1430
+ return response_data.response
1431
+
1432
+
1433
+ def _get_ip_batch_status_serialize(
1434
+ self,
1435
+ job_id,
1436
+ _request_auth,
1437
+ _content_type,
1438
+ _headers,
1439
+ _host_index,
1440
+ ) -> RequestSerialized:
1441
+
1442
+ _host = None
1443
+
1444
+ _collection_formats: Dict[str, str] = {
1445
+ }
1446
+
1447
+ _path_params: Dict[str, str] = {}
1448
+ _query_params: List[Tuple[str, str]] = []
1449
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1450
+ _form_params: List[Tuple[str, str]] = []
1451
+ _files: Dict[
1452
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1453
+ ] = {}
1454
+ _body_params: Optional[bytes] = None
1455
+
1456
+ # process the path parameters
1457
+ if job_id is not None:
1458
+ _path_params['jobId'] = job_id
1459
+ # process the query parameters
1460
+ # process the header parameters
1461
+ # process the form parameters
1462
+ # process the body parameter
1463
+
1464
+
1465
+ # set the HTTP header `Accept`
1466
+ if 'Accept' not in _header_params:
1467
+ _header_params['Accept'] = self.api_client.select_header_accept(
1468
+ [
1469
+ 'application/json'
1470
+ ]
1471
+ )
1472
+
1473
+
1474
+ # authentication setting
1475
+ _auth_settings: List[str] = [
1476
+ 'opportifyToken'
1477
+ ]
1478
+
1479
+ return self.api_client.param_serialize(
1480
+ method='GET',
1481
+ resource_path='/ip/batch/{jobId}',
1482
+ path_params=_path_params,
1483
+ query_params=_query_params,
1484
+ header_params=_header_params,
1485
+ body=_body_params,
1486
+ post_params=_form_params,
1487
+ files=_files,
1488
+ auth_settings=_auth_settings,
1489
+ collection_formats=_collection_formats,
1490
+ _host=_host,
1491
+ _request_auth=_request_auth
1492
+ )
1493
+
1494
+