Skip to content

Latest commit

 

History

History
302 lines (239 loc) · 10.4 KB

ObjectAttachmentApi.md

File metadata and controls

302 lines (239 loc) · 10.4 KB

eZmaxApi.Api.ObjectAttachmentApi

All URIs are relative to https://prod.api.appcluster01.ca-central-1.ezmax.com/rest

Method HTTP request Description
AttachmentDownloadV1 GET /1/object/attachment/{pkiAttachmentID}/download Retrieve the content
AttachmentGetAttachmentlogsV1 GET /1/object/attachment/{pkiAttachmentID}/getAttachmentlogs Retrieve the Attachmentlogs
AttachmentGetDownloadUrlV1 GET /1/object/attachment/{pkiAttachmentID}/getDownloadUrl Retrieve a URL to download attachments.

AttachmentDownloadV1

void AttachmentDownloadV1 (int pkiAttachmentID)

Retrieve the content

Using this endpoint, you can retrieve the content of an attachment.

Example

using System.Collections.Generic;
using System.Diagnostics;
using eZmaxApi.Api;
using eZmaxApi.Client;
using eZmaxApi.Model;

namespace Example
{
    public class AttachmentDownloadV1Example
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://prod.api.appcluster01.ca-central-1.ezmax.com/rest";
            // Configure API key authorization: Authorization
            config.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("Authorization", "Bearer");
            // Configure API key authorization: Presigned
            config.AddApiKey("sAuthorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("sAuthorization", "Bearer");

            var apiInstance = new ObjectAttachmentApi(config);
            var pkiAttachmentID = 56;  // int | 

            try
            {
                // Retrieve the content
                apiInstance.AttachmentDownloadV1(pkiAttachmentID);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ObjectAttachmentApi.AttachmentDownloadV1: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the AttachmentDownloadV1WithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Retrieve the content
    apiInstance.AttachmentDownloadV1WithHttpInfo(pkiAttachmentID);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling ObjectAttachmentApi.AttachmentDownloadV1WithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
pkiAttachmentID int

Return type

void (empty response body)

Authorization

Authorization, Presigned

HTTP request headers

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

HTTP response details

Status code Description Response headers
302 The user has been redirected -
404 The request failed. The element on which you were trying to work does not exists. Look for detail about the error in the body -

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

AttachmentGetAttachmentlogsV1

AttachmentGetAttachmentlogsV1Response AttachmentGetAttachmentlogsV1 (int pkiAttachmentID)

Retrieve the Attachmentlogs

Using this endpoint, you can retrieve the Attachmentlogs of an attachment.

Example

using System.Collections.Generic;
using System.Diagnostics;
using eZmaxApi.Api;
using eZmaxApi.Client;
using eZmaxApi.Model;

namespace Example
{
    public class AttachmentGetAttachmentlogsV1Example
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://prod.api.appcluster01.ca-central-1.ezmax.com/rest";
            // Configure API key authorization: Authorization
            config.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new ObjectAttachmentApi(config);
            var pkiAttachmentID = 56;  // int | 

            try
            {
                // Retrieve the Attachmentlogs
                AttachmentGetAttachmentlogsV1Response result = apiInstance.AttachmentGetAttachmentlogsV1(pkiAttachmentID);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ObjectAttachmentApi.AttachmentGetAttachmentlogsV1: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the AttachmentGetAttachmentlogsV1WithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Retrieve the Attachmentlogs
    ApiResponse<AttachmentGetAttachmentlogsV1Response> response = apiInstance.AttachmentGetAttachmentlogsV1WithHttpInfo(pkiAttachmentID);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling ObjectAttachmentApi.AttachmentGetAttachmentlogsV1WithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
pkiAttachmentID int

Return type

AttachmentGetAttachmentlogsV1Response

Authorization

Authorization

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -
404 The request failed. The element on which you were trying to work does not exists. Look for detail about the error in the body -

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

AttachmentGetDownloadUrlV1

AttachmentGetDownloadUrlV1Response AttachmentGetDownloadUrlV1 (int pkiAttachmentID)

Retrieve a URL to download attachments.

This endpoint returns an URL to download the attachment. These links will expire after 5 minutes so the download of the file should be made soon after retrieving the link.

Example

using System.Collections.Generic;
using System.Diagnostics;
using eZmaxApi.Api;
using eZmaxApi.Client;
using eZmaxApi.Model;

namespace Example
{
    public class AttachmentGetDownloadUrlV1Example
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://prod.api.appcluster01.ca-central-1.ezmax.com/rest";
            // Configure API key authorization: Authorization
            config.AddApiKey("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("Authorization", "Bearer");

            var apiInstance = new ObjectAttachmentApi(config);
            var pkiAttachmentID = 56;  // int | 

            try
            {
                // Retrieve a URL to download attachments.
                AttachmentGetDownloadUrlV1Response result = apiInstance.AttachmentGetDownloadUrlV1(pkiAttachmentID);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ObjectAttachmentApi.AttachmentGetDownloadUrlV1: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the AttachmentGetDownloadUrlV1WithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Retrieve a URL to download attachments.
    ApiResponse<AttachmentGetDownloadUrlV1Response> response = apiInstance.AttachmentGetDownloadUrlV1WithHttpInfo(pkiAttachmentID);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling ObjectAttachmentApi.AttachmentGetDownloadUrlV1WithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
pkiAttachmentID int

Return type

AttachmentGetDownloadUrlV1Response

Authorization

Authorization

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful response -
404 The request failed. The element on which you were trying to work does not exists. Look for detail about the error in the body -
422 The request was syntactically valid but failed because of an interdependance condition. Look for detail about the error in the body -

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