upload_portal_api module#

class edgeimpulse_api.api.upload_portal_api.UploadPortalApi(api_client=None)[source]#

Bases: object

Create pre-signed S3 upload link

Creates a signed link to securely upload data to s3 bucket directly from the client.

Parameters:
  • portal_id (int) – Portal ID (required)

  • create_signed_upload_link_request (CreateSignedUploadLinkRequest) – (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _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.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

CreateSignedUploadLinkResponse

delete_portal_file(
portal_id: StrictInt[StrictInt],
delete_portal_file_request: DeletePortalFileRequest,
**kwargs,
) GenericApiResponse[source]#

Delete file from portal

Delete a file from an upload portal (requires JWT auth).

Parameters:
  • portal_id (int) – Portal ID (required)

  • delete_portal_file_request (DeletePortalFileRequest) – (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _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.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

GenericApiResponse

download_portal_file(
portal_id: StrictInt[StrictInt],
download_portal_file_request: DownloadPortalFileRequest,
**kwargs,
) DownloadPortalFileResponse[source]#

Download file from portal

Download a file from an upload portal (requires JWT auth). Will return a signed URL to the bucket.

Parameters:
  • portal_id (int) – Portal ID (required)

  • download_portal_file_request (DownloadPortalFileRequest) – (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _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.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

DownloadPortalFileResponse

get_portal_info(
portal_id: StrictInt[StrictInt],
**kwargs,
) PortalInfoResponse[source]#

Portal info

Get information about a portal

Parameters:
  • portal_id (int) – Portal ID (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _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.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

PortalInfoResponse

list_portal_files_in_folder(
portal_id: StrictInt[StrictInt],
list_portal_files_in_folder_request: ListPortalFilesInFolderRequest,
**kwargs,
) ListPortalFilesInFolderResponse[source]#

List files in portal

List all files and directories in specified prefix.

Parameters:
  • portal_id (int) – Portal ID (required)

  • list_portal_files_in_folder_request (ListPortalFilesInFolderRequest) – (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _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.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

ListPortalFilesInFolderResponse

rename_portal_file(
portal_id: StrictInt[StrictInt],
rename_portal_file_request: RenamePortalFileRequest,
**kwargs,
) GenericApiResponse[source]#

Rename file from portal

Rename a file on an upload portal (requires JWT auth).

Parameters:
  • portal_id (int) – Portal ID (required)

  • rename_portal_file_request (RenamePortalFileRequest) – (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _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.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

GenericApiResponse

view_portal_file(
portal_id: StrictInt[StrictInt],
path: StrictStr[StrictStr],
**kwargs,
) str[source]#

View file from portal

View a file that’s located in an upload portal (requires JWT auth). File might be converted (e.g. Parquet) or truncated (e.g. CSV).

Parameters:
  • portal_id (int) – Portal ID (required)

  • path (str) – Path to file in portal (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _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.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

str