11# -*- coding: utf-8 -*-
22
3- """Interact with the Cortex Query Service API.
4-
3+ """
4+ :::info
55The Query Service is a Palo Alto Networks cloud service which allows
66for the storage and retrieval of data stored in the Cortex Data Lake.
77Any type of textual data can be stored in the Cortex Data Lake. Palo
88Alto Networks firewalls and software can write data to this service, as
99can the software and services created by Palo Alto Network's various
1010partners.
11+ :::
1112
1213Examples:
13- Refer to the examples provided with this library.
14+ Refer to the [ examples provided with this library](https://github.com/PaloAltoNetworks/pan-cortex-data-lake-python/tree/master/examples) .
1415
1516"""
1617
@@ -30,11 +31,11 @@ def __init__(self, **kwargs):
3031 """
3132
3233 Parameters:
33- session (HTTPClient): :class:`~cortex. httpclient.HTTPClient` object. Defaults to ``None``.
34- url (str): URL to send API requests to. Later combined with ``port`` and :meth:`~request` ``endpoint`` parameter.
34+ session (HTTPClient): [HTTPClient]( httpclient.md#httpclient) object. Defaults to ``None``.
35+ url (str): URL to send API requests to. Later combined with ``port`` and ``endpoint`` parameter.
3536
3637 Args:
37- **kwargs: Supported :class:`~cortex. httpclient.HTTPClient` parameters.
38+ **kwargs: Supported [HTTPClient]( httpclient.md#httpclient) parameters.
3839
3940 """
4041 self .kwargs = kwargs .copy () # used for __repr__
@@ -77,7 +78,7 @@ def cancel_job(self, job_id=None, **kwargs):
7778
7879 Args:
7980 job_id (str): Specifies the ID of the query job.
80- **kwargs: Supported :meth:`~pan_cortex_data_lake. httpclient.HTTPClient. request` parameters.
81+ **kwargs: Supported [HTTPClient.request()]( httpclient.md# request) parameters.
8182
8283 Returns:
8384 requests.Response: Requests Response() object.
@@ -93,14 +94,16 @@ def cancel_job(self, job_id=None, **kwargs):
9394 def create_query (self , job_id = None , query_params = None , ** kwargs ):
9495 """Create a search request.
9596
96- When submission is successful, http status code of 201 (Created)
97+ :::info
98+ When submission is successful, http status code of ``201`` (Created)
9799 is returned with a 'jobId' in response. Specifying a 'jobId' is
98100 optional.
101+ :::
99102
100103 Args:
101104 job_id (str): Specifies the ID of the query job. (optional)
102105 query_params (dict): Query parameters.
103- **kwargs: Supported :meth:`~pan_cortex_data_lake. httpclient.HTTPClient. request` parameters.
106+ **kwargs: Supported [HTTPClient.request()]( httpclient.md# request) parameters.
104107
105108 Returns:
106109 requests.Response: Requests Response() object.
@@ -129,7 +132,7 @@ def get_job(self, job_id=None, **kwargs):
129132 Args:
130133 job_id (str): Specifies the ID of the query job.
131134 params (dict): Payload/request dictionary.
132- **kwargs: Supported :meth:`~pan_cortex_data_lake. httpclient.HTTPClient. request` parameters.
135+ **kwargs: Supported [HTTPClient.request()]( httpclient.md# request) parameters.
133136
134137 Returns:
135138 requests.Response: Requests Response() object.
@@ -163,7 +166,7 @@ def get_job_results(
163166 page_number (int): Return the nth page from the result set as specified by this parameter.
164167 page_size (int): If specified, limits the size of a batch of results to the specified value. If un-specified, backend picks a size that may provide best performance.
165168 result_format (str): valuesArray or valuesJson.
166- **kwargs: Supported :meth:`~pan_cortex_data_lake. httpclient.HTTPClient. request` parameters.
169+ **kwargs: Supported [HTTPClient.request()]( httpclient.md# request) parameters.
167170
168171 Returns:
169172 requests.Response: Requests Response() object.
@@ -213,7 +216,7 @@ def iter_job_results(
213216 page_number (int): Return the nth page from the result set as specified by this parameter.
214217 page_size (int): If specified, limits the size of a batch of results to the specified value. If un-specified, backend picks a size that may provide best performance.
215218 result_format (str): valuesArray or valuesJson.
216- **kwargs: Supported :meth:`~pan_cortex_data_lake. httpclient.HTTPClient. request` parameters.
219+ **kwargs: Supported [HTTPClient.request()]( httpclient.md# request) parameters.
217220
218221 Yields:
219222 requests.Response: Requests Response() object.
@@ -271,7 +274,7 @@ def list_jobs(
271274 state (str): Job state, e.g. 'RUNNING', 'PENDING', 'FAILED', 'DONE'.
272275 job_type (str): Query type hint.
273276 tenant_id (str): Tenant ID.
274- **kwargs: Supported :meth:`~pan_cortex_data_lake. httpclient.HTTPClient. request` parameters.
277+ **kwargs: Supported [HTTPClient.request()]( httpclient.md# request) parameters.
275278
276279 Returns:
277280 requests.Response: Requests Response() object.
0 commit comments