Docspell

Admin

adminFtsReIndexAllPost

Re-creates the full-text index.

Clears the full-text index and inserts all data from the database. This migh take a while to complete. The response returns immediately. A task is submitted that will be executed by a job executor. Note that this affects all data of all collectives. This is an admin route, so you need to provide the secret from the config file as header `Docspell-Admin-Secret`.


/admin/fts/reIndexAll

Usage and SDK Samples

curl -X POST\
-H "Docspell-Admin-Secret: [[apiKey]]"\
-H "Accept: application/json"\
"/api/v1/admin/fts/reIndexAll"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AdminApi;

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

public class AdminApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: adminHeader
        ApiKeyAuth adminHeader = (ApiKeyAuth) defaultClient.getAuthentication("adminHeader");
        adminHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //adminHeader.setApiKeyPrefix("Token");

        AdminApi apiInstance = new AdminApi();
        try {
            BasicResult result = apiInstance.adminFtsReIndexAllPost();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminApi#adminFtsReIndexAllPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AdminApi;

public class AdminApiExample {

    public static void main(String[] args) {
        AdminApi apiInstance = new AdminApi();
        try {
            BasicResult result = apiInstance.adminFtsReIndexAllPost();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminApi#adminFtsReIndexAllPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: adminHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Docspell-Admin-Secret"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Docspell-Admin-Secret"];

AdminApi *apiInstance = [[AdminApi alloc] init];

// Re-creates the full-text index.
[apiInstance adminFtsReIndexAllPostWithCompletionHandler: 
              ^(BasicResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: adminHeader
var adminHeader = defaultClient.authentications['adminHeader'];
adminHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//adminHeader.apiKeyPrefix['Docspell-Admin-Secret'] = "Token"

var api = new Docspell.AdminApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.adminFtsReIndexAllPost(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: adminHeader
            Configuration.Default.ApiKey.Add("Docspell-Admin-Secret", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Docspell-Admin-Secret", "Bearer");

            var apiInstance = new AdminApi();

            try
            {
                // Re-creates the full-text index.
                BasicResult result = apiInstance.adminFtsReIndexAllPost();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AdminApi.adminFtsReIndexAllPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: adminHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Docspell-Admin-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Docspell-Admin-Secret', 'Bearer');

$api_instance = new Swagger\Client\ApiAdminApi();

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

# Configure API key authorization: adminHeader
$WWW::SwaggerClient::Configuration::api_key->{'Docspell-Admin-Secret'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Docspell-Admin-Secret'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AdminApi->new();

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

# Configure API key authorization: adminHeader
swagger_client.configuration.api_key['Docspell-Admin-Secret'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Docspell-Admin-Secret'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AdminApi()

try: 
    # Re-creates the full-text index.
    api_response = api_instance.admin_fts_re_index_all_post()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AdminApi->adminFtsReIndexAllPost: %s\n" % e)

Parameters

Responses

Status: 200 - Ok


adminUserResetPasswordPost

Reset a user password.

Resets a user password to some random string which is returned as the result. This is an admin route, so you need to specify the secret from the config file via a http header `Docspell-Admin-Secret`.


/admin/user/resetPassword

Usage and SDK Samples

curl -X POST\
-H "Docspell-Admin-Secret: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"/api/v1/admin/user/resetPassword"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AdminApi;

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

public class AdminApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: adminHeader
        ApiKeyAuth adminHeader = (ApiKeyAuth) defaultClient.getAuthentication("adminHeader");
        adminHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //adminHeader.setApiKeyPrefix("Token");

        AdminApi apiInstance = new AdminApi();
        ResetPassword body = ; // ResetPassword | 
        try {
            ResetPasswordResult result = apiInstance.adminUserResetPasswordPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminApi#adminUserResetPasswordPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AdminApi;

public class AdminApiExample {

    public static void main(String[] args) {
        AdminApi apiInstance = new AdminApi();
        ResetPassword body = ; // ResetPassword | 
        try {
            ResetPasswordResult result = apiInstance.adminUserResetPasswordPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminApi#adminUserResetPasswordPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: adminHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Docspell-Admin-Secret"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Docspell-Admin-Secret"];
ResetPassword *body = ; //  (optional)

AdminApi *apiInstance = [[AdminApi alloc] init];

// Reset a user password.
[apiInstance adminUserResetPasswordPostWith:body
              completionHandler: ^(ResetPasswordResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: adminHeader
var adminHeader = defaultClient.authentications['adminHeader'];
adminHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//adminHeader.apiKeyPrefix['Docspell-Admin-Secret'] = "Token"

var api = new Docspell.AdminApi()
var opts = { 
  'body':  // {{ResetPassword}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.adminUserResetPasswordPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: adminHeader
            Configuration.Default.ApiKey.Add("Docspell-Admin-Secret", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Docspell-Admin-Secret", "Bearer");

            var apiInstance = new AdminApi();
            var body = new ResetPassword(); // ResetPassword |  (optional) 

            try
            {
                // Reset a user password.
                ResetPasswordResult result = apiInstance.adminUserResetPasswordPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AdminApi.adminUserResetPasswordPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: adminHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Docspell-Admin-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Docspell-Admin-Secret', 'Bearer');

$api_instance = new Swagger\Client\ApiAdminApi();
$body = ; // ResetPassword | 

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

# Configure API key authorization: adminHeader
$WWW::SwaggerClient::Configuration::api_key->{'Docspell-Admin-Secret'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Docspell-Admin-Secret'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AdminApi->new();
my $body = WWW::SwaggerClient::Object::ResetPassword->new(); # ResetPassword | 

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

# Configure API key authorization: adminHeader
swagger_client.configuration.api_key['Docspell-Admin-Secret'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Docspell-Admin-Secret'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AdminApi()
body =  # ResetPassword |  (optional)

try: 
    # Reset a user password.
    api_response = api_instance.admin_user_reset_password_post(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AdminApi->adminUserResetPasswordPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Ok


Attachment

secAttachmentIdArchiveGet

Get an attachment archive file.

Get the archive file that was originally uploaded that contains the attachment with the given id. If the attachment was not uploaded as part of an archive, a 404 is returned.


/sec/attachment/{id}/archive

Usage and SDK Samples

curl -X GET\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/octet-stream"\
"/api/v1/sec/attachment/{id}/archive"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentApi;

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

public class AttachmentApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        try {
            byte[] result = apiInstance.secAttachmentIdArchiveGet(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdArchiveGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentApi;

public class AttachmentApiExample {

    public static void main(String[] args) {
        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        try {
            byte[] result = apiInstance.secAttachmentIdArchiveGet(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdArchiveGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
String *id = id_example; // An identifier

AttachmentApi *apiInstance = [[AttachmentApi alloc] init];

// Get an attachment archive file.
[apiInstance secAttachmentIdArchiveGetWith:id
              completionHandler: ^(byte[] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.AttachmentApi()
var id = id_example; // {{String}} An identifier

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

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new AttachmentApi();
            var id = id_example;  // String | An identifier

            try
            {
                // Get an attachment archive file.
                byte[] result = apiInstance.secAttachmentIdArchiveGet(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentApi.secAttachmentIdArchiveGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiAttachmentApi();
$id = id_example; // String | An identifier

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AttachmentApi->new();
my $id = id_example; # String | An identifier

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentApi()
id = id_example # String | An identifier

try: 
    # Get an attachment archive file.
    api_response = api_instance.sec_attachment_id_archive_get(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentApi->secAttachmentIdArchiveGet: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
An identifier
Required

Responses

Status: 200 - Ok


secAttachmentIdArchiveHead

Get an attachment archive file.

Get information about the archive that contains the attachment with the given id. If the attachment was not uploaded as part of an archive, 404 is returned.


/sec/attachment/{id}/archive

Usage and SDK Samples

curl -X HEAD\
-H "X-Docspell-Auth: [[apiKey]]"\
"/api/v1/sec/attachment/{id}/archive"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentApi;

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

public class AttachmentApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        try {
            apiInstance.secAttachmentIdArchiveHead(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdArchiveHead");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentApi;

public class AttachmentApiExample {

    public static void main(String[] args) {
        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        try {
            apiInstance.secAttachmentIdArchiveHead(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdArchiveHead");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
String *id = id_example; // An identifier

AttachmentApi *apiInstance = [[AttachmentApi alloc] init];

// Get an attachment archive file.
[apiInstance secAttachmentIdArchiveHeadWith:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.AttachmentApi()
var id = id_example; // {{String}} An identifier

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.secAttachmentIdArchiveHead(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new AttachmentApi();
            var id = id_example;  // String | An identifier

            try
            {
                // Get an attachment archive file.
                apiInstance.secAttachmentIdArchiveHead(id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentApi.secAttachmentIdArchiveHead: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiAttachmentApi();
$id = id_example; // String | An identifier

try {
    $api_instance->secAttachmentIdArchiveHead($id);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentApi->secAttachmentIdArchiveHead: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentApi;

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AttachmentApi->new();
my $id = id_example; # String | An identifier

eval { 
    $api_instance->secAttachmentIdArchiveHead(id => $id);
};
if ($@) {
    warn "Exception when calling AttachmentApi->secAttachmentIdArchiveHead: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentApi()
id = id_example # String | An identifier

try: 
    # Get an attachment archive file.
    api_instance.sec_attachment_id_archive_head(id)
except ApiException as e:
    print("Exception when calling AttachmentApi->secAttachmentIdArchiveHead: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
An identifier
Required

Responses

Status: 200 - Ok

Name Type Format Description
Content-Type String
Content-Length Long int64
ETag String
Content-Disposition String

secAttachmentIdDelete

Delete an attachment.

Deletes a single attachment with all its related data like file, the original file, extracted text, results from analysis etc. If the attachment is part of an archive, the archive is only deleted, if it is the last entry left. Archives are otherwise not deleted, if there are remaining attachments available.


/sec/attachment/{id}

Usage and SDK Samples

curl -X DELETE\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
"/api/v1/sec/attachment/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentApi;

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

public class AttachmentApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        try {
            BasicResult result = apiInstance.secAttachmentIdDelete(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentApi;

public class AttachmentApiExample {

    public static void main(String[] args) {
        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        try {
            BasicResult result = apiInstance.secAttachmentIdDelete(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
String *id = id_example; // An identifier

AttachmentApi *apiInstance = [[AttachmentApi alloc] init];

// Delete an attachment.
[apiInstance secAttachmentIdDeleteWith:id
              completionHandler: ^(BasicResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.AttachmentApi()
var id = id_example; // {{String}} An identifier

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

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new AttachmentApi();
            var id = id_example;  // String | An identifier

            try
            {
                // Delete an attachment.
                BasicResult result = apiInstance.secAttachmentIdDelete(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentApi.secAttachmentIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiAttachmentApi();
$id = id_example; // String | An identifier

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AttachmentApi->new();
my $id = id_example; # String | An identifier

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentApi()
id = id_example # String | An identifier

try: 
    # Delete an attachment.
    api_response = api_instance.sec_attachment_id_delete(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentApi->secAttachmentIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
An identifier
Required

Responses

Status: 200 - Ok


secAttachmentIdGet

Get an attachment file.

Get the binary file belonging to the attachment with the given id.


/sec/attachment/{id}

Usage and SDK Samples

curl -X GET\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/octet-stream"\
"/api/v1/sec/attachment/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentApi;

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

public class AttachmentApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        try {
            byte[] result = apiInstance.secAttachmentIdGet(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentApi;

public class AttachmentApiExample {

    public static void main(String[] args) {
        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        try {
            byte[] result = apiInstance.secAttachmentIdGet(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
String *id = id_example; // An identifier

AttachmentApi *apiInstance = [[AttachmentApi alloc] init];

// Get an attachment file.
[apiInstance secAttachmentIdGetWith:id
              completionHandler: ^(byte[] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.AttachmentApi()
var id = id_example; // {{String}} An identifier

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

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new AttachmentApi();
            var id = id_example;  // String | An identifier

            try
            {
                // Get an attachment file.
                byte[] result = apiInstance.secAttachmentIdGet(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentApi.secAttachmentIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiAttachmentApi();
$id = id_example; // String | An identifier

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AttachmentApi->new();
my $id = id_example; # String | An identifier

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentApi()
id = id_example # String | An identifier

try: 
    # Get an attachment file.
    api_response = api_instance.sec_attachment_id_get(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentApi->secAttachmentIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
An identifier
Required

Responses

Status: 200 - Ok


secAttachmentIdHead

Get an attachment file.

Get information about the binary file belonging to the attachment with the given id.


/sec/attachment/{id}

Usage and SDK Samples

curl -X HEAD\
-H "X-Docspell-Auth: [[apiKey]]"\
"/api/v1/sec/attachment/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentApi;

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

public class AttachmentApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        try {
            apiInstance.secAttachmentIdHead(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdHead");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentApi;

public class AttachmentApiExample {

    public static void main(String[] args) {
        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        try {
            apiInstance.secAttachmentIdHead(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdHead");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
String *id = id_example; // An identifier

AttachmentApi *apiInstance = [[AttachmentApi alloc] init];

// Get an attachment file.
[apiInstance secAttachmentIdHeadWith:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.AttachmentApi()
var id = id_example; // {{String}} An identifier

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.secAttachmentIdHead(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new AttachmentApi();
            var id = id_example;  // String | An identifier

            try
            {
                // Get an attachment file.
                apiInstance.secAttachmentIdHead(id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentApi.secAttachmentIdHead: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiAttachmentApi();
$id = id_example; // String | An identifier

try {
    $api_instance->secAttachmentIdHead($id);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentApi->secAttachmentIdHead: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentApi;

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AttachmentApi->new();
my $id = id_example; # String | An identifier

eval { 
    $api_instance->secAttachmentIdHead(id => $id);
};
if ($@) {
    warn "Exception when calling AttachmentApi->secAttachmentIdHead: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentApi()
id = id_example # String | An identifier

try: 
    # Get an attachment file.
    api_instance.sec_attachment_id_head(id)
except ApiException as e:
    print("Exception when calling AttachmentApi->secAttachmentIdHead: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
An identifier
Required

Responses

Status: 200 - Ok

Name Type Format Description
Content-Type String
Content-Length Long int64
ETag String
Content-Disposition String

secAttachmentIdMetaGet

Get the attachment's meta data.

Get meta data for this attachment. The meta data has been extracted from the contents.


/sec/attachment/{id}/meta

Usage and SDK Samples

curl -X GET\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
"/api/v1/sec/attachment/{id}/meta"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentApi;

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

public class AttachmentApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        try {
            AttachmentMeta result = apiInstance.secAttachmentIdMetaGet(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdMetaGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentApi;

public class AttachmentApiExample {

    public static void main(String[] args) {
        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        try {
            AttachmentMeta result = apiInstance.secAttachmentIdMetaGet(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdMetaGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
String *id = id_example; // An identifier

AttachmentApi *apiInstance = [[AttachmentApi alloc] init];

// Get the attachment's meta data.
[apiInstance secAttachmentIdMetaGetWith:id
              completionHandler: ^(AttachmentMeta output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.AttachmentApi()
var id = id_example; // {{String}} An identifier

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

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new AttachmentApi();
            var id = id_example;  // String | An identifier

            try
            {
                // Get the attachment's meta data.
                AttachmentMeta result = apiInstance.secAttachmentIdMetaGet(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentApi.secAttachmentIdMetaGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiAttachmentApi();
$id = id_example; // String | An identifier

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AttachmentApi->new();
my $id = id_example; # String | An identifier

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentApi()
id = id_example # String | An identifier

try: 
    # Get the attachment's meta data.
    api_response = api_instance.sec_attachment_id_meta_get(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentApi->secAttachmentIdMetaGet: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
An identifier
Required

Responses

Status: 200 - Ok


secAttachmentIdNamePost

Changes the name of an attachment

Change the name of the attachment with the given id. The attachment must be part of an item that belongs to the collective of the current user.


/sec/attachment/{id}/name

Usage and SDK Samples

curl -X POST\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"/api/v1/sec/attachment/{id}/name"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentApi;

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

public class AttachmentApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        OptionalText body = ; // OptionalText | 
        try {
            BasicResult result = apiInstance.secAttachmentIdNamePost(id, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdNamePost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentApi;

public class AttachmentApiExample {

    public static void main(String[] args) {
        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        OptionalText body = ; // OptionalText | 
        try {
            BasicResult result = apiInstance.secAttachmentIdNamePost(id, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdNamePost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
String *id = id_example; // An identifier
OptionalText *body = ; //  (optional)

AttachmentApi *apiInstance = [[AttachmentApi alloc] init];

// Changes the name of an attachment
[apiInstance secAttachmentIdNamePostWith:id
    body:body
              completionHandler: ^(BasicResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.AttachmentApi()
var id = id_example; // {{String}} An identifier
var opts = { 
  'body':  // {{OptionalText}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.secAttachmentIdNamePost(id, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new AttachmentApi();
            var id = id_example;  // String | An identifier
            var body = new OptionalText(); // OptionalText |  (optional) 

            try
            {
                // Changes the name of an attachment
                BasicResult result = apiInstance.secAttachmentIdNamePost(id, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentApi.secAttachmentIdNamePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiAttachmentApi();
$id = id_example; // String | An identifier
$body = ; // OptionalText | 

try {
    $result = $api_instance->secAttachmentIdNamePost($id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentApi->secAttachmentIdNamePost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentApi;

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AttachmentApi->new();
my $id = id_example; # String | An identifier
my $body = WWW::SwaggerClient::Object::OptionalText->new(); # OptionalText | 

eval { 
    my $result = $api_instance->secAttachmentIdNamePost(id => $id, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentApi->secAttachmentIdNamePost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentApi()
id = id_example # String | An identifier
body =  # OptionalText |  (optional)

try: 
    # Changes the name of an attachment
    api_response = api_instance.sec_attachment_id_name_post(id, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentApi->secAttachmentIdNamePost: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
An identifier
Required
Body parameters
Name Description
body

Responses

Status: 200 - Ok


secAttachmentIdOriginalGet

Get an attachment file.

Get the original binary file of the attachment with the given id. If the attachment is a converted PDF file, this route gets the original file as it was uploaded.


/sec/attachment/{id}/original

Usage and SDK Samples

curl -X GET\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/octet-stream"\
"/api/v1/sec/attachment/{id}/original"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentApi;

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

public class AttachmentApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        try {
            byte[] result = apiInstance.secAttachmentIdOriginalGet(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdOriginalGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentApi;

public class AttachmentApiExample {

    public static void main(String[] args) {
        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        try {
            byte[] result = apiInstance.secAttachmentIdOriginalGet(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdOriginalGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
String *id = id_example; // An identifier

AttachmentApi *apiInstance = [[AttachmentApi alloc] init];

// Get an attachment file.
[apiInstance secAttachmentIdOriginalGetWith:id
              completionHandler: ^(byte[] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.AttachmentApi()
var id = id_example; // {{String}} An identifier

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

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new AttachmentApi();
            var id = id_example;  // String | An identifier

            try
            {
                // Get an attachment file.
                byte[] result = apiInstance.secAttachmentIdOriginalGet(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentApi.secAttachmentIdOriginalGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiAttachmentApi();
$id = id_example; // String | An identifier

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AttachmentApi->new();
my $id = id_example; # String | An identifier

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentApi()
id = id_example # String | An identifier

try: 
    # Get an attachment file.
    api_response = api_instance.sec_attachment_id_original_get(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentApi->secAttachmentIdOriginalGet: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
An identifier
Required

Responses

Status: 200 - Ok


secAttachmentIdOriginalHead

Get an attachment file.

Get information about the original binary file of the attachment with the given id. If the attachment is a converted PDF file, this route gets the original file as it was uploaded.


/sec/attachment/{id}/original

Usage and SDK Samples

curl -X HEAD\
-H "X-Docspell-Auth: [[apiKey]]"\
"/api/v1/sec/attachment/{id}/original"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentApi;

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

public class AttachmentApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        try {
            apiInstance.secAttachmentIdOriginalHead(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdOriginalHead");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentApi;

public class AttachmentApiExample {

    public static void main(String[] args) {
        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        try {
            apiInstance.secAttachmentIdOriginalHead(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdOriginalHead");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
String *id = id_example; // An identifier

AttachmentApi *apiInstance = [[AttachmentApi alloc] init];

// Get an attachment file.
[apiInstance secAttachmentIdOriginalHeadWith:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.AttachmentApi()
var id = id_example; // {{String}} An identifier

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.secAttachmentIdOriginalHead(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new AttachmentApi();
            var id = id_example;  // String | An identifier

            try
            {
                // Get an attachment file.
                apiInstance.secAttachmentIdOriginalHead(id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentApi.secAttachmentIdOriginalHead: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiAttachmentApi();
$id = id_example; // String | An identifier

try {
    $api_instance->secAttachmentIdOriginalHead($id);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentApi->secAttachmentIdOriginalHead: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentApi;

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AttachmentApi->new();
my $id = id_example; # String | An identifier

eval { 
    $api_instance->secAttachmentIdOriginalHead(id => $id);
};
if ($@) {
    warn "Exception when calling AttachmentApi->secAttachmentIdOriginalHead: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentApi()
id = id_example # String | An identifier

try: 
    # Get an attachment file.
    api_instance.sec_attachment_id_original_head(id)
except ApiException as e:
    print("Exception when calling AttachmentApi->secAttachmentIdOriginalHead: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
An identifier
Required

Responses

Status: 200 - Ok

Name Type Format Description
Content-Type String
Content-Length Long int64
ETag String
Content-Disposition String

secAttachmentIdPreviewGet

Get a preview image of an attachment file.

Gets a image file showing a preview of the attachment. Usually it is a small image of the first page of the document.If not available, a 404 is returned. However, if the query parameter `withFallback` is `true`, a fallback preview image is returned. You can also use the `HEAD` method to check for existence.


/sec/attachment/{id}/preview

Usage and SDK Samples

curl -X GET\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/octet-stream"\
"/api/v1/sec/attachment/{id}/preview?withFallback="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentApi;

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

public class AttachmentApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        Boolean withFallback = true; // Boolean | Whether to provide a fallback or not.
        try {
            byte[] result = apiInstance.secAttachmentIdPreviewGet(id, withFallback);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdPreviewGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentApi;

public class AttachmentApiExample {

    public static void main(String[] args) {
        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        Boolean withFallback = true; // Boolean | Whether to provide a fallback or not.
        try {
            byte[] result = apiInstance.secAttachmentIdPreviewGet(id, withFallback);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdPreviewGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
String *id = id_example; // An identifier
Boolean *withFallback = true; // Whether to provide a fallback or not. (optional)

AttachmentApi *apiInstance = [[AttachmentApi alloc] init];

// Get a preview image of an attachment file.
[apiInstance secAttachmentIdPreviewGetWith:id
    withFallback:withFallback
              completionHandler: ^(byte[] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.AttachmentApi()
var id = id_example; // {{String}} An identifier
var opts = { 
  'withFallback': true // {{Boolean}} Whether to provide a fallback or not.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.secAttachmentIdPreviewGet(id, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new AttachmentApi();
            var id = id_example;  // String | An identifier
            var withFallback = true;  // Boolean | Whether to provide a fallback or not. (optional) 

            try
            {
                // Get a preview image of an attachment file.
                byte[] result = apiInstance.secAttachmentIdPreviewGet(id, withFallback);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentApi.secAttachmentIdPreviewGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiAttachmentApi();
$id = id_example; // String | An identifier
$withFallback = true; // Boolean | Whether to provide a fallback or not.

try {
    $result = $api_instance->secAttachmentIdPreviewGet($id, $withFallback);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentApi->secAttachmentIdPreviewGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentApi;

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AttachmentApi->new();
my $id = id_example; # String | An identifier
my $withFallback = true; # Boolean | Whether to provide a fallback or not.

eval { 
    my $result = $api_instance->secAttachmentIdPreviewGet(id => $id, withFallback => $withFallback);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentApi->secAttachmentIdPreviewGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentApi()
id = id_example # String | An identifier
withFallback = true # Boolean | Whether to provide a fallback or not. (optional)

try: 
    # Get a preview image of an attachment file.
    api_response = api_instance.sec_attachment_id_preview_get(id, withFallback=withFallback)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentApi->secAttachmentIdPreviewGet: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
An identifier
Required
Query parameters
Name Description
withFallback
Boolean
Whether to provide a fallback or not.

Responses

Status: 200 - Ok


secAttachmentIdPreviewHead

Get a preview image of an attachment file.

Checks if an image file showing a preview of the attachment is available. If not available, a 404 is returned.


/sec/attachment/{id}/preview

Usage and SDK Samples

curl -X HEAD\
-H "X-Docspell-Auth: [[apiKey]]"\
"/api/v1/sec/attachment/{id}/preview"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentApi;

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

public class AttachmentApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        try {
            apiInstance.secAttachmentIdPreviewHead(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdPreviewHead");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentApi;

public class AttachmentApiExample {

    public static void main(String[] args) {
        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        try {
            apiInstance.secAttachmentIdPreviewHead(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdPreviewHead");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
String *id = id_example; // An identifier

AttachmentApi *apiInstance = [[AttachmentApi alloc] init];

// Get a preview image of an attachment file.
[apiInstance secAttachmentIdPreviewHeadWith:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.AttachmentApi()
var id = id_example; // {{String}} An identifier

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.secAttachmentIdPreviewHead(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new AttachmentApi();
            var id = id_example;  // String | An identifier

            try
            {
                // Get a preview image of an attachment file.
                apiInstance.secAttachmentIdPreviewHead(id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentApi.secAttachmentIdPreviewHead: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiAttachmentApi();
$id = id_example; // String | An identifier

try {
    $api_instance->secAttachmentIdPreviewHead($id);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentApi->secAttachmentIdPreviewHead: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentApi;

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AttachmentApi->new();
my $id = id_example; # String | An identifier

eval { 
    $api_instance->secAttachmentIdPreviewHead(id => $id);
};
if ($@) {
    warn "Exception when calling AttachmentApi->secAttachmentIdPreviewHead: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentApi()
id = id_example # String | An identifier

try: 
    # Get a preview image of an attachment file.
    api_instance.sec_attachment_id_preview_head(id)
except ApiException as e:
    print("Exception when calling AttachmentApi->secAttachmentIdPreviewHead: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
An identifier
Required

Responses

Status: 200 - Ok

Status: 404 - NotFound


secAttachmentIdPreviewPost

(Re)generate a preview image.

Submits a task that generates a preview image for this attachment. The existing preview will be replaced.


/sec/attachment/{id}/preview

Usage and SDK Samples

curl -X POST\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
"/api/v1/sec/attachment/{id}/preview"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentApi;

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

public class AttachmentApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        try {
            BasicResult result = apiInstance.secAttachmentIdPreviewPost(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdPreviewPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentApi;

public class AttachmentApiExample {

    public static void main(String[] args) {
        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        try {
            BasicResult result = apiInstance.secAttachmentIdPreviewPost(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdPreviewPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
String *id = id_example; // An identifier

AttachmentApi *apiInstance = [[AttachmentApi alloc] init];

// (Re)generate a preview image.
[apiInstance secAttachmentIdPreviewPostWith:id
              completionHandler: ^(BasicResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.AttachmentApi()
var id = id_example; // {{String}} An identifier

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

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new AttachmentApi();
            var id = id_example;  // String | An identifier

            try
            {
                // (Re)generate a preview image.
                BasicResult result = apiInstance.secAttachmentIdPreviewPost(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentApi.secAttachmentIdPreviewPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiAttachmentApi();
$id = id_example; // String | An identifier

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AttachmentApi->new();
my $id = id_example; # String | An identifier

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentApi()
id = id_example # String | An identifier

try: 
    # (Re)generate a preview image.
    api_response = api_instance.sec_attachment_id_preview_post(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentApi->secAttachmentIdPreviewPost: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
An identifier
Required

Responses

Status: 200 - Ok


secAttachmentIdViewGet

A preview of the attachment

This provides a preview of the attachment. It currently uses a third-party javascript library (viewerjs) to display the preview. This works by redirecting to the viewerjs url with the attachment url as parameter. Note that the resulting url that is redirected to is not stable. It may change from version to version. This route, however, is meant to provide a stable url for the preview.


/sec/attachment/{id}/view

Usage and SDK Samples

curl -X GET\
-H "X-Docspell-Auth: [[apiKey]]"\
"/api/v1/sec/attachment/{id}/view"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentApi;

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

public class AttachmentApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        try {
            apiInstance.secAttachmentIdViewGet(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdViewGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentApi;

public class AttachmentApiExample {

    public static void main(String[] args) {
        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        try {
            apiInstance.secAttachmentIdViewGet(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secAttachmentIdViewGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
String *id = id_example; // An identifier

AttachmentApi *apiInstance = [[AttachmentApi alloc] init];

// A preview of the attachment
[apiInstance secAttachmentIdViewGetWith:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.AttachmentApi()
var id = id_example; // {{String}} An identifier

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.secAttachmentIdViewGet(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new AttachmentApi();
            var id = id_example;  // String | An identifier

            try
            {
                // A preview of the attachment
                apiInstance.secAttachmentIdViewGet(id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentApi.secAttachmentIdViewGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiAttachmentApi();
$id = id_example; // String | An identifier

try {
    $api_instance->secAttachmentIdViewGet($id);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentApi->secAttachmentIdViewGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentApi;

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AttachmentApi->new();
my $id = id_example; # String | An identifier

eval { 
    $api_instance->secAttachmentIdViewGet(id => $id);
};
if ($@) {
    warn "Exception when calling AttachmentApi->secAttachmentIdViewGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentApi()
id = id_example # String | An identifier

try: 
    # A preview of the attachment
    api_instance.sec_attachment_id_view_get(id)
except ApiException as e:
    print("Exception when calling AttachmentApi->secAttachmentIdViewGet: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
An identifier
Required

Responses

Status: 303 - See Other

Status: 200 - Ok


secItemIdPreviewGet

Get a preview image of an attachment file.

Gets a image file showing a preview of the item. Usually it is a small image of the first page of the first attachment. If not available, a 404 is returned. However, if the query parameter `withFallback` is `true`, a fallback preview image is returned. You can also use the `HEAD` method to check for existence.


/sec/item/{id}/preview

Usage and SDK Samples

curl -X GET\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/octet-stream"\
"/api/v1/sec/item/{id}/preview?withFallback="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentApi;

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

public class AttachmentApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        Boolean withFallback = true; // Boolean | Whether to provide a fallback or not.
        try {
            byte[] result = apiInstance.secItemIdPreviewGet(id, withFallback);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secItemIdPreviewGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentApi;

public class AttachmentApiExample {

    public static void main(String[] args) {
        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        Boolean withFallback = true; // Boolean | Whether to provide a fallback or not.
        try {
            byte[] result = apiInstance.secItemIdPreviewGet(id, withFallback);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secItemIdPreviewGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
String *id = id_example; // An identifier
Boolean *withFallback = true; // Whether to provide a fallback or not. (optional)

AttachmentApi *apiInstance = [[AttachmentApi alloc] init];

// Get a preview image of an attachment file.
[apiInstance secItemIdPreviewGetWith:id
    withFallback:withFallback
              completionHandler: ^(byte[] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.AttachmentApi()
var id = id_example; // {{String}} An identifier
var opts = { 
  'withFallback': true // {{Boolean}} Whether to provide a fallback or not.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.secItemIdPreviewGet(id, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new AttachmentApi();
            var id = id_example;  // String | An identifier
            var withFallback = true;  // Boolean | Whether to provide a fallback or not. (optional) 

            try
            {
                // Get a preview image of an attachment file.
                byte[] result = apiInstance.secItemIdPreviewGet(id, withFallback);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentApi.secItemIdPreviewGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiAttachmentApi();
$id = id_example; // String | An identifier
$withFallback = true; // Boolean | Whether to provide a fallback or not.

try {
    $result = $api_instance->secItemIdPreviewGet($id, $withFallback);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentApi->secItemIdPreviewGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentApi;

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AttachmentApi->new();
my $id = id_example; # String | An identifier
my $withFallback = true; # Boolean | Whether to provide a fallback or not.

eval { 
    my $result = $api_instance->secItemIdPreviewGet(id => $id, withFallback => $withFallback);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentApi->secItemIdPreviewGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentApi()
id = id_example # String | An identifier
withFallback = true # Boolean | Whether to provide a fallback or not. (optional)

try: 
    # Get a preview image of an attachment file.
    api_response = api_instance.sec_item_id_preview_get(id, withFallback=withFallback)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentApi->secItemIdPreviewGet: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
An identifier
Required
Query parameters
Name Description
withFallback
Boolean
Whether to provide a fallback or not.

Responses

Status: 200 - Ok


secItemIdPreviewHead

Get a preview image of an attachment file.

Checks if an image file showing a preview of the item is available. If not available, a 404 is returned. The preview is currently the an image of the first page of the first attachment.


/sec/item/{id}/preview

Usage and SDK Samples

curl -X HEAD\
-H "X-Docspell-Auth: [[apiKey]]"\
"/api/v1/sec/item/{id}/preview"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentApi;

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

public class AttachmentApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        try {
            apiInstance.secItemIdPreviewHead(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secItemIdPreviewHead");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentApi;

public class AttachmentApiExample {

    public static void main(String[] args) {
        AttachmentApi apiInstance = new AttachmentApi();
        String id = id_example; // String | An identifier
        try {
            apiInstance.secItemIdPreviewHead(id);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentApi#secItemIdPreviewHead");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
String *id = id_example; // An identifier

AttachmentApi *apiInstance = [[AttachmentApi alloc] init];

// Get a preview image of an attachment file.
[apiInstance secItemIdPreviewHeadWith:id
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.AttachmentApi()
var id = id_example; // {{String}} An identifier

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.secItemIdPreviewHead(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new AttachmentApi();
            var id = id_example;  // String | An identifier

            try
            {
                // Get a preview image of an attachment file.
                apiInstance.secItemIdPreviewHead(id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentApi.secItemIdPreviewHead: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiAttachmentApi();
$id = id_example; // String | An identifier

try {
    $api_instance->secItemIdPreviewHead($id);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentApi->secItemIdPreviewHead: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentApi;

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AttachmentApi->new();
my $id = id_example; # String | An identifier

eval { 
    $api_instance->secItemIdPreviewHead(id => $id);
};
if ($@) {
    warn "Exception when calling AttachmentApi->secItemIdPreviewHead: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentApi()
id = id_example # String | An identifier

try: 
    # Get a preview image of an attachment file.
    api_instance.sec_item_id_preview_head(id)
except ApiException as e:
    print("Exception when calling AttachmentApi->secItemIdPreviewHead: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
An identifier
Required

Responses

Status: 200 - Ok

Status: 404 - NotFound


Authentication

openAuthLoginPost

Authenticate with account name and password.

Authenticate with account name and password. The account name is comprised of the collective id and user id separated by slash, backslash or whitespace. If successful, an authentication token is returned that can be used for subsequent calls to protected routes.


/open/auth/login

Usage and SDK Samples

curl -X POST\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"/api/v1/open/auth/login"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AuthenticationApi;

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

public class AuthenticationApiExample {

    public static void main(String[] args) {
        
        AuthenticationApi apiInstance = new AuthenticationApi();
        UserPass body = ; // UserPass | 
        try {
            AuthResult result = apiInstance.openAuthLoginPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AuthenticationApi#openAuthLoginPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AuthenticationApi;

public class AuthenticationApiExample {

    public static void main(String[] args) {
        AuthenticationApi apiInstance = new AuthenticationApi();
        UserPass body = ; // UserPass | 
        try {
            AuthResult result = apiInstance.openAuthLoginPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AuthenticationApi#openAuthLoginPost");
            e.printStackTrace();
        }
    }
}
UserPass *body = ; //  (optional)

AuthenticationApi *apiInstance = [[AuthenticationApi alloc] init];

// Authenticate with account name and password.
[apiInstance openAuthLoginPostWith:body
              completionHandler: ^(AuthResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');

var api = new Docspell.AuthenticationApi()
var opts = { 
  'body':  // {{UserPass}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.openAuthLoginPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            var apiInstance = new AuthenticationApi();
            var body = new UserPass(); // UserPass |  (optional) 

            try
            {
                // Authenticate with account name and password.
                AuthResult result = apiInstance.openAuthLoginPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AuthenticationApi.openAuthLoginPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAuthenticationApi();
$body = ; // UserPass | 

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

my $api_instance = WWW::SwaggerClient::AuthenticationApi->new();
my $body = WWW::SwaggerClient::Object::UserPass->new(); # UserPass | 

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

# create an instance of the API class
api_instance = swagger_client.AuthenticationApi()
body =  # UserPass |  (optional)

try: 
    # Authenticate with account name and password.
    api_response = api_instance.open_auth_login_post(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthenticationApi->openAuthLoginPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Ok


secAuthLogoutPost

Logout.

This route informs the server about a logout. This is not strictly necessary.


/sec/auth/logout

Usage and SDK Samples

curl -X POST\
-H "X-Docspell-Auth: [[apiKey]]"\
"/api/v1/sec/auth/logout"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AuthenticationApi;

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

public class AuthenticationApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        AuthenticationApi apiInstance = new AuthenticationApi();
        try {
            apiInstance.secAuthLogoutPost();
        } catch (ApiException e) {
            System.err.println("Exception when calling AuthenticationApi#secAuthLogoutPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AuthenticationApi;

public class AuthenticationApiExample {

    public static void main(String[] args) {
        AuthenticationApi apiInstance = new AuthenticationApi();
        try {
            apiInstance.secAuthLogoutPost();
        } catch (ApiException e) {
            System.err.println("Exception when calling AuthenticationApi#secAuthLogoutPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];

AuthenticationApi *apiInstance = [[AuthenticationApi alloc] init];

// Logout.
[apiInstance secAuthLogoutPostWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.AuthenticationApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.secAuthLogoutPost(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new AuthenticationApi();

            try
            {
                // Logout.
                apiInstance.secAuthLogoutPost();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AuthenticationApi.secAuthLogoutPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiAuthenticationApi();

try {
    $api_instance->secAuthLogoutPost();
} catch (Exception $e) {
    echo 'Exception when calling AuthenticationApi->secAuthLogoutPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AuthenticationApi;

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AuthenticationApi->new();

eval { 
    $api_instance->secAuthLogoutPost();
};
if ($@) {
    warn "Exception when calling AuthenticationApi->secAuthLogoutPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AuthenticationApi()

try: 
    # Logout.
    api_instance.sec_auth_logout_post()
except ApiException as e:
    print("Exception when calling AuthenticationApi->secAuthLogoutPost: %s\n" % e)

Parameters

Responses

Status: 200 - Ok


secAuthSessionPost

Authentication with a token

Authenticate with a token. This can be used to get a new authentication token based on another valid one.


/sec/auth/session

Usage and SDK Samples

curl -X POST\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
"/api/v1/sec/auth/session"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AuthenticationApi;

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

public class AuthenticationApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        AuthenticationApi apiInstance = new AuthenticationApi();
        try {
            AuthResult result = apiInstance.secAuthSessionPost();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AuthenticationApi#secAuthSessionPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AuthenticationApi;

public class AuthenticationApiExample {

    public static void main(String[] args) {
        AuthenticationApi apiInstance = new AuthenticationApi();
        try {
            AuthResult result = apiInstance.secAuthSessionPost();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AuthenticationApi#secAuthSessionPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];

AuthenticationApi *apiInstance = [[AuthenticationApi alloc] init];

// Authentication with a token
[apiInstance secAuthSessionPostWithCompletionHandler: 
              ^(AuthResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.AuthenticationApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.secAuthSessionPost(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new AuthenticationApi();

            try
            {
                // Authentication with a token
                AuthResult result = apiInstance.secAuthSessionPost();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AuthenticationApi.secAuthSessionPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiAuthenticationApi();

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::AuthenticationApi->new();

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AuthenticationApi()

try: 
    # Authentication with a token
    api_response = api_instance.sec_auth_session_post()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthenticationApi->secAuthSessionPost: %s\n" % e)

Parameters

Responses

Status: 200 - Ok


Collective

adminUserResetPasswordPost

Reset a user password.

Resets a user password to some random string which is returned as the result. This is an admin route, so you need to specify the secret from the config file via a http header `Docspell-Admin-Secret`.


/admin/user/resetPassword

Usage and SDK Samples

curl -X POST\
-H "Docspell-Admin-Secret: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"/api/v1/admin/user/resetPassword"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CollectiveApi;

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

public class CollectiveApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: adminHeader
        ApiKeyAuth adminHeader = (ApiKeyAuth) defaultClient.getAuthentication("adminHeader");
        adminHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //adminHeader.setApiKeyPrefix("Token");

        CollectiveApi apiInstance = new CollectiveApi();
        ResetPassword body = ; // ResetPassword | 
        try {
            ResetPasswordResult result = apiInstance.adminUserResetPasswordPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#adminUserResetPasswordPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CollectiveApi;

public class CollectiveApiExample {

    public static void main(String[] args) {
        CollectiveApi apiInstance = new CollectiveApi();
        ResetPassword body = ; // ResetPassword | 
        try {
            ResetPasswordResult result = apiInstance.adminUserResetPasswordPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#adminUserResetPasswordPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: adminHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Docspell-Admin-Secret"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Docspell-Admin-Secret"];
ResetPassword *body = ; //  (optional)

CollectiveApi *apiInstance = [[CollectiveApi alloc] init];

// Reset a user password.
[apiInstance adminUserResetPasswordPostWith:body
              completionHandler: ^(ResetPasswordResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: adminHeader
var adminHeader = defaultClient.authentications['adminHeader'];
adminHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//adminHeader.apiKeyPrefix['Docspell-Admin-Secret'] = "Token"

var api = new Docspell.CollectiveApi()
var opts = { 
  'body':  // {{ResetPassword}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.adminUserResetPasswordPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: adminHeader
            Configuration.Default.ApiKey.Add("Docspell-Admin-Secret", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Docspell-Admin-Secret", "Bearer");

            var apiInstance = new CollectiveApi();
            var body = new ResetPassword(); // ResetPassword |  (optional) 

            try
            {
                // Reset a user password.
                ResetPasswordResult result = apiInstance.adminUserResetPasswordPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CollectiveApi.adminUserResetPasswordPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: adminHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Docspell-Admin-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Docspell-Admin-Secret', 'Bearer');

$api_instance = new Swagger\Client\ApiCollectiveApi();
$body = ; // ResetPassword | 

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

# Configure API key authorization: adminHeader
$WWW::SwaggerClient::Configuration::api_key->{'Docspell-Admin-Secret'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'Docspell-Admin-Secret'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CollectiveApi->new();
my $body = WWW::SwaggerClient::Object::ResetPassword->new(); # ResetPassword | 

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

# Configure API key authorization: adminHeader
swagger_client.configuration.api_key['Docspell-Admin-Secret'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Docspell-Admin-Secret'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CollectiveApi()
body =  # ResetPassword |  (optional)

try: 
    # Reset a user password.
    api_response = api_instance.admin_user_reset_password_post(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CollectiveApi->adminUserResetPasswordPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Ok


secCollectiveClassifierStartoncePost

Starts the learn-classifier task

If the collective has classification enabled, this will submit the task for learning a classifier from existing data. This task is usally run periodically as determined by the collective settings. The request is empty, settings are used from the collective.


/sec/collective/classifier/startonce

Usage and SDK Samples

curl -X POST\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
"/api/v1/sec/collective/classifier/startonce"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CollectiveApi;

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

public class CollectiveApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        CollectiveApi apiInstance = new CollectiveApi();
        try {
            BasicResult result = apiInstance.secCollectiveClassifierStartoncePost();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secCollectiveClassifierStartoncePost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CollectiveApi;

public class CollectiveApiExample {

    public static void main(String[] args) {
        CollectiveApi apiInstance = new CollectiveApi();
        try {
            BasicResult result = apiInstance.secCollectiveClassifierStartoncePost();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secCollectiveClassifierStartoncePost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];

CollectiveApi *apiInstance = [[CollectiveApi alloc] init];

// Starts the learn-classifier task
[apiInstance secCollectiveClassifierStartoncePostWithCompletionHandler: 
              ^(BasicResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.CollectiveApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.secCollectiveClassifierStartoncePost(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new CollectiveApi();

            try
            {
                // Starts the learn-classifier task
                BasicResult result = apiInstance.secCollectiveClassifierStartoncePost();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CollectiveApi.secCollectiveClassifierStartoncePost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiCollectiveApi();

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CollectiveApi->new();

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CollectiveApi()

try: 
    # Starts the learn-classifier task
    api_response = api_instance.sec_collective_classifier_startonce_post()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CollectiveApi->secCollectiveClassifierStartoncePost: %s\n" % e)

Parameters

Responses

Status: 200 - Ok


secCollectiveContactsGet

Return a list of contacts.

Return a list of all contacts available from the collectives address book.


/sec/collective/contacts

Usage and SDK Samples

curl -X GET\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
"/api/v1/sec/collective/contacts?q=&kind="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CollectiveApi;

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

public class CollectiveApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        CollectiveApi apiInstance = new CollectiveApi();
        String q = q_example; // String | A query string.
        String kind = kind_example; // String | One of the available contact kinds.

        try {
            ContactList result = apiInstance.secCollectiveContactsGet(q, kind);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secCollectiveContactsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CollectiveApi;

public class CollectiveApiExample {

    public static void main(String[] args) {
        CollectiveApi apiInstance = new CollectiveApi();
        String q = q_example; // String | A query string.
        String kind = kind_example; // String | One of the available contact kinds.

        try {
            ContactList result = apiInstance.secCollectiveContactsGet(q, kind);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secCollectiveContactsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
String *q = q_example; // A query string. (optional)
String *kind = kind_example; // One of the available contact kinds.
 (optional)

CollectiveApi *apiInstance = [[CollectiveApi alloc] init];

// Return a list of contacts.
[apiInstance secCollectiveContactsGetWith:q
    kind:kind
              completionHandler: ^(ContactList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.CollectiveApi()
var opts = { 
  'q': q_example, // {{String}} A query string.
  'kind': kind_example // {{String}} One of the available contact kinds.

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

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new CollectiveApi();
            var q = q_example;  // String | A query string. (optional) 
            var kind = kind_example;  // String | One of the available contact kinds.
 (optional) 

            try
            {
                // Return a list of contacts.
                ContactList result = apiInstance.secCollectiveContactsGet(q, kind);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CollectiveApi.secCollectiveContactsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiCollectiveApi();
$q = q_example; // String | A query string.
$kind = kind_example; // String | One of the available contact kinds.


try {
    $result = $api_instance->secCollectiveContactsGet($q, $kind);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CollectiveApi->secCollectiveContactsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CollectiveApi;

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CollectiveApi->new();
my $q = q_example; # String | A query string.
my $kind = kind_example; # String | One of the available contact kinds.


eval { 
    my $result = $api_instance->secCollectiveContactsGet(q => $q, kind => $kind);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CollectiveApi->secCollectiveContactsGet: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CollectiveApi()
q = q_example # String | A query string. (optional)
kind = kind_example # String | One of the available contact kinds.
 (optional)

try: 
    # Return a list of contacts.
    api_response = api_instance.sec_collective_contacts_get(q=q, kind=kind)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CollectiveApi->secCollectiveContactsGet: %s\n" % e)

Parameters

Query parameters
Name Description
q
String
A query string.
kind
String
One of the available contact kinds.

Responses

Status: 200 - Ok


secCollectiveGet

Get information about your collective

Return some information about the current collective.


/sec/collective

Usage and SDK Samples

curl -X GET\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
"/api/v1/sec/collective"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CollectiveApi;

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

public class CollectiveApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        CollectiveApi apiInstance = new CollectiveApi();
        try {
            Collective result = apiInstance.secCollectiveGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secCollectiveGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CollectiveApi;

public class CollectiveApiExample {

    public static void main(String[] args) {
        CollectiveApi apiInstance = new CollectiveApi();
        try {
            Collective result = apiInstance.secCollectiveGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secCollectiveGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];

CollectiveApi *apiInstance = [[CollectiveApi alloc] init];

// Get information about your collective
[apiInstance secCollectiveGetWithCompletionHandler: 
              ^(Collective output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.CollectiveApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.secCollectiveGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new CollectiveApi();

            try
            {
                // Get information about your collective
                Collective result = apiInstance.secCollectiveGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CollectiveApi.secCollectiveGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiCollectiveApi();

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CollectiveApi->new();

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CollectiveApi()

try: 
    # Get information about your collective
    api_response = api_instance.sec_collective_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CollectiveApi->secCollectiveGet: %s\n" % e)

Parameters

Responses

Status: 200 - Ok


secCollectiveInsightsGet

Get some insights regarding your items.

Returns some information about how many items there are, how much folder they occupy etc.


/sec/collective/insights

Usage and SDK Samples

curl -X GET\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
"/api/v1/sec/collective/insights"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CollectiveApi;

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

public class CollectiveApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        CollectiveApi apiInstance = new CollectiveApi();
        try {
            ItemInsights result = apiInstance.secCollectiveInsightsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secCollectiveInsightsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CollectiveApi;

public class CollectiveApiExample {

    public static void main(String[] args) {
        CollectiveApi apiInstance = new CollectiveApi();
        try {
            ItemInsights result = apiInstance.secCollectiveInsightsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secCollectiveInsightsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];

CollectiveApi *apiInstance = [[CollectiveApi alloc] init];

// Get some insights regarding your items.
[apiInstance secCollectiveInsightsGetWithCompletionHandler: 
              ^(ItemInsights output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.CollectiveApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.secCollectiveInsightsGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new CollectiveApi();

            try
            {
                // Get some insights regarding your items.
                ItemInsights result = apiInstance.secCollectiveInsightsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CollectiveApi.secCollectiveInsightsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiCollectiveApi();

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CollectiveApi->new();

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CollectiveApi()

try: 
    # Get some insights regarding your items.
    api_response = api_instance.sec_collective_insights_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CollectiveApi->secCollectiveInsightsGet: %s\n" % e)

Parameters

Responses

Status: 200 - Ok


secCollectivePreviewsPost

Starts the generate previews task

Submits a task that re-generates preview images of all attachments of the current collective. Each existing preview image will be replaced. This can be used after changing the `preview` settings. If only preview images of selected attachments should be regenerated, see the `/sec/attachment/{id}/preview` endpoint.


/sec/collective/previews

Usage and SDK Samples

curl -X POST\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
"/api/v1/sec/collective/previews"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CollectiveApi;

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

public class CollectiveApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        CollectiveApi apiInstance = new CollectiveApi();
        try {
            BasicResult result = apiInstance.secCollectivePreviewsPost();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secCollectivePreviewsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CollectiveApi;

public class CollectiveApiExample {

    public static void main(String[] args) {
        CollectiveApi apiInstance = new CollectiveApi();
        try {
            BasicResult result = apiInstance.secCollectivePreviewsPost();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secCollectivePreviewsPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];

CollectiveApi *apiInstance = [[CollectiveApi alloc] init];

// Starts the generate previews task
[apiInstance secCollectivePreviewsPostWithCompletionHandler: 
              ^(BasicResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.CollectiveApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.secCollectivePreviewsPost(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new CollectiveApi();

            try
            {
                // Starts the generate previews task
                BasicResult result = apiInstance.secCollectivePreviewsPost();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CollectiveApi.secCollectivePreviewsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiCollectiveApi();

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CollectiveApi->new();

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CollectiveApi()

try: 
    # Starts the generate previews task
    api_response = api_instance.sec_collective_previews_post()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CollectiveApi->secCollectivePreviewsPost: %s\n" % e)

Parameters

Responses

Status: 200 - Ok


secCollectiveSettingsGet

Get collective settings

Return the settings of a collective.


/sec/collective/settings

Usage and SDK Samples

curl -X GET\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
"/api/v1/sec/collective/settings"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CollectiveApi;

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

public class CollectiveApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        CollectiveApi apiInstance = new CollectiveApi();
        try {
            CollectiveSettings result = apiInstance.secCollectiveSettingsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secCollectiveSettingsGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CollectiveApi;

public class CollectiveApiExample {

    public static void main(String[] args) {
        CollectiveApi apiInstance = new CollectiveApi();
        try {
            CollectiveSettings result = apiInstance.secCollectiveSettingsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secCollectiveSettingsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];

CollectiveApi *apiInstance = [[CollectiveApi alloc] init];

// Get collective settings
[apiInstance secCollectiveSettingsGetWithCompletionHandler: 
              ^(CollectiveSettings output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.CollectiveApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.secCollectiveSettingsGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new CollectiveApi();

            try
            {
                // Get collective settings
                CollectiveSettings result = apiInstance.secCollectiveSettingsGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CollectiveApi.secCollectiveSettingsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiCollectiveApi();

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CollectiveApi->new();

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CollectiveApi()

try: 
    # Get collective settings
    api_response = api_instance.sec_collective_settings_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CollectiveApi->secCollectiveSettingsGet: %s\n" % e)

Parameters

Responses

Status: 200 - Ok


secCollectiveSettingsPost

Update settings for a collective

Updates settings for a collective.


/sec/collective/settings

Usage and SDK Samples

curl -X POST\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"/api/v1/sec/collective/settings"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CollectiveApi;

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

public class CollectiveApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        CollectiveApi apiInstance = new CollectiveApi();
        CollectiveSettings body = ; // CollectiveSettings | 
        try {
            Collective result = apiInstance.secCollectiveSettingsPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secCollectiveSettingsPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CollectiveApi;

public class CollectiveApiExample {

    public static void main(String[] args) {
        CollectiveApi apiInstance = new CollectiveApi();
        CollectiveSettings body = ; // CollectiveSettings | 
        try {
            Collective result = apiInstance.secCollectiveSettingsPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secCollectiveSettingsPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
CollectiveSettings *body = ; //  (optional)

CollectiveApi *apiInstance = [[CollectiveApi alloc] init];

// Update settings for a collective
[apiInstance secCollectiveSettingsPostWith:body
              completionHandler: ^(Collective output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.CollectiveApi()
var opts = { 
  'body':  // {{CollectiveSettings}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.secCollectiveSettingsPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new CollectiveApi();
            var body = new CollectiveSettings(); // CollectiveSettings |  (optional) 

            try
            {
                // Update settings for a collective
                Collective result = apiInstance.secCollectiveSettingsPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CollectiveApi.secCollectiveSettingsPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiCollectiveApi();
$body = ; // CollectiveSettings | 

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CollectiveApi->new();
my $body = WWW::SwaggerClient::Object::CollectiveSettings->new(); # CollectiveSettings | 

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CollectiveApi()
body =  # CollectiveSettings |  (optional)

try: 
    # Update settings for a collective
    api_response = api_instance.sec_collective_settings_post(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CollectiveApi->secCollectiveSettingsPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Ok


secCollectiveTagcloudGet

Summary of used tags.

Returns all tags and how often each has been applied.


/sec/collective/tagcloud

Usage and SDK Samples

curl -X GET\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
"/api/v1/sec/collective/tagcloud"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CollectiveApi;

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

public class CollectiveApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        CollectiveApi apiInstance = new CollectiveApi();
        try {
            TagCloud result = apiInstance.secCollectiveTagcloudGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secCollectiveTagcloudGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CollectiveApi;

public class CollectiveApiExample {

    public static void main(String[] args) {
        CollectiveApi apiInstance = new CollectiveApi();
        try {
            TagCloud result = apiInstance.secCollectiveTagcloudGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secCollectiveTagcloudGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];

CollectiveApi *apiInstance = [[CollectiveApi alloc] init];

// Summary of used tags.
[apiInstance secCollectiveTagcloudGetWithCompletionHandler: 
              ^(TagCloud output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.CollectiveApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.secCollectiveTagcloudGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new CollectiveApi();

            try
            {
                // Summary of used tags.
                TagCloud result = apiInstance.secCollectiveTagcloudGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CollectiveApi.secCollectiveTagcloudGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiCollectiveApi();

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CollectiveApi->new();

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CollectiveApi()

try: 
    # Summary of used tags.
    api_response = api_instance.sec_collective_tagcloud_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CollectiveApi->secCollectiveTagcloudGet: %s\n" % e)

Parameters

Responses

Status: 200 - Ok


secUserChangePasswordPost

Change the password.

Allows users to change their password.


/sec/user/changePassword

Usage and SDK Samples

curl -X POST\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"/api/v1/sec/user/changePassword"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CollectiveApi;

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

public class CollectiveApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        CollectiveApi apiInstance = new CollectiveApi();
        PasswordChange body = ; // PasswordChange | 
        try {
            BasicResult result = apiInstance.secUserChangePasswordPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secUserChangePasswordPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CollectiveApi;

public class CollectiveApiExample {

    public static void main(String[] args) {
        CollectiveApi apiInstance = new CollectiveApi();
        PasswordChange body = ; // PasswordChange | 
        try {
            BasicResult result = apiInstance.secUserChangePasswordPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secUserChangePasswordPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
PasswordChange *body = ; //  (optional)

CollectiveApi *apiInstance = [[CollectiveApi alloc] init];

// Change the password.
[apiInstance secUserChangePasswordPostWith:body
              completionHandler: ^(BasicResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.CollectiveApi()
var opts = { 
  'body':  // {{PasswordChange}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.secUserChangePasswordPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new CollectiveApi();
            var body = new PasswordChange(); // PasswordChange |  (optional) 

            try
            {
                // Change the password.
                BasicResult result = apiInstance.secUserChangePasswordPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CollectiveApi.secUserChangePasswordPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiCollectiveApi();
$body = ; // PasswordChange | 

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CollectiveApi->new();
my $body = WWW::SwaggerClient::Object::PasswordChange->new(); # PasswordChange | 

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CollectiveApi()
body =  # PasswordChange |  (optional)

try: 
    # Change the password.
    api_response = api_instance.sec_user_change_password_post(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CollectiveApi->secUserChangePasswordPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Ok


secUserGet

Get a list of collective users.

Return a list of all users of the collective.


/sec/user

Usage and SDK Samples

curl -X GET\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
"/api/v1/sec/user"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CollectiveApi;

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

public class CollectiveApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        CollectiveApi apiInstance = new CollectiveApi();
        try {
            UserList result = apiInstance.secUserGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secUserGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CollectiveApi;

public class CollectiveApiExample {

    public static void main(String[] args) {
        CollectiveApi apiInstance = new CollectiveApi();
        try {
            UserList result = apiInstance.secUserGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secUserGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];

CollectiveApi *apiInstance = [[CollectiveApi alloc] init];

// Get a list of collective users.
[apiInstance secUserGetWithCompletionHandler: 
              ^(UserList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.CollectiveApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.secUserGet(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new CollectiveApi();

            try
            {
                // Get a list of collective users.
                UserList result = apiInstance.secUserGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CollectiveApi.secUserGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiCollectiveApi();

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CollectiveApi->new();

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CollectiveApi()

try: 
    # Get a list of collective users.
    api_response = api_instance.sec_user_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CollectiveApi->secUserGet: %s\n" % e)

Parameters

Responses

Status: 200 - Ok


secUserIdDelete

Delete a user.

Deletes a user.


/sec/user/{id}

Usage and SDK Samples

curl -X DELETE\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
"/api/v1/sec/user/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CollectiveApi;

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

public class CollectiveApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        CollectiveApi apiInstance = new CollectiveApi();
        String id = id_example; // String | An identifier
        try {
            BasicResult result = apiInstance.secUserIdDelete(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secUserIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CollectiveApi;

public class CollectiveApiExample {

    public static void main(String[] args) {
        CollectiveApi apiInstance = new CollectiveApi();
        String id = id_example; // String | An identifier
        try {
            BasicResult result = apiInstance.secUserIdDelete(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secUserIdDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
String *id = id_example; // An identifier

CollectiveApi *apiInstance = [[CollectiveApi alloc] init];

// Delete a user.
[apiInstance secUserIdDeleteWith:id
              completionHandler: ^(BasicResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.CollectiveApi()
var id = id_example; // {{String}} An identifier

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

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new CollectiveApi();
            var id = id_example;  // String | An identifier

            try
            {
                // Delete a user.
                BasicResult result = apiInstance.secUserIdDelete(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CollectiveApi.secUserIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiCollectiveApi();
$id = id_example; // String | An identifier

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CollectiveApi->new();
my $id = id_example; # String | An identifier

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CollectiveApi()
id = id_example # String | An identifier

try: 
    # Delete a user.
    api_response = api_instance.sec_user_id_delete(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CollectiveApi->secUserIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
An identifier
Required

Responses

Status: 200 - Ok


secUserPost

Create a new collective user.

Create a new collective user. If a user with this name already exists, an error is returned.


/sec/user

Usage and SDK Samples

curl -X POST\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"/api/v1/sec/user"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CollectiveApi;

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

public class CollectiveApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        CollectiveApi apiInstance = new CollectiveApi();
        User body = ; // User | 
        try {
            BasicResult result = apiInstance.secUserPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secUserPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CollectiveApi;

public class CollectiveApiExample {

    public static void main(String[] args) {
        CollectiveApi apiInstance = new CollectiveApi();
        User body = ; // User | 
        try {
            BasicResult result = apiInstance.secUserPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secUserPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
User *body = ; //  (optional)

CollectiveApi *apiInstance = [[CollectiveApi alloc] init];

// Create a new collective user.
[apiInstance secUserPostWith:body
              completionHandler: ^(BasicResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.CollectiveApi()
var opts = { 
  'body':  // {{User}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.secUserPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new CollectiveApi();
            var body = new User(); // User |  (optional) 

            try
            {
                // Create a new collective user.
                BasicResult result = apiInstance.secUserPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CollectiveApi.secUserPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiCollectiveApi();
$body = ; // User | 

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CollectiveApi->new();
my $body = WWW::SwaggerClient::Object::User->new(); # User | 

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CollectiveApi()
body =  # User |  (optional)

try: 
    # Create a new collective user.
    api_response = api_instance.sec_user_post(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CollectiveApi->secUserPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Ok


secUserPut

Change an existing user.

Changes an existing user. The user is looked up by its id and all properties are changed as given.


/sec/user

Usage and SDK Samples

curl -X PUT\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"/api/v1/sec/user"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CollectiveApi;

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

public class CollectiveApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        CollectiveApi apiInstance = new CollectiveApi();
        User body = ; // User | 
        try {
            BasicResult result = apiInstance.secUserPut(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secUserPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CollectiveApi;

public class CollectiveApiExample {

    public static void main(String[] args) {
        CollectiveApi apiInstance = new CollectiveApi();
        User body = ; // User | 
        try {
            BasicResult result = apiInstance.secUserPut(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CollectiveApi#secUserPut");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
User *body = ; //  (optional)

CollectiveApi *apiInstance = [[CollectiveApi alloc] init];

// Change an existing user.
[apiInstance secUserPutWith:body
              completionHandler: ^(BasicResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.CollectiveApi()
var opts = { 
  'body':  // {{User}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.secUserPut(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new CollectiveApi();
            var body = new User(); // User |  (optional) 

            try
            {
                // Change an existing user.
                BasicResult result = apiInstance.secUserPut(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CollectiveApi.secUserPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiCollectiveApi();
$body = ; // User | 

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CollectiveApi->new();
my $body = WWW::SwaggerClient::Object::User->new(); # User | 

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CollectiveApi()
body =  # User |  (optional)

try: 
    # Change an existing user.
    api_response = api_instance.sec_user_put(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CollectiveApi->secUserPut: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Ok


CustomFields

secCustomfieldGet

Get all defined custom fields.

Get all custom fields defined for the current collective.


/sec/customfield

Usage and SDK Samples

curl -X GET\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
"/api/v1/sec/customfield?q="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CustomFieldsApi;

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

public class CustomFieldsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        CustomFieldsApi apiInstance = new CustomFieldsApi();
        String q = q_example; // String | A query string.
        try {
            CustomFieldList result = apiInstance.secCustomfieldGet(q);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomFieldsApi#secCustomfieldGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CustomFieldsApi;

public class CustomFieldsApiExample {

    public static void main(String[] args) {
        CustomFieldsApi apiInstance = new CustomFieldsApi();
        String q = q_example; // String | A query string.
        try {
            CustomFieldList result = apiInstance.secCustomfieldGet(q);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomFieldsApi#secCustomfieldGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
String *q = q_example; // A query string. (optional)

CustomFieldsApi *apiInstance = [[CustomFieldsApi alloc] init];

// Get all defined custom fields.
[apiInstance secCustomfieldGetWith:q
              completionHandler: ^(CustomFieldList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.CustomFieldsApi()
var opts = { 
  'q': q_example // {{String}} A query string.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.secCustomfieldGet(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new CustomFieldsApi();
            var q = q_example;  // String | A query string. (optional) 

            try
            {
                // Get all defined custom fields.
                CustomFieldList result = apiInstance.secCustomfieldGet(q);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CustomFieldsApi.secCustomfieldGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiCustomFieldsApi();
$q = q_example; // String | A query string.

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CustomFieldsApi->new();
my $q = q_example; # String | A query string.

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CustomFieldsApi()
q = q_example # String | A query string. (optional)

try: 
    # Get all defined custom fields.
    api_response = api_instance.sec_customfield_get(q=q)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomFieldsApi->secCustomfieldGet: %s\n" % e)

Parameters

Query parameters
Name Description
q
String
A query string.

Responses

Status: 200 - Ok


secCustomfieldIdDelete

Deletes a custom field.

Deletes the custom field and all its relations.


/sec/customfield/{id}

Usage and SDK Samples

curl -X DELETE\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
"/api/v1/sec/customfield/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CustomFieldsApi;

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

public class CustomFieldsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        CustomFieldsApi apiInstance = new CustomFieldsApi();
        String id = id_example; // String | An identifier
        try {
            BasicResult result = apiInstance.secCustomfieldIdDelete(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomFieldsApi#secCustomfieldIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CustomFieldsApi;

public class CustomFieldsApiExample {

    public static void main(String[] args) {
        CustomFieldsApi apiInstance = new CustomFieldsApi();
        String id = id_example; // String | An identifier
        try {
            BasicResult result = apiInstance.secCustomfieldIdDelete(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomFieldsApi#secCustomfieldIdDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
String *id = id_example; // An identifier

CustomFieldsApi *apiInstance = [[CustomFieldsApi alloc] init];

// Deletes a custom field.
[apiInstance secCustomfieldIdDeleteWith:id
              completionHandler: ^(BasicResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.CustomFieldsApi()
var id = id_example; // {{String}} An identifier

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

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new CustomFieldsApi();
            var id = id_example;  // String | An identifier

            try
            {
                // Deletes a custom field.
                BasicResult result = apiInstance.secCustomfieldIdDelete(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CustomFieldsApi.secCustomfieldIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiCustomFieldsApi();
$id = id_example; // String | An identifier

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CustomFieldsApi->new();
my $id = id_example; # String | An identifier

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CustomFieldsApi()
id = id_example # String | An identifier

try: 
    # Deletes a custom field.
    api_response = api_instance.sec_customfield_id_delete(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomFieldsApi->secCustomfieldIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
An identifier
Required

Responses

Status: 200 - Ok


secCustomfieldIdGet

Get details about a custom field.

Returns the details about a custom field.


/sec/customfield/{id}

Usage and SDK Samples

curl -X GET\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
"/api/v1/sec/customfield/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CustomFieldsApi;

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

public class CustomFieldsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        CustomFieldsApi apiInstance = new CustomFieldsApi();
        String id = id_example; // String | An identifier
        try {
            CustomField result = apiInstance.secCustomfieldIdGet(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomFieldsApi#secCustomfieldIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CustomFieldsApi;

public class CustomFieldsApiExample {

    public static void main(String[] args) {
        CustomFieldsApi apiInstance = new CustomFieldsApi();
        String id = id_example; // String | An identifier
        try {
            CustomField result = apiInstance.secCustomfieldIdGet(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomFieldsApi#secCustomfieldIdGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
String *id = id_example; // An identifier

CustomFieldsApi *apiInstance = [[CustomFieldsApi alloc] init];

// Get details about a custom field.
[apiInstance secCustomfieldIdGetWith:id
              completionHandler: ^(CustomField output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.CustomFieldsApi()
var id = id_example; // {{String}} An identifier

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

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new CustomFieldsApi();
            var id = id_example;  // String | An identifier

            try
            {
                // Get details about a custom field.
                CustomField result = apiInstance.secCustomfieldIdGet(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CustomFieldsApi.secCustomfieldIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiCustomFieldsApi();
$id = id_example; // String | An identifier

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CustomFieldsApi->new();
my $id = id_example; # String | An identifier

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CustomFieldsApi()
id = id_example # String | An identifier

try: 
    # Get details about a custom field.
    api_response = api_instance.sec_customfield_id_get(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomFieldsApi->secCustomfieldIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
An identifier
Required

Responses

Status: 200 - Ok


secCustomfieldIdPut

Change a custom field

Change properties of a custom field. Changing the label has no further impliciations, since it is only used for displaying. The name and type on the other hand have consequences: name must be unique and the type determines how the value is stored internally.


/sec/customfield/{id}

Usage and SDK Samples

curl -X PUT\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"/api/v1/sec/customfield/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CustomFieldsApi;

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

public class CustomFieldsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        CustomFieldsApi apiInstance = new CustomFieldsApi();
        String id = id_example; // String | An identifier
        NewCustomField body = ; // NewCustomField | 
        try {
            BasicResult result = apiInstance.secCustomfieldIdPut(id, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomFieldsApi#secCustomfieldIdPut");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CustomFieldsApi;

public class CustomFieldsApiExample {

    public static void main(String[] args) {
        CustomFieldsApi apiInstance = new CustomFieldsApi();
        String id = id_example; // String | An identifier
        NewCustomField body = ; // NewCustomField | 
        try {
            BasicResult result = apiInstance.secCustomfieldIdPut(id, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomFieldsApi#secCustomfieldIdPut");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
String *id = id_example; // An identifier
NewCustomField *body = ; //  (optional)

CustomFieldsApi *apiInstance = [[CustomFieldsApi alloc] init];

// Change a custom field
[apiInstance secCustomfieldIdPutWith:id
    body:body
              completionHandler: ^(BasicResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.CustomFieldsApi()
var id = id_example; // {{String}} An identifier
var opts = { 
  'body':  // {{NewCustomField}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.secCustomfieldIdPut(id, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new CustomFieldsApi();
            var id = id_example;  // String | An identifier
            var body = new NewCustomField(); // NewCustomField |  (optional) 

            try
            {
                // Change a custom field
                BasicResult result = apiInstance.secCustomfieldIdPut(id, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CustomFieldsApi.secCustomfieldIdPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiCustomFieldsApi();
$id = id_example; // String | An identifier
$body = ; // NewCustomField | 

try {
    $result = $api_instance->secCustomfieldIdPut($id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomFieldsApi->secCustomfieldIdPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CustomFieldsApi;

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CustomFieldsApi->new();
my $id = id_example; # String | An identifier
my $body = WWW::SwaggerClient::Object::NewCustomField->new(); # NewCustomField | 

eval { 
    my $result = $api_instance->secCustomfieldIdPut(id => $id, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CustomFieldsApi->secCustomfieldIdPut: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CustomFieldsApi()
id = id_example # String | An identifier
body =  # NewCustomField |  (optional)

try: 
    # Change a custom field
    api_response = api_instance.sec_customfield_id_put(id, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomFieldsApi->secCustomfieldIdPut: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
An identifier
Required
Body parameters
Name Description
body

Responses

Status: 200 - Ok


secCustomfieldPost

Create a new custom field

Creates a new custom field.


/sec/customfield

Usage and SDK Samples

curl -X POST\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"/api/v1/sec/customfield"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CustomFieldsApi;

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

public class CustomFieldsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        CustomFieldsApi apiInstance = new CustomFieldsApi();
        NewCustomField body = ; // NewCustomField | 
        try {
            BasicResult result = apiInstance.secCustomfieldPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomFieldsApi#secCustomfieldPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CustomFieldsApi;

public class CustomFieldsApiExample {

    public static void main(String[] args) {
        CustomFieldsApi apiInstance = new CustomFieldsApi();
        NewCustomField body = ; // NewCustomField | 
        try {
            BasicResult result = apiInstance.secCustomfieldPost(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomFieldsApi#secCustomfieldPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
NewCustomField *body = ; //  (optional)

CustomFieldsApi *apiInstance = [[CustomFieldsApi alloc] init];

// Create a new custom field
[apiInstance secCustomfieldPostWith:body
              completionHandler: ^(BasicResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.CustomFieldsApi()
var opts = { 
  'body':  // {{NewCustomField}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.secCustomfieldPost(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new CustomFieldsApi();
            var body = new NewCustomField(); // NewCustomField |  (optional) 

            try
            {
                // Create a new custom field
                BasicResult result = apiInstance.secCustomfieldPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CustomFieldsApi.secCustomfieldPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiCustomFieldsApi();
$body = ; // NewCustomField | 

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::CustomFieldsApi->new();
my $body = WWW::SwaggerClient::Object::NewCustomField->new(); # NewCustomField | 

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.CustomFieldsApi()
body =  # NewCustomField |  (optional)

try: 
    # Create a new custom field
    api_response = api_instance.sec_customfield_post(body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomFieldsApi->secCustomfieldPost: %s\n" % e)

Parameters

Body parameters
Name Description
body

Responses

Status: 200 - Ok


EMail

secEmailSendNameIdPost

Send an email.

Sends an email as specified in the body of the request. The item's attachment are added to the mail if requested.


/sec/email/send/{name}/{id}

Usage and SDK Samples

curl -X POST\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"/api/v1/sec/email/send/{name}/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.EMailApi;

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

public class EMailApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        EMailApi apiInstance = new EMailApi();
        String name = name_example; // String | An e-mail connection name
        String id = id_example; // String | An identifier
        SimpleMail body = ; // SimpleMail | 
        try {
            BasicResult result = apiInstance.secEmailSendNameIdPost(name, id, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EMailApi#secEmailSendNameIdPost");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.EMailApi;

public class EMailApiExample {

    public static void main(String[] args) {
        EMailApi apiInstance = new EMailApi();
        String name = name_example; // String | An e-mail connection name
        String id = id_example; // String | An identifier
        SimpleMail body = ; // SimpleMail | 
        try {
            BasicResult result = apiInstance.secEmailSendNameIdPost(name, id, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EMailApi#secEmailSendNameIdPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
String *name = name_example; // An e-mail connection name
String *id = id_example; // An identifier
SimpleMail *body = ; //  (optional)

EMailApi *apiInstance = [[EMailApi alloc] init];

// Send an email.
[apiInstance secEmailSendNameIdPostWith:name
    id:id
    body:body
              completionHandler: ^(BasicResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.EMailApi()
var name = name_example; // {{String}} An e-mail connection name
var id = id_example; // {{String}} An identifier
var opts = { 
  'body':  // {{SimpleMail}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.secEmailSendNameIdPost(nameid, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new EMailApi();
            var name = name_example;  // String | An e-mail connection name
            var id = id_example;  // String | An identifier
            var body = new SimpleMail(); // SimpleMail |  (optional) 

            try
            {
                // Send an email.
                BasicResult result = apiInstance.secEmailSendNameIdPost(name, id, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EMailApi.secEmailSendNameIdPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiEMailApi();
$name = name_example; // String | An e-mail connection name
$id = id_example; // String | An identifier
$body = ; // SimpleMail | 

try {
    $result = $api_instance->secEmailSendNameIdPost($name, $id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling EMailApi->secEmailSendNameIdPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::EMailApi;

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::EMailApi->new();
my $name = name_example; # String | An e-mail connection name
my $id = id_example; # String | An identifier
my $body = WWW::SwaggerClient::Object::SimpleMail->new(); # SimpleMail | 

eval { 
    my $result = $api_instance->secEmailSendNameIdPost(name => $name, id => $id, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling EMailApi->secEmailSendNameIdPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.EMailApi()
name = name_example # String | An e-mail connection name
id = id_example # String | An identifier
body =  # SimpleMail |  (optional)

try: 
    # Send an email.
    api_response = api_instance.sec_email_send_name_id_post(name, id, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EMailApi->secEmailSendNameIdPost: %s\n" % e)

Parameters

Path parameters
Name Description
name*
String
An e-mail connection name
Required
id*
String
An identifier
Required
Body parameters
Name Description
body

Responses

Status: 200 - Ok


secEmailSentItemIdGet

Get sent mail related to an item

Return all mails that have been sent related to the item with id `id`.


/sec/email/sent/item/{id}

Usage and SDK Samples

curl -X GET\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
"/api/v1/sec/email/sent/item/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.EMailApi;

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

public class EMailApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        EMailApi apiInstance = new EMailApi();
        String id = id_example; // String | An identifier
        try {
            SentMails result = apiInstance.secEmailSentItemIdGet(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EMailApi#secEmailSentItemIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.EMailApi;

public class EMailApiExample {

    public static void main(String[] args) {
        EMailApi apiInstance = new EMailApi();
        String id = id_example; // String | An identifier
        try {
            SentMails result = apiInstance.secEmailSentItemIdGet(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EMailApi#secEmailSentItemIdGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
String *id = id_example; // An identifier

EMailApi *apiInstance = [[EMailApi alloc] init];

// Get sent mail related to an item
[apiInstance secEmailSentItemIdGetWith:id
              completionHandler: ^(SentMails output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.EMailApi()
var id = id_example; // {{String}} An identifier

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

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new EMailApi();
            var id = id_example;  // String | An identifier

            try
            {
                // Get sent mail related to an item
                SentMails result = apiInstance.secEmailSentItemIdGet(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EMailApi.secEmailSentItemIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiEMailApi();
$id = id_example; // String | An identifier

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::EMailApi->new();
my $id = id_example; # String | An identifier

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.EMailApi()
id = id_example # String | An identifier

try: 
    # Get sent mail related to an item
    api_response = api_instance.sec_email_sent_item_id_get(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EMailApi->secEmailSentItemIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
An identifier
Required

Responses

Status: 200 - Ok


secEmailSentMailMailIdDelete

Delete a sent mail.

Delete a sent mail.


/sec/email/sent/mail/{mailId}

Usage and SDK Samples

curl -X DELETE\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
"/api/v1/sec/email/sent/mail/{mailId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.EMailApi;

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

public class EMailApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        EMailApi apiInstance = new EMailApi();
        String mailId = mailId_example; // String | The id of a sent mail.
        try {
            BasicResult result = apiInstance.secEmailSentMailMailIdDelete(mailId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EMailApi#secEmailSentMailMailIdDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.EMailApi;

public class EMailApiExample {

    public static void main(String[] args) {
        EMailApi apiInstance = new EMailApi();
        String mailId = mailId_example; // String | The id of a sent mail.
        try {
            BasicResult result = apiInstance.secEmailSentMailMailIdDelete(mailId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EMailApi#secEmailSentMailMailIdDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
String *mailId = mailId_example; // The id of a sent mail.

EMailApi *apiInstance = [[EMailApi alloc] init];

// Delete a sent mail.
[apiInstance secEmailSentMailMailIdDeleteWith:mailId
              completionHandler: ^(BasicResult output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.EMailApi()
var mailId = mailId_example; // {{String}} The id of a sent mail.

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

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new EMailApi();
            var mailId = mailId_example;  // String | The id of a sent mail.

            try
            {
                // Delete a sent mail.
                BasicResult result = apiInstance.secEmailSentMailMailIdDelete(mailId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EMailApi.secEmailSentMailMailIdDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiEMailApi();
$mailId = mailId_example; // String | The id of a sent mail.

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::EMailApi->new();
my $mailId = mailId_example; # String | The id of a sent mail.

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.EMailApi()
mailId = mailId_example # String | The id of a sent mail.

try: 
    # Delete a sent mail.
    api_response = api_instance.sec_email_sent_mail_mail_id_delete(mailId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EMailApi->secEmailSentMailMailIdDelete: %s\n" % e)

Parameters

Path parameters
Name Description
mailId*
String
The id of a sent mail.
Required

Responses

Status: 200 - Ok


secEmailSentMailMailIdGet

Get sent single mail related to an item

Return one mail with the given id.


/sec/email/sent/mail/{mailId}

Usage and SDK Samples

curl -X GET\
-H "X-Docspell-Auth: [[apiKey]]"\
-H "Accept: application/json"\
"/api/v1/sec/email/sent/mail/{mailId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.EMailApi;

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

public class EMailApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: authTokenHeader
        ApiKeyAuth authTokenHeader = (ApiKeyAuth) defaultClient.getAuthentication("authTokenHeader");
        authTokenHeader.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //authTokenHeader.setApiKeyPrefix("Token");

        EMailApi apiInstance = new EMailApi();
        String mailId = mailId_example; // String | The id of a sent mail.
        try {
            SentMail result = apiInstance.secEmailSentMailMailIdGet(mailId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EMailApi#secEmailSentMailMailIdGet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.EMailApi;

public class EMailApiExample {

    public static void main(String[] args) {
        EMailApi apiInstance = new EMailApi();
        String mailId = mailId_example; // String | The id of a sent mail.
        try {
            SentMail result = apiInstance.secEmailSentMailMailIdGet(mailId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling EMailApi#secEmailSentMailMailIdGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure API key authorization: (authentication scheme: authTokenHeader)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"X-Docspell-Auth"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"X-Docspell-Auth"];
String *mailId = mailId_example; // The id of a sent mail.

EMailApi *apiInstance = [[EMailApi alloc] init];

// Get sent single mail related to an item
[apiInstance secEmailSentMailMailIdGetWith:mailId
              completionHandler: ^(SentMail output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var Docspell = require('docspell');
var defaultClient = Docspell.ApiClient.instance;

// Configure API key authorization: authTokenHeader
var authTokenHeader = defaultClient.authentications['authTokenHeader'];
authTokenHeader.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//authTokenHeader.apiKeyPrefix['X-Docspell-Auth'] = "Token"

var api = new Docspell.EMailApi()
var mailId = mailId_example; // {{String}} The id of a sent mail.

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

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

            // Configure API key authorization: authTokenHeader
            Configuration.Default.ApiKey.Add("X-Docspell-Auth", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("X-Docspell-Auth", "Bearer");

            var apiInstance = new EMailApi();
            var mailId = mailId_example;  // String | The id of a sent mail.

            try
            {
                // Get sent single mail related to an item
                SentMail result = apiInstance.secEmailSentMailMailIdGet(mailId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EMailApi.secEmailSentMailMailIdGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: authTokenHeader
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Docspell-Auth', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Docspell-Auth', 'Bearer');

$api_instance = new Swagger\Client\ApiEMailApi();
$mailId = mailId_example; // String | The id of a sent mail.

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

# Configure API key authorization: authTokenHeader
$WWW::SwaggerClient::Configuration::api_key->{'X-Docspell-Auth'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'X-Docspell-Auth'} = "Bearer";

my $api_instance = WWW::SwaggerClient::EMailApi->new();
my $mailId = mailId_example; # String | The id of a sent mail.

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

# Configure API key authorization: authTokenHeader
swagger_client.configuration.api_key['X-Docspell-Auth'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['X-Docspell-Auth'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.EMailApi()
mailId = mailId_example # String | The id of a sent mail.

try: 
    # Get sent single mail related to an item
    api_response = api_instance.sec_email_sent_mail_mail_id_get(mailId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EMailApi->secEmailSentMailMailIdGet: %s\n" % e)

Parameters

Path parameters
Name Description
mailId*
String
The id of a sent mail.
Required

Responses

Status: 200 - Ok