def share_array_by_invite_with_http_info(self, namespace, array,
                                             email_invite,
                                             **kwargs):  # noqa: E501
        """share_array_by_invite  # noqa: E501

        Sends email to multiple recipients with sharing information regarding an array  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.share_array_by_invite_with_http_info(namespace, array, email_invite, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str namespace: namespace array is in (an organization name or user's username) (required)
        :param str array: name/uri of array that is url-encoded (required)
        :param InvitationArrayShareEmail email_invite: list of email recipients (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ["namespace", "array", "email_invite"]
        all_params.extend([
            "async_req",
            "_return_http_data_only",
            "_preload_content",
            "_request_timeout",
        ])

        for key, val in six.iteritems(local_var_params["kwargs"]):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method share_array_by_invite" % key)
            local_var_params[key] = val
        del local_var_params["kwargs"]
        # verify the required parameter 'namespace' is set
        if self.api_client.client_side_validation and (
                "namespace" not in local_var_params
                or local_var_params["namespace"] is None  # noqa: E501
        ):  # noqa: E501
            raise ApiValueError(
                "Missing the required parameter `namespace` when calling `share_array_by_invite`"
            )  # noqa: E501
        # verify the required parameter 'array' is set
        if self.api_client.client_side_validation and (
                "array" not in local_var_params
                or local_var_params["array"] is None  # noqa: E501
        ):  # noqa: E501
            raise ApiValueError(
                "Missing the required parameter `array` when calling `share_array_by_invite`"
            )  # noqa: E501
        # verify the required parameter 'email_invite' is set
        if self.api_client.client_side_validation and (
                "email_invite" not in local_var_params
                or local_var_params["email_invite"] is None  # noqa: E501
        ):  # noqa: E501
            raise ApiValueError(
                "Missing the required parameter `email_invite` when calling `share_array_by_invite`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}
        if "namespace" in local_var_params:
            path_params["namespace"] = local_var_params[
                "namespace"]  # noqa: E501
        if "array" in local_var_params:
            path_params["array"] = local_var_params["array"]  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "email_invite" in local_var_params:
            body_params = local_var_params["email_invite"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"])  # noqa: E501

        # HTTP header `Content-Type`
        header_params[
            "Content-Type"] = self.api_client.select_header_content_type(  # noqa: E501
                ["application/json"])  # noqa: E501

        # Authentication setting
        auth_settings = ["ApiKeyAuth", "BasicAuth"]  # noqa: E501

        return self.api_client.call_api(
            "/invitations/{namespace}/{array}/share",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get(
                "_return_http_data_only"),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
        )
Beispiel #2
0
    def get_tiledb_stats_with_http_info(self, **kwargs):  # noqa: E501
        """get_tiledb_stats  # noqa: E501

        Fetch libtiledb stat  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_tiledb_stats_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(InlineResponse200, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = []  # noqa: E501
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        for key, val in six.iteritems(local_var_params["kwargs"]):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method get_tiledb_stats" % key)
            local_var_params[key] = val
        del local_var_params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"])  # noqa: E501

        # Authentication setting
        auth_settings = ["ApiKeyAuth", "BasicAuth"]  # noqa: E501

        return self.api_client.call_api(
            "/.stats",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="InlineResponse200",  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get(
                "_return_http_data_only"),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
        )
    def fetch_invitations_with_http_info(self, **kwargs):  # noqa: E501
        """fetch_invitations  # noqa: E501

        Fetch a list of invitations  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.fetch_invitations_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str organization: name or id of organization to filter
        :param str array: name/uri of array that is url-encoded to filter
        :param int start: start time for tasks to filter by
        :param int end: end time for tasks to filter by
        :param int page: pagination offset
        :param int per_page: pagination limit
        :param str type: invitation type, \"ARRAY_SHARE\", \"JOIN_ORGANIZATION\"
        :param str status: Filter to only return \"PENDING\", \"ACCEPTED\"
        :param str orderby: sort by which field valid values include timestamp, array_name, organization_name
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(InvitationData, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            "organization",
            "array",
            "start",
            "end",
            "page",
            "per_page",
            "type",
            "status",
            "orderby",
        ]
        all_params.extend([
            "async_req",
            "_return_http_data_only",
            "_preload_content",
            "_request_timeout",
        ])

        for key, val in six.iteritems(local_var_params["kwargs"]):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method fetch_invitations" % key)
            local_var_params[key] = val
        del local_var_params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []
        if ("organization" in local_var_params and
                local_var_params["organization"] is not None):  # noqa: E501
            query_params.append(
                ("organization",
                 local_var_params["organization"]))  # noqa: E501
        if ("array" in local_var_params
                and local_var_params["array"] is not None):  # noqa: E501
            query_params.append(
                ("array", local_var_params["array"]))  # noqa: E501
        if ("start" in local_var_params
                and local_var_params["start"] is not None):  # noqa: E501
            query_params.append(
                ("start", local_var_params["start"]))  # noqa: E501
        if ("end" in local_var_params
                and local_var_params["end"] is not None):  # noqa: E501
            query_params.append(("end", local_var_params["end"]))  # noqa: E501
        if ("page" in local_var_params
                and local_var_params["page"] is not None):  # noqa: E501
            query_params.append(
                ("page", local_var_params["page"]))  # noqa: E501
        if ("per_page" in local_var_params
                and local_var_params["per_page"] is not None):  # noqa: E501
            query_params.append(
                ("per_page", local_var_params["per_page"]))  # noqa: E501
        if ("type" in local_var_params
                and local_var_params["type"] is not None):  # noqa: E501
            query_params.append(
                ("type", local_var_params["type"]))  # noqa: E501
        if ("status" in local_var_params
                and local_var_params["status"] is not None):  # noqa: E501
            query_params.append(
                ("status", local_var_params["status"]))  # noqa: E501
        if ("orderby" in local_var_params
                and local_var_params["orderby"] is not None):  # noqa: E501
            query_params.append(
                ("orderby", local_var_params["orderby"]))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"])  # noqa: E501

        # Authentication setting
        auth_settings = ["ApiKeyAuth", "BasicAuth"]  # noqa: E501

        return self.api_client.call_api(
            "/invitations",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="InvitationData",  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get(
                "_return_http_data_only"),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
        )
    def accept_invitation_with_http_info(self, invitation,
                                         **kwargs):  # noqa: E501
        """accept_invitation  # noqa: E501

        Accepts invitation  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.accept_invitation_with_http_info(invitation, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str invitation: the id of invitation about to be accepted (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ["invitation"]
        all_params.extend([
            "async_req",
            "_return_http_data_only",
            "_preload_content",
            "_request_timeout",
        ])

        for key, val in six.iteritems(local_var_params["kwargs"]):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method accept_invitation" % key)
            local_var_params[key] = val
        del local_var_params["kwargs"]
        # verify the required parameter 'invitation' is set
        if self.api_client.client_side_validation and (
                "invitation" not in local_var_params
                or local_var_params["invitation"] is None  # noqa: E501
        ):  # noqa: E501
            raise ApiValueError(
                "Missing the required parameter `invitation` when calling `accept_invitation`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}
        if "invitation" in local_var_params:
            path_params["invitation"] = local_var_params[
                "invitation"]  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"])  # noqa: E501

        # Authentication setting
        auth_settings = ["ApiKeyAuth", "BasicAuth"]  # noqa: E501

        return self.api_client.call_api(
            "/invitations/{invitation}",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get(
                "_return_http_data_only"),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
        )
Beispiel #5
0
    def finalize_query_with_http_info(self, namespace, array, type,
                                      content_type, query,
                                      **kwargs):  # noqa: E501
        """finalize_query  # noqa: E501

        send a query to run against a specified array/URI registered to a group/project  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.finalize_query_with_http_info(namespace, array, type, content_type, query, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str namespace: namespace array is in (an organization name or user's username) (required)
        :param str array: name/uri of array that is url-encoded (required)
        :param str type: type of query (required)
        :param str content_type: Content Type of input and return mime (required)
        :param Query query: query to run (required)
        :param str x_payer: Name of organization or user who should be charged for this request
        :param int open_at: open_at for array in unix epoch
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(Query, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            "namespace",
            "array",
            "type",
            "content_type",
            "query",
            "x_payer",
            "open_at",
        ]  # noqa: E501
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        for key, val in six.iteritems(local_var_params["kwargs"]):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method finalize_query" % key)
            local_var_params[key] = val
        del local_var_params["kwargs"]
        # verify the required parameter 'namespace' is set
        if "namespace" not in local_var_params or local_var_params[
                "namespace"] is None:
            raise ApiValueError(
                "Missing the required parameter `namespace` when calling `finalize_query`"
            )  # noqa: E501
        # verify the required parameter 'array' is set
        if "array" not in local_var_params or local_var_params["array"] is None:
            raise ApiValueError(
                "Missing the required parameter `array` when calling `finalize_query`"
            )  # noqa: E501
        # verify the required parameter 'type' is set
        if "type" not in local_var_params or local_var_params["type"] is None:
            raise ApiValueError(
                "Missing the required parameter `type` when calling `finalize_query`"
            )  # noqa: E501
        # verify the required parameter 'content_type' is set
        if ("content_type" not in local_var_params
                or local_var_params["content_type"] is None):
            raise ApiValueError(
                "Missing the required parameter `content_type` when calling `finalize_query`"
            )  # noqa: E501
        # verify the required parameter 'query' is set
        if "query" not in local_var_params or local_var_params["query"] is None:
            raise ApiValueError(
                "Missing the required parameter `query` when calling `finalize_query`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}
        if "namespace" in local_var_params:
            path_params["namespace"] = local_var_params[
                "namespace"]  # noqa: E501
        if "array" in local_var_params:
            path_params["array"] = local_var_params["array"]  # noqa: E501

        query_params = []
        if "type" in local_var_params:
            query_params.append(
                ("type", local_var_params["type"]))  # noqa: E501
        if "open_at" in local_var_params:
            query_params.append(
                ("open_at", local_var_params["open_at"]))  # noqa: E501

        header_params = {}
        if "content_type" in local_var_params:
            header_params["Content-Type"] = local_var_params[
                "content_type"]  # noqa: E501
        if "x_payer" in local_var_params:
            header_params["X-Payer"] = local_var_params[
                "x_payer"]  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        if "query" in local_var_params:
            body_params = local_var_params["query"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "application/capnp"])  # noqa: E501

        # HTTP header `Content-Type`
        header_params[
            "Content-Type"] = self.api_client.select_header_content_type(  # noqa: E501
                ["application/json", "application/capnp"])  # noqa: E501

        # Authentication setting
        auth_settings = ["ApiKeyAuth", "BasicAuth"]  # noqa: E501

        return self.api_client.call_api(
            "/arrays/{namespace}/{array}/query/finalize",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="Query",  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get(
                "_return_http_data_only"),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
        )
Beispiel #6
0
    def get_array_tasks_sidebar_with_http_info(self, **kwargs):  # noqa: E501
        """get_array_tasks_sidebar  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_array_tasks_sidebar_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param int start: Fetch tasks created after this time, unix epoch in seconds, default 7 days ago
        :param int end: Fetch tasks created before this time, unix epoch in seconds, default now
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(ArrayTaskBrowserSidebar, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ["start", "end"]
        all_params.extend(
            [
                "async_req",
                "_return_http_data_only",
                "_preload_content",
                "_request_timeout",
            ]
        )

        for key, val in six.iteritems(local_var_params["kwargs"]):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_array_tasks_sidebar" % key
                )
            local_var_params[key] = val
        del local_var_params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []
        if (
            "start" in local_var_params and local_var_params["start"] is not None
        ):  # noqa: E501
            query_params.append(("start", local_var_params["start"]))  # noqa: E501
        if (
            "end" in local_var_params and local_var_params["end"] is not None
        ):  # noqa: E501
            query_params.append(("end", local_var_params["end"]))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # noqa: E501

        # Authentication setting
        auth_settings = ["ApiKeyAuth", "BasicAuth"]  # noqa: E501

        return self.api_client.call_api(
            "/tasks/sidebar",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="ArrayTaskBrowserSidebar",  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get(
                "_return_http_data_only"
            ),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
        )
Beispiel #7
0
    def tasks_get_with_http_info(self, **kwargs):  # noqa: E501
        """tasks_get  # noqa: E501

        Fetch a list of all array tasks a user has access to  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.tasks_get_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str namespace: namespace to filter
        :param str created_by: username to filter
        :param str array: name/uri of array that is url-encoded to filter
        :param int start: start time for tasks to filter by
        :param int end: end time for tasks to filter by
        :param int page: pagination offset
        :param int per_page: pagination limit
        :param str type: task type, \"QUERY\", \"SQL\", \"UDF\"
        :param str status: Filter to only return these statuses
        :param str search: search string that will look at name, namespace or description fields
        :param str orderby: sort by which field valid values include start_time, name
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(ArrayTaskData, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = [
            "namespace",
            "created_by",
            "array",
            "start",
            "end",
            "page",
            "per_page",
            "type",
            "status",
            "search",
            "orderby",
        ]  # noqa: E501
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        for key, val in six.iteritems(local_var_params["kwargs"]):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method tasks_get" % key
                )
            local_var_params[key] = val
        del local_var_params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []
        if "namespace" in local_var_params:
            query_params.append(
                ("namespace", local_var_params["namespace"])
            )  # noqa: E501
        if "created_by" in local_var_params:
            query_params.append(
                ("created_by", local_var_params["created_by"])
            )  # noqa: E501
        if "array" in local_var_params:
            query_params.append(("array", local_var_params["array"]))  # noqa: E501
        if "start" in local_var_params:
            query_params.append(("start", local_var_params["start"]))  # noqa: E501
        if "end" in local_var_params:
            query_params.append(("end", local_var_params["end"]))  # noqa: E501
        if "page" in local_var_params:
            query_params.append(("page", local_var_params["page"]))  # noqa: E501
        if "per_page" in local_var_params:
            query_params.append(
                ("per_page", local_var_params["per_page"])
            )  # noqa: E501
        if "type" in local_var_params:
            query_params.append(("type", local_var_params["type"]))  # noqa: E501
        if "status" in local_var_params:
            query_params.append(("status", local_var_params["status"]))  # noqa: E501
        if "search" in local_var_params:
            query_params.append(("search", local_var_params["search"]))  # noqa: E501
        if "orderby" in local_var_params:
            query_params.append(("orderby", local_var_params["orderby"]))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # noqa: E501

        # Authentication setting
        auth_settings = ["ApiKeyAuth", "BasicAuth"]  # noqa: E501

        return self.api_client.call_api(
            "/tasks",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="ArrayTaskData",  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get(
                "_return_http_data_only"
            ),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
        )
Beispiel #8
0
    def run_sql_with_http_info(self, namespace, sql, **kwargs):  # noqa: E501
        """run_sql  # noqa: E501

        Run a sql query  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.run_sql_with_http_info(namespace, sql, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str namespace: namespace to run task under is in (an organization name or user's username) (required)
        :param SQLParameters sql: sql being submitted (required)
        :param str accept_encoding: Encoding to use
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(list[object], status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ["namespace", "sql", "accept_encoding"]  # noqa: E501
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        for key, val in six.iteritems(local_var_params["kwargs"]):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'" " to method run_sql" % key
                )
            local_var_params[key] = val
        del local_var_params["kwargs"]
        # verify the required parameter 'namespace' is set
        if "namespace" not in local_var_params or local_var_params["namespace"] is None:
            raise ApiValueError(
                "Missing the required parameter `namespace` when calling `run_sql`"
            )  # noqa: E501
        # verify the required parameter 'sql' is set
        if "sql" not in local_var_params or local_var_params["sql"] is None:
            raise ApiValueError(
                "Missing the required parameter `sql` when calling `run_sql`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}
        if "namespace" in local_var_params:
            path_params["namespace"] = local_var_params["namespace"]  # noqa: E501

        query_params = []

        header_params = {}
        if "accept_encoding" in local_var_params:
            header_params["Accept-Encoding"] = local_var_params[
                "accept_encoding"
            ]  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        if "sql" in local_var_params:
            body_params = local_var_params["sql"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # noqa: E501

        # HTTP header `Content-Type`
        header_params[
            "Content-Type"
        ] = self.api_client.select_header_content_type(  # noqa: E501
            ["application/json"]
        )  # noqa: E501

        # Authentication setting
        auth_settings = ["ApiKeyAuth", "BasicAuth"]  # noqa: E501

        return self.api_client.call_api(
            "/sql/{namespace}",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="list[object]",  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get(
                "_return_http_data_only"
            ),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
        )
Beispiel #9
0
    def task_id_get_with_http_info(self, id, **kwargs):  # noqa: E501
        """task_id_get  # noqa: E501

        Fetch an array task  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.task_id_get_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str id: task id to fetch (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: tuple(ArrayTask, status_code(int), headers(HTTPHeaderDict))
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ["id"]  # noqa: E501
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        for key, val in six.iteritems(local_var_params["kwargs"]):
            if key not in all_params:
                raise ApiTypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method task_id_get" % key
                )
            local_var_params[key] = val
        del local_var_params["kwargs"]
        # verify the required parameter 'id' is set
        if "id" not in local_var_params or local_var_params["id"] is None:
            raise ApiValueError(
                "Missing the required parameter `id` when calling `task_id_get`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}
        if "id" in local_var_params:
            path_params["id"] = local_var_params["id"]  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"]
        )  # noqa: E501

        # Authentication setting
        auth_settings = ["ApiKeyAuth", "BasicAuth"]  # noqa: E501

        return self.api_client.call_api(
            "/task/{id}",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="ArrayTask",  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get(
                "_return_http_data_only"
            ),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
        )
Beispiel #10
0
    def post_favorite_with_http_info(self, **kwargs):  # noqa: E501
        """post_favorite  # noqa: E501

        Add a new favorite  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.post_favorite_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param FavoriteUpdate body:
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ["body"]  # noqa: E501
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        for key, val in six.iteritems(local_var_params["kwargs"]):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method post_favorite" % key)
            local_var_params[key] = val
        del local_var_params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "body" in local_var_params:
            body_params = local_var_params["body"]
        # HTTP header `Content-Type`
        header_params[
            "Content-Type"] = self.api_client.select_header_content_type(  # noqa: E501
                ["application/json"])  # noqa: E501

        # Authentication setting
        auth_settings = ["ApiKeyAuth", "BasicAuth"]  # noqa: E501

        return self.api_client.call_api(
            "/favorites",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get(
                "_return_http_data_only"),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
        )
Beispiel #11
0
    def update_notebook_name_with_http_info(self, namespace, array,
                                            notebook_metadata,
                                            **kwargs):  # noqa: E501
        """update_notebook_name  # noqa: E501

        update name on a notebok, moving related s3 object to new location  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_notebook_name_with_http_info(namespace, array, notebook_metadata, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str namespace: namespace array is in (an organization name or user's username) (required)
        :param str array: name/uri of notebook (array) that is url-encoded (required)
        :param ArrayInfoUpdate notebook_metadata: notebook (array) metadata to update (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ["namespace", "array", "notebook_metadata"]
        all_params.extend([
            "async_req",
            "_return_http_data_only",
            "_preload_content",
            "_request_timeout",
        ])

        for key, val in six.iteritems(local_var_params["kwargs"]):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method update_notebook_name" % key)
            local_var_params[key] = val
        del local_var_params["kwargs"]
        # verify the required parameter 'namespace' is set
        if "namespace" not in local_var_params or local_var_params[
                "namespace"] is None:
            raise ApiValueError(
                "Missing the required parameter `namespace` when calling `update_notebook_name`"
            )
        # verify the required parameter 'array' is set
        if "array" not in local_var_params or local_var_params["array"] is None:
            raise ApiValueError(
                "Missing the required parameter `array` when calling `update_notebook_name`"
            )
        # verify the required parameter 'notebook_metadata' is set
        if ("notebook_metadata" not in local_var_params
                or local_var_params["notebook_metadata"] is None):
            raise ApiValueError(
                "Missing the required parameter `notebook_metadata` when calling `update_notebook_name`"
            )

        collection_formats = {}

        path_params = {}
        if "namespace" in local_var_params:
            path_params["namespace"] = local_var_params[
                "namespace"]  # noqa: E501
        if "array" in local_var_params:
            path_params["array"] = local_var_params["array"]  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "notebook_metadata" in local_var_params:
            body_params = local_var_params["notebook_metadata"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"])  # noqa: E501

        # HTTP header `Content-Type`
        header_params[
            "Content-Type"] = self.api_client.select_header_content_type(  # noqa: E501
                ["application/json"])  # noqa: E501

        # Authentication setting
        auth_settings = ["ApiKeyAuth", "BasicAuth"]  # noqa: E501

        return self.api_client.call_api(
            "/notebooks/{namespace}/{array}/rename",
            "PATCH",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get(
                "_return_http_data_only"),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
        )
Beispiel #12
0
    def shutdown_notebook_server_with_http_info(self, namespace,
                                                **kwargs):  # noqa: E501
        """shutdown_notebook_server  # noqa: E501

        Shutdown a notebook server  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.shutdown_notebook_server_with_http_info(namespace, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str namespace: namespace notebook is in (an organization name or user's username) (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ["namespace"]  # noqa: E501
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        for key, val in six.iteritems(local_var_params["kwargs"]):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method shutdown_notebook_server" % key)
            local_var_params[key] = val
        del local_var_params["kwargs"]
        # verify the required parameter 'namespace' is set
        if "namespace" not in local_var_params or local_var_params[
                "namespace"] is None:
            raise ApiValueError(
                "Missing the required parameter `namespace` when calling `shutdown_notebook_server`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}
        if "namespace" in local_var_params:
            path_params["namespace"] = local_var_params[
                "namespace"]  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"])  # noqa: E501

        # Authentication setting
        auth_settings = ["ApiKeyAuth", "BasicAuth"]  # noqa: E501

        return self.api_client.call_api(
            "/notebooks/server/{namespace}",
            "DELETE",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get(
                "_return_http_data_only"),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
        )
Beispiel #13
0
    def join_organization_with_http_info(self, organization, email_invite,
                                         **kwargs):  # noqa: E501
        """join_organization  # noqa: E501

        Sends email to multiple recipients with joining information regarding an organization  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.join_organization_with_http_info(organization, email_invite, async_req=True)
        >>> result = thread.get()

        :param async_req bool: execute request asynchronously
        :param str organization: name or uuid of organization (required)
        :param InvitationOrganizationJoinEmail email_invite: list of email recipients (required)
        :param _return_http_data_only: response data without head status code
                                       and headers
        :param _preload_content: if False, the urllib3.HTTPResponse object will
                                 be returned without reading/decoding response
                                 data. Default is True.
        :param _request_timeout: timeout setting for this request. If one
                                 number provided, it will be total request
                                 timeout. It can also be a pair (tuple) of
                                 (connection, read) timeouts.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        local_var_params = locals()

        all_params = ["organization", "email_invite"]  # noqa: E501
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        for key, val in six.iteritems(local_var_params["kwargs"]):
            if key not in all_params:
                raise ApiTypeError("Got an unexpected keyword argument '%s'"
                                   " to method join_organization" % key)
            local_var_params[key] = val
        del local_var_params["kwargs"]
        # verify the required parameter 'organization' is set
        if ("organization" not in local_var_params
                or local_var_params["organization"] is None):
            raise ApiValueError(
                "Missing the required parameter `organization` when calling `join_organization`"
            )  # noqa: E501
        # verify the required parameter 'email_invite' is set
        if ("email_invite" not in local_var_params
                or local_var_params["email_invite"] is None):
            raise ApiValueError(
                "Missing the required parameter `email_invite` when calling `join_organization`"
            )  # noqa: E501

        collection_formats = {}

        path_params = {}
        if "organization" in local_var_params:
            path_params["organization"] = local_var_params[
                "organization"]  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "email_invite" in local_var_params:
            body_params = local_var_params["email_invite"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json"])  # noqa: E501

        # HTTP header `Content-Type`
        header_params[
            "Content-Type"] = self.api_client.select_header_content_type(  # noqa: E501
                ["application/json"])  # noqa: E501

        # Authentication setting
        auth_settings = ["ApiKeyAuth", "BasicAuth"]  # noqa: E501

        return self.api_client.call_api(
            "/invitations/{organization}/join",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # noqa: E501
            auth_settings=auth_settings,
            async_req=local_var_params.get("async_req"),
            _return_http_data_only=local_var_params.get(
                "_return_http_data_only"),  # noqa: E501
            _preload_content=local_var_params.get("_preload_content", True),
            _request_timeout=local_var_params.get("_request_timeout"),
            collection_formats=collection_formats,
        )