Spenda.Services.Attachments

Attachments

attachmentsGetFile

Get a file content

Allows an user to get file content


/Spenda/Attachments/{attachmentTypeID}/{attachmentGUID}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/octet-stream" \
 "https://api.dev.spenda.co/api/Spenda/Attachments/{attachmentTypeID}/{attachmentGUID}?t=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AttachmentsApi;

import java.io.File;
import java.util.*;

public class AttachmentsApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        AttachmentsApi apiInstance = new AttachmentsApi();
        Integer attachmentTypeID = 56; // Integer | Attachment type
        UUID attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Attachment unique identifier
        Boolean t = true; // Boolean | Token representing the attachment details

        try {
            stream result = apiInstance.attachmentsGetFile(attachmentTypeID, attachmentGUID, t);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#attachmentsGetFile");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer attachmentTypeID = new Integer(); // Integer | Attachment type
final UUID attachmentGUID = new UUID(); // UUID | Attachment unique identifier
final Boolean t = new Boolean(); // Boolean | Token representing the attachment details

try {
    final result = await api_instance.attachmentsGetFile(attachmentTypeID, attachmentGUID, t);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->attachmentsGetFile: $e\n');
}

import org.openapitools.client.api.AttachmentsApi;

public class AttachmentsApiExample {
    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        Integer attachmentTypeID = 56; // Integer | Attachment type
        UUID attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Attachment unique identifier
        Boolean t = true; // Boolean | Token representing the attachment details

        try {
            stream result = apiInstance.attachmentsGetFile(attachmentTypeID, attachmentGUID, t);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#attachmentsGetFile");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
AttachmentsApi *apiInstance = [[AttachmentsApi alloc] init];
Integer *attachmentTypeID = 56; // Attachment type (default to null)
UUID *attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Attachment unique identifier (default to null)
Boolean *t = true; // Token representing the attachment details (default to null)

// Get a file content
[apiInstance attachmentsGetFileWith:attachmentTypeID
    attachmentGUID:attachmentGUID
    t:t
              completionHandler: ^(stream output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAttachments = require('spenda_services_attachments');

// Create an instance of the API class
var api = new SpendaServicesAttachments.AttachmentsApi()
var attachmentTypeID = 56; // {Integer} Attachment type
var attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // {UUID} Attachment unique identifier
var t = true; // {Boolean} Token representing the attachment details

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.attachmentsGetFile(attachmentTypeID, attachmentGUID, t, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class attachmentsGetFileExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new AttachmentsApi();
            var attachmentTypeID = 56;  // Integer | Attachment type (default to null)
            var attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d;  // UUID | Attachment unique identifier (default to null)
            var t = true;  // Boolean | Token representing the attachment details (default to null)

            try {
                // Get a file content
                stream result = apiInstance.attachmentsGetFile(attachmentTypeID, attachmentGUID, t);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AttachmentsApi.attachmentsGetFile: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AttachmentsApi();
$attachmentTypeID = 56; // Integer | Attachment type
$attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Attachment unique identifier
$t = true; // Boolean | Token representing the attachment details

try {
    $result = $api_instance->attachmentsGetFile($attachmentTypeID, $attachmentGUID, $t);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->attachmentsGetFile: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AttachmentsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AttachmentsApi->new();
my $attachmentTypeID = 56; # Integer | Attachment type
my $attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Attachment unique identifier
my $t = true; # Boolean | Token representing the attachment details

eval {
    my $result = $api_instance->attachmentsGetFile(attachmentTypeID => $attachmentTypeID, attachmentGUID => $attachmentGUID, t => $t);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->attachmentsGetFile: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.AttachmentsApi()
attachmentTypeID = 56 # Integer | Attachment type (default to null)
attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Attachment unique identifier (default to null)
t = true # Boolean | Token representing the attachment details (default to null)

try:
    # Get a file content
    api_response = api_instance.attachments_get_file(attachmentTypeID, attachmentGUID, t)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->attachmentsGetFile: %s\n" % e)
extern crate AttachmentsApi;

pub fn main() {
    let attachmentTypeID = 56; // Integer
    let attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    let t = true; // Boolean

    let mut context = AttachmentsApi::Context::default();
    let result = client.attachmentsGetFile(attachmentTypeID, attachmentGUID, t, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
attachmentTypeID*
Integer (int32)
Attachment type
Required
attachmentGUID*
UUID (uuid)
Attachment unique identifier
Required
Query parameters
Name Description
t*
Boolean
Token representing the attachment details
Required

Responses


deleteFile

Deletes a URI file from a specified storage based on the attachment type

Allows an user to delete any existing URI file


/Spenda/Attachments/File/{attachmentTypeID}/{attachmentGUID}

Usage and SDK Samples

curl -X DELETE \
 -H "Accept: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Attachments/File/{attachmentTypeID}/{attachmentGUID}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AttachmentsApi;

import java.io.File;
import java.util.*;

public class AttachmentsApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        AttachmentsApi apiInstance = new AttachmentsApi();
        Integer attachmentTypeID = 56; // Integer | Attachment Type ID
        UUID attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Attachment unique identifier

        try {
            httpActionResult_attachmentResponse result = apiInstance.deleteFile(attachmentTypeID, attachmentGUID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#deleteFile");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer attachmentTypeID = new Integer(); // Integer | Attachment Type ID
final UUID attachmentGUID = new UUID(); // UUID | Attachment unique identifier

try {
    final result = await api_instance.deleteFile(attachmentTypeID, attachmentGUID);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deleteFile: $e\n');
}

import org.openapitools.client.api.AttachmentsApi;

public class AttachmentsApiExample {
    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        Integer attachmentTypeID = 56; // Integer | Attachment Type ID
        UUID attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Attachment unique identifier

        try {
            httpActionResult_attachmentResponse result = apiInstance.deleteFile(attachmentTypeID, attachmentGUID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#deleteFile");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
AttachmentsApi *apiInstance = [[AttachmentsApi alloc] init];
Integer *attachmentTypeID = 56; // Attachment Type ID (default to null)
UUID *attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Attachment unique identifier (default to null)

// Deletes a URI file from a specified storage based on the attachment type
[apiInstance deleteFileWith:attachmentTypeID
    attachmentGUID:attachmentGUID
              completionHandler: ^(httpActionResult_attachmentResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAttachments = require('spenda_services_attachments');

// Create an instance of the API class
var api = new SpendaServicesAttachments.AttachmentsApi()
var attachmentTypeID = 56; // {Integer} Attachment Type ID
var attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // {UUID} Attachment unique identifier

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteFile(attachmentTypeID, attachmentGUID, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteFileExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new AttachmentsApi();
            var attachmentTypeID = 56;  // Integer | Attachment Type ID (default to null)
            var attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d;  // UUID | Attachment unique identifier (default to null)

            try {
                // Deletes a URI file from a specified storage based on the attachment type
                httpActionResult_attachmentResponse result = apiInstance.deleteFile(attachmentTypeID, attachmentGUID);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AttachmentsApi.deleteFile: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AttachmentsApi();
$attachmentTypeID = 56; // Integer | Attachment Type ID
$attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Attachment unique identifier

try {
    $result = $api_instance->deleteFile($attachmentTypeID, $attachmentGUID);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->deleteFile: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AttachmentsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AttachmentsApi->new();
my $attachmentTypeID = 56; # Integer | Attachment Type ID
my $attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Attachment unique identifier

eval {
    my $result = $api_instance->deleteFile(attachmentTypeID => $attachmentTypeID, attachmentGUID => $attachmentGUID);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->deleteFile: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.AttachmentsApi()
attachmentTypeID = 56 # Integer | Attachment Type ID (default to null)
attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Attachment unique identifier (default to null)

try:
    # Deletes a URI file from a specified storage based on the attachment type
    api_response = api_instance.delete_file(attachmentTypeID, attachmentGUID)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->deleteFile: %s\n" % e)
extern crate AttachmentsApi;

pub fn main() {
    let attachmentTypeID = 56; // Integer
    let attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID

    let mut context = AttachmentsApi::Context::default();
    let result = client.deleteFile(attachmentTypeID, attachmentGUID, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
attachmentTypeID*
Integer (int32)
Attachment Type ID
Required
attachmentGUID*
UUID (uuid)
Attachment unique identifier
Required

Responses


deleteMultipleFiles

Deletes URI files from a specified storage based on the attachment type

Allows an user to delete any existing URI files


/Spenda/Attachments/File/{attachmentTypeID}

Usage and SDK Samples

curl -X DELETE \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Attachments/File/{attachmentTypeID}" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AttachmentsApi;

import java.io.File;
import java.util.*;

public class AttachmentsApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        AttachmentsApi apiInstance = new AttachmentsApi();
        Integer attachmentTypeID = 56; // Integer | Attachment Type ID
        array[UUID] uUID = ["string"]; // array[UUID] | 

        try {
            httpActionResult_attachmentResponse result = apiInstance.deleteMultipleFiles(attachmentTypeID, uUID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#deleteMultipleFiles");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer attachmentTypeID = new Integer(); // Integer | Attachment Type ID
final array[UUID] uUID = new array[UUID](); // array[UUID] | 

try {
    final result = await api_instance.deleteMultipleFiles(attachmentTypeID, uUID);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->deleteMultipleFiles: $e\n');
}

import org.openapitools.client.api.AttachmentsApi;

public class AttachmentsApiExample {
    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        Integer attachmentTypeID = 56; // Integer | Attachment Type ID
        array[UUID] uUID = ["string"]; // array[UUID] | 

        try {
            httpActionResult_attachmentResponse result = apiInstance.deleteMultipleFiles(attachmentTypeID, uUID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#deleteMultipleFiles");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
AttachmentsApi *apiInstance = [[AttachmentsApi alloc] init];
Integer *attachmentTypeID = 56; // Attachment Type ID (default to null)
array[UUID] *uUID = ["string"]; //  (optional)

// Deletes URI files from a specified storage based on the attachment type
[apiInstance deleteMultipleFilesWith:attachmentTypeID
    uUID:uUID
              completionHandler: ^(httpActionResult_attachmentResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAttachments = require('spenda_services_attachments');

// Create an instance of the API class
var api = new SpendaServicesAttachments.AttachmentsApi()
var attachmentTypeID = 56; // {Integer} Attachment Type ID
var opts = {
  'uUID': ["string"] // {array[UUID]} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteMultipleFiles(attachmentTypeID, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class deleteMultipleFilesExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new AttachmentsApi();
            var attachmentTypeID = 56;  // Integer | Attachment Type ID (default to null)
            var uUID = new array[UUID](); // array[UUID] |  (optional) 

            try {
                // Deletes URI files from a specified storage based on the attachment type
                httpActionResult_attachmentResponse result = apiInstance.deleteMultipleFiles(attachmentTypeID, uUID);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AttachmentsApi.deleteMultipleFiles: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AttachmentsApi();
$attachmentTypeID = 56; // Integer | Attachment Type ID
$uUID = ["string"]; // array[UUID] | 

try {
    $result = $api_instance->deleteMultipleFiles($attachmentTypeID, $uUID);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->deleteMultipleFiles: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AttachmentsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AttachmentsApi->new();
my $attachmentTypeID = 56; # Integer | Attachment Type ID
my $uUID = [WWW::OPenAPIClient::Object::array[UUID]->new()]; # array[UUID] | 

eval {
    my $result = $api_instance->deleteMultipleFiles(attachmentTypeID => $attachmentTypeID, uUID => $uUID);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->deleteMultipleFiles: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.AttachmentsApi()
attachmentTypeID = 56 # Integer | Attachment Type ID (default to null)
uUID = ["string"] # array[UUID] |  (optional)

try:
    # Deletes URI files from a specified storage based on the attachment type
    api_response = api_instance.delete_multiple_files(attachmentTypeID, uUID=uUID)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->deleteMultipleFiles: %s\n" % e)
extern crate AttachmentsApi;

pub fn main() {
    let attachmentTypeID = 56; // Integer
    let uUID = ["string"]; // array[UUID]

    let mut context = AttachmentsApi::Context::default();
    let result = client.deleteMultipleFiles(attachmentTypeID, uUID, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
attachmentTypeID*
Integer (int32)
Attachment Type ID
Required
Body parameters
Name Description
uUID

Responses


downloadFileContent

Get a file content from a specified storage based on the attachment type

Allows an user to get any file content


/Spenda/Attachments/File/{attachmentTypeID}/{attachmentGUID}/Content

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/octet-stream,application/json" \
 "https://api.dev.spenda.co/api/Spenda/Attachments/File/{attachmentTypeID}/{attachmentGUID}/Content?shouldDownloadThumbnailContent=true&ownerRefID=56&contentType=contentType_example&contentDisposition=contentDisposition_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AttachmentsApi;

import java.io.File;
import java.util.*;

public class AttachmentsApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        AttachmentsApi apiInstance = new AttachmentsApi();
        Integer attachmentTypeID = 56; // Integer | Attachment Type ID
        UUID attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Attachment unique identifier
        Boolean shouldDownloadThumbnailContent = true; // Boolean | it will indicate if content to download is the generated thumbnail for requested attachment
        Integer ownerRefID = 56; // Integer | Owner reference ID
        String contentType = contentType_example; // String | Content Type
        String contentDisposition = contentDisposition_example; // String | Content Disposition

        try {
            stream result = apiInstance.downloadFileContent(attachmentTypeID, attachmentGUID, shouldDownloadThumbnailContent, ownerRefID, contentType, contentDisposition);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#downloadFileContent");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer attachmentTypeID = new Integer(); // Integer | Attachment Type ID
final UUID attachmentGUID = new UUID(); // UUID | Attachment unique identifier
final Boolean shouldDownloadThumbnailContent = new Boolean(); // Boolean | it will indicate if content to download is the generated thumbnail for requested attachment
final Integer ownerRefID = new Integer(); // Integer | Owner reference ID
final String contentType = new String(); // String | Content Type
final String contentDisposition = new String(); // String | Content Disposition

try {
    final result = await api_instance.downloadFileContent(attachmentTypeID, attachmentGUID, shouldDownloadThumbnailContent, ownerRefID, contentType, contentDisposition);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->downloadFileContent: $e\n');
}

import org.openapitools.client.api.AttachmentsApi;

public class AttachmentsApiExample {
    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        Integer attachmentTypeID = 56; // Integer | Attachment Type ID
        UUID attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Attachment unique identifier
        Boolean shouldDownloadThumbnailContent = true; // Boolean | it will indicate if content to download is the generated thumbnail for requested attachment
        Integer ownerRefID = 56; // Integer | Owner reference ID
        String contentType = contentType_example; // String | Content Type
        String contentDisposition = contentDisposition_example; // String | Content Disposition

        try {
            stream result = apiInstance.downloadFileContent(attachmentTypeID, attachmentGUID, shouldDownloadThumbnailContent, ownerRefID, contentType, contentDisposition);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#downloadFileContent");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
AttachmentsApi *apiInstance = [[AttachmentsApi alloc] init];
Integer *attachmentTypeID = 56; // Attachment Type ID (default to null)
UUID *attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Attachment unique identifier (default to null)
Boolean *shouldDownloadThumbnailContent = true; // it will indicate if content to download is the generated thumbnail for requested attachment (optional) (default to null)
Integer *ownerRefID = 56; // Owner reference ID (optional) (default to null)
String *contentType = contentType_example; // Content Type (optional) (default to null)
String *contentDisposition = contentDisposition_example; // Content Disposition (optional) (default to null)

// Get a file content from a specified storage based on the attachment type
[apiInstance downloadFileContentWith:attachmentTypeID
    attachmentGUID:attachmentGUID
    shouldDownloadThumbnailContent:shouldDownloadThumbnailContent
    ownerRefID:ownerRefID
    contentType:contentType
    contentDisposition:contentDisposition
              completionHandler: ^(stream output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAttachments = require('spenda_services_attachments');

// Create an instance of the API class
var api = new SpendaServicesAttachments.AttachmentsApi()
var attachmentTypeID = 56; // {Integer} Attachment Type ID
var attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // {UUID} Attachment unique identifier
var opts = {
  'shouldDownloadThumbnailContent': true, // {Boolean} it will indicate if content to download is the generated thumbnail for requested attachment
  'ownerRefID': 56, // {Integer} Owner reference ID
  'contentType': contentType_example, // {String} Content Type
  'contentDisposition': contentDisposition_example // {String} Content Disposition
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.downloadFileContent(attachmentTypeID, attachmentGUID, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class downloadFileContentExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new AttachmentsApi();
            var attachmentTypeID = 56;  // Integer | Attachment Type ID (default to null)
            var attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d;  // UUID | Attachment unique identifier (default to null)
            var shouldDownloadThumbnailContent = true;  // Boolean | it will indicate if content to download is the generated thumbnail for requested attachment (optional)  (default to null)
            var ownerRefID = 56;  // Integer | Owner reference ID (optional)  (default to null)
            var contentType = contentType_example;  // String | Content Type (optional)  (default to null)
            var contentDisposition = contentDisposition_example;  // String | Content Disposition (optional)  (default to null)

            try {
                // Get a file content from a specified storage based on the attachment type
                stream result = apiInstance.downloadFileContent(attachmentTypeID, attachmentGUID, shouldDownloadThumbnailContent, ownerRefID, contentType, contentDisposition);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AttachmentsApi.downloadFileContent: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AttachmentsApi();
$attachmentTypeID = 56; // Integer | Attachment Type ID
$attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Attachment unique identifier
$shouldDownloadThumbnailContent = true; // Boolean | it will indicate if content to download is the generated thumbnail for requested attachment
$ownerRefID = 56; // Integer | Owner reference ID
$contentType = contentType_example; // String | Content Type
$contentDisposition = contentDisposition_example; // String | Content Disposition

try {
    $result = $api_instance->downloadFileContent($attachmentTypeID, $attachmentGUID, $shouldDownloadThumbnailContent, $ownerRefID, $contentType, $contentDisposition);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->downloadFileContent: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AttachmentsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AttachmentsApi->new();
my $attachmentTypeID = 56; # Integer | Attachment Type ID
my $attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Attachment unique identifier
my $shouldDownloadThumbnailContent = true; # Boolean | it will indicate if content to download is the generated thumbnail for requested attachment
my $ownerRefID = 56; # Integer | Owner reference ID
my $contentType = contentType_example; # String | Content Type
my $contentDisposition = contentDisposition_example; # String | Content Disposition

eval {
    my $result = $api_instance->downloadFileContent(attachmentTypeID => $attachmentTypeID, attachmentGUID => $attachmentGUID, shouldDownloadThumbnailContent => $shouldDownloadThumbnailContent, ownerRefID => $ownerRefID, contentType => $contentType, contentDisposition => $contentDisposition);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->downloadFileContent: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.AttachmentsApi()
attachmentTypeID = 56 # Integer | Attachment Type ID (default to null)
attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Attachment unique identifier (default to null)
shouldDownloadThumbnailContent = true # Boolean | it will indicate if content to download is the generated thumbnail for requested attachment (optional) (default to null)
ownerRefID = 56 # Integer | Owner reference ID (optional) (default to null)
contentType = contentType_example # String | Content Type (optional) (default to null)
contentDisposition = contentDisposition_example # String | Content Disposition (optional) (default to null)

try:
    # Get a file content from a specified storage based on the attachment type
    api_response = api_instance.download_file_content(attachmentTypeID, attachmentGUID, shouldDownloadThumbnailContent=shouldDownloadThumbnailContent, ownerRefID=ownerRefID, contentType=contentType, contentDisposition=contentDisposition)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->downloadFileContent: %s\n" % e)
extern crate AttachmentsApi;

pub fn main() {
    let attachmentTypeID = 56; // Integer
    let attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    let shouldDownloadThumbnailContent = true; // Boolean
    let ownerRefID = 56; // Integer
    let contentType = contentType_example; // String
    let contentDisposition = contentDisposition_example; // String

    let mut context = AttachmentsApi::Context::default();
    let result = client.downloadFileContent(attachmentTypeID, attachmentGUID, shouldDownloadThumbnailContent, ownerRefID, contentType, contentDisposition, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
attachmentTypeID*
Integer (int32)
Attachment Type ID
Required
attachmentGUID*
UUID (uuid)
Attachment unique identifier
Required
Query parameters
Name Description
shouldDownloadThumbnailContent
Boolean
it will indicate if content to download is the generated thumbnail for requested attachment
ownerRefID
Integer (int32)
Owner reference ID
contentType
String
Content Type
contentDisposition
String
Content Disposition

Responses


downloadZipFile

Search from a specified storage based on the attachment type and compress found file(s) in a zip file

Allows an user to get a zip file containing requested file(s)


/Spenda/Attachments/File/Content/Zip

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/octet-stream,application/json" \
 -H "Content-Type: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Attachments/File/Content/Zip" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AttachmentsApi;

import java.io.File;
import java.util.*;

public class AttachmentsApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        AttachmentsApi apiInstance = new AttachmentsApi();
        DownloadZipRequest downloadZipRequest = {"data":{"accountCustomerID":0,"linkedSupplierID":0,"documentID":0,"documentLineID":0},"guids":["string"]}; // DownloadZipRequest | 

        try {
            stream result = apiInstance.downloadZipFile(downloadZipRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#downloadZipFile");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final DownloadZipRequest downloadZipRequest = new DownloadZipRequest(); // DownloadZipRequest | 

try {
    final result = await api_instance.downloadZipFile(downloadZipRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->downloadZipFile: $e\n');
}

import org.openapitools.client.api.AttachmentsApi;

public class AttachmentsApiExample {
    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        DownloadZipRequest downloadZipRequest = {"data":{"accountCustomerID":0,"linkedSupplierID":0,"documentID":0,"documentLineID":0},"guids":["string"]}; // DownloadZipRequest | 

        try {
            stream result = apiInstance.downloadZipFile(downloadZipRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#downloadZipFile");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
AttachmentsApi *apiInstance = [[AttachmentsApi alloc] init];
DownloadZipRequest *downloadZipRequest = {"data":{"accountCustomerID":0,"linkedSupplierID":0,"documentID":0,"documentLineID":0},"guids":["string"]}; //  (optional)

// Search from a specified storage based on the attachment type and compress found file(s) in a zip file
[apiInstance downloadZipFileWith:downloadZipRequest
              completionHandler: ^(stream output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAttachments = require('spenda_services_attachments');

// Create an instance of the API class
var api = new SpendaServicesAttachments.AttachmentsApi()
var opts = {
  'downloadZipRequest': {"data":{"accountCustomerID":0,"linkedSupplierID":0,"documentID":0,"documentLineID":0},"guids":["string"]} // {DownloadZipRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.downloadZipFile(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class downloadZipFileExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new AttachmentsApi();
            var downloadZipRequest = new DownloadZipRequest(); // DownloadZipRequest |  (optional) 

            try {
                // Search from a specified storage based on the attachment type and compress found file(s) in a zip file
                stream result = apiInstance.downloadZipFile(downloadZipRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AttachmentsApi.downloadZipFile: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AttachmentsApi();
$downloadZipRequest = {"data":{"accountCustomerID":0,"linkedSupplierID":0,"documentID":0,"documentLineID":0},"guids":["string"]}; // DownloadZipRequest | 

try {
    $result = $api_instance->downloadZipFile($downloadZipRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->downloadZipFile: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AttachmentsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AttachmentsApi->new();
my $downloadZipRequest = WWW::OPenAPIClient::Object::DownloadZipRequest->new(); # DownloadZipRequest | 

eval {
    my $result = $api_instance->downloadZipFile(downloadZipRequest => $downloadZipRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->downloadZipFile: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.AttachmentsApi()
downloadZipRequest = {"data":{"accountCustomerID":0,"linkedSupplierID":0,"documentID":0,"documentLineID":0},"guids":["string"]} # DownloadZipRequest |  (optional)

try:
    # Search from a specified storage based on the attachment type and compress found file(s) in a zip file
    api_response = api_instance.download_zip_file(downloadZipRequest=downloadZipRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->downloadZipFile: %s\n" % e)
extern crate AttachmentsApi;

pub fn main() {
    let downloadZipRequest = {"data":{"accountCustomerID":0,"linkedSupplierID":0,"documentID":0,"documentLineID":0},"guids":["string"]}; // DownloadZipRequest

    let mut context = AttachmentsApi::Context::default();
    let result = client.downloadZipFile(downloadZipRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
downloadZipRequest

Responses


getResourceAttachments

Get Resource Files

Allows an user to get files related to a resource


/Spenda/Attachments/Groups/{attachmentTypeID}/Resources/{resourceGUID}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Attachments/Groups/{attachmentTypeID}/Resources/{resourceGUID}?resourceLineGUID=38400000-8cf0-11bd-b23e-10b96e4ef00d&ownerRefID=56&attachmentGUID=38400000-8cf0-11bd-b23e-10b96e4ef00d&rootLevelOnly=true&excludeURL=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AttachmentsApi;

import java.io.File;
import java.util.*;

public class AttachmentsApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        AttachmentsApi apiInstance = new AttachmentsApi();
        Integer attachmentTypeID = 56; // Integer | Attachment Type ID
        UUID resourceGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Resource GUID
        UUID resourceLineGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Resource Line GUID
        Integer ownerRefID = 56; // Integer | Resource owner reference ID
        UUID attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Attachment unique identifier
        Boolean rootLevelOnly = true; // Boolean | Flag to return attachment from resoure root level.
        Boolean excludeURL = true; // Boolean | Flag to exclude attachment access URL.

        try {
            httpActionResult_attachmentResponse result = apiInstance.getResourceAttachments(attachmentTypeID, resourceGUID, resourceLineGUID, ownerRefID, attachmentGUID, rootLevelOnly, excludeURL);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#getResourceAttachments");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer attachmentTypeID = new Integer(); // Integer | Attachment Type ID
final UUID resourceGUID = new UUID(); // UUID | Resource GUID
final UUID resourceLineGUID = new UUID(); // UUID | Resource Line GUID
final Integer ownerRefID = new Integer(); // Integer | Resource owner reference ID
final UUID attachmentGUID = new UUID(); // UUID | Attachment unique identifier
final Boolean rootLevelOnly = new Boolean(); // Boolean | Flag to return attachment from resoure root level.
final Boolean excludeURL = new Boolean(); // Boolean | Flag to exclude attachment access URL.

try {
    final result = await api_instance.getResourceAttachments(attachmentTypeID, resourceGUID, resourceLineGUID, ownerRefID, attachmentGUID, rootLevelOnly, excludeURL);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getResourceAttachments: $e\n');
}

import org.openapitools.client.api.AttachmentsApi;

public class AttachmentsApiExample {
    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        Integer attachmentTypeID = 56; // Integer | Attachment Type ID
        UUID resourceGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Resource GUID
        UUID resourceLineGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Resource Line GUID
        Integer ownerRefID = 56; // Integer | Resource owner reference ID
        UUID attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Attachment unique identifier
        Boolean rootLevelOnly = true; // Boolean | Flag to return attachment from resoure root level.
        Boolean excludeURL = true; // Boolean | Flag to exclude attachment access URL.

        try {
            httpActionResult_attachmentResponse result = apiInstance.getResourceAttachments(attachmentTypeID, resourceGUID, resourceLineGUID, ownerRefID, attachmentGUID, rootLevelOnly, excludeURL);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#getResourceAttachments");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
AttachmentsApi *apiInstance = [[AttachmentsApi alloc] init];
Integer *attachmentTypeID = 56; // Attachment Type ID (default to null)
UUID *resourceGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Resource GUID (default to null)
UUID *resourceLineGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Resource Line GUID (optional) (default to null)
Integer *ownerRefID = 56; // Resource owner reference ID (optional) (default to null)
UUID *attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Attachment unique identifier (optional) (default to null)
Boolean *rootLevelOnly = true; // Flag to return attachment from resoure root level. (optional) (default to null)
Boolean *excludeURL = true; // Flag to exclude attachment access URL. (optional) (default to null)

// Get Resource Files
[apiInstance getResourceAttachmentsWith:attachmentTypeID
    resourceGUID:resourceGUID
    resourceLineGUID:resourceLineGUID
    ownerRefID:ownerRefID
    attachmentGUID:attachmentGUID
    rootLevelOnly:rootLevelOnly
    excludeURL:excludeURL
              completionHandler: ^(httpActionResult_attachmentResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAttachments = require('spenda_services_attachments');

// Create an instance of the API class
var api = new SpendaServicesAttachments.AttachmentsApi()
var attachmentTypeID = 56; // {Integer} Attachment Type ID
var resourceGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // {UUID} Resource GUID
var opts = {
  'resourceLineGUID': 38400000-8cf0-11bd-b23e-10b96e4ef00d, // {UUID} Resource Line GUID
  'ownerRefID': 56, // {Integer} Resource owner reference ID
  'attachmentGUID': 38400000-8cf0-11bd-b23e-10b96e4ef00d, // {UUID} Attachment unique identifier
  'rootLevelOnly': true, // {Boolean} Flag to return attachment from resoure root level.
  'excludeURL': true // {Boolean} Flag to exclude attachment access URL.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getResourceAttachments(attachmentTypeID, resourceGUID, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getResourceAttachmentsExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new AttachmentsApi();
            var attachmentTypeID = 56;  // Integer | Attachment Type ID (default to null)
            var resourceGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d;  // UUID | Resource GUID (default to null)
            var resourceLineGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d;  // UUID | Resource Line GUID (optional)  (default to null)
            var ownerRefID = 56;  // Integer | Resource owner reference ID (optional)  (default to null)
            var attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d;  // UUID | Attachment unique identifier (optional)  (default to null)
            var rootLevelOnly = true;  // Boolean | Flag to return attachment from resoure root level. (optional)  (default to null)
            var excludeURL = true;  // Boolean | Flag to exclude attachment access URL. (optional)  (default to null)

            try {
                // Get Resource Files
                httpActionResult_attachmentResponse result = apiInstance.getResourceAttachments(attachmentTypeID, resourceGUID, resourceLineGUID, ownerRefID, attachmentGUID, rootLevelOnly, excludeURL);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AttachmentsApi.getResourceAttachments: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AttachmentsApi();
$attachmentTypeID = 56; // Integer | Attachment Type ID
$resourceGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Resource GUID
$resourceLineGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Resource Line GUID
$ownerRefID = 56; // Integer | Resource owner reference ID
$attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Attachment unique identifier
$rootLevelOnly = true; // Boolean | Flag to return attachment from resoure root level.
$excludeURL = true; // Boolean | Flag to exclude attachment access URL.

try {
    $result = $api_instance->getResourceAttachments($attachmentTypeID, $resourceGUID, $resourceLineGUID, $ownerRefID, $attachmentGUID, $rootLevelOnly, $excludeURL);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->getResourceAttachments: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AttachmentsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AttachmentsApi->new();
my $attachmentTypeID = 56; # Integer | Attachment Type ID
my $resourceGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Resource GUID
my $resourceLineGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Resource Line GUID
my $ownerRefID = 56; # Integer | Resource owner reference ID
my $attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Attachment unique identifier
my $rootLevelOnly = true; # Boolean | Flag to return attachment from resoure root level.
my $excludeURL = true; # Boolean | Flag to exclude attachment access URL.

eval {
    my $result = $api_instance->getResourceAttachments(attachmentTypeID => $attachmentTypeID, resourceGUID => $resourceGUID, resourceLineGUID => $resourceLineGUID, ownerRefID => $ownerRefID, attachmentGUID => $attachmentGUID, rootLevelOnly => $rootLevelOnly, excludeURL => $excludeURL);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->getResourceAttachments: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.AttachmentsApi()
attachmentTypeID = 56 # Integer | Attachment Type ID (default to null)
resourceGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Resource GUID (default to null)
resourceLineGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Resource Line GUID (optional) (default to null)
ownerRefID = 56 # Integer | Resource owner reference ID (optional) (default to null)
attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Attachment unique identifier (optional) (default to null)
rootLevelOnly = true # Boolean | Flag to return attachment from resoure root level. (optional) (default to null)
excludeURL = true # Boolean | Flag to exclude attachment access URL. (optional) (default to null)

try:
    # Get Resource Files
    api_response = api_instance.get_resource_attachments(attachmentTypeID, resourceGUID, resourceLineGUID=resourceLineGUID, ownerRefID=ownerRefID, attachmentGUID=attachmentGUID, rootLevelOnly=rootLevelOnly, excludeURL=excludeURL)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->getResourceAttachments: %s\n" % e)
extern crate AttachmentsApi;

pub fn main() {
    let attachmentTypeID = 56; // Integer
    let resourceGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    let resourceLineGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    let ownerRefID = 56; // Integer
    let attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    let rootLevelOnly = true; // Boolean
    let excludeURL = true; // Boolean

    let mut context = AttachmentsApi::Context::default();
    let result = client.getResourceAttachments(attachmentTypeID, resourceGUID, resourceLineGUID, ownerRefID, attachmentGUID, rootLevelOnly, excludeURL, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
attachmentTypeID*
Integer (int32)
Attachment Type ID
Required
resourceGUID*
UUID (uuid)
Resource GUID
Required
Query parameters
Name Description
resourceLineGUID
UUID (uuid)
Resource Line GUID
ownerRefID
Integer (int32)
Resource owner reference ID
attachmentGUID
UUID (uuid)
Attachment unique identifier
rootLevelOnly
Boolean
Flag to return attachment from resoure root level.
excludeURL
Boolean
Flag to exclude attachment access URL.

Responses


getResourceLineAttachments

Get Resource Line Files

Allows an user to get files related to a resource line


/Spenda/Attachments/Groups/{attachmentTypeID}/Resources/{resourceGUID}/Lines/{resourceLineGUID}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Attachments/Groups/{attachmentTypeID}/Resources/{resourceGUID}/Lines/{resourceLineGUID}?ownerRefID=56&attachmentGUID=38400000-8cf0-11bd-b23e-10b96e4ef00d&excludeURL=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AttachmentsApi;

import java.io.File;
import java.util.*;

public class AttachmentsApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        AttachmentsApi apiInstance = new AttachmentsApi();
        Integer attachmentTypeID = 56; // Integer | Attachment Type ID
        UUID resourceGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Resource GUID
        UUID resourceLineGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Resource Line GUID
        Integer ownerRefID = 56; // Integer | Resource owner reference ID
        UUID attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Attachment unique identifier
        Boolean excludeURL = true; // Boolean | Flag to exclude attachment access URL.

        try {
            httpActionResult_attachmentResponse result = apiInstance.getResourceLineAttachments(attachmentTypeID, resourceGUID, resourceLineGUID, ownerRefID, attachmentGUID, excludeURL);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#getResourceLineAttachments");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer attachmentTypeID = new Integer(); // Integer | Attachment Type ID
final UUID resourceGUID = new UUID(); // UUID | Resource GUID
final UUID resourceLineGUID = new UUID(); // UUID | Resource Line GUID
final Integer ownerRefID = new Integer(); // Integer | Resource owner reference ID
final UUID attachmentGUID = new UUID(); // UUID | Attachment unique identifier
final Boolean excludeURL = new Boolean(); // Boolean | Flag to exclude attachment access URL.

try {
    final result = await api_instance.getResourceLineAttachments(attachmentTypeID, resourceGUID, resourceLineGUID, ownerRefID, attachmentGUID, excludeURL);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getResourceLineAttachments: $e\n');
}

import org.openapitools.client.api.AttachmentsApi;

public class AttachmentsApiExample {
    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        Integer attachmentTypeID = 56; // Integer | Attachment Type ID
        UUID resourceGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Resource GUID
        UUID resourceLineGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Resource Line GUID
        Integer ownerRefID = 56; // Integer | Resource owner reference ID
        UUID attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Attachment unique identifier
        Boolean excludeURL = true; // Boolean | Flag to exclude attachment access URL.

        try {
            httpActionResult_attachmentResponse result = apiInstance.getResourceLineAttachments(attachmentTypeID, resourceGUID, resourceLineGUID, ownerRefID, attachmentGUID, excludeURL);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#getResourceLineAttachments");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
AttachmentsApi *apiInstance = [[AttachmentsApi alloc] init];
Integer *attachmentTypeID = 56; // Attachment Type ID (default to null)
UUID *resourceGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Resource GUID (default to null)
UUID *resourceLineGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Resource Line GUID (default to null)
Integer *ownerRefID = 56; // Resource owner reference ID (optional) (default to null)
UUID *attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Attachment unique identifier (optional) (default to null)
Boolean *excludeURL = true; // Flag to exclude attachment access URL. (optional) (default to null)

// Get Resource Line Files
[apiInstance getResourceLineAttachmentsWith:attachmentTypeID
    resourceGUID:resourceGUID
    resourceLineGUID:resourceLineGUID
    ownerRefID:ownerRefID
    attachmentGUID:attachmentGUID
    excludeURL:excludeURL
              completionHandler: ^(httpActionResult_attachmentResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAttachments = require('spenda_services_attachments');

// Create an instance of the API class
var api = new SpendaServicesAttachments.AttachmentsApi()
var attachmentTypeID = 56; // {Integer} Attachment Type ID
var resourceGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // {UUID} Resource GUID
var resourceLineGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // {UUID} Resource Line GUID
var opts = {
  'ownerRefID': 56, // {Integer} Resource owner reference ID
  'attachmentGUID': 38400000-8cf0-11bd-b23e-10b96e4ef00d, // {UUID} Attachment unique identifier
  'excludeURL': true // {Boolean} Flag to exclude attachment access URL.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getResourceLineAttachments(attachmentTypeID, resourceGUID, resourceLineGUID, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getResourceLineAttachmentsExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new AttachmentsApi();
            var attachmentTypeID = 56;  // Integer | Attachment Type ID (default to null)
            var resourceGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d;  // UUID | Resource GUID (default to null)
            var resourceLineGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d;  // UUID | Resource Line GUID (default to null)
            var ownerRefID = 56;  // Integer | Resource owner reference ID (optional)  (default to null)
            var attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d;  // UUID | Attachment unique identifier (optional)  (default to null)
            var excludeURL = true;  // Boolean | Flag to exclude attachment access URL. (optional)  (default to null)

            try {
                // Get Resource Line Files
                httpActionResult_attachmentResponse result = apiInstance.getResourceLineAttachments(attachmentTypeID, resourceGUID, resourceLineGUID, ownerRefID, attachmentGUID, excludeURL);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AttachmentsApi.getResourceLineAttachments: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AttachmentsApi();
$attachmentTypeID = 56; // Integer | Attachment Type ID
$resourceGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Resource GUID
$resourceLineGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Resource Line GUID
$ownerRefID = 56; // Integer | Resource owner reference ID
$attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Attachment unique identifier
$excludeURL = true; // Boolean | Flag to exclude attachment access URL.

try {
    $result = $api_instance->getResourceLineAttachments($attachmentTypeID, $resourceGUID, $resourceLineGUID, $ownerRefID, $attachmentGUID, $excludeURL);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->getResourceLineAttachments: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AttachmentsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AttachmentsApi->new();
my $attachmentTypeID = 56; # Integer | Attachment Type ID
my $resourceGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Resource GUID
my $resourceLineGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Resource Line GUID
my $ownerRefID = 56; # Integer | Resource owner reference ID
my $attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Attachment unique identifier
my $excludeURL = true; # Boolean | Flag to exclude attachment access URL.

eval {
    my $result = $api_instance->getResourceLineAttachments(attachmentTypeID => $attachmentTypeID, resourceGUID => $resourceGUID, resourceLineGUID => $resourceLineGUID, ownerRefID => $ownerRefID, attachmentGUID => $attachmentGUID, excludeURL => $excludeURL);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->getResourceLineAttachments: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.AttachmentsApi()
attachmentTypeID = 56 # Integer | Attachment Type ID (default to null)
resourceGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Resource GUID (default to null)
resourceLineGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Resource Line GUID (default to null)
ownerRefID = 56 # Integer | Resource owner reference ID (optional) (default to null)
attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Attachment unique identifier (optional) (default to null)
excludeURL = true # Boolean | Flag to exclude attachment access URL. (optional) (default to null)

try:
    # Get Resource Line Files
    api_response = api_instance.get_resource_line_attachments(attachmentTypeID, resourceGUID, resourceLineGUID, ownerRefID=ownerRefID, attachmentGUID=attachmentGUID, excludeURL=excludeURL)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->getResourceLineAttachments: %s\n" % e)
extern crate AttachmentsApi;

pub fn main() {
    let attachmentTypeID = 56; // Integer
    let resourceGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    let resourceLineGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    let ownerRefID = 56; // Integer
    let attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    let excludeURL = true; // Boolean

    let mut context = AttachmentsApi::Context::default();
    let result = client.getResourceLineAttachments(attachmentTypeID, resourceGUID, resourceLineGUID, ownerRefID, attachmentGUID, excludeURL, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
attachmentTypeID*
Integer (int32)
Attachment Type ID
Required
resourceGUID*
UUID (uuid)
Resource GUID
Required
resourceLineGUID*
UUID (uuid)
Resource Line GUID
Required
Query parameters
Name Description
ownerRefID
Integer (int32)
Resource owner reference ID
attachmentGUID
UUID (uuid)
Attachment unique identifier
excludeURL
Boolean
Flag to exclude attachment access URL.

Responses


regenerateLogoThumbnail

This is use to regenerate logo business thumbnails

This is use to regenerate logo business thumbnails with new setting


/Spenda/Attachments/RegenerateLogoThumbnail

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Attachments/RegenerateLogoThumbnail?processAll=true&batchLimit=true&logoID=56"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AttachmentsApi;

import java.io.File;
import java.util.*;

public class AttachmentsApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        AttachmentsApi apiInstance = new AttachmentsApi();
        Boolean processAll = true; // Boolean | Process all logo
        Boolean batchLimit = true; // Boolean | Batch reccord limit to process
        Integer logoID = 56; // Integer | Logo ID to process

        try {
            httpActionResult_resizeLogoThumbnailResponse result = apiInstance.regenerateLogoThumbnail(processAll, batchLimit, logoID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#regenerateLogoThumbnail");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Boolean processAll = new Boolean(); // Boolean | Process all logo
final Boolean batchLimit = new Boolean(); // Boolean | Batch reccord limit to process
final Integer logoID = new Integer(); // Integer | Logo ID to process

try {
    final result = await api_instance.regenerateLogoThumbnail(processAll, batchLimit, logoID);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->regenerateLogoThumbnail: $e\n');
}

import org.openapitools.client.api.AttachmentsApi;

public class AttachmentsApiExample {
    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        Boolean processAll = true; // Boolean | Process all logo
        Boolean batchLimit = true; // Boolean | Batch reccord limit to process
        Integer logoID = 56; // Integer | Logo ID to process

        try {
            httpActionResult_resizeLogoThumbnailResponse result = apiInstance.regenerateLogoThumbnail(processAll, batchLimit, logoID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#regenerateLogoThumbnail");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
AttachmentsApi *apiInstance = [[AttachmentsApi alloc] init];
Boolean *processAll = true; // Process all logo (optional) (default to null)
Boolean *batchLimit = true; // Batch reccord limit to process (optional) (default to null)
Integer *logoID = 56; // Logo ID to process (optional) (default to null)

// This is use to regenerate logo business thumbnails
[apiInstance regenerateLogoThumbnailWith:processAll
    batchLimit:batchLimit
    logoID:logoID
              completionHandler: ^(httpActionResult_resizeLogoThumbnailResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAttachments = require('spenda_services_attachments');

// Create an instance of the API class
var api = new SpendaServicesAttachments.AttachmentsApi()
var opts = {
  'processAll': true, // {Boolean} Process all logo
  'batchLimit': true, // {Boolean} Batch reccord limit to process
  'logoID': 56 // {Integer} Logo ID to process
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.regenerateLogoThumbnail(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class regenerateLogoThumbnailExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new AttachmentsApi();
            var processAll = true;  // Boolean | Process all logo (optional)  (default to null)
            var batchLimit = true;  // Boolean | Batch reccord limit to process (optional)  (default to null)
            var logoID = 56;  // Integer | Logo ID to process (optional)  (default to null)

            try {
                // This is use to regenerate logo business thumbnails
                httpActionResult_resizeLogoThumbnailResponse result = apiInstance.regenerateLogoThumbnail(processAll, batchLimit, logoID);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AttachmentsApi.regenerateLogoThumbnail: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AttachmentsApi();
$processAll = true; // Boolean | Process all logo
$batchLimit = true; // Boolean | Batch reccord limit to process
$logoID = 56; // Integer | Logo ID to process

try {
    $result = $api_instance->regenerateLogoThumbnail($processAll, $batchLimit, $logoID);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->regenerateLogoThumbnail: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AttachmentsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AttachmentsApi->new();
my $processAll = true; # Boolean | Process all logo
my $batchLimit = true; # Boolean | Batch reccord limit to process
my $logoID = 56; # Integer | Logo ID to process

eval {
    my $result = $api_instance->regenerateLogoThumbnail(processAll => $processAll, batchLimit => $batchLimit, logoID => $logoID);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->regenerateLogoThumbnail: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.AttachmentsApi()
processAll = true # Boolean | Process all logo (optional) (default to null)
batchLimit = true # Boolean | Batch reccord limit to process (optional) (default to null)
logoID = 56 # Integer | Logo ID to process (optional) (default to null)

try:
    # This is use to regenerate logo business thumbnails
    api_response = api_instance.regenerate_logo_thumbnail(processAll=processAll, batchLimit=batchLimit, logoID=logoID)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->regenerateLogoThumbnail: %s\n" % e)
extern crate AttachmentsApi;

pub fn main() {
    let processAll = true; // Boolean
    let batchLimit = true; // Boolean
    let logoID = 56; // Integer

    let mut context = AttachmentsApi::Context::default();
    let result = client.regenerateLogoThumbnail(processAll, batchLimit, logoID, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
processAll
Boolean
Process all logo
batchLimit
Boolean
Batch reccord limit to process
logoID
Integer (int32)
Logo ID to process

Responses


uploadFile

Uploads a file(s) to a specified storage based on the attachment type

Allows an user to upload any file


/Spenda/Attachments/File/Upload

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Attachments/File/Upload"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AttachmentsApi;

import java.io.File;
import java.util.*;

public class AttachmentsApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        AttachmentsApi apiInstance = new AttachmentsApi();

        try {
            httpActionResult_attachmentResponse result = apiInstance.uploadFile();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#uploadFile");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.uploadFile();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->uploadFile: $e\n');
}

import org.openapitools.client.api.AttachmentsApi;

public class AttachmentsApiExample {
    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();

        try {
            httpActionResult_attachmentResponse result = apiInstance.uploadFile();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#uploadFile");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
AttachmentsApi *apiInstance = [[AttachmentsApi alloc] init];

// Uploads a file(s) to a specified storage based on the attachment type
[apiInstance uploadFileWithCompletionHandler: 
              ^(httpActionResult_attachmentResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAttachments = require('spenda_services_attachments');

// Create an instance of the API class
var api = new SpendaServicesAttachments.AttachmentsApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.uploadFile(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class uploadFileExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new AttachmentsApi();

            try {
                // Uploads a file(s) to a specified storage based on the attachment type
                httpActionResult_attachmentResponse result = apiInstance.uploadFile();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AttachmentsApi.uploadFile: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AttachmentsApi();

try {
    $result = $api_instance->uploadFile();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->uploadFile: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AttachmentsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AttachmentsApi->new();

eval {
    my $result = $api_instance->uploadFile();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->uploadFile: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.AttachmentsApi()

try:
    # Uploads a file(s) to a specified storage based on the attachment type
    api_response = api_instance.upload_file()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->uploadFile: %s\n" % e)
extern crate AttachmentsApi;

pub fn main() {

    let mut context = AttachmentsApi::Context::default();
    let result = client.uploadFile(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


viewFile

Get a URI file from a specified storage based on the attachment type

Allows an user to get any existing URI file


/Spenda/Attachments/File/{attachmentTypeID}/{attachmentGUID}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Attachments/File/{attachmentTypeID}/{attachmentGUID}?ownerRefID=56"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AttachmentsApi;

import java.io.File;
import java.util.*;

public class AttachmentsApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        AttachmentsApi apiInstance = new AttachmentsApi();
        Integer attachmentTypeID = 56; // Integer | Attachment Type ID
        UUID attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Attachment unique identifier
        Integer ownerRefID = 56; // Integer | Owner reference ID

        try {
            httpActionResult_attachmentResponse result = apiInstance.viewFile(attachmentTypeID, attachmentGUID, ownerRefID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#viewFile");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer attachmentTypeID = new Integer(); // Integer | Attachment Type ID
final UUID attachmentGUID = new UUID(); // UUID | Attachment unique identifier
final Integer ownerRefID = new Integer(); // Integer | Owner reference ID

try {
    final result = await api_instance.viewFile(attachmentTypeID, attachmentGUID, ownerRefID);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->viewFile: $e\n');
}

import org.openapitools.client.api.AttachmentsApi;

public class AttachmentsApiExample {
    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        Integer attachmentTypeID = 56; // Integer | Attachment Type ID
        UUID attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Attachment unique identifier
        Integer ownerRefID = 56; // Integer | Owner reference ID

        try {
            httpActionResult_attachmentResponse result = apiInstance.viewFile(attachmentTypeID, attachmentGUID, ownerRefID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#viewFile");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
AttachmentsApi *apiInstance = [[AttachmentsApi alloc] init];
Integer *attachmentTypeID = 56; // Attachment Type ID (default to null)
UUID *attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Attachment unique identifier (default to null)
Integer *ownerRefID = 56; // Owner reference ID (optional) (default to null)

// Get a URI file from a specified storage based on the attachment type
[apiInstance viewFileWith:attachmentTypeID
    attachmentGUID:attachmentGUID
    ownerRefID:ownerRefID
              completionHandler: ^(httpActionResult_attachmentResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAttachments = require('spenda_services_attachments');

// Create an instance of the API class
var api = new SpendaServicesAttachments.AttachmentsApi()
var attachmentTypeID = 56; // {Integer} Attachment Type ID
var attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // {UUID} Attachment unique identifier
var opts = {
  'ownerRefID': 56 // {Integer} Owner reference ID
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.viewFile(attachmentTypeID, attachmentGUID, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class viewFileExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new AttachmentsApi();
            var attachmentTypeID = 56;  // Integer | Attachment Type ID (default to null)
            var attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d;  // UUID | Attachment unique identifier (default to null)
            var ownerRefID = 56;  // Integer | Owner reference ID (optional)  (default to null)

            try {
                // Get a URI file from a specified storage based on the attachment type
                httpActionResult_attachmentResponse result = apiInstance.viewFile(attachmentTypeID, attachmentGUID, ownerRefID);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AttachmentsApi.viewFile: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AttachmentsApi();
$attachmentTypeID = 56; // Integer | Attachment Type ID
$attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Attachment unique identifier
$ownerRefID = 56; // Integer | Owner reference ID

try {
    $result = $api_instance->viewFile($attachmentTypeID, $attachmentGUID, $ownerRefID);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->viewFile: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AttachmentsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AttachmentsApi->new();
my $attachmentTypeID = 56; # Integer | Attachment Type ID
my $attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Attachment unique identifier
my $ownerRefID = 56; # Integer | Owner reference ID

eval {
    my $result = $api_instance->viewFile(attachmentTypeID => $attachmentTypeID, attachmentGUID => $attachmentGUID, ownerRefID => $ownerRefID);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->viewFile: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.AttachmentsApi()
attachmentTypeID = 56 # Integer | Attachment Type ID (default to null)
attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Attachment unique identifier (default to null)
ownerRefID = 56 # Integer | Owner reference ID (optional) (default to null)

try:
    # Get a URI file from a specified storage based on the attachment type
    api_response = api_instance.view_file(attachmentTypeID, attachmentGUID, ownerRefID=ownerRefID)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->viewFile: %s\n" % e)
extern crate AttachmentsApi;

pub fn main() {
    let attachmentTypeID = 56; // Integer
    let attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    let ownerRefID = 56; // Integer

    let mut context = AttachmentsApi::Context::default();
    let result = client.viewFile(attachmentTypeID, attachmentGUID, ownerRefID, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
attachmentTypeID*
Integer (int32)
Attachment Type ID
Required
attachmentGUID*
UUID (uuid)
Attachment unique identifier
Required
Query parameters
Name Description
ownerRefID
Integer (int32)
Owner reference ID

Responses


viewMultipleFiles

Get a list of URI files from a specified storage based on the attachment type

Allows an user to get a list of existing URI files


/Spenda/Attachments/File/{attachmentTypeID}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Attachments/File/{attachmentTypeID}?guids=guids_example&ownerRefID=56"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AttachmentsApi;

import java.io.File;
import java.util.*;

public class AttachmentsApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        AttachmentsApi apiInstance = new AttachmentsApi();
        Integer attachmentTypeID = 56; // Integer | Attachment Type ID
        String guids = guids_example; // String | list of guids separated by comma
        Integer ownerRefID = 56; // Integer | Owner reference ID

        try {
            httpActionResult_attachmentResponse result = apiInstance.viewMultipleFiles(attachmentTypeID, guids, ownerRefID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#viewMultipleFiles");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer attachmentTypeID = new Integer(); // Integer | Attachment Type ID
final String guids = new String(); // String | list of guids separated by comma
final Integer ownerRefID = new Integer(); // Integer | Owner reference ID

try {
    final result = await api_instance.viewMultipleFiles(attachmentTypeID, guids, ownerRefID);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->viewMultipleFiles: $e\n');
}

import org.openapitools.client.api.AttachmentsApi;

public class AttachmentsApiExample {
    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        Integer attachmentTypeID = 56; // Integer | Attachment Type ID
        String guids = guids_example; // String | list of guids separated by comma
        Integer ownerRefID = 56; // Integer | Owner reference ID

        try {
            httpActionResult_attachmentResponse result = apiInstance.viewMultipleFiles(attachmentTypeID, guids, ownerRefID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#viewMultipleFiles");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
AttachmentsApi *apiInstance = [[AttachmentsApi alloc] init];
Integer *attachmentTypeID = 56; // Attachment Type ID (default to null)
String *guids = guids_example; // list of guids separated by comma (default to null)
Integer *ownerRefID = 56; // Owner reference ID (optional) (default to null)

// Get a list of URI files from a specified storage based on the attachment type
[apiInstance viewMultipleFilesWith:attachmentTypeID
    guids:guids
    ownerRefID:ownerRefID
              completionHandler: ^(httpActionResult_attachmentResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAttachments = require('spenda_services_attachments');

// Create an instance of the API class
var api = new SpendaServicesAttachments.AttachmentsApi()
var attachmentTypeID = 56; // {Integer} Attachment Type ID
var guids = guids_example; // {String} list of guids separated by comma
var opts = {
  'ownerRefID': 56 // {Integer} Owner reference ID
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.viewMultipleFiles(attachmentTypeID, guids, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class viewMultipleFilesExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new AttachmentsApi();
            var attachmentTypeID = 56;  // Integer | Attachment Type ID (default to null)
            var guids = guids_example;  // String | list of guids separated by comma (default to null)
            var ownerRefID = 56;  // Integer | Owner reference ID (optional)  (default to null)

            try {
                // Get a list of URI files from a specified storage based on the attachment type
                httpActionResult_attachmentResponse result = apiInstance.viewMultipleFiles(attachmentTypeID, guids, ownerRefID);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AttachmentsApi.viewMultipleFiles: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AttachmentsApi();
$attachmentTypeID = 56; // Integer | Attachment Type ID
$guids = guids_example; // String | list of guids separated by comma
$ownerRefID = 56; // Integer | Owner reference ID

try {
    $result = $api_instance->viewMultipleFiles($attachmentTypeID, $guids, $ownerRefID);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->viewMultipleFiles: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AttachmentsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AttachmentsApi->new();
my $attachmentTypeID = 56; # Integer | Attachment Type ID
my $guids = guids_example; # String | list of guids separated by comma
my $ownerRefID = 56; # Integer | Owner reference ID

eval {
    my $result = $api_instance->viewMultipleFiles(attachmentTypeID => $attachmentTypeID, guids => $guids, ownerRefID => $ownerRefID);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->viewMultipleFiles: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.AttachmentsApi()
attachmentTypeID = 56 # Integer | Attachment Type ID (default to null)
guids = guids_example # String | list of guids separated by comma (default to null)
ownerRefID = 56 # Integer | Owner reference ID (optional) (default to null)

try:
    # Get a list of URI files from a specified storage based on the attachment type
    api_response = api_instance.view_multiple_files(attachmentTypeID, guids, ownerRefID=ownerRefID)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->viewMultipleFiles: %s\n" % e)
extern crate AttachmentsApi;

pub fn main() {
    let attachmentTypeID = 56; // Integer
    let guids = guids_example; // String
    let ownerRefID = 56; // Integer

    let mut context = AttachmentsApi::Context::default();
    let result = client.viewMultipleFiles(attachmentTypeID, guids, ownerRefID, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
attachmentTypeID*
Integer (int32)
Attachment Type ID
Required
Query parameters
Name Description
guids*
String
list of guids separated by comma
Required
ownerRefID
Integer (int32)
Owner reference ID

Responses


Public

attachmentsGetFile

Get a file content

Allows an user to get file content


/Spenda/Attachments/{attachmentTypeID}/{attachmentGUID}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/octet-stream" \
 "https://api.dev.spenda.co/api/Spenda/Attachments/{attachmentTypeID}/{attachmentGUID}?t=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PublicApi;

import java.io.File;
import java.util.*;

public class PublicApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        PublicApi apiInstance = new PublicApi();
        Integer attachmentTypeID = 56; // Integer | Attachment type
        UUID attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Attachment unique identifier
        Boolean t = true; // Boolean | Token representing the attachment details

        try {
            stream result = apiInstance.attachmentsGetFile(attachmentTypeID, attachmentGUID, t);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PublicApi#attachmentsGetFile");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer attachmentTypeID = new Integer(); // Integer | Attachment type
final UUID attachmentGUID = new UUID(); // UUID | Attachment unique identifier
final Boolean t = new Boolean(); // Boolean | Token representing the attachment details

try {
    final result = await api_instance.attachmentsGetFile(attachmentTypeID, attachmentGUID, t);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->attachmentsGetFile: $e\n');
}

import org.openapitools.client.api.PublicApi;

public class PublicApiExample {
    public static void main(String[] args) {
        PublicApi apiInstance = new PublicApi();
        Integer attachmentTypeID = 56; // Integer | Attachment type
        UUID attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Attachment unique identifier
        Boolean t = true; // Boolean | Token representing the attachment details

        try {
            stream result = apiInstance.attachmentsGetFile(attachmentTypeID, attachmentGUID, t);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PublicApi#attachmentsGetFile");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
PublicApi *apiInstance = [[PublicApi alloc] init];
Integer *attachmentTypeID = 56; // Attachment type (default to null)
UUID *attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // Attachment unique identifier (default to null)
Boolean *t = true; // Token representing the attachment details (default to null)

// Get a file content
[apiInstance attachmentsGetFileWith:attachmentTypeID
    attachmentGUID:attachmentGUID
    t:t
              completionHandler: ^(stream output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAttachments = require('spenda_services_attachments');

// Create an instance of the API class
var api = new SpendaServicesAttachments.PublicApi()
var attachmentTypeID = 56; // {Integer} Attachment type
var attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // {UUID} Attachment unique identifier
var t = true; // {Boolean} Token representing the attachment details

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.attachmentsGetFile(attachmentTypeID, attachmentGUID, t, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class attachmentsGetFileExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new PublicApi();
            var attachmentTypeID = 56;  // Integer | Attachment type (default to null)
            var attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d;  // UUID | Attachment unique identifier (default to null)
            var t = true;  // Boolean | Token representing the attachment details (default to null)

            try {
                // Get a file content
                stream result = apiInstance.attachmentsGetFile(attachmentTypeID, attachmentGUID, t);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PublicApi.attachmentsGetFile: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PublicApi();
$attachmentTypeID = 56; // Integer | Attachment type
$attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | Attachment unique identifier
$t = true; // Boolean | Token representing the attachment details

try {
    $result = $api_instance->attachmentsGetFile($attachmentTypeID, $attachmentGUID, $t);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PublicApi->attachmentsGetFile: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PublicApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PublicApi->new();
my $attachmentTypeID = 56; # Integer | Attachment type
my $attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | Attachment unique identifier
my $t = true; # Boolean | Token representing the attachment details

eval {
    my $result = $api_instance->attachmentsGetFile(attachmentTypeID => $attachmentTypeID, attachmentGUID => $attachmentGUID, t => $t);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PublicApi->attachmentsGetFile: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.PublicApi()
attachmentTypeID = 56 # Integer | Attachment type (default to null)
attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID | Attachment unique identifier (default to null)
t = true # Boolean | Token representing the attachment details (default to null)

try:
    # Get a file content
    api_response = api_instance.attachments_get_file(attachmentTypeID, attachmentGUID, t)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PublicApi->attachmentsGetFile: %s\n" % e)
extern crate PublicApi;

pub fn main() {
    let attachmentTypeID = 56; // Integer
    let attachmentGUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID
    let t = true; // Boolean

    let mut context = PublicApi::Context::default();
    let result = client.attachmentsGetFile(attachmentTypeID, attachmentGUID, t, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
attachmentTypeID*
Integer (int32)
Attachment type
Required
attachmentGUID*
UUID (uuid)
Attachment unique identifier
Required
Query parameters
Name Description
t*
Boolean
Token representing the attachment details
Required

Responses


regenerateLogoThumbnail

This is use to regenerate logo business thumbnails

This is use to regenerate logo business thumbnails with new setting


/Spenda/Attachments/RegenerateLogoThumbnail

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json" \
 "https://api.dev.spenda.co/api/Spenda/Attachments/RegenerateLogoThumbnail?processAll=true&batchLimit=true&logoID=56"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PublicApi;

import java.io.File;
import java.util.*;

public class PublicApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        PublicApi apiInstance = new PublicApi();
        Boolean processAll = true; // Boolean | Process all logo
        Boolean batchLimit = true; // Boolean | Batch reccord limit to process
        Integer logoID = 56; // Integer | Logo ID to process

        try {
            httpActionResult_resizeLogoThumbnailResponse result = apiInstance.regenerateLogoThumbnail(processAll, batchLimit, logoID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PublicApi#regenerateLogoThumbnail");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Boolean processAll = new Boolean(); // Boolean | Process all logo
final Boolean batchLimit = new Boolean(); // Boolean | Batch reccord limit to process
final Integer logoID = new Integer(); // Integer | Logo ID to process

try {
    final result = await api_instance.regenerateLogoThumbnail(processAll, batchLimit, logoID);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->regenerateLogoThumbnail: $e\n');
}

import org.openapitools.client.api.PublicApi;

public class PublicApiExample {
    public static void main(String[] args) {
        PublicApi apiInstance = new PublicApi();
        Boolean processAll = true; // Boolean | Process all logo
        Boolean batchLimit = true; // Boolean | Batch reccord limit to process
        Integer logoID = 56; // Integer | Logo ID to process

        try {
            httpActionResult_resizeLogoThumbnailResponse result = apiInstance.regenerateLogoThumbnail(processAll, batchLimit, logoID);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PublicApi#regenerateLogoThumbnail");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
PublicApi *apiInstance = [[PublicApi alloc] init];
Boolean *processAll = true; // Process all logo (optional) (default to null)
Boolean *batchLimit = true; // Batch reccord limit to process (optional) (default to null)
Integer *logoID = 56; // Logo ID to process (optional) (default to null)

// This is use to regenerate logo business thumbnails
[apiInstance regenerateLogoThumbnailWith:processAll
    batchLimit:batchLimit
    logoID:logoID
              completionHandler: ^(httpActionResult_resizeLogoThumbnailResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpendaServicesAttachments = require('spenda_services_attachments');

// Create an instance of the API class
var api = new SpendaServicesAttachments.PublicApi()
var opts = {
  'processAll': true, // {Boolean} Process all logo
  'batchLimit': true, // {Boolean} Batch reccord limit to process
  'logoID': 56 // {Integer} Logo ID to process
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.regenerateLogoThumbnail(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class regenerateLogoThumbnailExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new PublicApi();
            var processAll = true;  // Boolean | Process all logo (optional)  (default to null)
            var batchLimit = true;  // Boolean | Batch reccord limit to process (optional)  (default to null)
            var logoID = 56;  // Integer | Logo ID to process (optional)  (default to null)

            try {
                // This is use to regenerate logo business thumbnails
                httpActionResult_resizeLogoThumbnailResponse result = apiInstance.regenerateLogoThumbnail(processAll, batchLimit, logoID);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PublicApi.regenerateLogoThumbnail: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PublicApi();
$processAll = true; // Boolean | Process all logo
$batchLimit = true; // Boolean | Batch reccord limit to process
$logoID = 56; // Integer | Logo ID to process

try {
    $result = $api_instance->regenerateLogoThumbnail($processAll, $batchLimit, $logoID);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PublicApi->regenerateLogoThumbnail: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PublicApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PublicApi->new();
my $processAll = true; # Boolean | Process all logo
my $batchLimit = true; # Boolean | Batch reccord limit to process
my $logoID = 56; # Integer | Logo ID to process

eval {
    my $result = $api_instance->regenerateLogoThumbnail(processAll => $processAll, batchLimit => $batchLimit, logoID => $logoID);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PublicApi->regenerateLogoThumbnail: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.PublicApi()
processAll = true # Boolean | Process all logo (optional) (default to null)
batchLimit = true # Boolean | Batch reccord limit to process (optional) (default to null)
logoID = 56 # Integer | Logo ID to process (optional) (default to null)

try:
    # This is use to regenerate logo business thumbnails
    api_response = api_instance.regenerate_logo_thumbnail(processAll=processAll, batchLimit=batchLimit, logoID=logoID)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PublicApi->regenerateLogoThumbnail: %s\n" % e)
extern crate PublicApi;

pub fn main() {
    let processAll = true; // Boolean
    let batchLimit = true; // Boolean
    let logoID = 56; // Integer

    let mut context = PublicApi::Context::default();
    let result = client.regenerateLogoThumbnail(processAll, batchLimit, logoID, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
processAll
Boolean
Process all logo
batchLimit
Boolean
Batch reccord limit to process
logoID
Integer (int32)
Logo ID to process

Responses