Skip to content

Latest commit

 

History

History
179 lines (131 loc) · 6.03 KB

File metadata and controls

179 lines (131 loc) · 6.03 KB

openapi_client.FilesApi

All URIs are relative to https://localhost:16001/api/v1

Method HTTP request Description
delete_upload_fidelete DELETE /file/{uuid} Delete a file from the upload directory
get_upload_file GET /file/{uuid} Get a file from the upload directory

delete_upload_fidelete

GenericGoodAnswer delete_upload_fidelete(uuid, serial_number)

Delete a file from the upload directory

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (bearerAuth):
import time
import openapi_client
from openapi_client.api import files_api
from openapi_client.model.generic_good_answer import GenericGoodAnswer
from openapi_client.model.generic_error_response import GenericErrorResponse
from pprint import pprint
# Defining the host is optional and defaults to https://localhost:16001/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "https://localhost:16001/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): bearerAuth
configuration = openapi_client.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = files_api.FilesApi(api_client)
    uuid = "uuid_example" # str | 
    serial_number = "serialNumber_example" # str | 

    # example passing only required values which don't have defaults set
    try:
        # Delete a file from the upload directory
        api_response = api_instance.delete_upload_fidelete(uuid, serial_number)
        pprint(api_response)
    except openapi_client.ApiException as e:
        print("Exception when calling FilesApi->delete_upload_fidelete: %s\n" % e)

Parameters

Name Type Description Notes
uuid str
serial_number str

Return type

GenericGoodAnswer

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 The requested operation was performed. -
403 The requested does not have sufficient rights to perform the operation. -
404 The specified resource was not found. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_upload_file

file_type get_upload_file(uuid, serial_number)

Get a file from the upload directory

Example

  • Api Key Authentication (ApiKeyAuth):
  • Bearer (JWT) Authentication (bearerAuth):
import time
import openapi_client
from openapi_client.api import files_api
from openapi_client.model.generic_error_response import GenericErrorResponse
from pprint import pprint
# Defining the host is optional and defaults to https://localhost:16001/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "https://localhost:16001/api/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure Bearer authorization (JWT): bearerAuth
configuration = openapi_client.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)

# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = files_api.FilesApi(api_client)
    uuid = "uuid_example" # str | 
    serial_number = "serialNumber_example" # str | 

    # example passing only required values which don't have defaults set
    try:
        # Get a file from the upload directory
        api_response = api_instance.get_upload_file(uuid, serial_number)
        pprint(api_response)
    except openapi_client.ApiException as e:
        print("Exception when calling FilesApi->get_upload_file: %s\n" % e)

Parameters

Name Type Description Notes
uuid str
serial_number str

Return type

file_type

Authorization

ApiKeyAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/octet-stream, application/json

HTTP response details

Status code Description Response headers
200 Succesfull file retrieval -
403 The requested does not have sufficient rights to perform the operation. -
404 The specified resource was not found. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]