Skip to content

Latest commit

 

History

History
61 lines (42 loc) · 1.75 KB

File metadata and controls

61 lines (42 loc) · 1.75 KB

liveagent_api.FilesApi

All URIs are relative to http://localhost/api/v3

Method HTTP request Description
upload_file POST /files Upload new file to the system

upload_file

StoredFile upload_file(file=file)

Upload new file to the system

Example

import time
import liveagent_api
from liveagent_api.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: privileges
liveagent_api.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Configure API key authorization: apikey
liveagent_api.configuration.api_key['apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. BEARER) for API key, if needed
# liveagent_api.configuration.api_key_prefix['apikey'] = 'BEARER'

# create an instance of the API class
api_instance = liveagent_api.FilesApi()
file = '/path/to/file.txt' # file |  (optional)

try: 
    # Upload new file to the system
    api_response = api_instance.upload_file(file=file)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling FilesApi->upload_file: %s\n" % e

Parameters

Name Type Description Notes
file file [optional]

Return type

StoredFile

Authorization

privileges, apikey

HTTP request headers

  • Content-Type: multipart/form-data, application/x-www-form-urlencoded
  • Accept: application/json

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