CCM REST API

Attachments

createAttachment

createAttachment

Creates a new attachment.


/ccmweb/rest/repos/{repo}/databases/{database}/records/{recordType}/{recordId}/attachmentFields2/{fieldName}

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/records/{recordType}/{recordId}/attachmentFields2/{fieldName}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentsApi;

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

public class AttachmentsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        AttachmentsApi apiInstance = new AttachmentsApi();
        Attachment attachment = ; // Attachment | Attachment to be created
        String database = database_example; // String | Database Name
        String fieldName = fieldName_example; // String | Attachment Field name
        String recordId = recordId_example; // String | Record ID
        String recordType = recordType_example; // String | Record Type
        String repo = repo_example; // String | Schema Repository Name
        Object actionName = ; // Object | Action to be used to modify the Record.
        Object operation = ; // Object | The operation mode. If none is specified then Commit is assumed.
        Object useDbid = ; // Object | A boolean value to access a record using its database ID rather than its record ID
        try {
            Attachment result = apiInstance.createAttachment(attachment, database, fieldName, recordId, recordType, repo, actionName, operation, useDbid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#createAttachment");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentsApi;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        Attachment attachment = ; // Attachment | Attachment to be created
        String database = database_example; // String | Database Name
        String fieldName = fieldName_example; // String | Attachment Field name
        String recordId = recordId_example; // String | Record ID
        String recordType = recordType_example; // String | Record Type
        String repo = repo_example; // String | Schema Repository Name
        Object actionName = ; // Object | Action to be used to modify the Record.
        Object operation = ; // Object | The operation mode. If none is specified then Commit is assumed.
        Object useDbid = ; // Object | A boolean value to access a record using its database ID rather than its record ID
        try {
            Attachment result = apiInstance.createAttachment(attachment, database, fieldName, recordId, recordType, repo, actionName, operation, useDbid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#createAttachment");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

Attachment *attachment = ; // Attachment to be created
String *database = database_example; // Database Name
String *fieldName = fieldName_example; // Attachment Field name
String *recordId = recordId_example; // Record ID
String *recordType = recordType_example; // Record Type
String *repo = repo_example; // Schema Repository Name
Object *actionName = ; // Action to be used to modify the Record. (optional)
Object *operation = ; // The operation mode. If none is specified then Commit is assumed. (optional)
Object *useDbid = ; // A boolean value to access a record using its database ID rather than its record ID (optional)

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

// createAttachment
[apiInstance createAttachmentWith:attachment
    database:database
    fieldName:fieldName
    recordId:recordId
    recordType:recordType
    repo:repo
    actionName:actionName
    operation:operation
    useDbid:useDbid
              completionHandler: ^(Attachment output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.AttachmentsApi()

var attachment = ; // {Attachment} Attachment to be created

var database = database_example; // {String} Database Name

var fieldName = fieldName_example; // {String} Attachment Field name

var recordId = recordId_example; // {String} Record ID

var recordType = recordType_example; // {String} Record Type

var repo = repo_example; // {String} Schema Repository Name

var opts = { 
  'actionName': , // {Object} Action to be used to modify the Record.
  'operation': , // {Object} The operation mode. If none is specified then Commit is assumed.
  'useDbid':  // {Object} A boolean value to access a record using its database ID rather than its record ID
};

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

namespace Example
{
    public class createAttachmentExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new AttachmentsApi();
            var attachment = new Attachment(); // Attachment | Attachment to be created
            var database = database_example;  // String | Database Name
            var fieldName = fieldName_example;  // String | Attachment Field name
            var recordId = recordId_example;  // String | Record ID
            var recordType = recordType_example;  // String | Record Type
            var repo = repo_example;  // String | Schema Repository Name
            var actionName = new Object(); // Object | Action to be used to modify the Record. (optional) 
            var operation = new Object(); // Object | The operation mode. If none is specified then Commit is assumed. (optional) 
            var useDbid = new Object(); // Object | A boolean value to access a record using its database ID rather than its record ID (optional) 

            try
            {
                // createAttachment
                Attachment result = apiInstance.createAttachment(attachment, database, fieldName, recordId, recordType, repo, actionName, operation, useDbid);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentsApi.createAttachment: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\AttachmentsApi();
$attachment = ; // Attachment | Attachment to be created
$database = database_example; // String | Database Name
$fieldName = fieldName_example; // String | Attachment Field name
$recordId = recordId_example; // String | Record ID
$recordType = recordType_example; // String | Record Type
$repo = repo_example; // String | Schema Repository Name
$actionName = ; // Object | Action to be used to modify the Record.
$operation = ; // Object | The operation mode. If none is specified then Commit is assumed.
$useDbid = ; // Object | A boolean value to access a record using its database ID rather than its record ID

try {
    $result = $api_instance->createAttachment($attachment, $database, $fieldName, $recordId, $recordType, $repo, $actionName, $operation, $useDbid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->createAttachment: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentsApi;

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

my $api_instance = WWW::SwaggerClient::AttachmentsApi->new();
my $attachment = WWW::SwaggerClient::Object::Attachment->new(); # Attachment | Attachment to be created
my $database = database_example; # String | Database Name
my $fieldName = fieldName_example; # String | Attachment Field name
my $recordId = recordId_example; # String | Record ID
my $recordType = recordType_example; # String | Record Type
my $repo = repo_example; # String | Schema Repository Name
my $actionName = ; # Object | Action to be used to modify the Record.
my $operation = ; # Object | The operation mode. If none is specified then Commit is assumed.
my $useDbid = ; # Object | A boolean value to access a record using its database ID rather than its record ID

eval { 
    my $result = $api_instance->createAttachment(attachment => $attachment, database => $database, fieldName => $fieldName, recordId => $recordId, recordType => $recordType, repo => $repo, actionName => $actionName, operation => $operation, useDbid => $useDbid);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->createAttachment: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentsApi()
attachment =  # Attachment | Attachment to be created
database = database_example # String | Database Name
fieldName = fieldName_example # String | Attachment Field name
recordId = recordId_example # String | Record ID
recordType = recordType_example # String | Record Type
repo = repo_example # String | Schema Repository Name
actionName =  # Object | Action to be used to modify the Record. (optional)
operation =  # Object | The operation mode. If none is specified then Commit is assumed. (optional)
useDbid =  # Object | A boolean value to access a record using its database ID rather than its record ID (optional)

try: 
    # createAttachment
    api_response = api_instance.create_attachment(attachment, database, fieldName, recordId, recordType, repo, actionName=actionName, operation=operation, useDbid=useDbid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->createAttachment: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
Database Name
Required
fieldName*
String
Attachment Field name
Required
recordId*
String
Record ID
Required
recordType*
String
Record Type
Required
repo*
String
Schema Repository Name
Required
Body parameters
Name Description
attachment *
Form parameters
Name Description
actionName
Object
Action to be used to modify the Record.
operation
Object
The operation mode. If none is specified then Commit is assumed.
useDbid
Object
A boolean value to access a record using its database ID rather than its record ID

Responses

Status: 200 - OK

Status: 201 - Attachment successfully created.

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


deleteAttachment

deleteAttachment

Delete an Attachment


/ccmweb/rest/repos/{repo}/databases/{database}/records/{recordType}/{recordId}/attachmentFields2/{fieldName}/{fileName}

Usage and SDK Samples

curl -X DELETE -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/records/{recordType}/{recordId}/attachmentFields2/{fieldName}/{fileName}?actionName=&operation=&useDbid="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentsApi;

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

public class AttachmentsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        AttachmentsApi apiInstance = new AttachmentsApi();
        String database = database_example; // String | Database Name
        String fieldName = fieldName_example; // String | Attachment Field name
        String fileName = fileName_example; // String | Name of the Attachment
        String recordId = recordId_example; // String | Record ID
        String recordType = recordType_example; // String | Record Type
        String repo = repo_example; // String | Schema Repository Name
        String actionName = actionName_example; // String | Action to be used to modify the Record.
        String operation = operation_example; // String | The operation mode. If none is specified then Commit is assumed.
        String useDbid = useDbid_example; // String | A boolean value to access a record using its database ID rather than its record ID
        try {
            apiInstance.deleteAttachment(database, fieldName, fileName, recordId, recordType, repo, actionName, operation, useDbid);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#deleteAttachment");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentsApi;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        String database = database_example; // String | Database Name
        String fieldName = fieldName_example; // String | Attachment Field name
        String fileName = fileName_example; // String | Name of the Attachment
        String recordId = recordId_example; // String | Record ID
        String recordType = recordType_example; // String | Record Type
        String repo = repo_example; // String | Schema Repository Name
        String actionName = actionName_example; // String | Action to be used to modify the Record.
        String operation = operation_example; // String | The operation mode. If none is specified then Commit is assumed.
        String useDbid = useDbid_example; // String | A boolean value to access a record using its database ID rather than its record ID
        try {
            apiInstance.deleteAttachment(database, fieldName, fileName, recordId, recordType, repo, actionName, operation, useDbid);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#deleteAttachment");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *database = database_example; // Database Name
String *fieldName = fieldName_example; // Attachment Field name
String *fileName = fileName_example; // Name of the Attachment
String *recordId = recordId_example; // Record ID
String *recordType = recordType_example; // Record Type
String *repo = repo_example; // Schema Repository Name
String *actionName = actionName_example; // Action to be used to modify the Record. (optional)
String *operation = operation_example; // The operation mode. If none is specified then Commit is assumed. (optional) (default to Commit)
String *useDbid = useDbid_example; // A boolean value to access a record using its database ID rather than its record ID (optional)

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

// deleteAttachment
[apiInstance deleteAttachmentWith:database
    fieldName:fieldName
    fileName:fileName
    recordId:recordId
    recordType:recordType
    repo:repo
    actionName:actionName
    operation:operation
    useDbid:useDbid
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.AttachmentsApi()

var database = database_example; // {String} Database Name

var fieldName = fieldName_example; // {String} Attachment Field name

var fileName = fileName_example; // {String} Name of the Attachment

var recordId = recordId_example; // {String} Record ID

var recordType = recordType_example; // {String} Record Type

var repo = repo_example; // {String} Schema Repository Name

var opts = { 
  'actionName': actionName_example, // {String} Action to be used to modify the Record.
  'operation': operation_example, // {String} The operation mode. If none is specified then Commit is assumed.
  'useDbid': useDbid_example // {String} A boolean value to access a record using its database ID rather than its record ID
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteAttachment(database, fieldName, fileName, recordId, recordType, repo, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteAttachmentExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new AttachmentsApi();
            var database = database_example;  // String | Database Name
            var fieldName = fieldName_example;  // String | Attachment Field name
            var fileName = fileName_example;  // String | Name of the Attachment
            var recordId = recordId_example;  // String | Record ID
            var recordType = recordType_example;  // String | Record Type
            var repo = repo_example;  // String | Schema Repository Name
            var actionName = actionName_example;  // String | Action to be used to modify the Record. (optional) 
            var operation = operation_example;  // String | The operation mode. If none is specified then Commit is assumed. (optional)  (default to Commit)
            var useDbid = useDbid_example;  // String | A boolean value to access a record using its database ID rather than its record ID (optional) 

            try
            {
                // deleteAttachment
                apiInstance.deleteAttachment(database, fieldName, fileName, recordId, recordType, repo, actionName, operation, useDbid);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentsApi.deleteAttachment: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\AttachmentsApi();
$database = database_example; // String | Database Name
$fieldName = fieldName_example; // String | Attachment Field name
$fileName = fileName_example; // String | Name of the Attachment
$recordId = recordId_example; // String | Record ID
$recordType = recordType_example; // String | Record Type
$repo = repo_example; // String | Schema Repository Name
$actionName = actionName_example; // String | Action to be used to modify the Record.
$operation = operation_example; // String | The operation mode. If none is specified then Commit is assumed.
$useDbid = useDbid_example; // String | A boolean value to access a record using its database ID rather than its record ID

try {
    $api_instance->deleteAttachment($database, $fieldName, $fileName, $recordId, $recordType, $repo, $actionName, $operation, $useDbid);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->deleteAttachment: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentsApi;

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

my $api_instance = WWW::SwaggerClient::AttachmentsApi->new();
my $database = database_example; # String | Database Name
my $fieldName = fieldName_example; # String | Attachment Field name
my $fileName = fileName_example; # String | Name of the Attachment
my $recordId = recordId_example; # String | Record ID
my $recordType = recordType_example; # String | Record Type
my $repo = repo_example; # String | Schema Repository Name
my $actionName = actionName_example; # String | Action to be used to modify the Record.
my $operation = operation_example; # String | The operation mode. If none is specified then Commit is assumed.
my $useDbid = useDbid_example; # String | A boolean value to access a record using its database ID rather than its record ID

eval { 
    $api_instance->deleteAttachment(database => $database, fieldName => $fieldName, fileName => $fileName, recordId => $recordId, recordType => $recordType, repo => $repo, actionName => $actionName, operation => $operation, useDbid => $useDbid);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->deleteAttachment: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentsApi()
database = database_example # String | Database Name
fieldName = fieldName_example # String | Attachment Field name
fileName = fileName_example # String | Name of the Attachment
recordId = recordId_example # String | Record ID
recordType = recordType_example # String | Record Type
repo = repo_example # String | Schema Repository Name
actionName = actionName_example # String | Action to be used to modify the Record. (optional)
operation = operation_example # String | The operation mode. If none is specified then Commit is assumed. (optional) (default to Commit)
useDbid = useDbid_example # String | A boolean value to access a record using its database ID rather than its record ID (optional)

try: 
    # deleteAttachment
    api_instance.delete_attachment(database, fieldName, fileName, recordId, recordType, repo, actionName=actionName, operation=operation, useDbid=useDbid)
except ApiException as e:
    print("Exception when calling AttachmentsApi->deleteAttachment: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
Database Name
Required
fieldName*
String
Attachment Field name
Required
fileName*
String
Name of the Attachment
Required
recordId*
String
Record ID
Required
recordType*
String
Record Type
Required
repo*
String
Schema Repository Name
Required
Query parameters
Name Description
actionName
String
Action to be used to modify the Record.
operation
String
The operation mode. If none is specified then Commit is assumed.
useDbid
String
A boolean value to access a record using its database ID rather than its record ID

Responses

Status: 200 - OK

Status: 204 - Attachment deleted.

Status: 401 - Unauthorized

Status: 403 - Forbidden


deleteAttachment1

Deletes an attachment from a record

Deletes a specific attachment associated with a specific record


/ccmweb/rest/repos/{repo}/databases/{database}/records/{recordType}/{recordId}/attachmentFields/{fieldName}/{fileName}

Usage and SDK Samples

curl -X DELETE -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/records/{recordType}/{recordId}/attachmentFields/{fieldName}/{fileName}?actionName=&useDbid="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentsApi;

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

public class AttachmentsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        AttachmentsApi apiInstance = new AttachmentsApi();
        String actionName = actionName_example; // String | The name of an action to modify the record containing the attachment to delete
        String database = database_example; // String | The name of a database (within the repository) to delete the attachment from
        String fieldName = fieldName_example; // String | The name of the field containing the attachment to delete
        String fileName = fileName_example; // String | The name of the attachment to delete
        String recordId = recordId_example; // String | The ID of the record that contains the attachment to delete
        String recordType = recordType_example; // String | The type of the record which contains the attachment to delete
        String repo = repo_example; // String | The name of a CCM repository containing the database to delete the attachment from
        Boolean useDbid = true; // Boolean | A boolean value to access a record using its database ID rather than its record ID
        try {
            apiInstance.deleteAttachment1(actionName, database, fieldName, fileName, recordId, recordType, repo, useDbid);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#deleteAttachment1");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentsApi;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        String actionName = actionName_example; // String | The name of an action to modify the record containing the attachment to delete
        String database = database_example; // String | The name of a database (within the repository) to delete the attachment from
        String fieldName = fieldName_example; // String | The name of the field containing the attachment to delete
        String fileName = fileName_example; // String | The name of the attachment to delete
        String recordId = recordId_example; // String | The ID of the record that contains the attachment to delete
        String recordType = recordType_example; // String | The type of the record which contains the attachment to delete
        String repo = repo_example; // String | The name of a CCM repository containing the database to delete the attachment from
        Boolean useDbid = true; // Boolean | A boolean value to access a record using its database ID rather than its record ID
        try {
            apiInstance.deleteAttachment1(actionName, database, fieldName, fileName, recordId, recordType, repo, useDbid);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#deleteAttachment1");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *actionName = actionName_example; // The name of an action to modify the record containing the attachment to delete
String *database = database_example; // The name of a database (within the repository) to delete the attachment from
String *fieldName = fieldName_example; // The name of the field containing the attachment to delete
String *fileName = fileName_example; // The name of the attachment to delete
String *recordId = recordId_example; // The ID of the record that contains the attachment to delete
String *recordType = recordType_example; // The type of the record which contains the attachment to delete
String *repo = repo_example; // The name of a CCM repository containing the database to delete the attachment from
Boolean *useDbid = true; // A boolean value to access a record using its database ID rather than its record ID (optional) (default to false)

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

// Deletes an attachment from a record
[apiInstance deleteAttachment1With:actionName
    database:database
    fieldName:fieldName
    fileName:fileName
    recordId:recordId
    recordType:recordType
    repo:repo
    useDbid:useDbid
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.AttachmentsApi()

var actionName = actionName_example; // {String} The name of an action to modify the record containing the attachment to delete

var database = database_example; // {String} The name of a database (within the repository) to delete the attachment from

var fieldName = fieldName_example; // {String} The name of the field containing the attachment to delete

var fileName = fileName_example; // {String} The name of the attachment to delete

var recordId = recordId_example; // {String} The ID of the record that contains the attachment to delete

var recordType = recordType_example; // {String} The type of the record which contains the attachment to delete

var repo = repo_example; // {String} The name of a CCM repository containing the database to delete the attachment from

var opts = { 
  'useDbid': true // {Boolean} A boolean value to access a record using its database ID rather than its record ID
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteAttachment1(actionName, database, fieldName, fileName, recordId, recordType, repo, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteAttachment1Example
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new AttachmentsApi();
            var actionName = actionName_example;  // String | The name of an action to modify the record containing the attachment to delete
            var database = database_example;  // String | The name of a database (within the repository) to delete the attachment from
            var fieldName = fieldName_example;  // String | The name of the field containing the attachment to delete
            var fileName = fileName_example;  // String | The name of the attachment to delete
            var recordId = recordId_example;  // String | The ID of the record that contains the attachment to delete
            var recordType = recordType_example;  // String | The type of the record which contains the attachment to delete
            var repo = repo_example;  // String | The name of a CCM repository containing the database to delete the attachment from
            var useDbid = true;  // Boolean | A boolean value to access a record using its database ID rather than its record ID (optional)  (default to false)

            try
            {
                // Deletes an attachment from a record
                apiInstance.deleteAttachment1(actionName, database, fieldName, fileName, recordId, recordType, repo, useDbid);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentsApi.deleteAttachment1: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\AttachmentsApi();
$actionName = actionName_example; // String | The name of an action to modify the record containing the attachment to delete
$database = database_example; // String | The name of a database (within the repository) to delete the attachment from
$fieldName = fieldName_example; // String | The name of the field containing the attachment to delete
$fileName = fileName_example; // String | The name of the attachment to delete
$recordId = recordId_example; // String | The ID of the record that contains the attachment to delete
$recordType = recordType_example; // String | The type of the record which contains the attachment to delete
$repo = repo_example; // String | The name of a CCM repository containing the database to delete the attachment from
$useDbid = true; // Boolean | A boolean value to access a record using its database ID rather than its record ID

try {
    $api_instance->deleteAttachment1($actionName, $database, $fieldName, $fileName, $recordId, $recordType, $repo, $useDbid);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->deleteAttachment1: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentsApi;

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

my $api_instance = WWW::SwaggerClient::AttachmentsApi->new();
my $actionName = actionName_example; # String | The name of an action to modify the record containing the attachment to delete
my $database = database_example; # String | The name of a database (within the repository) to delete the attachment from
my $fieldName = fieldName_example; # String | The name of the field containing the attachment to delete
my $fileName = fileName_example; # String | The name of the attachment to delete
my $recordId = recordId_example; # String | The ID of the record that contains the attachment to delete
my $recordType = recordType_example; # String | The type of the record which contains the attachment to delete
my $repo = repo_example; # String | The name of a CCM repository containing the database to delete the attachment from
my $useDbid = true; # Boolean | A boolean value to access a record using its database ID rather than its record ID

eval { 
    $api_instance->deleteAttachment1(actionName => $actionName, database => $database, fieldName => $fieldName, fileName => $fileName, recordId => $recordId, recordType => $recordType, repo => $repo, useDbid => $useDbid);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->deleteAttachment1: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentsApi()
actionName = actionName_example # String | The name of an action to modify the record containing the attachment to delete
database = database_example # String | The name of a database (within the repository) to delete the attachment from
fieldName = fieldName_example # String | The name of the field containing the attachment to delete
fileName = fileName_example # String | The name of the attachment to delete
recordId = recordId_example # String | The ID of the record that contains the attachment to delete
recordType = recordType_example # String | The type of the record which contains the attachment to delete
repo = repo_example # String | The name of a CCM repository containing the database to delete the attachment from
useDbid = true # Boolean | A boolean value to access a record using its database ID rather than its record ID (optional) (default to false)

try: 
    # Deletes an attachment from a record
    api_instance.delete_attachment1(actionName, database, fieldName, fileName, recordId, recordType, repo, useDbid=useDbid)
except ApiException as e:
    print("Exception when calling AttachmentsApi->deleteAttachment1: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
The name of a database (within the repository) to delete the attachment from
Required
fieldName*
String
The name of the field containing the attachment to delete
Required
fileName*
String
The name of the attachment to delete
Required
recordId*
String
The ID of the record that contains the attachment to delete
Required
recordType*
String
The type of the record which contains the attachment to delete
Required
repo*
String
The name of a CCM repository containing the database to delete the attachment from
Required
Query parameters
Name Description
actionName*
String
The name of an action to modify the record containing the attachment to delete
Required
useDbid
Boolean
A boolean value to access a record using its database ID rather than its record ID

Responses

Status: 200 - OK

Status: 204 - Attachment deleted.

Status: 401 - Unauthorized

Status: 403 - Forbidden


downloadFile

downloadFile

Download a file.


/ccmweb/rest/repos/{repo}/databases/{database}/records/{recordType}/{recordId}/attachmentFields2/{fieldName}/{fileName}/file

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/records/{recordType}/{recordId}/attachmentFields2/{fieldName}/{fileName}/file?useDbid="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentsApi;

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

public class AttachmentsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        AttachmentsApi apiInstance = new AttachmentsApi();
        String database = database_example; // String | Database Name
        String fieldName = fieldName_example; // String | Attachment Field name
        String fileName = fileName_example; // String | Name of the file to be downloaded
        String recordId = recordId_example; // String | Record ID
        String recordType = recordType_example; // String | Record Type
        String repo = repo_example; // String | Schema Repository Name
        String useDbid = useDbid_example; // String | A boolean value to access a record using its database ID rather than its record ID
        try {
            Resource result = apiInstance.downloadFile(database, fieldName, fileName, recordId, recordType, repo, useDbid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#downloadFile");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentsApi;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        String database = database_example; // String | Database Name
        String fieldName = fieldName_example; // String | Attachment Field name
        String fileName = fileName_example; // String | Name of the file to be downloaded
        String recordId = recordId_example; // String | Record ID
        String recordType = recordType_example; // String | Record Type
        String repo = repo_example; // String | Schema Repository Name
        String useDbid = useDbid_example; // String | A boolean value to access a record using its database ID rather than its record ID
        try {
            Resource result = apiInstance.downloadFile(database, fieldName, fileName, recordId, recordType, repo, useDbid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#downloadFile");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *database = database_example; // Database Name
String *fieldName = fieldName_example; // Attachment Field name
String *fileName = fileName_example; // Name of the file to be downloaded
String *recordId = recordId_example; // Record ID
String *recordType = recordType_example; // Record Type
String *repo = repo_example; // Schema Repository Name
String *useDbid = useDbid_example; // A boolean value to access a record using its database ID rather than its record ID (optional)

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

// downloadFile
[apiInstance downloadFileWith:database
    fieldName:fieldName
    fileName:fileName
    recordId:recordId
    recordType:recordType
    repo:repo
    useDbid:useDbid
              completionHandler: ^(Resource output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.AttachmentsApi()

var database = database_example; // {String} Database Name

var fieldName = fieldName_example; // {String} Attachment Field name

var fileName = fileName_example; // {String} Name of the file to be downloaded

var recordId = recordId_example; // {String} Record ID

var recordType = recordType_example; // {String} Record Type

var repo = repo_example; // {String} Schema Repository Name

var opts = { 
  'useDbid': useDbid_example // {String} A boolean value to access a record using its database ID rather than its record ID
};

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

namespace Example
{
    public class downloadFileExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new AttachmentsApi();
            var database = database_example;  // String | Database Name
            var fieldName = fieldName_example;  // String | Attachment Field name
            var fileName = fileName_example;  // String | Name of the file to be downloaded
            var recordId = recordId_example;  // String | Record ID
            var recordType = recordType_example;  // String | Record Type
            var repo = repo_example;  // String | Schema Repository Name
            var useDbid = useDbid_example;  // String | A boolean value to access a record using its database ID rather than its record ID (optional) 

            try
            {
                // downloadFile
                Resource result = apiInstance.downloadFile(database, fieldName, fileName, recordId, recordType, repo, useDbid);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentsApi.downloadFile: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\AttachmentsApi();
$database = database_example; // String | Database Name
$fieldName = fieldName_example; // String | Attachment Field name
$fileName = fileName_example; // String | Name of the file to be downloaded
$recordId = recordId_example; // String | Record ID
$recordType = recordType_example; // String | Record Type
$repo = repo_example; // String | Schema Repository Name
$useDbid = useDbid_example; // String | A boolean value to access a record using its database ID rather than its record ID

try {
    $result = $api_instance->downloadFile($database, $fieldName, $fileName, $recordId, $recordType, $repo, $useDbid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->downloadFile: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentsApi;

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

my $api_instance = WWW::SwaggerClient::AttachmentsApi->new();
my $database = database_example; # String | Database Name
my $fieldName = fieldName_example; # String | Attachment Field name
my $fileName = fileName_example; # String | Name of the file to be downloaded
my $recordId = recordId_example; # String | Record ID
my $recordType = recordType_example; # String | Record Type
my $repo = repo_example; # String | Schema Repository Name
my $useDbid = useDbid_example; # String | A boolean value to access a record using its database ID rather than its record ID

eval { 
    my $result = $api_instance->downloadFile(database => $database, fieldName => $fieldName, fileName => $fileName, recordId => $recordId, recordType => $recordType, repo => $repo, useDbid => $useDbid);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->downloadFile: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentsApi()
database = database_example # String | Database Name
fieldName = fieldName_example # String | Attachment Field name
fileName = fileName_example # String | Name of the file to be downloaded
recordId = recordId_example # String | Record ID
recordType = recordType_example # String | Record Type
repo = repo_example # String | Schema Repository Name
useDbid = useDbid_example # String | A boolean value to access a record using its database ID rather than its record ID (optional)

try: 
    # downloadFile
    api_response = api_instance.download_file(database, fieldName, fileName, recordId, recordType, repo, useDbid=useDbid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->downloadFile: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
Database Name
Required
fieldName*
String
Attachment Field name
Required
fileName*
String
Name of the file to be downloaded
Required
recordId*
String
Record ID
Required
recordType*
String
Record Type
Required
repo*
String
Schema Repository Name
Required
Query parameters
Name Description
useDbid
String
A boolean value to access a record using its database ID rather than its record ID

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - File not found


downloadFile1

Downloads an attachment from a record

Downloads an attachment from a record


/ccmweb/rest/repos/{repo}/databases/{database}/records/{recordType}/{recordId}/attachmentFields/{fieldName}/{fileName}/file

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/records/{recordType}/{recordId}/attachmentFields/{fieldName}/{fileName}/file?useDbid="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentsApi;

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

public class AttachmentsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        AttachmentsApi apiInstance = new AttachmentsApi();
        String database = database_example; // String | The name of a database (within the repository) to download the attachment from
        String fieldName = fieldName_example; // String | The name of the field containing the attachment to download
        String fileName = fileName_example; // String | The name of the file to be downloaded
        String recordId = recordId_example; // String | The ID of the record that contains the attachment to download
        String recordType = recordType_example; // String | The type of the record which contains the attachment to download
        String repo = repo_example; // String | The name of a CCM repository containing the database to download the attachment from
        Boolean useDbid = true; // Boolean | A boolean value to access a record using its database ID rather than its record ID
        try {
            Resource result = apiInstance.downloadFile1(database, fieldName, fileName, recordId, recordType, repo, useDbid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#downloadFile1");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentsApi;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        String database = database_example; // String | The name of a database (within the repository) to download the attachment from
        String fieldName = fieldName_example; // String | The name of the field containing the attachment to download
        String fileName = fileName_example; // String | The name of the file to be downloaded
        String recordId = recordId_example; // String | The ID of the record that contains the attachment to download
        String recordType = recordType_example; // String | The type of the record which contains the attachment to download
        String repo = repo_example; // String | The name of a CCM repository containing the database to download the attachment from
        Boolean useDbid = true; // Boolean | A boolean value to access a record using its database ID rather than its record ID
        try {
            Resource result = apiInstance.downloadFile1(database, fieldName, fileName, recordId, recordType, repo, useDbid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#downloadFile1");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *database = database_example; // The name of a database (within the repository) to download the attachment from
String *fieldName = fieldName_example; // The name of the field containing the attachment to download
String *fileName = fileName_example; // The name of the file to be downloaded
String *recordId = recordId_example; // The ID of the record that contains the attachment to download
String *recordType = recordType_example; // The type of the record which contains the attachment to download
String *repo = repo_example; // The name of a CCM repository containing the database to download the attachment from
Boolean *useDbid = true; // A boolean value to access a record using its database ID rather than its record ID (optional) (default to false)

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

// Downloads an attachment from a record
[apiInstance downloadFile1With:database
    fieldName:fieldName
    fileName:fileName
    recordId:recordId
    recordType:recordType
    repo:repo
    useDbid:useDbid
              completionHandler: ^(Resource output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.AttachmentsApi()

var database = database_example; // {String} The name of a database (within the repository) to download the attachment from

var fieldName = fieldName_example; // {String} The name of the field containing the attachment to download

var fileName = fileName_example; // {String} The name of the file to be downloaded

var recordId = recordId_example; // {String} The ID of the record that contains the attachment to download

var recordType = recordType_example; // {String} The type of the record which contains the attachment to download

var repo = repo_example; // {String} The name of a CCM repository containing the database to download the attachment from

var opts = { 
  'useDbid': true // {Boolean} A boolean value to access a record using its database ID rather than its record ID
};

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

namespace Example
{
    public class downloadFile1Example
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new AttachmentsApi();
            var database = database_example;  // String | The name of a database (within the repository) to download the attachment from
            var fieldName = fieldName_example;  // String | The name of the field containing the attachment to download
            var fileName = fileName_example;  // String | The name of the file to be downloaded
            var recordId = recordId_example;  // String | The ID of the record that contains the attachment to download
            var recordType = recordType_example;  // String | The type of the record which contains the attachment to download
            var repo = repo_example;  // String | The name of a CCM repository containing the database to download the attachment from
            var useDbid = true;  // Boolean | A boolean value to access a record using its database ID rather than its record ID (optional)  (default to false)

            try
            {
                // Downloads an attachment from a record
                Resource result = apiInstance.downloadFile1(database, fieldName, fileName, recordId, recordType, repo, useDbid);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentsApi.downloadFile1: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\AttachmentsApi();
$database = database_example; // String | The name of a database (within the repository) to download the attachment from
$fieldName = fieldName_example; // String | The name of the field containing the attachment to download
$fileName = fileName_example; // String | The name of the file to be downloaded
$recordId = recordId_example; // String | The ID of the record that contains the attachment to download
$recordType = recordType_example; // String | The type of the record which contains the attachment to download
$repo = repo_example; // String | The name of a CCM repository containing the database to download the attachment from
$useDbid = true; // Boolean | A boolean value to access a record using its database ID rather than its record ID

try {
    $result = $api_instance->downloadFile1($database, $fieldName, $fileName, $recordId, $recordType, $repo, $useDbid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->downloadFile1: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentsApi;

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

my $api_instance = WWW::SwaggerClient::AttachmentsApi->new();
my $database = database_example; # String | The name of a database (within the repository) to download the attachment from
my $fieldName = fieldName_example; # String | The name of the field containing the attachment to download
my $fileName = fileName_example; # String | The name of the file to be downloaded
my $recordId = recordId_example; # String | The ID of the record that contains the attachment to download
my $recordType = recordType_example; # String | The type of the record which contains the attachment to download
my $repo = repo_example; # String | The name of a CCM repository containing the database to download the attachment from
my $useDbid = true; # Boolean | A boolean value to access a record using its database ID rather than its record ID

eval { 
    my $result = $api_instance->downloadFile1(database => $database, fieldName => $fieldName, fileName => $fileName, recordId => $recordId, recordType => $recordType, repo => $repo, useDbid => $useDbid);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->downloadFile1: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentsApi()
database = database_example # String | The name of a database (within the repository) to download the attachment from
fieldName = fieldName_example # String | The name of the field containing the attachment to download
fileName = fileName_example # String | The name of the file to be downloaded
recordId = recordId_example # String | The ID of the record that contains the attachment to download
recordType = recordType_example # String | The type of the record which contains the attachment to download
repo = repo_example # String | The name of a CCM repository containing the database to download the attachment from
useDbid = true # Boolean | A boolean value to access a record using its database ID rather than its record ID (optional) (default to false)

try: 
    # Downloads an attachment from a record
    api_response = api_instance.download_file1(database, fieldName, fileName, recordId, recordType, repo, useDbid=useDbid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->downloadFile1: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
The name of a database (within the repository) to download the attachment from
Required
fieldName*
String
The name of the field containing the attachment to download
Required
fileName*
String
The name of the file to be downloaded
Required
recordId*
String
The ID of the record that contains the attachment to download
Required
recordType*
String
The type of the record which contains the attachment to download
Required
repo*
String
The name of a CCM repository containing the database to download the attachment from
Required
Query parameters
Name Description
useDbid
Boolean
A boolean value to access a record using its database ID rather than its record ID

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - File not found


getAttachment

getAttachment

Get an Attachment details.


/ccmweb/rest/repos/{repo}/databases/{database}/records/{recordType}/{recordId}/attachmentFields2/{fieldName}/{fileName}

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/records/{recordType}/{recordId}/attachmentFields2/{fieldName}/{fileName}?useDbid="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentsApi;

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

public class AttachmentsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        AttachmentsApi apiInstance = new AttachmentsApi();
        String database = database_example; // String | Database Name
        String fieldName = fieldName_example; // String | Attachment Field name
        String fileName = fileName_example; // String | Name of the Attachment
        String recordId = recordId_example; // String | Record ID
        String recordType = recordType_example; // String | Record Type
        String repo = repo_example; // String | Schema Repository Name
        String useDbid = useDbid_example; // String | A boolean value to access a record using its database ID rather than its record ID
        try {
            Attachment result = apiInstance.getAttachment(database, fieldName, fileName, recordId, recordType, repo, useDbid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#getAttachment");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentsApi;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        String database = database_example; // String | Database Name
        String fieldName = fieldName_example; // String | Attachment Field name
        String fileName = fileName_example; // String | Name of the Attachment
        String recordId = recordId_example; // String | Record ID
        String recordType = recordType_example; // String | Record Type
        String repo = repo_example; // String | Schema Repository Name
        String useDbid = useDbid_example; // String | A boolean value to access a record using its database ID rather than its record ID
        try {
            Attachment result = apiInstance.getAttachment(database, fieldName, fileName, recordId, recordType, repo, useDbid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#getAttachment");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *database = database_example; // Database Name
String *fieldName = fieldName_example; // Attachment Field name
String *fileName = fileName_example; // Name of the Attachment
String *recordId = recordId_example; // Record ID
String *recordType = recordType_example; // Record Type
String *repo = repo_example; // Schema Repository Name
String *useDbid = useDbid_example; // A boolean value to access a record using its database ID rather than its record ID (optional)

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

// getAttachment
[apiInstance getAttachmentWith:database
    fieldName:fieldName
    fileName:fileName
    recordId:recordId
    recordType:recordType
    repo:repo
    useDbid:useDbid
              completionHandler: ^(Attachment output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.AttachmentsApi()

var database = database_example; // {String} Database Name

var fieldName = fieldName_example; // {String} Attachment Field name

var fileName = fileName_example; // {String} Name of the Attachment

var recordId = recordId_example; // {String} Record ID

var recordType = recordType_example; // {String} Record Type

var repo = repo_example; // {String} Schema Repository Name

var opts = { 
  'useDbid': useDbid_example // {String} A boolean value to access a record using its database ID rather than its record ID
};

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

namespace Example
{
    public class getAttachmentExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new AttachmentsApi();
            var database = database_example;  // String | Database Name
            var fieldName = fieldName_example;  // String | Attachment Field name
            var fileName = fileName_example;  // String | Name of the Attachment
            var recordId = recordId_example;  // String | Record ID
            var recordType = recordType_example;  // String | Record Type
            var repo = repo_example;  // String | Schema Repository Name
            var useDbid = useDbid_example;  // String | A boolean value to access a record using its database ID rather than its record ID (optional) 

            try
            {
                // getAttachment
                Attachment result = apiInstance.getAttachment(database, fieldName, fileName, recordId, recordType, repo, useDbid);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentsApi.getAttachment: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\AttachmentsApi();
$database = database_example; // String | Database Name
$fieldName = fieldName_example; // String | Attachment Field name
$fileName = fileName_example; // String | Name of the Attachment
$recordId = recordId_example; // String | Record ID
$recordType = recordType_example; // String | Record Type
$repo = repo_example; // String | Schema Repository Name
$useDbid = useDbid_example; // String | A boolean value to access a record using its database ID rather than its record ID

try {
    $result = $api_instance->getAttachment($database, $fieldName, $fileName, $recordId, $recordType, $repo, $useDbid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->getAttachment: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentsApi;

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

my $api_instance = WWW::SwaggerClient::AttachmentsApi->new();
my $database = database_example; # String | Database Name
my $fieldName = fieldName_example; # String | Attachment Field name
my $fileName = fileName_example; # String | Name of the Attachment
my $recordId = recordId_example; # String | Record ID
my $recordType = recordType_example; # String | Record Type
my $repo = repo_example; # String | Schema Repository Name
my $useDbid = useDbid_example; # String | A boolean value to access a record using its database ID rather than its record ID

eval { 
    my $result = $api_instance->getAttachment(database => $database, fieldName => $fieldName, fileName => $fileName, recordId => $recordId, recordType => $recordType, repo => $repo, useDbid => $useDbid);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->getAttachment: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentsApi()
database = database_example # String | Database Name
fieldName = fieldName_example # String | Attachment Field name
fileName = fileName_example # String | Name of the Attachment
recordId = recordId_example # String | Record ID
recordType = recordType_example # String | Record Type
repo = repo_example # String | Schema Repository Name
useDbid = useDbid_example # String | A boolean value to access a record using its database ID rather than its record ID (optional)

try: 
    # getAttachment
    api_response = api_instance.get_attachment(database, fieldName, fileName, recordId, recordType, repo, useDbid=useDbid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->getAttachment: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
Database Name
Required
fieldName*
String
Attachment Field name
Required
fileName*
String
Name of the Attachment
Required
recordId*
String
Record ID
Required
recordType*
String
Record Type
Required
repo*
String
Schema Repository Name
Required
Query parameters
Name Description
useDbid
String
A boolean value to access a record using its database ID rather than its record ID

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - File not found


getAttachment1

Retrieves an attachment's details

Retrieves an attachment's details


/ccmweb/rest/repos/{repo}/databases/{database}/records/{recordType}/{recordId}/attachmentFields/{fieldName}/{fileName}

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/records/{recordType}/{recordId}/attachmentFields/{fieldName}/{fileName}?useDbid="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentsApi;

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

public class AttachmentsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        AttachmentsApi apiInstance = new AttachmentsApi();
        String database = database_example; // String | The name of a database (within the repository) to retrieve the attachment from
        String fieldName = fieldName_example; // String | The name of the field containing the attachment to retrieve
        String fileName = fileName_example; // String | The name of the file to be retrieved
        String recordId = recordId_example; // String | The ID of the record that contains the attachment to retrieve
        String recordType = recordType_example; // String | The type of the record which contains the attachment to retrieve
        String repo = repo_example; // String | The name of a CCM repository containing the database to retrieve the attachment from
        Boolean useDbid = true; // Boolean | A boolean value to access a record using its database ID rather than its record ID
        try {
            Attachment result = apiInstance.getAttachment1(database, fieldName, fileName, recordId, recordType, repo, useDbid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#getAttachment1");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentsApi;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        String database = database_example; // String | The name of a database (within the repository) to retrieve the attachment from
        String fieldName = fieldName_example; // String | The name of the field containing the attachment to retrieve
        String fileName = fileName_example; // String | The name of the file to be retrieved
        String recordId = recordId_example; // String | The ID of the record that contains the attachment to retrieve
        String recordType = recordType_example; // String | The type of the record which contains the attachment to retrieve
        String repo = repo_example; // String | The name of a CCM repository containing the database to retrieve the attachment from
        Boolean useDbid = true; // Boolean | A boolean value to access a record using its database ID rather than its record ID
        try {
            Attachment result = apiInstance.getAttachment1(database, fieldName, fileName, recordId, recordType, repo, useDbid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#getAttachment1");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *database = database_example; // The name of a database (within the repository) to retrieve the attachment from
String *fieldName = fieldName_example; // The name of the field containing the attachment to retrieve
String *fileName = fileName_example; // The name of the file to be retrieved
String *recordId = recordId_example; // The ID of the record that contains the attachment to retrieve
String *recordType = recordType_example; // The type of the record which contains the attachment to retrieve
String *repo = repo_example; // The name of a CCM repository containing the database to retrieve the attachment from
Boolean *useDbid = true; // A boolean value to access a record using its database ID rather than its record ID (optional) (default to false)

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

// Retrieves an attachment's details
[apiInstance getAttachment1With:database
    fieldName:fieldName
    fileName:fileName
    recordId:recordId
    recordType:recordType
    repo:repo
    useDbid:useDbid
              completionHandler: ^(Attachment output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.AttachmentsApi()

var database = database_example; // {String} The name of a database (within the repository) to retrieve the attachment from

var fieldName = fieldName_example; // {String} The name of the field containing the attachment to retrieve

var fileName = fileName_example; // {String} The name of the file to be retrieved

var recordId = recordId_example; // {String} The ID of the record that contains the attachment to retrieve

var recordType = recordType_example; // {String} The type of the record which contains the attachment to retrieve

var repo = repo_example; // {String} The name of a CCM repository containing the database to retrieve the attachment from

var opts = { 
  'useDbid': true // {Boolean} A boolean value to access a record using its database ID rather than its record ID
};

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

namespace Example
{
    public class getAttachment1Example
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new AttachmentsApi();
            var database = database_example;  // String | The name of a database (within the repository) to retrieve the attachment from
            var fieldName = fieldName_example;  // String | The name of the field containing the attachment to retrieve
            var fileName = fileName_example;  // String | The name of the file to be retrieved
            var recordId = recordId_example;  // String | The ID of the record that contains the attachment to retrieve
            var recordType = recordType_example;  // String | The type of the record which contains the attachment to retrieve
            var repo = repo_example;  // String | The name of a CCM repository containing the database to retrieve the attachment from
            var useDbid = true;  // Boolean | A boolean value to access a record using its database ID rather than its record ID (optional)  (default to false)

            try
            {
                // Retrieves an attachment's details
                Attachment result = apiInstance.getAttachment1(database, fieldName, fileName, recordId, recordType, repo, useDbid);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentsApi.getAttachment1: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\AttachmentsApi();
$database = database_example; // String | The name of a database (within the repository) to retrieve the attachment from
$fieldName = fieldName_example; // String | The name of the field containing the attachment to retrieve
$fileName = fileName_example; // String | The name of the file to be retrieved
$recordId = recordId_example; // String | The ID of the record that contains the attachment to retrieve
$recordType = recordType_example; // String | The type of the record which contains the attachment to retrieve
$repo = repo_example; // String | The name of a CCM repository containing the database to retrieve the attachment from
$useDbid = true; // Boolean | A boolean value to access a record using its database ID rather than its record ID

try {
    $result = $api_instance->getAttachment1($database, $fieldName, $fileName, $recordId, $recordType, $repo, $useDbid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->getAttachment1: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentsApi;

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

my $api_instance = WWW::SwaggerClient::AttachmentsApi->new();
my $database = database_example; # String | The name of a database (within the repository) to retrieve the attachment from
my $fieldName = fieldName_example; # String | The name of the field containing the attachment to retrieve
my $fileName = fileName_example; # String | The name of the file to be retrieved
my $recordId = recordId_example; # String | The ID of the record that contains the attachment to retrieve
my $recordType = recordType_example; # String | The type of the record which contains the attachment to retrieve
my $repo = repo_example; # String | The name of a CCM repository containing the database to retrieve the attachment from
my $useDbid = true; # Boolean | A boolean value to access a record using its database ID rather than its record ID

eval { 
    my $result = $api_instance->getAttachment1(database => $database, fieldName => $fieldName, fileName => $fileName, recordId => $recordId, recordType => $recordType, repo => $repo, useDbid => $useDbid);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->getAttachment1: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentsApi()
database = database_example # String | The name of a database (within the repository) to retrieve the attachment from
fieldName = fieldName_example # String | The name of the field containing the attachment to retrieve
fileName = fileName_example # String | The name of the file to be retrieved
recordId = recordId_example # String | The ID of the record that contains the attachment to retrieve
recordType = recordType_example # String | The type of the record which contains the attachment to retrieve
repo = repo_example # String | The name of a CCM repository containing the database to retrieve the attachment from
useDbid = true # Boolean | A boolean value to access a record using its database ID rather than its record ID (optional) (default to false)

try: 
    # Retrieves an attachment's details
    api_response = api_instance.get_attachment1(database, fieldName, fileName, recordId, recordType, repo, useDbid=useDbid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->getAttachment1: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
The name of a database (within the repository) to retrieve the attachment from
Required
fieldName*
String
The name of the field containing the attachment to retrieve
Required
fileName*
String
The name of the file to be retrieved
Required
recordId*
String
The ID of the record that contains the attachment to retrieve
Required
recordType*
String
The type of the record which contains the attachment to retrieve
Required
repo*
String
The name of a CCM repository containing the database to retrieve the attachment from
Required
Query parameters
Name Description
useDbid
Boolean
A boolean value to access a record using its database ID rather than its record ID

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Attachment not found


getAttachmentFields

getAttachmentFields

Get Attachment Fields of a Record.


/ccmweb/rest/repos/{repo}/databases/{database}/records/{recordType}/{recordId}/attachmentFields2

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/records/{recordType}/{recordId}/attachmentFields2?useDbid="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentsApi;

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

public class AttachmentsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        AttachmentsApi apiInstance = new AttachmentsApi();
        String database = database_example; // String | Database Name
        String recordId = recordId_example; // String | Record ID
        String recordType = recordType_example; // String | Record Type
        String repo = repo_example; // String | Schema Repository Name
        String useDbid = useDbid_example; // String | A boolean value to access a record using its database ID rather than its record ID
        try {
            array[AttachmentField] result = apiInstance.getAttachmentFields(database, recordId, recordType, repo, useDbid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#getAttachmentFields");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentsApi;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        String database = database_example; // String | Database Name
        String recordId = recordId_example; // String | Record ID
        String recordType = recordType_example; // String | Record Type
        String repo = repo_example; // String | Schema Repository Name
        String useDbid = useDbid_example; // String | A boolean value to access a record using its database ID rather than its record ID
        try {
            array[AttachmentField] result = apiInstance.getAttachmentFields(database, recordId, recordType, repo, useDbid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#getAttachmentFields");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *database = database_example; // Database Name
String *recordId = recordId_example; // Record ID
String *recordType = recordType_example; // Record Type
String *repo = repo_example; // Schema Repository Name
String *useDbid = useDbid_example; // A boolean value to access a record using its database ID rather than its record ID (optional)

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

// getAttachmentFields
[apiInstance getAttachmentFieldsWith:database
    recordId:recordId
    recordType:recordType
    repo:repo
    useDbid:useDbid
              completionHandler: ^(array[AttachmentField] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.AttachmentsApi()

var database = database_example; // {String} Database Name

var recordId = recordId_example; // {String} Record ID

var recordType = recordType_example; // {String} Record Type

var repo = repo_example; // {String} Schema Repository Name

var opts = { 
  'useDbid': useDbid_example // {String} A boolean value to access a record using its database ID rather than its record ID
};

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

namespace Example
{
    public class getAttachmentFieldsExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new AttachmentsApi();
            var database = database_example;  // String | Database Name
            var recordId = recordId_example;  // String | Record ID
            var recordType = recordType_example;  // String | Record Type
            var repo = repo_example;  // String | Schema Repository Name
            var useDbid = useDbid_example;  // String | A boolean value to access a record using its database ID rather than its record ID (optional) 

            try
            {
                // getAttachmentFields
                array[AttachmentField] result = apiInstance.getAttachmentFields(database, recordId, recordType, repo, useDbid);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentsApi.getAttachmentFields: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\AttachmentsApi();
$database = database_example; // String | Database Name
$recordId = recordId_example; // String | Record ID
$recordType = recordType_example; // String | Record Type
$repo = repo_example; // String | Schema Repository Name
$useDbid = useDbid_example; // String | A boolean value to access a record using its database ID rather than its record ID

try {
    $result = $api_instance->getAttachmentFields($database, $recordId, $recordType, $repo, $useDbid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->getAttachmentFields: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentsApi;

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

my $api_instance = WWW::SwaggerClient::AttachmentsApi->new();
my $database = database_example; # String | Database Name
my $recordId = recordId_example; # String | Record ID
my $recordType = recordType_example; # String | Record Type
my $repo = repo_example; # String | Schema Repository Name
my $useDbid = useDbid_example; # String | A boolean value to access a record using its database ID rather than its record ID

eval { 
    my $result = $api_instance->getAttachmentFields(database => $database, recordId => $recordId, recordType => $recordType, repo => $repo, useDbid => $useDbid);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->getAttachmentFields: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentsApi()
database = database_example # String | Database Name
recordId = recordId_example # String | Record ID
recordType = recordType_example # String | Record Type
repo = repo_example # String | Schema Repository Name
useDbid = useDbid_example # String | A boolean value to access a record using its database ID rather than its record ID (optional)

try: 
    # getAttachmentFields
    api_response = api_instance.get_attachment_fields(database, recordId, recordType, repo, useDbid=useDbid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->getAttachmentFields: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
Database Name
Required
recordId*
String
Record ID
Required
recordType*
String
Record Type
Required
repo*
String
Schema Repository Name
Required
Query parameters
Name Description
useDbid
String
A boolean value to access a record using its database ID rather than its record ID

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Attachments not found


getAttachmentFields1

Retrieves a record's attachment fields

Retrieves the attachments fields of a specific record


/ccmweb/rest/repos/{repo}/databases/{database}/records/{recordType}/{recordId}/attachmentFields

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/records/{recordType}/{recordId}/attachmentFields?useDbid="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentsApi;

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

public class AttachmentsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        AttachmentsApi apiInstance = new AttachmentsApi();
        String database = database_example; // String | The name of a database (within the repository) to retrieve the attachment's fields from
        String recordId = recordId_example; // String | The ID of the record that contains the attachment fields to retrieve
        String recordType = recordType_example; // String | The type of the record which contains the attachment fields to retrieve
        String repo = repo_example; // String | The name of a CCM repository containing the database to retrieve an attachment's fields from
        Boolean useDbid = true; // Boolean | A boolean value to access a record using its database ID rather than its record ID
        try {
            array[AttachmentField] result = apiInstance.getAttachmentFields1(database, recordId, recordType, repo, useDbid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#getAttachmentFields1");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentsApi;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        String database = database_example; // String | The name of a database (within the repository) to retrieve the attachment's fields from
        String recordId = recordId_example; // String | The ID of the record that contains the attachment fields to retrieve
        String recordType = recordType_example; // String | The type of the record which contains the attachment fields to retrieve
        String repo = repo_example; // String | The name of a CCM repository containing the database to retrieve an attachment's fields from
        Boolean useDbid = true; // Boolean | A boolean value to access a record using its database ID rather than its record ID
        try {
            array[AttachmentField] result = apiInstance.getAttachmentFields1(database, recordId, recordType, repo, useDbid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#getAttachmentFields1");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *database = database_example; // The name of a database (within the repository) to retrieve the attachment's fields from
String *recordId = recordId_example; // The ID of the record that contains the attachment fields to retrieve
String *recordType = recordType_example; // The type of the record which contains the attachment fields to retrieve
String *repo = repo_example; // The name of a CCM repository containing the database to retrieve an attachment's fields from
Boolean *useDbid = true; // A boolean value to access a record using its database ID rather than its record ID (optional) (default to false)

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

// Retrieves a record's attachment fields
[apiInstance getAttachmentFields1With:database
    recordId:recordId
    recordType:recordType
    repo:repo
    useDbid:useDbid
              completionHandler: ^(array[AttachmentField] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.AttachmentsApi()

var database = database_example; // {String} The name of a database (within the repository) to retrieve the attachment's fields from

var recordId = recordId_example; // {String} The ID of the record that contains the attachment fields to retrieve

var recordType = recordType_example; // {String} The type of the record which contains the attachment fields to retrieve

var repo = repo_example; // {String} The name of a CCM repository containing the database to retrieve an attachment's fields from

var opts = { 
  'useDbid': true // {Boolean} A boolean value to access a record using its database ID rather than its record ID
};

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

namespace Example
{
    public class getAttachmentFields1Example
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new AttachmentsApi();
            var database = database_example;  // String | The name of a database (within the repository) to retrieve the attachment's fields from
            var recordId = recordId_example;  // String | The ID of the record that contains the attachment fields to retrieve
            var recordType = recordType_example;  // String | The type of the record which contains the attachment fields to retrieve
            var repo = repo_example;  // String | The name of a CCM repository containing the database to retrieve an attachment's fields from
            var useDbid = true;  // Boolean | A boolean value to access a record using its database ID rather than its record ID (optional)  (default to false)

            try
            {
                // Retrieves a record's attachment fields
                array[AttachmentField] result = apiInstance.getAttachmentFields1(database, recordId, recordType, repo, useDbid);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentsApi.getAttachmentFields1: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\AttachmentsApi();
$database = database_example; // String | The name of a database (within the repository) to retrieve the attachment's fields from
$recordId = recordId_example; // String | The ID of the record that contains the attachment fields to retrieve
$recordType = recordType_example; // String | The type of the record which contains the attachment fields to retrieve
$repo = repo_example; // String | The name of a CCM repository containing the database to retrieve an attachment's fields from
$useDbid = true; // Boolean | A boolean value to access a record using its database ID rather than its record ID

try {
    $result = $api_instance->getAttachmentFields1($database, $recordId, $recordType, $repo, $useDbid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->getAttachmentFields1: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentsApi;

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

my $api_instance = WWW::SwaggerClient::AttachmentsApi->new();
my $database = database_example; # String | The name of a database (within the repository) to retrieve the attachment's fields from
my $recordId = recordId_example; # String | The ID of the record that contains the attachment fields to retrieve
my $recordType = recordType_example; # String | The type of the record which contains the attachment fields to retrieve
my $repo = repo_example; # String | The name of a CCM repository containing the database to retrieve an attachment's fields from
my $useDbid = true; # Boolean | A boolean value to access a record using its database ID rather than its record ID

eval { 
    my $result = $api_instance->getAttachmentFields1(database => $database, recordId => $recordId, recordType => $recordType, repo => $repo, useDbid => $useDbid);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->getAttachmentFields1: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentsApi()
database = database_example # String | The name of a database (within the repository) to retrieve the attachment's fields from
recordId = recordId_example # String | The ID of the record that contains the attachment fields to retrieve
recordType = recordType_example # String | The type of the record which contains the attachment fields to retrieve
repo = repo_example # String | The name of a CCM repository containing the database to retrieve an attachment's fields from
useDbid = true # Boolean | A boolean value to access a record using its database ID rather than its record ID (optional) (default to false)

try: 
    # Retrieves a record's attachment fields
    api_response = api_instance.get_attachment_fields1(database, recordId, recordType, repo, useDbid=useDbid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->getAttachmentFields1: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
The name of a database (within the repository) to retrieve the attachment's fields from
Required
recordId*
String
The ID of the record that contains the attachment fields to retrieve
Required
recordType*
String
The type of the record which contains the attachment fields to retrieve
Required
repo*
String
The name of a CCM repository containing the database to retrieve an attachment's fields from
Required
Query parameters
Name Description
useDbid
Boolean
A boolean value to access a record using its database ID rather than its record ID

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Attachements not found


modifyAttachment

modifyAttachment

Modify an attachment. Note that only description can be modifed.


/ccmweb/rest/repos/{repo}/databases/{database}/records/{recordType}/{recordId}/attachmentFields2/{fieldName}/{fileName}

Usage and SDK Samples

curl -X PATCH -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/records/{recordType}/{recordId}/attachmentFields2/{fieldName}/{fileName}?actionName=&operation=&useDbid="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentsApi;

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

public class AttachmentsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        AttachmentsApi apiInstance = new AttachmentsApi();
        Attachment attachment = ; // Attachment | Attachment to be modified.
        String database = database_example; // String | Database Name
        String fieldName = fieldName_example; // String | Attachment Field name
        String fileName = fileName_example; // String | fileName
        String recordId = recordId_example; // String | Record ID
        String recordType = recordType_example; // String | Record Type
        String repo = repo_example; // String | Schema Repository Name
        String actionName = actionName_example; // String | Action to be used to modify the Record.
        String operation = operation_example; // String | The operation mode. If none is specified then Commit is assumed.
        String useDbid = useDbid_example; // String | A boolean value to access a record using its database ID rather than its record ID
        try {
            Attachment result = apiInstance.modifyAttachment(attachment, database, fieldName, fileName, recordId, recordType, repo, actionName, operation, useDbid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#modifyAttachment");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentsApi;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        Attachment attachment = ; // Attachment | Attachment to be modified.
        String database = database_example; // String | Database Name
        String fieldName = fieldName_example; // String | Attachment Field name
        String fileName = fileName_example; // String | fileName
        String recordId = recordId_example; // String | Record ID
        String recordType = recordType_example; // String | Record Type
        String repo = repo_example; // String | Schema Repository Name
        String actionName = actionName_example; // String | Action to be used to modify the Record.
        String operation = operation_example; // String | The operation mode. If none is specified then Commit is assumed.
        String useDbid = useDbid_example; // String | A boolean value to access a record using its database ID rather than its record ID
        try {
            Attachment result = apiInstance.modifyAttachment(attachment, database, fieldName, fileName, recordId, recordType, repo, actionName, operation, useDbid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#modifyAttachment");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

Attachment *attachment = ; // Attachment to be modified.
String *database = database_example; // Database Name
String *fieldName = fieldName_example; // Attachment Field name
String *fileName = fileName_example; // fileName
String *recordId = recordId_example; // Record ID
String *recordType = recordType_example; // Record Type
String *repo = repo_example; // Schema Repository Name
String *actionName = actionName_example; // Action to be used to modify the Record. (optional)
String *operation = operation_example; // The operation mode. If none is specified then Commit is assumed. (optional) (default to Commit)
String *useDbid = useDbid_example; // A boolean value to access a record using its database ID rather than its record ID (optional)

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

// modifyAttachment
[apiInstance modifyAttachmentWith:attachment
    database:database
    fieldName:fieldName
    fileName:fileName
    recordId:recordId
    recordType:recordType
    repo:repo
    actionName:actionName
    operation:operation
    useDbid:useDbid
              completionHandler: ^(Attachment output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.AttachmentsApi()

var attachment = ; // {Attachment} Attachment to be modified.

var database = database_example; // {String} Database Name

var fieldName = fieldName_example; // {String} Attachment Field name

var fileName = fileName_example; // {String} fileName

var recordId = recordId_example; // {String} Record ID

var recordType = recordType_example; // {String} Record Type

var repo = repo_example; // {String} Schema Repository Name

var opts = { 
  'actionName': actionName_example, // {String} Action to be used to modify the Record.
  'operation': operation_example, // {String} The operation mode. If none is specified then Commit is assumed.
  'useDbid': useDbid_example // {String} A boolean value to access a record using its database ID rather than its record ID
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.modifyAttachment(attachment, database, fieldName, fileName, recordId, recordType, repo, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class modifyAttachmentExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new AttachmentsApi();
            var attachment = new Attachment(); // Attachment | Attachment to be modified.
            var database = database_example;  // String | Database Name
            var fieldName = fieldName_example;  // String | Attachment Field name
            var fileName = fileName_example;  // String | fileName
            var recordId = recordId_example;  // String | Record ID
            var recordType = recordType_example;  // String | Record Type
            var repo = repo_example;  // String | Schema Repository Name
            var actionName = actionName_example;  // String | Action to be used to modify the Record. (optional) 
            var operation = operation_example;  // String | The operation mode. If none is specified then Commit is assumed. (optional)  (default to Commit)
            var useDbid = useDbid_example;  // String | A boolean value to access a record using its database ID rather than its record ID (optional) 

            try
            {
                // modifyAttachment
                Attachment result = apiInstance.modifyAttachment(attachment, database, fieldName, fileName, recordId, recordType, repo, actionName, operation, useDbid);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentsApi.modifyAttachment: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\AttachmentsApi();
$attachment = ; // Attachment | Attachment to be modified.
$database = database_example; // String | Database Name
$fieldName = fieldName_example; // String | Attachment Field name
$fileName = fileName_example; // String | fileName
$recordId = recordId_example; // String | Record ID
$recordType = recordType_example; // String | Record Type
$repo = repo_example; // String | Schema Repository Name
$actionName = actionName_example; // String | Action to be used to modify the Record.
$operation = operation_example; // String | The operation mode. If none is specified then Commit is assumed.
$useDbid = useDbid_example; // String | A boolean value to access a record using its database ID rather than its record ID

try {
    $result = $api_instance->modifyAttachment($attachment, $database, $fieldName, $fileName, $recordId, $recordType, $repo, $actionName, $operation, $useDbid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->modifyAttachment: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentsApi;

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

my $api_instance = WWW::SwaggerClient::AttachmentsApi->new();
my $attachment = WWW::SwaggerClient::Object::Attachment->new(); # Attachment | Attachment to be modified.
my $database = database_example; # String | Database Name
my $fieldName = fieldName_example; # String | Attachment Field name
my $fileName = fileName_example; # String | fileName
my $recordId = recordId_example; # String | Record ID
my $recordType = recordType_example; # String | Record Type
my $repo = repo_example; # String | Schema Repository Name
my $actionName = actionName_example; # String | Action to be used to modify the Record.
my $operation = operation_example; # String | The operation mode. If none is specified then Commit is assumed.
my $useDbid = useDbid_example; # String | A boolean value to access a record using its database ID rather than its record ID

eval { 
    my $result = $api_instance->modifyAttachment(attachment => $attachment, database => $database, fieldName => $fieldName, fileName => $fileName, recordId => $recordId, recordType => $recordType, repo => $repo, actionName => $actionName, operation => $operation, useDbid => $useDbid);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->modifyAttachment: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentsApi()
attachment =  # Attachment | Attachment to be modified.
database = database_example # String | Database Name
fieldName = fieldName_example # String | Attachment Field name
fileName = fileName_example # String | fileName
recordId = recordId_example # String | Record ID
recordType = recordType_example # String | Record Type
repo = repo_example # String | Schema Repository Name
actionName = actionName_example # String | Action to be used to modify the Record. (optional)
operation = operation_example # String | The operation mode. If none is specified then Commit is assumed. (optional) (default to Commit)
useDbid = useDbid_example # String | A boolean value to access a record using its database ID rather than its record ID (optional)

try: 
    # modifyAttachment
    api_response = api_instance.modify_attachment(attachment, database, fieldName, fileName, recordId, recordType, repo, actionName=actionName, operation=operation, useDbid=useDbid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->modifyAttachment: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
Database Name
Required
fieldName*
String
Attachment Field name
Required
fileName*
String
fileName
Required
recordId*
String
Record ID
Required
recordType*
String
Record Type
Required
repo*
String
Schema Repository Name
Required
Body parameters
Name Description
attachment *
Query parameters
Name Description
actionName
String
Action to be used to modify the Record.
operation
String
The operation mode. If none is specified then Commit is assumed.
useDbid
String
A boolean value to access a record using its database ID rather than its record ID

Responses

Status: 200 - Attachment successfully modified.

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


updateAttachment

Updates an existing attachment on a record

Updates an existing attachment on a record


/ccmweb/rest/repos/{repo}/databases/{database}/records/{recordType}/{recordId}/attachmentFields/{fieldName}/{fileName}

Usage and SDK Samples

curl -X PATCH -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/records/{recordType}/{recordId}/attachmentFields/{fieldName}/{fileName}?actionName=&useDbid="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentsApi;

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

public class AttachmentsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        AttachmentsApi apiInstance = new AttachmentsApi();
        String actionName = actionName_example; // String | The name of an action to modify the record where the attachment is being updated
        String database = database_example; // String | The name of a database (within the repository) to update an attachment in
        String fieldName = fieldName_example; // String | The name of the field within the record containing the attachment to be updated
        String fileName = fileName_example; // String | The name of the file to be updated
        String recordId = recordId_example; // String | The ID of the record containing the attachment to be updated
        String recordType = recordType_example; // String | The type of the record that an attachment will be updated for
        String repo = repo_example; // String | The name of a CCM repository containing the database to update an attachment in
        Attachment attachment = ; // Attachment | The attachment to edit.
        Boolean useDbid = true; // Boolean | A boolean value to access a record using its database ID rather than its record ID
        try {
            Attachment result = apiInstance.updateAttachment(actionName, database, fieldName, fileName, recordId, recordType, repo, attachment, useDbid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#updateAttachment");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentsApi;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        String actionName = actionName_example; // String | The name of an action to modify the record where the attachment is being updated
        String database = database_example; // String | The name of a database (within the repository) to update an attachment in
        String fieldName = fieldName_example; // String | The name of the field within the record containing the attachment to be updated
        String fileName = fileName_example; // String | The name of the file to be updated
        String recordId = recordId_example; // String | The ID of the record containing the attachment to be updated
        String recordType = recordType_example; // String | The type of the record that an attachment will be updated for
        String repo = repo_example; // String | The name of a CCM repository containing the database to update an attachment in
        Attachment attachment = ; // Attachment | The attachment to edit.
        Boolean useDbid = true; // Boolean | A boolean value to access a record using its database ID rather than its record ID
        try {
            Attachment result = apiInstance.updateAttachment(actionName, database, fieldName, fileName, recordId, recordType, repo, attachment, useDbid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#updateAttachment");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *actionName = actionName_example; // The name of an action to modify the record where the attachment is being updated
String *database = database_example; // The name of a database (within the repository) to update an attachment in
String *fieldName = fieldName_example; // The name of the field within the record containing the attachment to be updated
String *fileName = fileName_example; // The name of the file to be updated
String *recordId = recordId_example; // The ID of the record containing the attachment to be updated
String *recordType = recordType_example; // The type of the record that an attachment will be updated for
String *repo = repo_example; // The name of a CCM repository containing the database to update an attachment in
Attachment *attachment = ; // The attachment to edit. (optional)
Boolean *useDbid = true; // A boolean value to access a record using its database ID rather than its record ID (optional) (default to false)

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

// Updates an existing attachment on a record
[apiInstance updateAttachmentWith:actionName
    database:database
    fieldName:fieldName
    fileName:fileName
    recordId:recordId
    recordType:recordType
    repo:repo
    attachment:attachment
    useDbid:useDbid
              completionHandler: ^(Attachment output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.AttachmentsApi()

var actionName = actionName_example; // {String} The name of an action to modify the record where the attachment is being updated

var database = database_example; // {String} The name of a database (within the repository) to update an attachment in

var fieldName = fieldName_example; // {String} The name of the field within the record containing the attachment to be updated

var fileName = fileName_example; // {String} The name of the file to be updated

var recordId = recordId_example; // {String} The ID of the record containing the attachment to be updated

var recordType = recordType_example; // {String} The type of the record that an attachment will be updated for

var repo = repo_example; // {String} The name of a CCM repository containing the database to update an attachment in

var opts = { 
  'attachment': , // {Attachment} The attachment to edit.
  'useDbid': true // {Boolean} A boolean value to access a record using its database ID rather than its record ID
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateAttachment(actionName, database, fieldName, fileName, recordId, recordType, repo, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateAttachmentExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new AttachmentsApi();
            var actionName = actionName_example;  // String | The name of an action to modify the record where the attachment is being updated
            var database = database_example;  // String | The name of a database (within the repository) to update an attachment in
            var fieldName = fieldName_example;  // String | The name of the field within the record containing the attachment to be updated
            var fileName = fileName_example;  // String | The name of the file to be updated
            var recordId = recordId_example;  // String | The ID of the record containing the attachment to be updated
            var recordType = recordType_example;  // String | The type of the record that an attachment will be updated for
            var repo = repo_example;  // String | The name of a CCM repository containing the database to update an attachment in
            var attachment = new Attachment(); // Attachment | The attachment to edit. (optional) 
            var useDbid = true;  // Boolean | A boolean value to access a record using its database ID rather than its record ID (optional)  (default to false)

            try
            {
                // Updates an existing attachment on a record
                Attachment result = apiInstance.updateAttachment(actionName, database, fieldName, fileName, recordId, recordType, repo, attachment, useDbid);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentsApi.updateAttachment: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\AttachmentsApi();
$actionName = actionName_example; // String | The name of an action to modify the record where the attachment is being updated
$database = database_example; // String | The name of a database (within the repository) to update an attachment in
$fieldName = fieldName_example; // String | The name of the field within the record containing the attachment to be updated
$fileName = fileName_example; // String | The name of the file to be updated
$recordId = recordId_example; // String | The ID of the record containing the attachment to be updated
$recordType = recordType_example; // String | The type of the record that an attachment will be updated for
$repo = repo_example; // String | The name of a CCM repository containing the database to update an attachment in
$attachment = ; // Attachment | The attachment to edit.
$useDbid = true; // Boolean | A boolean value to access a record using its database ID rather than its record ID

try {
    $result = $api_instance->updateAttachment($actionName, $database, $fieldName, $fileName, $recordId, $recordType, $repo, $attachment, $useDbid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->updateAttachment: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentsApi;

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

my $api_instance = WWW::SwaggerClient::AttachmentsApi->new();
my $actionName = actionName_example; # String | The name of an action to modify the record where the attachment is being updated
my $database = database_example; # String | The name of a database (within the repository) to update an attachment in
my $fieldName = fieldName_example; # String | The name of the field within the record containing the attachment to be updated
my $fileName = fileName_example; # String | The name of the file to be updated
my $recordId = recordId_example; # String | The ID of the record containing the attachment to be updated
my $recordType = recordType_example; # String | The type of the record that an attachment will be updated for
my $repo = repo_example; # String | The name of a CCM repository containing the database to update an attachment in
my $attachment = WWW::SwaggerClient::Object::Attachment->new(); # Attachment | The attachment to edit.
my $useDbid = true; # Boolean | A boolean value to access a record using its database ID rather than its record ID

eval { 
    my $result = $api_instance->updateAttachment(actionName => $actionName, database => $database, fieldName => $fieldName, fileName => $fileName, recordId => $recordId, recordType => $recordType, repo => $repo, attachment => $attachment, useDbid => $useDbid);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->updateAttachment: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentsApi()
actionName = actionName_example # String | The name of an action to modify the record where the attachment is being updated
database = database_example # String | The name of a database (within the repository) to update an attachment in
fieldName = fieldName_example # String | The name of the field within the record containing the attachment to be updated
fileName = fileName_example # String | The name of the file to be updated
recordId = recordId_example # String | The ID of the record containing the attachment to be updated
recordType = recordType_example # String | The type of the record that an attachment will be updated for
repo = repo_example # String | The name of a CCM repository containing the database to update an attachment in
attachment =  # Attachment | The attachment to edit. (optional)
useDbid = true # Boolean | A boolean value to access a record using its database ID rather than its record ID (optional) (default to false)

try: 
    # Updates an existing attachment on a record
    api_response = api_instance.update_attachment(actionName, database, fieldName, fileName, recordId, recordType, repo, attachment=attachment, useDbid=useDbid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AttachmentsApi->updateAttachment: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
The name of a database (within the repository) to update an attachment in
Required
fieldName*
String
The name of the field within the record containing the attachment to be updated
Required
fileName*
String
The name of the file to be updated
Required
recordId*
String
The ID of the record containing the attachment to be updated
Required
recordType*
String
The type of the record that an attachment will be updated for
Required
repo*
String
The name of a CCM repository containing the database to update an attachment in
Required
Body parameters
Name Description
attachment
Query parameters
Name Description
actionName*
String
The name of an action to modify the record where the attachment is being updated
Required
useDbid
Boolean
A boolean value to access a record using its database ID rather than its record ID

Responses

Status: 200 - Attachment successfully modified

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


uploadFile

Uploads a file to a record

Uploads a file to a record


/ccmweb/rest/repos/{repo}/databases/{database}/records/{recordType}/{recordId}/attachmentFields/{fieldName}/{fileName}

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/records/{recordType}/{recordId}/attachmentFields/{fieldName}/{fileName}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AttachmentsApi;

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

public class AttachmentsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        AttachmentsApi apiInstance = new AttachmentsApi();
        Object actionName = ; // Object | The name of an action to modify the record that the attachment is being uploaded to
        String database = database_example; // String | The name of a database (within the repository) to upload the attachment to
        String fieldName = fieldName_example; // String | The name of the field within the record to upload the attachment to
        File file = /path/to/file.txt; // File | The file to be uploaded
        String fileName = fileName_example; // String | The name to associate with the file being uploaded
        String recordId = recordId_example; // String | The ID of the record to upload the attachment to
        String recordType = recordType_example; // String | The type of the record that the attachment will be uploaded to
        String repo = repo_example; // String | The name of a CCM repository containing the database to upload the attachment to
        Object useDbid = ; // Object | A boolean value to access a record using its database ID rather than its record ID
        try {
            apiInstance.uploadFile(actionName, database, fieldName, file, fileName, recordId, recordType, repo, useDbid);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#uploadFile");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AttachmentsApi;

public class AttachmentsApiExample {

    public static void main(String[] args) {
        AttachmentsApi apiInstance = new AttachmentsApi();
        Object actionName = ; // Object | The name of an action to modify the record that the attachment is being uploaded to
        String database = database_example; // String | The name of a database (within the repository) to upload the attachment to
        String fieldName = fieldName_example; // String | The name of the field within the record to upload the attachment to
        File file = /path/to/file.txt; // File | The file to be uploaded
        String fileName = fileName_example; // String | The name to associate with the file being uploaded
        String recordId = recordId_example; // String | The ID of the record to upload the attachment to
        String recordType = recordType_example; // String | The type of the record that the attachment will be uploaded to
        String repo = repo_example; // String | The name of a CCM repository containing the database to upload the attachment to
        Object useDbid = ; // Object | A boolean value to access a record using its database ID rather than its record ID
        try {
            apiInstance.uploadFile(actionName, database, fieldName, file, fileName, recordId, recordType, repo, useDbid);
        } catch (ApiException e) {
            System.err.println("Exception when calling AttachmentsApi#uploadFile");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

Object *actionName = ; // The name of an action to modify the record that the attachment is being uploaded to
String *database = database_example; // The name of a database (within the repository) to upload the attachment to
String *fieldName = fieldName_example; // The name of the field within the record to upload the attachment to
File *file = /path/to/file.txt; // The file to be uploaded
String *fileName = fileName_example; // The name to associate with the file being uploaded
String *recordId = recordId_example; // The ID of the record to upload the attachment to
String *recordType = recordType_example; // The type of the record that the attachment will be uploaded to
String *repo = repo_example; // The name of a CCM repository containing the database to upload the attachment to
Object *useDbid = ; // A boolean value to access a record using its database ID rather than its record ID (optional)

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

// Uploads a file to a record
[apiInstance uploadFileWith:actionName
    database:database
    fieldName:fieldName
    file:file
    fileName:fileName
    recordId:recordId
    recordType:recordType
    repo:repo
    useDbid:useDbid
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.AttachmentsApi()

var actionName = ; // {Object} The name of an action to modify the record that the attachment is being uploaded to

var database = database_example; // {String} The name of a database (within the repository) to upload the attachment to

var fieldName = fieldName_example; // {String} The name of the field within the record to upload the attachment to

var file = /path/to/file.txt; // {File} The file to be uploaded

var fileName = fileName_example; // {String} The name to associate with the file being uploaded

var recordId = recordId_example; // {String} The ID of the record to upload the attachment to

var recordType = recordType_example; // {String} The type of the record that the attachment will be uploaded to

var repo = repo_example; // {String} The name of a CCM repository containing the database to upload the attachment to

var opts = { 
  'useDbid':  // {Object} A boolean value to access a record using its database ID rather than its record ID
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.uploadFile(actionName, database, fieldName, file, fileName, recordId, recordType, repo, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class uploadFileExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new AttachmentsApi();
            var actionName = new Object(); // Object | The name of an action to modify the record that the attachment is being uploaded to
            var database = database_example;  // String | The name of a database (within the repository) to upload the attachment to
            var fieldName = fieldName_example;  // String | The name of the field within the record to upload the attachment to
            var file = new File(); // File | The file to be uploaded
            var fileName = fileName_example;  // String | The name to associate with the file being uploaded
            var recordId = recordId_example;  // String | The ID of the record to upload the attachment to
            var recordType = recordType_example;  // String | The type of the record that the attachment will be uploaded to
            var repo = repo_example;  // String | The name of a CCM repository containing the database to upload the attachment to
            var useDbid = new Object(); // Object | A boolean value to access a record using its database ID rather than its record ID (optional) 

            try
            {
                // Uploads a file to a record
                apiInstance.uploadFile(actionName, database, fieldName, file, fileName, recordId, recordType, repo, useDbid);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AttachmentsApi.uploadFile: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\AttachmentsApi();
$actionName = ; // Object | The name of an action to modify the record that the attachment is being uploaded to
$database = database_example; // String | The name of a database (within the repository) to upload the attachment to
$fieldName = fieldName_example; // String | The name of the field within the record to upload the attachment to
$file = /path/to/file.txt; // File | The file to be uploaded
$fileName = fileName_example; // String | The name to associate with the file being uploaded
$recordId = recordId_example; // String | The ID of the record to upload the attachment to
$recordType = recordType_example; // String | The type of the record that the attachment will be uploaded to
$repo = repo_example; // String | The name of a CCM repository containing the database to upload the attachment to
$useDbid = ; // Object | A boolean value to access a record using its database ID rather than its record ID

try {
    $api_instance->uploadFile($actionName, $database, $fieldName, $file, $fileName, $recordId, $recordType, $repo, $useDbid);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentsApi->uploadFile: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AttachmentsApi;

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

my $api_instance = WWW::SwaggerClient::AttachmentsApi->new();
my $actionName = ; # Object | The name of an action to modify the record that the attachment is being uploaded to
my $database = database_example; # String | The name of a database (within the repository) to upload the attachment to
my $fieldName = fieldName_example; # String | The name of the field within the record to upload the attachment to
my $file = /path/to/file.txt; # File | The file to be uploaded
my $fileName = fileName_example; # String | The name to associate with the file being uploaded
my $recordId = recordId_example; # String | The ID of the record to upload the attachment to
my $recordType = recordType_example; # String | The type of the record that the attachment will be uploaded to
my $repo = repo_example; # String | The name of a CCM repository containing the database to upload the attachment to
my $useDbid = ; # Object | A boolean value to access a record using its database ID rather than its record ID

eval { 
    $api_instance->uploadFile(actionName => $actionName, database => $database, fieldName => $fieldName, file => $file, fileName => $fileName, recordId => $recordId, recordType => $recordType, repo => $repo, useDbid => $useDbid);
};
if ($@) {
    warn "Exception when calling AttachmentsApi->uploadFile: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.AttachmentsApi()
actionName =  # Object | The name of an action to modify the record that the attachment is being uploaded to
database = database_example # String | The name of a database (within the repository) to upload the attachment to
fieldName = fieldName_example # String | The name of the field within the record to upload the attachment to
file = /path/to/file.txt # File | The file to be uploaded
fileName = fileName_example # String | The name to associate with the file being uploaded
recordId = recordId_example # String | The ID of the record to upload the attachment to
recordType = recordType_example # String | The type of the record that the attachment will be uploaded to
repo = repo_example # String | The name of a CCM repository containing the database to upload the attachment to
useDbid =  # Object | A boolean value to access a record using its database ID rather than its record ID (optional)

try: 
    # Uploads a file to a record
    api_instance.upload_file(actionName, database, fieldName, file, fileName, recordId, recordType, repo, useDbid=useDbid)
except ApiException as e:
    print("Exception when calling AttachmentsApi->uploadFile: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
The name of a database (within the repository) to upload the attachment to
Required
fieldName*
String
The name of the field within the record to upload the attachment to
Required
fileName*
String
The name to associate with the file being uploaded
Required
recordId*
String
The ID of the record to upload the attachment to
Required
recordType*
String
The type of the record that the attachment will be uploaded to
Required
repo*
String
The name of a CCM repository containing the database to upload the attachment to
Required
Form parameters
Name Description
actionName*
Object
The name of an action to modify the record that the attachment is being uploaded to
Required
file*
File
The file to be uploaded
Required
useDbid
Object
A boolean value to access a record using its database ID rather than its record ID

Responses

Status: 201 - File successfully uploaded.

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Authentication

authenticate

Authenticate with the CCM REST Server

Authenticate with the CCM REST Server


/ccmweb/rest/authenticate

Usage and SDK Samples

curl -X POST "https://192.168.1.245:8190/ccmweb/rest/authenticate"
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();
        AuthInfo authInfo = ; // AuthInfo | Represents information required to authenticate with the CCM REST Server. If a repo name isn't provided, the server will attempt to authenticate with the default repository, if one is specified within CCM.
        try {
            AuthToken result = apiInstance.authenticate(authInfo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AuthenticationApi#authenticate");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AuthenticationApi;

public class AuthenticationApiExample {

    public static void main(String[] args) {
        AuthenticationApi apiInstance = new AuthenticationApi();
        AuthInfo authInfo = ; // AuthInfo | Represents information required to authenticate with the CCM REST Server. If a repo name isn't provided, the server will attempt to authenticate with the default repository, if one is specified within CCM.
        try {
            AuthToken result = apiInstance.authenticate(authInfo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AuthenticationApi#authenticate");
            e.printStackTrace();
        }
    }
}
AuthInfo *authInfo = ; // Represents information required to authenticate with the CCM REST Server. If a repo name isn't provided, the server will attempt to authenticate with the default repository, if one is specified within CCM. (optional)

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

// Authenticate with the CCM REST Server
[apiInstance authenticateWith:authInfo
              completionHandler: ^(AuthToken output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');

var api = new CcmRestApi.AuthenticationApi()

var opts = { 
  'authInfo':  // {AuthInfo} Represents information required to authenticate with the CCM REST Server. If a repo name isn't provided, the server will attempt to authenticate with the default repository, if one is specified within CCM.
};

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

namespace Example
{
    public class authenticateExample
    {
        public void main()
        {
            
            var apiInstance = new AuthenticationApi();
            var authInfo = new AuthInfo(); // AuthInfo | Represents information required to authenticate with the CCM REST Server. If a repo name isn't provided, the server will attempt to authenticate with the default repository, if one is specified within CCM. (optional) 

            try
            {
                // Authenticate with the CCM REST Server
                AuthToken result = apiInstance.authenticate(authInfo);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AuthenticationApi.authenticate: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\AuthenticationApi();
$authInfo = ; // AuthInfo | Represents information required to authenticate with the CCM REST Server. If a repo name isn't provided, the server will attempt to authenticate with the default repository, if one is specified within CCM.

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

my $api_instance = WWW::SwaggerClient::AuthenticationApi->new();
my $authInfo = WWW::SwaggerClient::Object::AuthInfo->new(); # AuthInfo | Represents information required to authenticate with the CCM REST Server. If a repo name isn't provided, the server will attempt to authenticate with the default repository, if one is specified within CCM.

eval { 
    my $result = $api_instance->authenticate(authInfo => $authInfo);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AuthenticationApi->authenticate: $@\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()
authInfo =  # AuthInfo | Represents information required to authenticate with the CCM REST Server. If a repo name isn't provided, the server will attempt to authenticate with the default repository, if one is specified within CCM. (optional)

try: 
    # Authenticate with the CCM REST Server
    api_response = api_instance.authenticate(authInfo=authInfo)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AuthenticationApi->authenticate: %s\n" % e)

Parameters

Body parameters
Name Description
authInfo

Responses

Status: 201 - Authenticated successfully.

Status: 400 - Invalid login request.

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


logoff

Log off the CCM REST Server

Log off the CCM REST Server


/ccmweb/rest/authenticate/logoff

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/authenticate/logoff"
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: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

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

public class AuthenticationApiExample {

    public static void main(String[] args) {
        AuthenticationApi apiInstance = new AuthenticationApi();
        try {
            apiInstance.logoff();
        } catch (ApiException e) {
            System.err.println("Exception when calling AuthenticationApi#logoff");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];


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

// Log off the CCM REST Server
[apiInstance logoffWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.AuthenticationApi()

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

namespace Example
{
    public class logoffExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new AuthenticationApi();

            try
            {
                // Log off the CCM REST Server
                apiInstance.logoff();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AuthenticationApi.logoff: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\AuthenticationApi();

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

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

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

eval { 
    $api_instance->logoff();
};
if ($@) {
    warn "Exception when calling AuthenticationApi->logoff: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

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

try: 
    # Log off the CCM REST Server
    api_instance.logoff()
except ApiException as e:
    print("Exception when calling AuthenticationApi->logoff: %s\n" % e)

Parameters

Responses

Status: 201 - Created

Status: 204 - Logged off successfully.

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Database

getDatabase

Get the properties of a specific database

Returns the properties of a database. By default, only the name and description of the database are returned. Additonal properties can be requested by using the filter request body.


/ccmweb/rest/repos/{repo}/databases/{database}

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DatabaseApi;

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

public class DatabaseApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        DatabaseApi apiInstance = new DatabaseApi();
        String database = database_example; // String | The name of the desired database within the provided CCM repository
        String repo = repo_example; // String | The name of the CCM repository containing the desired database
        ApiFilter filter = ; // ApiFilter | A filter that can be used to return a subset of database properties
        try {
            Database result = apiInstance.getDatabase(database, repo, filter);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatabaseApi#getDatabase");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DatabaseApi;

public class DatabaseApiExample {

    public static void main(String[] args) {
        DatabaseApi apiInstance = new DatabaseApi();
        String database = database_example; // String | The name of the desired database within the provided CCM repository
        String repo = repo_example; // String | The name of the CCM repository containing the desired database
        ApiFilter filter = ; // ApiFilter | A filter that can be used to return a subset of database properties
        try {
            Database result = apiInstance.getDatabase(database, repo, filter);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatabaseApi#getDatabase");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *database = database_example; // The name of the desired database within the provided CCM repository
String *repo = repo_example; // The name of the CCM repository containing the desired database
ApiFilter *filter = ; // A filter that can be used to return a subset of database properties (optional)

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

// Get the properties of a specific database
[apiInstance getDatabaseWith:database
    repo:repo
    filter:filter
              completionHandler: ^(Database output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.DatabaseApi()

var database = database_example; // {String} The name of the desired database within the provided CCM repository

var repo = repo_example; // {String} The name of the CCM repository containing the desired database

var opts = { 
  'filter':  // {ApiFilter} A filter that can be used to return a subset of database properties
};

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

namespace Example
{
    public class getDatabaseExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new DatabaseApi();
            var database = database_example;  // String | The name of the desired database within the provided CCM repository
            var repo = repo_example;  // String | The name of the CCM repository containing the desired database
            var filter = new ApiFilter(); // ApiFilter | A filter that can be used to return a subset of database properties (optional) 

            try
            {
                // Get the properties of a specific database
                Database result = apiInstance.getDatabase(database, repo, filter);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DatabaseApi.getDatabase: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\DatabaseApi();
$database = database_example; // String | The name of the desired database within the provided CCM repository
$repo = repo_example; // String | The name of the CCM repository containing the desired database
$filter = ; // ApiFilter | A filter that can be used to return a subset of database properties

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

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

my $api_instance = WWW::SwaggerClient::DatabaseApi->new();
my $database = database_example; # String | The name of the desired database within the provided CCM repository
my $repo = repo_example; # String | The name of the CCM repository containing the desired database
my $filter = WWW::SwaggerClient::Object::ApiFilter->new(); # ApiFilter | A filter that can be used to return a subset of database properties

eval { 
    my $result = $api_instance->getDatabase(database => $database, repo => $repo, filter => $filter);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DatabaseApi->getDatabase: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DatabaseApi()
database = database_example # String | The name of the desired database within the provided CCM repository
repo = repo_example # String | The name of the CCM repository containing the desired database
filter =  # ApiFilter | A filter that can be used to return a subset of database properties (optional)

try: 
    # Get the properties of a specific database
    api_response = api_instance.get_database(database, repo, filter=filter)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatabaseApi->getDatabase: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
The name of the desired database within the provided CCM repository
Required
repo*
String
The name of the CCM repository containing the desired database
Required
Body parameters
Name Description
filter

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Database not found.


Databases

getAllDatabases

Get a list of available databases within a schema repository

Returns a list of all databases in a specified repository.


/ccmweb/rest/repos/{repo}/databases

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DatabasesApi;

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

public class DatabasesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        DatabasesApi apiInstance = new DatabasesApi();
        String repo = repo_example; // String | The name of the CCM repository to retrieve a list of databases from
        try {
            array[Database] result = apiInstance.getAllDatabases(repo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatabasesApi#getAllDatabases");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DatabasesApi;

public class DatabasesApiExample {

    public static void main(String[] args) {
        DatabasesApi apiInstance = new DatabasesApi();
        String repo = repo_example; // String | The name of the CCM repository to retrieve a list of databases from
        try {
            array[Database] result = apiInstance.getAllDatabases(repo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DatabasesApi#getAllDatabases");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *repo = repo_example; // The name of the CCM repository to retrieve a list of databases from

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

// Get a list of available databases within a schema repository
[apiInstance getAllDatabasesWith:repo
              completionHandler: ^(array[Database] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.DatabasesApi()

var repo = repo_example; // {String} The name of the CCM repository to retrieve a list of databases from


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

namespace Example
{
    public class getAllDatabasesExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new DatabasesApi();
            var repo = repo_example;  // String | The name of the CCM repository to retrieve a list of databases from

            try
            {
                // Get a list of available databases within a schema repository
                array[Database] result = apiInstance.getAllDatabases(repo);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DatabasesApi.getAllDatabases: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\DatabasesApi();
$repo = repo_example; // String | The name of the CCM repository to retrieve a list of databases from

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

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

my $api_instance = WWW::SwaggerClient::DatabasesApi->new();
my $repo = repo_example; # String | The name of the CCM repository to retrieve a list of databases from

eval { 
    my $result = $api_instance->getAllDatabases(repo => $repo);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DatabasesApi->getAllDatabases: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.DatabasesApi()
repo = repo_example # String | The name of the CCM repository to retrieve a list of databases from

try: 
    # Get a list of available databases within a schema repository
    api_response = api_instance.get_all_databases(repo)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DatabasesApi->getAllDatabases: %s\n" % e)

Parameters

Path parameters
Name Description
repo*
String
The name of the CCM repository to retrieve a list of databases from
Required

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - The provided schema repository was not found.


Folder

deleteFolder

Deletes a folder

Deletes a folder and all children, if any exist, from the workspace.


/ccmweb/rest/repos/{repo}/databases/{database}/workspace/folders/{folder_dbid}

Usage and SDK Samples

curl -X DELETE -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/workspace/folders/{folder_dbid}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FolderApi;

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

public class FolderApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        FolderApi apiInstance = new FolderApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the folder to delete
        String folderDbid = folderDbid_example; // String | The database ID (dbId) of the folder to delete
        String repo = repo_example; // String | The name of a CCM repository containing the folder to delete
        try {
            apiInstance.deleteFolder(database, folderDbid, repo);
        } catch (ApiException e) {
            System.err.println("Exception when calling FolderApi#deleteFolder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FolderApi;

public class FolderApiExample {

    public static void main(String[] args) {
        FolderApi apiInstance = new FolderApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the folder to delete
        String folderDbid = folderDbid_example; // String | The database ID (dbId) of the folder to delete
        String repo = repo_example; // String | The name of a CCM repository containing the folder to delete
        try {
            apiInstance.deleteFolder(database, folderDbid, repo);
        } catch (ApiException e) {
            System.err.println("Exception when calling FolderApi#deleteFolder");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *database = database_example; // The name of a database (within the repository) which contains the folder to delete
String *folderDbid = folderDbid_example; // The database ID (dbId) of the folder to delete
String *repo = repo_example; // The name of a CCM repository containing the folder to delete

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

// Deletes a folder
[apiInstance deleteFolderWith:database
    folderDbid:folderDbid
    repo:repo
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.FolderApi()

var database = database_example; // {String} The name of a database (within the repository) which contains the folder to delete

var folderDbid = folderDbid_example; // {String} The database ID (dbId) of the folder to delete

var repo = repo_example; // {String} The name of a CCM repository containing the folder to delete


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

namespace Example
{
    public class deleteFolderExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new FolderApi();
            var database = database_example;  // String | The name of a database (within the repository) which contains the folder to delete
            var folderDbid = folderDbid_example;  // String | The database ID (dbId) of the folder to delete
            var repo = repo_example;  // String | The name of a CCM repository containing the folder to delete

            try
            {
                // Deletes a folder
                apiInstance.deleteFolder(database, folderDbid, repo);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FolderApi.deleteFolder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\FolderApi();
$database = database_example; // String | The name of a database (within the repository) which contains the folder to delete
$folderDbid = folderDbid_example; // String | The database ID (dbId) of the folder to delete
$repo = repo_example; // String | The name of a CCM repository containing the folder to delete

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

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

my $api_instance = WWW::SwaggerClient::FolderApi->new();
my $database = database_example; # String | The name of a database (within the repository) which contains the folder to delete
my $folderDbid = folderDbid_example; # String | The database ID (dbId) of the folder to delete
my $repo = repo_example; # String | The name of a CCM repository containing the folder to delete

eval { 
    $api_instance->deleteFolder(database => $database, folderDbid => $folderDbid, repo => $repo);
};
if ($@) {
    warn "Exception when calling FolderApi->deleteFolder: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FolderApi()
database = database_example # String | The name of a database (within the repository) which contains the folder to delete
folderDbid = folderDbid_example # String | The database ID (dbId) of the folder to delete
repo = repo_example # String | The name of a CCM repository containing the folder to delete

try: 
    # Deletes a folder
    api_instance.delete_folder(database, folderDbid, repo)
except ApiException as e:
    print("Exception when calling FolderApi->deleteFolder: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
The name of a database (within the repository) which contains the folder to delete
Required
folder_dbid*
String
The database ID (dbId) of the folder to delete
Required
repo*
String
The name of a CCM repository containing the folder to delete
Required

Responses

Status: 204 - Folder deleted successfully.

Status: 401 - Unauthorized

Status: 403 - Forbidden


getFolder

Retrieves a folder

Retrieves information about a folder, including one level of children, if any exist.


/ccmweb/rest/repos/{repo}/databases/{database}/workspace/folders/{folder_dbid}

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/workspace/folders/{folder_dbid}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FolderApi;

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

public class FolderApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        FolderApi apiInstance = new FolderApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the desired folder
        String folderDbid = folderDbid_example; // String | The database ID (dbId) of the desired folder
        String repo = repo_example; // String | The name of a CCM repository containing the desired folder
        try {
            Folder result = apiInstance.getFolder(database, folderDbid, repo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FolderApi#getFolder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FolderApi;

public class FolderApiExample {

    public static void main(String[] args) {
        FolderApi apiInstance = new FolderApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the desired folder
        String folderDbid = folderDbid_example; // String | The database ID (dbId) of the desired folder
        String repo = repo_example; // String | The name of a CCM repository containing the desired folder
        try {
            Folder result = apiInstance.getFolder(database, folderDbid, repo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FolderApi#getFolder");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *database = database_example; // The name of a database (within the repository) which contains the desired folder
String *folderDbid = folderDbid_example; // The database ID (dbId) of the desired folder
String *repo = repo_example; // The name of a CCM repository containing the desired folder

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

// Retrieves a folder
[apiInstance getFolderWith:database
    folderDbid:folderDbid
    repo:repo
              completionHandler: ^(Folder output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.FolderApi()

var database = database_example; // {String} The name of a database (within the repository) which contains the desired folder

var folderDbid = folderDbid_example; // {String} The database ID (dbId) of the desired folder

var repo = repo_example; // {String} The name of a CCM repository containing the desired folder


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

namespace Example
{
    public class getFolderExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new FolderApi();
            var database = database_example;  // String | The name of a database (within the repository) which contains the desired folder
            var folderDbid = folderDbid_example;  // String | The database ID (dbId) of the desired folder
            var repo = repo_example;  // String | The name of a CCM repository containing the desired folder

            try
            {
                // Retrieves a folder
                Folder result = apiInstance.getFolder(database, folderDbid, repo);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FolderApi.getFolder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\FolderApi();
$database = database_example; // String | The name of a database (within the repository) which contains the desired folder
$folderDbid = folderDbid_example; // String | The database ID (dbId) of the desired folder
$repo = repo_example; // String | The name of a CCM repository containing the desired folder

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

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

my $api_instance = WWW::SwaggerClient::FolderApi->new();
my $database = database_example; # String | The name of a database (within the repository) which contains the desired folder
my $folderDbid = folderDbid_example; # String | The database ID (dbId) of the desired folder
my $repo = repo_example; # String | The name of a CCM repository containing the desired folder

eval { 
    my $result = $api_instance->getFolder(database => $database, folderDbid => $folderDbid, repo => $repo);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FolderApi->getFolder: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FolderApi()
database = database_example # String | The name of a database (within the repository) which contains the desired folder
folderDbid = folderDbid_example # String | The database ID (dbId) of the desired folder
repo = repo_example # String | The name of a CCM repository containing the desired folder

try: 
    # Retrieves a folder
    api_response = api_instance.get_folder(database, folderDbid, repo)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FolderApi->getFolder: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
The name of a database (within the repository) which contains the desired folder
Required
folder_dbid*
String
The database ID (dbId) of the desired folder
Required
repo*
String
The name of a CCM repository containing the desired folder
Required

Responses

Status: 200 - OK.

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


modifyFolder

Modifies a folder

Modifies the details of a folder, specifically its parent by providing a different parent folder, its name, or it's master replica name. The root folders of the workspace cannot be modified.


/ccmweb/rest/repos/{repo}/databases/{database}/workspace/folders/{folder_dbid}

Usage and SDK Samples

curl -X PATCH -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/workspace/folders/{folder_dbid}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FolderApi;

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

public class FolderApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        FolderApi apiInstance = new FolderApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the folder to modify
        Folder folder = ; // Folder | A request body containing updated values for the desired folder. An empty body is entirely valid, although in this case, no modifications will be made to the selected folder. A folder can be renamed, moved (in which case its name must be provided), and given a new master replica name. These changes can be done separately or all at once. The root folders of the workspace cannot be modified.
        String folderDbid = folderDbid_example; // String | The database ID (dbId) of the folder to modify
        String repo = repo_example; // String | The name of a CCM repository containing the folder to modify
        try {
            Folder result = apiInstance.modifyFolder(database, folder, folderDbid, repo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FolderApi#modifyFolder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FolderApi;

public class FolderApiExample {

    public static void main(String[] args) {
        FolderApi apiInstance = new FolderApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the folder to modify
        Folder folder = ; // Folder | A request body containing updated values for the desired folder. An empty body is entirely valid, although in this case, no modifications will be made to the selected folder. A folder can be renamed, moved (in which case its name must be provided), and given a new master replica name. These changes can be done separately or all at once. The root folders of the workspace cannot be modified.
        String folderDbid = folderDbid_example; // String | The database ID (dbId) of the folder to modify
        String repo = repo_example; // String | The name of a CCM repository containing the folder to modify
        try {
            Folder result = apiInstance.modifyFolder(database, folder, folderDbid, repo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FolderApi#modifyFolder");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *database = database_example; // The name of a database (within the repository) which contains the folder to modify
Folder *folder = ; // A request body containing updated values for the desired folder. An empty body is entirely valid, although in this case, no modifications will be made to the selected folder. A folder can be renamed, moved (in which case its name must be provided), and given a new master replica name. These changes can be done separately or all at once. The root folders of the workspace cannot be modified.
String *folderDbid = folderDbid_example; // The database ID (dbId) of the folder to modify
String *repo = repo_example; // The name of a CCM repository containing the folder to modify

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

// Modifies a folder
[apiInstance modifyFolderWith:database
    folder:folder
    folderDbid:folderDbid
    repo:repo
              completionHandler: ^(Folder output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.FolderApi()

var database = database_example; // {String} The name of a database (within the repository) which contains the folder to modify

var folder = ; // {Folder} A request body containing updated values for the desired folder. An empty body is entirely valid, although in this case, no modifications will be made to the selected folder. A folder can be renamed, moved (in which case its name must be provided), and given a new master replica name. These changes can be done separately or all at once. The root folders of the workspace cannot be modified.

var folderDbid = folderDbid_example; // {String} The database ID (dbId) of the folder to modify

var repo = repo_example; // {String} The name of a CCM repository containing the folder to modify


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

namespace Example
{
    public class modifyFolderExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new FolderApi();
            var database = database_example;  // String | The name of a database (within the repository) which contains the folder to modify
            var folder = new Folder(); // Folder | A request body containing updated values for the desired folder. An empty body is entirely valid, although in this case, no modifications will be made to the selected folder. A folder can be renamed, moved (in which case its name must be provided), and given a new master replica name. These changes can be done separately or all at once. The root folders of the workspace cannot be modified.
            var folderDbid = folderDbid_example;  // String | The database ID (dbId) of the folder to modify
            var repo = repo_example;  // String | The name of a CCM repository containing the folder to modify

            try
            {
                // Modifies a folder
                Folder result = apiInstance.modifyFolder(database, folder, folderDbid, repo);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FolderApi.modifyFolder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\FolderApi();
$database = database_example; // String | The name of a database (within the repository) which contains the folder to modify
$folder = ; // Folder | A request body containing updated values for the desired folder. An empty body is entirely valid, although in this case, no modifications will be made to the selected folder. A folder can be renamed, moved (in which case its name must be provided), and given a new master replica name. These changes can be done separately or all at once. The root folders of the workspace cannot be modified.
$folderDbid = folderDbid_example; // String | The database ID (dbId) of the folder to modify
$repo = repo_example; // String | The name of a CCM repository containing the folder to modify

try {
    $result = $api_instance->modifyFolder($database, $folder, $folderDbid, $repo);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FolderApi->modifyFolder: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::FolderApi;

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

my $api_instance = WWW::SwaggerClient::FolderApi->new();
my $database = database_example; # String | The name of a database (within the repository) which contains the folder to modify
my $folder = WWW::SwaggerClient::Object::Folder->new(); # Folder | A request body containing updated values for the desired folder. An empty body is entirely valid, although in this case, no modifications will be made to the selected folder. A folder can be renamed, moved (in which case its name must be provided), and given a new master replica name. These changes can be done separately or all at once. The root folders of the workspace cannot be modified.
my $folderDbid = folderDbid_example; # String | The database ID (dbId) of the folder to modify
my $repo = repo_example; # String | The name of a CCM repository containing the folder to modify

eval { 
    my $result = $api_instance->modifyFolder(database => $database, folder => $folder, folderDbid => $folderDbid, repo => $repo);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FolderApi->modifyFolder: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FolderApi()
database = database_example # String | The name of a database (within the repository) which contains the folder to modify
folder =  # Folder | A request body containing updated values for the desired folder. An empty body is entirely valid, although in this case, no modifications will be made to the selected folder. A folder can be renamed, moved (in which case its name must be provided), and given a new master replica name. These changes can be done separately or all at once. The root folders of the workspace cannot be modified.
folderDbid = folderDbid_example # String | The database ID (dbId) of the folder to modify
repo = repo_example # String | The name of a CCM repository containing the folder to modify

try: 
    # Modifies a folder
    api_response = api_instance.modify_folder(database, folder, folderDbid, repo)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FolderApi->modifyFolder: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
The name of a database (within the repository) which contains the folder to modify
Required
folder_dbid*
String
The database ID (dbId) of the folder to modify
Required
repo*
String
The name of a CCM repository containing the folder to modify
Required
Body parameters
Name Description
folder *

Responses

Status: 200 - Folder modified successfully.

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


Folders

createFolder

Creates a folder

Creates a folder with the given name and master replica name within the desired parent folder.


/ccmweb/rest/repos/{repo}/databases/{database}/workspace/folders

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/workspace/folders"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FoldersApi;

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

public class FoldersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        FoldersApi apiInstance = new FoldersApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the desired workspace to create the folder in
        Folder folder = ; // Folder | Represents information required to create a folder in CCM. At minimum, a name and parent database ID (where the folder will be placed in the workspace) are required to create a folder
        String repo = repo_example; // String | The name of a CCM repository containing the desired workspace to create the folder in
        try {
            Folder result = apiInstance.createFolder(database, folder, repo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FoldersApi#createFolder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FoldersApi;

public class FoldersApiExample {

    public static void main(String[] args) {
        FoldersApi apiInstance = new FoldersApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the desired workspace to create the folder in
        Folder folder = ; // Folder | Represents information required to create a folder in CCM. At minimum, a name and parent database ID (where the folder will be placed in the workspace) are required to create a folder
        String repo = repo_example; // String | The name of a CCM repository containing the desired workspace to create the folder in
        try {
            Folder result = apiInstance.createFolder(database, folder, repo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FoldersApi#createFolder");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *database = database_example; // The name of a database (within the repository) which contains the desired workspace to create the folder in
Folder *folder = ; // Represents information required to create a folder in CCM. At minimum, a name and parent database ID (where the folder will be placed in the workspace) are required to create a folder
String *repo = repo_example; // The name of a CCM repository containing the desired workspace to create the folder in

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

// Creates a folder
[apiInstance createFolderWith:database
    folder:folder
    repo:repo
              completionHandler: ^(Folder output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.FoldersApi()

var database = database_example; // {String} The name of a database (within the repository) which contains the desired workspace to create the folder in

var folder = ; // {Folder} Represents information required to create a folder in CCM. At minimum, a name and parent database ID (where the folder will be placed in the workspace) are required to create a folder

var repo = repo_example; // {String} The name of a CCM repository containing the desired workspace to create the folder in


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

namespace Example
{
    public class createFolderExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new FoldersApi();
            var database = database_example;  // String | The name of a database (within the repository) which contains the desired workspace to create the folder in
            var folder = new Folder(); // Folder | Represents information required to create a folder in CCM. At minimum, a name and parent database ID (where the folder will be placed in the workspace) are required to create a folder
            var repo = repo_example;  // String | The name of a CCM repository containing the desired workspace to create the folder in

            try
            {
                // Creates a folder
                Folder result = apiInstance.createFolder(database, folder, repo);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FoldersApi.createFolder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\FoldersApi();
$database = database_example; // String | The name of a database (within the repository) which contains the desired workspace to create the folder in
$folder = ; // Folder | Represents information required to create a folder in CCM. At minimum, a name and parent database ID (where the folder will be placed in the workspace) are required to create a folder
$repo = repo_example; // String | The name of a CCM repository containing the desired workspace to create the folder in

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

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

my $api_instance = WWW::SwaggerClient::FoldersApi->new();
my $database = database_example; # String | The name of a database (within the repository) which contains the desired workspace to create the folder in
my $folder = WWW::SwaggerClient::Object::Folder->new(); # Folder | Represents information required to create a folder in CCM. At minimum, a name and parent database ID (where the folder will be placed in the workspace) are required to create a folder
my $repo = repo_example; # String | The name of a CCM repository containing the desired workspace to create the folder in

eval { 
    my $result = $api_instance->createFolder(database => $database, folder => $folder, repo => $repo);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FoldersApi->createFolder: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FoldersApi()
database = database_example # String | The name of a database (within the repository) which contains the desired workspace to create the folder in
folder =  # Folder | Represents information required to create a folder in CCM. At minimum, a name and parent database ID (where the folder will be placed in the workspace) are required to create a folder
repo = repo_example # String | The name of a CCM repository containing the desired workspace to create the folder in

try: 
    # Creates a folder
    api_response = api_instance.create_folder(database, folder, repo)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FoldersApi->createFolder: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
The name of a database (within the repository) which contains the desired workspace to create the folder in
Required
repo*
String
The name of a CCM repository containing the desired workspace to create the folder in
Required
Body parameters
Name Description
folder *

Responses

Status: 201 - Folder created successfully.

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getRootFolders

Retrieves the workspace's root folders

Returns the root folders of the workspace. The root folders include the Personal and Public folders.


/ccmweb/rest/repos/{repo}/databases/{database}/workspace/folders

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/workspace/folders"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FoldersApi;

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

public class FoldersApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        FoldersApi apiInstance = new FoldersApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the desired workspace
        String repo = repo_example; // String | The name of a CCM repository containing the desired workspace
        try {
            array[Folder] result = apiInstance.getRootFolders(database, repo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FoldersApi#getRootFolders");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.FoldersApi;

public class FoldersApiExample {

    public static void main(String[] args) {
        FoldersApi apiInstance = new FoldersApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the desired workspace
        String repo = repo_example; // String | The name of a CCM repository containing the desired workspace
        try {
            array[Folder] result = apiInstance.getRootFolders(database, repo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling FoldersApi#getRootFolders");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *database = database_example; // The name of a database (within the repository) which contains the desired workspace
String *repo = repo_example; // The name of a CCM repository containing the desired workspace

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

// Retrieves the workspace's root folders
[apiInstance getRootFoldersWith:database
    repo:repo
              completionHandler: ^(array[Folder] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.FoldersApi()

var database = database_example; // {String} The name of a database (within the repository) which contains the desired workspace

var repo = repo_example; // {String} The name of a CCM repository containing the desired workspace


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

namespace Example
{
    public class getRootFoldersExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new FoldersApi();
            var database = database_example;  // String | The name of a database (within the repository) which contains the desired workspace
            var repo = repo_example;  // String | The name of a CCM repository containing the desired workspace

            try
            {
                // Retrieves the workspace's root folders
                array[Folder] result = apiInstance.getRootFolders(database, repo);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling FoldersApi.getRootFolders: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\FoldersApi();
$database = database_example; // String | The name of a database (within the repository) which contains the desired workspace
$repo = repo_example; // String | The name of a CCM repository containing the desired workspace

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

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

my $api_instance = WWW::SwaggerClient::FoldersApi->new();
my $database = database_example; # String | The name of a database (within the repository) which contains the desired workspace
my $repo = repo_example; # String | The name of a CCM repository containing the desired workspace

eval { 
    my $result = $api_instance->getRootFolders(database => $database, repo => $repo);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling FoldersApi->getRootFolders: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.FoldersApi()
database = database_example # String | The name of a database (within the repository) which contains the desired workspace
repo = repo_example # String | The name of a CCM repository containing the desired workspace

try: 
    # Retrieves the workspace's root folders
    api_response = api_instance.get_root_folders(database, repo)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling FoldersApi->getRootFolders: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
The name of a database (within the repository) which contains the desired workspace
Required
repo*
String
The name of a CCM repository containing the desired workspace
Required

Responses

Status: 200 - OK.

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Info

getInformation

Gets information about the product

Gets information about the product


/ccmweb/rest/info

Usage and SDK Samples

curl -X GET "https://192.168.1.245:8190/ccmweb/rest/info"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InfoApi;

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

public class InfoApiExample {

    public static void main(String[] args) {
        
        InfoApi apiInstance = new InfoApi();
        try {
            Info result = apiInstance.getInformation();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InfoApi#getInformation");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InfoApi;

public class InfoApiExample {

    public static void main(String[] args) {
        InfoApi apiInstance = new InfoApi();
        try {
            Info result = apiInstance.getInformation();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InfoApi#getInformation");
            e.printStackTrace();
        }
    }
}

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

// Gets information about the product
[apiInstance getInformationWithCompletionHandler: 
              ^(Info output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');

var api = new CcmRestApi.InfoApi()

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

namespace Example
{
    public class getInformationExample
    {
        public void main()
        {
            
            var apiInstance = new InfoApi();

            try
            {
                // Gets information about the product
                Info result = apiInstance.getInformation();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InfoApi.getInformation: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\InfoApi();

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

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

eval { 
    my $result = $api_instance->getInformation();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InfoApi->getInformation: $@\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.InfoApi()

try: 
    # Gets information about the product
    api_response = api_instance.get_information()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InfoApi->getInformation: %s\n" % e)

Parameters

Responses

Status: 200 - OK

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Preferences

getPreferences

Retrieves user preferences

Retrieves the workspace preferences associated with the requesting user.


/ccmweb/rest/repos/{repo}/databases/{database}/workspace/preferences/{id}

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/workspace/preferences/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PreferencesApi;

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

public class PreferencesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        PreferencesApi apiInstance = new PreferencesApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the desired workspace to retrieve user-specific preferences for
        String id = id_example; // String | The preference id.
        String repo = repo_example; // String | The name of a CCM repository containing the desired workspace to retrieve user-specific preferences for
        try {
            Preferences result = apiInstance.getPreferences(database, id, repo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PreferencesApi#getPreferences");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PreferencesApi;

public class PreferencesApiExample {

    public static void main(String[] args) {
        PreferencesApi apiInstance = new PreferencesApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the desired workspace to retrieve user-specific preferences for
        String id = id_example; // String | The preference id.
        String repo = repo_example; // String | The name of a CCM repository containing the desired workspace to retrieve user-specific preferences for
        try {
            Preferences result = apiInstance.getPreferences(database, id, repo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PreferencesApi#getPreferences");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *database = database_example; // The name of a database (within the repository) which contains the desired workspace to retrieve user-specific preferences for
String *id = id_example; // The preference id.
String *repo = repo_example; // The name of a CCM repository containing the desired workspace to retrieve user-specific preferences for

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

// Retrieves user preferences
[apiInstance getPreferencesWith:database
    id:id
    repo:repo
              completionHandler: ^(Preferences output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.PreferencesApi()

var database = database_example; // {String} The name of a database (within the repository) which contains the desired workspace to retrieve user-specific preferences for

var id = id_example; // {String} The preference id.

var repo = repo_example; // {String} The name of a CCM repository containing the desired workspace to retrieve user-specific preferences for


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

namespace Example
{
    public class getPreferencesExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new PreferencesApi();
            var database = database_example;  // String | The name of a database (within the repository) which contains the desired workspace to retrieve user-specific preferences for
            var id = id_example;  // String | The preference id.
            var repo = repo_example;  // String | The name of a CCM repository containing the desired workspace to retrieve user-specific preferences for

            try
            {
                // Retrieves user preferences
                Preferences result = apiInstance.getPreferences(database, id, repo);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PreferencesApi.getPreferences: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\PreferencesApi();
$database = database_example; // String | The name of a database (within the repository) which contains the desired workspace to retrieve user-specific preferences for
$id = id_example; // String | The preference id.
$repo = repo_example; // String | The name of a CCM repository containing the desired workspace to retrieve user-specific preferences for

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

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

my $api_instance = WWW::SwaggerClient::PreferencesApi->new();
my $database = database_example; # String | The name of a database (within the repository) which contains the desired workspace to retrieve user-specific preferences for
my $id = id_example; # String | The preference id.
my $repo = repo_example; # String | The name of a CCM repository containing the desired workspace to retrieve user-specific preferences for

eval { 
    my $result = $api_instance->getPreferences(database => $database, id => $id, repo => $repo);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PreferencesApi->getPreferences: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PreferencesApi()
database = database_example # String | The name of a database (within the repository) which contains the desired workspace to retrieve user-specific preferences for
id = id_example # String | The preference id.
repo = repo_example # String | The name of a CCM repository containing the desired workspace to retrieve user-specific preferences for

try: 
    # Retrieves user preferences
    api_response = api_instance.get_preferences(database, id, repo)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PreferencesApi->getPreferences: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
The name of a database (within the repository) which contains the desired workspace to retrieve user-specific preferences for
Required
id*
String
The preference id.
Required
repo*
String
The name of a CCM repository containing the desired workspace to retrieve user-specific preferences for
Required

Responses

Status: 200 - OK.

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


modifyPreferences

Modifies a user's preferences

Modifies the workspace preferences associated with the requesting user.


/ccmweb/rest/repos/{repo}/databases/{database}/workspace/preferences/{id}

Usage and SDK Samples

curl -X PUT -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/workspace/preferences/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PreferencesApi;

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

public class PreferencesApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        PreferencesApi apiInstance = new PreferencesApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the desired workspace to modify user-specific preferences for
        String id = id_example; // String | The preference id.
        String repo = repo_example; // String | The name of a CCM repository containing the desired workspace to modify user-specific preferences for
        Preferences preferences = ; // Preferences | A string containing user-specific workspace preferences
        try {
            Preferences result = apiInstance.modifyPreferences(database, id, repo, preferences);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PreferencesApi#modifyPreferences");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PreferencesApi;

public class PreferencesApiExample {

    public static void main(String[] args) {
        PreferencesApi apiInstance = new PreferencesApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the desired workspace to modify user-specific preferences for
        String id = id_example; // String | The preference id.
        String repo = repo_example; // String | The name of a CCM repository containing the desired workspace to modify user-specific preferences for
        Preferences preferences = ; // Preferences | A string containing user-specific workspace preferences
        try {
            Preferences result = apiInstance.modifyPreferences(database, id, repo, preferences);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PreferencesApi#modifyPreferences");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *database = database_example; // The name of a database (within the repository) which contains the desired workspace to modify user-specific preferences for
String *id = id_example; // The preference id.
String *repo = repo_example; // The name of a CCM repository containing the desired workspace to modify user-specific preferences for
Preferences *preferences = ; // A string containing user-specific workspace preferences (optional)

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

// Modifies a user's preferences
[apiInstance modifyPreferencesWith:database
    id:id
    repo:repo
    preferences:preferences
              completionHandler: ^(Preferences output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.PreferencesApi()

var database = database_example; // {String} The name of a database (within the repository) which contains the desired workspace to modify user-specific preferences for

var id = id_example; // {String} The preference id.

var repo = repo_example; // {String} The name of a CCM repository containing the desired workspace to modify user-specific preferences for

var opts = { 
  'preferences':  // {Preferences} A string containing user-specific workspace preferences
};

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

namespace Example
{
    public class modifyPreferencesExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new PreferencesApi();
            var database = database_example;  // String | The name of a database (within the repository) which contains the desired workspace to modify user-specific preferences for
            var id = id_example;  // String | The preference id.
            var repo = repo_example;  // String | The name of a CCM repository containing the desired workspace to modify user-specific preferences for
            var preferences = new Preferences(); // Preferences | A string containing user-specific workspace preferences (optional) 

            try
            {
                // Modifies a user's preferences
                Preferences result = apiInstance.modifyPreferences(database, id, repo, preferences);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PreferencesApi.modifyPreferences: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\PreferencesApi();
$database = database_example; // String | The name of a database (within the repository) which contains the desired workspace to modify user-specific preferences for
$id = id_example; // String | The preference id.
$repo = repo_example; // String | The name of a CCM repository containing the desired workspace to modify user-specific preferences for
$preferences = ; // Preferences | A string containing user-specific workspace preferences

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

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

my $api_instance = WWW::SwaggerClient::PreferencesApi->new();
my $database = database_example; # String | The name of a database (within the repository) which contains the desired workspace to modify user-specific preferences for
my $id = id_example; # String | The preference id.
my $repo = repo_example; # String | The name of a CCM repository containing the desired workspace to modify user-specific preferences for
my $preferences = WWW::SwaggerClient::Object::Preferences->new(); # Preferences | A string containing user-specific workspace preferences

eval { 
    my $result = $api_instance->modifyPreferences(database => $database, id => $id, repo => $repo, preferences => $preferences);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PreferencesApi->modifyPreferences: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.PreferencesApi()
database = database_example # String | The name of a database (within the repository) which contains the desired workspace to modify user-specific preferences for
id = id_example # String | The preference id.
repo = repo_example # String | The name of a CCM repository containing the desired workspace to modify user-specific preferences for
preferences =  # Preferences | A string containing user-specific workspace preferences (optional)

try: 
    # Modifies a user's preferences
    api_response = api_instance.modify_preferences(database, id, repo, preferences=preferences)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PreferencesApi->modifyPreferences: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
The name of a database (within the repository) which contains the desired workspace to modify user-specific preferences for
Required
id*
String
The preference id.
Required
repo*
String
The name of a CCM repository containing the desired workspace to modify user-specific preferences for
Required
Body parameters
Name Description
preferences

Responses

Status: 201 - Preferences modified successfully.

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


Query

deleteQueryResultSet

Deletes a result set

Deletes a result set produced by a dynamic query execution


/ccmweb/rest/repos/{repo}/databases/{database}/query/{result_set_id}

Usage and SDK Samples

curl -X DELETE -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/query/{result_set_id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.QueryApi;

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

public class QueryApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        QueryApi apiInstance = new QueryApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the desired result set to delete
        String repo = repo_example; // String | The name of a CCM repository containing the desired result set to delete
        String resultSetId = resultSetId_example; // String | The ID of the result set to delete
        try {
            apiInstance.deleteQueryResultSet(database, repo, resultSetId);
        } catch (ApiException e) {
            System.err.println("Exception when calling QueryApi#deleteQueryResultSet");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.QueryApi;

public class QueryApiExample {

    public static void main(String[] args) {
        QueryApi apiInstance = new QueryApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the desired result set to delete
        String repo = repo_example; // String | The name of a CCM repository containing the desired result set to delete
        String resultSetId = resultSetId_example; // String | The ID of the result set to delete
        try {
            apiInstance.deleteQueryResultSet(database, repo, resultSetId);
        } catch (ApiException e) {
            System.err.println("Exception when calling QueryApi#deleteQueryResultSet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *database = database_example; // The name of a database (within the repository) which contains the desired result set to delete
String *repo = repo_example; // The name of a CCM repository containing the desired result set to delete
String *resultSetId = resultSetId_example; // The ID of the result set to delete

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

// Deletes a result set
[apiInstance deleteQueryResultSetWith:database
    repo:repo
    resultSetId:resultSetId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.QueryApi()

var database = database_example; // {String} The name of a database (within the repository) which contains the desired result set to delete

var repo = repo_example; // {String} The name of a CCM repository containing the desired result set to delete

var resultSetId = resultSetId_example; // {String} The ID of the result set to delete


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

namespace Example
{
    public class deleteQueryResultSetExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new QueryApi();
            var database = database_example;  // String | The name of a database (within the repository) which contains the desired result set to delete
            var repo = repo_example;  // String | The name of a CCM repository containing the desired result set to delete
            var resultSetId = resultSetId_example;  // String | The ID of the result set to delete

            try
            {
                // Deletes a result set
                apiInstance.deleteQueryResultSet(database, repo, resultSetId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling QueryApi.deleteQueryResultSet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\QueryApi();
$database = database_example; // String | The name of a database (within the repository) which contains the desired result set to delete
$repo = repo_example; // String | The name of a CCM repository containing the desired result set to delete
$resultSetId = resultSetId_example; // String | The ID of the result set to delete

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

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

my $api_instance = WWW::SwaggerClient::QueryApi->new();
my $database = database_example; # String | The name of a database (within the repository) which contains the desired result set to delete
my $repo = repo_example; # String | The name of a CCM repository containing the desired result set to delete
my $resultSetId = resultSetId_example; # String | The ID of the result set to delete

eval { 
    $api_instance->deleteQueryResultSet(database => $database, repo => $repo, resultSetId => $resultSetId);
};
if ($@) {
    warn "Exception when calling QueryApi->deleteQueryResultSet: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.QueryApi()
database = database_example # String | The name of a database (within the repository) which contains the desired result set to delete
repo = repo_example # String | The name of a CCM repository containing the desired result set to delete
resultSetId = resultSetId_example # String | The ID of the result set to delete

try: 
    # Deletes a result set
    api_instance.delete_query_result_set(database, repo, resultSetId)
except ApiException as e:
    print("Exception when calling QueryApi->deleteQueryResultSet: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
The name of a database (within the repository) which contains the desired result set to delete
Required
repo*
String
The name of a CCM repository containing the desired result set to delete
Required
result_set_id*
String
The ID of the result set to delete
Required

Responses

Status: 204 - Result set deleted successfully.

Status: 401 - Unauthorized

Status: 403 - Forbidden


executeQuery

Executes a query and returns a result set, without saving the query

Executes a query and returns a result set, without saving the query.


/ccmweb/rest/repos/{repo}/databases/{database}/query

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/query"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.QueryApi;

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

public class QueryApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        QueryApi apiInstance = new QueryApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the desired workspace to dynamically execute the query definition in
        QueryOptions queryOptions = ; // QueryOptions | Represents information required to dynamically execute a query definition in CCM. For the query definition, a primary entity definition name, at least one query field definition that is set to be shown, and a root filter node with a boolean operator are required at minimum. Result set options are not required, in which case an empty object can be provided.
        String repo = repo_example; // String | The name of a CCM repository containing the desired workspace to dynamically execute the query definition in
        try {
            ResultSet result = apiInstance.executeQuery(database, queryOptions, repo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QueryApi#executeQuery");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.QueryApi;

public class QueryApiExample {

    public static void main(String[] args) {
        QueryApi apiInstance = new QueryApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the desired workspace to dynamically execute the query definition in
        QueryOptions queryOptions = ; // QueryOptions | Represents information required to dynamically execute a query definition in CCM. For the query definition, a primary entity definition name, at least one query field definition that is set to be shown, and a root filter node with a boolean operator are required at minimum. Result set options are not required, in which case an empty object can be provided.
        String repo = repo_example; // String | The name of a CCM repository containing the desired workspace to dynamically execute the query definition in
        try {
            ResultSet result = apiInstance.executeQuery(database, queryOptions, repo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QueryApi#executeQuery");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *database = database_example; // The name of a database (within the repository) which contains the desired workspace to dynamically execute the query definition in
QueryOptions *queryOptions = ; // Represents information required to dynamically execute a query definition in CCM. For the query definition, a primary entity definition name, at least one query field definition that is set to be shown, and a root filter node with a boolean operator are required at minimum. Result set options are not required, in which case an empty object can be provided.
String *repo = repo_example; // The name of a CCM repository containing the desired workspace to dynamically execute the query definition in

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

// Executes a query and returns a result set, without saving the query
[apiInstance executeQueryWith:database
    queryOptions:queryOptions
    repo:repo
              completionHandler: ^(ResultSet output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.QueryApi()

var database = database_example; // {String} The name of a database (within the repository) which contains the desired workspace to dynamically execute the query definition in

var queryOptions = ; // {QueryOptions} Represents information required to dynamically execute a query definition in CCM. For the query definition, a primary entity definition name, at least one query field definition that is set to be shown, and a root filter node with a boolean operator are required at minimum. Result set options are not required, in which case an empty object can be provided.

var repo = repo_example; // {String} The name of a CCM repository containing the desired workspace to dynamically execute the query definition in


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

namespace Example
{
    public class executeQueryExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new QueryApi();
            var database = database_example;  // String | The name of a database (within the repository) which contains the desired workspace to dynamically execute the query definition in
            var queryOptions = new QueryOptions(); // QueryOptions | Represents information required to dynamically execute a query definition in CCM. For the query definition, a primary entity definition name, at least one query field definition that is set to be shown, and a root filter node with a boolean operator are required at minimum. Result set options are not required, in which case an empty object can be provided.
            var repo = repo_example;  // String | The name of a CCM repository containing the desired workspace to dynamically execute the query definition in

            try
            {
                // Executes a query and returns a result set, without saving the query
                ResultSet result = apiInstance.executeQuery(database, queryOptions, repo);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling QueryApi.executeQuery: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\QueryApi();
$database = database_example; // String | The name of a database (within the repository) which contains the desired workspace to dynamically execute the query definition in
$queryOptions = ; // QueryOptions | Represents information required to dynamically execute a query definition in CCM. For the query definition, a primary entity definition name, at least one query field definition that is set to be shown, and a root filter node with a boolean operator are required at minimum. Result set options are not required, in which case an empty object can be provided.
$repo = repo_example; // String | The name of a CCM repository containing the desired workspace to dynamically execute the query definition in

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

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

my $api_instance = WWW::SwaggerClient::QueryApi->new();
my $database = database_example; # String | The name of a database (within the repository) which contains the desired workspace to dynamically execute the query definition in
my $queryOptions = WWW::SwaggerClient::Object::QueryOptions->new(); # QueryOptions | Represents information required to dynamically execute a query definition in CCM. For the query definition, a primary entity definition name, at least one query field definition that is set to be shown, and a root filter node with a boolean operator are required at minimum. Result set options are not required, in which case an empty object can be provided.
my $repo = repo_example; # String | The name of a CCM repository containing the desired workspace to dynamically execute the query definition in

eval { 
    my $result = $api_instance->executeQuery(database => $database, queryOptions => $queryOptions, repo => $repo);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QueryApi->executeQuery: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.QueryApi()
database = database_example # String | The name of a database (within the repository) which contains the desired workspace to dynamically execute the query definition in
queryOptions =  # QueryOptions | Represents information required to dynamically execute a query definition in CCM. For the query definition, a primary entity definition name, at least one query field definition that is set to be shown, and a root filter node with a boolean operator are required at minimum. Result set options are not required, in which case an empty object can be provided.
repo = repo_example # String | The name of a CCM repository containing the desired workspace to dynamically execute the query definition in

try: 
    # Executes a query and returns a result set, without saving the query
    api_response = api_instance.execute_query(database, queryOptions, repo)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QueryApi->executeQuery: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
The name of a database (within the repository) which contains the desired workspace to dynamically execute the query definition in
Required
repo*
String
The name of a CCM repository containing the desired workspace to dynamically execute the query definition in
Required
Body parameters
Name Description
queryOptions *

Responses

Status: 200 - OK

Status: 201 - OK.

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getQueryResultSetPage

Retrieves a result set from a dynamic query execution

Retrieves a result set from a dynamic query execution


/ccmweb/rest/repos/{repo}/databases/{database}/query/{result_set_id}

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/query/{result_set_id}?pageNumber="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.QueryApi;

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

public class QueryApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        QueryApi apiInstance = new QueryApi();
        String database = database_example; // String | The name of a database (within the repository) to retrieve a result set from
        String repo = repo_example; // String | The name of a CCM repository containing the database to retrieve a result set page from
        String resultSetId = resultSetId_example; // String | The ID of the desired result set
        Long pageNumber = 789; // Long | The page number to retrieve from the result set. If one is not provided, the first page will be retreived by default.
        try {
            ResultSetPage result = apiInstance.getQueryResultSetPage(database, repo, resultSetId, pageNumber);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QueryApi#getQueryResultSetPage");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.QueryApi;

public class QueryApiExample {

    public static void main(String[] args) {
        QueryApi apiInstance = new QueryApi();
        String database = database_example; // String | The name of a database (within the repository) to retrieve a result set from
        String repo = repo_example; // String | The name of a CCM repository containing the database to retrieve a result set page from
        String resultSetId = resultSetId_example; // String | The ID of the desired result set
        Long pageNumber = 789; // Long | The page number to retrieve from the result set. If one is not provided, the first page will be retreived by default.
        try {
            ResultSetPage result = apiInstance.getQueryResultSetPage(database, repo, resultSetId, pageNumber);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QueryApi#getQueryResultSetPage");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *database = database_example; // The name of a database (within the repository) to retrieve a result set from
String *repo = repo_example; // The name of a CCM repository containing the database to retrieve a result set page from
String *resultSetId = resultSetId_example; // The ID of the desired result set
Long *pageNumber = 789; // The page number to retrieve from the result set. If one is not provided, the first page will be retreived by default. (optional)

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

// Retrieves a result set from a dynamic query execution
[apiInstance getQueryResultSetPageWith:database
    repo:repo
    resultSetId:resultSetId
    pageNumber:pageNumber
              completionHandler: ^(ResultSetPage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.QueryApi()

var database = database_example; // {String} The name of a database (within the repository) to retrieve a result set from

var repo = repo_example; // {String} The name of a CCM repository containing the database to retrieve a result set page from

var resultSetId = resultSetId_example; // {String} The ID of the desired result set

var opts = { 
  'pageNumber': 789 // {Long} The page number to retrieve from the result set. If one is not provided, the first page will be retreived by default.
};

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

namespace Example
{
    public class getQueryResultSetPageExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new QueryApi();
            var database = database_example;  // String | The name of a database (within the repository) to retrieve a result set from
            var repo = repo_example;  // String | The name of a CCM repository containing the database to retrieve a result set page from
            var resultSetId = resultSetId_example;  // String | The ID of the desired result set
            var pageNumber = 789;  // Long | The page number to retrieve from the result set. If one is not provided, the first page will be retreived by default. (optional) 

            try
            {
                // Retrieves a result set from a dynamic query execution
                ResultSetPage result = apiInstance.getQueryResultSetPage(database, repo, resultSetId, pageNumber);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling QueryApi.getQueryResultSetPage: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\QueryApi();
$database = database_example; // String | The name of a database (within the repository) to retrieve a result set from
$repo = repo_example; // String | The name of a CCM repository containing the database to retrieve a result set page from
$resultSetId = resultSetId_example; // String | The ID of the desired result set
$pageNumber = 789; // Long | The page number to retrieve from the result set. If one is not provided, the first page will be retreived by default.

try {
    $result = $api_instance->getQueryResultSetPage($database, $repo, $resultSetId, $pageNumber);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QueryApi->getQueryResultSetPage: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::QueryApi;

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

my $api_instance = WWW::SwaggerClient::QueryApi->new();
my $database = database_example; # String | The name of a database (within the repository) to retrieve a result set from
my $repo = repo_example; # String | The name of a CCM repository containing the database to retrieve a result set page from
my $resultSetId = resultSetId_example; # String | The ID of the desired result set
my $pageNumber = 789; # Long | The page number to retrieve from the result set. If one is not provided, the first page will be retreived by default.

eval { 
    my $result = $api_instance->getQueryResultSetPage(database => $database, repo => $repo, resultSetId => $resultSetId, pageNumber => $pageNumber);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QueryApi->getQueryResultSetPage: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.QueryApi()
database = database_example # String | The name of a database (within the repository) to retrieve a result set from
repo = repo_example # String | The name of a CCM repository containing the database to retrieve a result set page from
resultSetId = resultSetId_example # String | The ID of the desired result set
pageNumber = 789 # Long | The page number to retrieve from the result set. If one is not provided, the first page will be retreived by default. (optional)

try: 
    # Retrieves a result set from a dynamic query execution
    api_response = api_instance.get_query_result_set_page(database, repo, resultSetId, pageNumber=pageNumber)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QueryApi->getQueryResultSetPage: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
The name of a database (within the repository) to retrieve a result set from
Required
repo*
String
The name of a CCM repository containing the database to retrieve a result set page from
Required
result_set_id*
String
The ID of the desired result set
Required
Query parameters
Name Description
pageNumber
Long (int64)
The page number to retrieve from the result set. If one is not provided, the first page will be retreived by default.

Responses

Status: 200 - OK.

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


QueryDef

deleteQueryDef

Deletes a query definition

Deletes an existing query definition from the server.


/ccmweb/rest/repos/{repo}/databases/{database}/workspace/queryDefs/{query_dbid}

Usage and SDK Samples

curl -X DELETE -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/workspace/queryDefs/{query_dbid}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.QueryDefApi;

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

public class QueryDefApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        QueryDefApi apiInstance = new QueryDefApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the query definition to delete
        String queryDbid = queryDbid_example; // String | The database ID (dbId) of the query definition to delete
        String repo = repo_example; // String | The name of a CCM repository containing the query definition to delete
        try {
            apiInstance.deleteQueryDef(database, queryDbid, repo);
        } catch (ApiException e) {
            System.err.println("Exception when calling QueryDefApi#deleteQueryDef");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.QueryDefApi;

public class QueryDefApiExample {

    public static void main(String[] args) {
        QueryDefApi apiInstance = new QueryDefApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the query definition to delete
        String queryDbid = queryDbid_example; // String | The database ID (dbId) of the query definition to delete
        String repo = repo_example; // String | The name of a CCM repository containing the query definition to delete
        try {
            apiInstance.deleteQueryDef(database, queryDbid, repo);
        } catch (ApiException e) {
            System.err.println("Exception when calling QueryDefApi#deleteQueryDef");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *database = database_example; // The name of a database (within the repository) which contains the query definition to delete
String *queryDbid = queryDbid_example; // The database ID (dbId) of the query definition to delete
String *repo = repo_example; // The name of a CCM repository containing the query definition to delete

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

// Deletes a query definition
[apiInstance deleteQueryDefWith:database
    queryDbid:queryDbid
    repo:repo
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.QueryDefApi()

var database = database_example; // {String} The name of a database (within the repository) which contains the query definition to delete

var queryDbid = queryDbid_example; // {String} The database ID (dbId) of the query definition to delete

var repo = repo_example; // {String} The name of a CCM repository containing the query definition to delete


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

namespace Example
{
    public class deleteQueryDefExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new QueryDefApi();
            var database = database_example;  // String | The name of a database (within the repository) which contains the query definition to delete
            var queryDbid = queryDbid_example;  // String | The database ID (dbId) of the query definition to delete
            var repo = repo_example;  // String | The name of a CCM repository containing the query definition to delete

            try
            {
                // Deletes a query definition
                apiInstance.deleteQueryDef(database, queryDbid, repo);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling QueryDefApi.deleteQueryDef: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\QueryDefApi();
$database = database_example; // String | The name of a database (within the repository) which contains the query definition to delete
$queryDbid = queryDbid_example; // String | The database ID (dbId) of the query definition to delete
$repo = repo_example; // String | The name of a CCM repository containing the query definition to delete

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

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

my $api_instance = WWW::SwaggerClient::QueryDefApi->new();
my $database = database_example; # String | The name of a database (within the repository) which contains the query definition to delete
my $queryDbid = queryDbid_example; # String | The database ID (dbId) of the query definition to delete
my $repo = repo_example; # String | The name of a CCM repository containing the query definition to delete

eval { 
    $api_instance->deleteQueryDef(database => $database, queryDbid => $queryDbid, repo => $repo);
};
if ($@) {
    warn "Exception when calling QueryDefApi->deleteQueryDef: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.QueryDefApi()
database = database_example # String | The name of a database (within the repository) which contains the query definition to delete
queryDbid = queryDbid_example # String | The database ID (dbId) of the query definition to delete
repo = repo_example # String | The name of a CCM repository containing the query definition to delete

try: 
    # Deletes a query definition
    api_instance.delete_query_def(database, queryDbid, repo)
except ApiException as e:
    print("Exception when calling QueryDefApi->deleteQueryDef: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
The name of a database (within the repository) which contains the query definition to delete
Required
query_dbid*
String
The database ID (dbId) of the query definition to delete
Required
repo*
String
The name of a CCM repository containing the query definition to delete
Required

Responses

Status: 204 - Query definition deleted successfully.

Status: 401 - Unauthorized

Status: 403 - Forbidden


getQueryDef

Retrieves a query definition

Retrieves an existing query definition.


/ccmweb/rest/repos/{repo}/databases/{database}/workspace/queryDefs/{query_dbid}

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/workspace/queryDefs/{query_dbid}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.QueryDefApi;

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

public class QueryDefApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        QueryDefApi apiInstance = new QueryDefApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the query definition to retrieve
        String queryDbid = queryDbid_example; // String | The database ID (dbId) of the query definition to retrieve
        String repo = repo_example; // String | The name of a CCM repository containing the query definition to retrieve
        try {
            QueryDef result = apiInstance.getQueryDef(database, queryDbid, repo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QueryDefApi#getQueryDef");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.QueryDefApi;

public class QueryDefApiExample {

    public static void main(String[] args) {
        QueryDefApi apiInstance = new QueryDefApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the query definition to retrieve
        String queryDbid = queryDbid_example; // String | The database ID (dbId) of the query definition to retrieve
        String repo = repo_example; // String | The name of a CCM repository containing the query definition to retrieve
        try {
            QueryDef result = apiInstance.getQueryDef(database, queryDbid, repo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QueryDefApi#getQueryDef");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *database = database_example; // The name of a database (within the repository) which contains the query definition to retrieve
String *queryDbid = queryDbid_example; // The database ID (dbId) of the query definition to retrieve
String *repo = repo_example; // The name of a CCM repository containing the query definition to retrieve

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

// Retrieves a query definition
[apiInstance getQueryDefWith:database
    queryDbid:queryDbid
    repo:repo
              completionHandler: ^(QueryDef output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.QueryDefApi()

var database = database_example; // {String} The name of a database (within the repository) which contains the query definition to retrieve

var queryDbid = queryDbid_example; // {String} The database ID (dbId) of the query definition to retrieve

var repo = repo_example; // {String} The name of a CCM repository containing the query definition to retrieve


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

namespace Example
{
    public class getQueryDefExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new QueryDefApi();
            var database = database_example;  // String | The name of a database (within the repository) which contains the query definition to retrieve
            var queryDbid = queryDbid_example;  // String | The database ID (dbId) of the query definition to retrieve
            var repo = repo_example;  // String | The name of a CCM repository containing the query definition to retrieve

            try
            {
                // Retrieves a query definition
                QueryDef result = apiInstance.getQueryDef(database, queryDbid, repo);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling QueryDefApi.getQueryDef: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\QueryDefApi();
$database = database_example; // String | The name of a database (within the repository) which contains the query definition to retrieve
$queryDbid = queryDbid_example; // String | The database ID (dbId) of the query definition to retrieve
$repo = repo_example; // String | The name of a CCM repository containing the query definition to retrieve

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

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

my $api_instance = WWW::SwaggerClient::QueryDefApi->new();
my $database = database_example; # String | The name of a database (within the repository) which contains the query definition to retrieve
my $queryDbid = queryDbid_example; # String | The database ID (dbId) of the query definition to retrieve
my $repo = repo_example; # String | The name of a CCM repository containing the query definition to retrieve

eval { 
    my $result = $api_instance->getQueryDef(database => $database, queryDbid => $queryDbid, repo => $repo);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QueryDefApi->getQueryDef: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.QueryDefApi()
database = database_example # String | The name of a database (within the repository) which contains the query definition to retrieve
queryDbid = queryDbid_example # String | The database ID (dbId) of the query definition to retrieve
repo = repo_example # String | The name of a CCM repository containing the query definition to retrieve

try: 
    # Retrieves a query definition
    api_response = api_instance.get_query_def(database, queryDbid, repo)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QueryDefApi->getQueryDef: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
The name of a database (within the repository) which contains the query definition to retrieve
Required
query_dbid*
String
The database ID (dbId) of the query definition to retrieve
Required
repo*
String
The name of a CCM repository containing the query definition to retrieve
Required

Responses

Status: 200 - OK.

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


getQueryFieldOptions

Retrieves field options for a field path in a query definition

Retrieves field options for a field path in a query definition


/ccmweb/rest/repos/{repo}/databases/{database}/workspace/queryDefs/{recordType}/fieldOptions/{fieldPath}

Usage and SDK Samples

curl -X GET -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/workspace/queryDefs/{recordType}/fieldOptions/{fieldPath}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.QueryDefApi;

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

public class QueryDefApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        QueryDefApi apiInstance = new QueryDefApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the field path to retrieve options for
        String fieldPath = fieldPath_example; // String | The field path to retrieve options for. The field path can be dot-separated to refer to nested fields.
        String recordType = recordType_example; // String | The record type that contains the field path to retreive options for
        String repo = repo_example; // String | The name of a CCM repository containing field path to retrieve options for
        try {
            FieldOptions result = apiInstance.getQueryFieldOptions(database, fieldPath, recordType, repo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QueryDefApi#getQueryFieldOptions");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.QueryDefApi;

public class QueryDefApiExample {

    public static void main(String[] args) {
        QueryDefApi apiInstance = new QueryDefApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the field path to retrieve options for
        String fieldPath = fieldPath_example; // String | The field path to retrieve options for. The field path can be dot-separated to refer to nested fields.
        String recordType = recordType_example; // String | The record type that contains the field path to retreive options for
        String repo = repo_example; // String | The name of a CCM repository containing field path to retrieve options for
        try {
            FieldOptions result = apiInstance.getQueryFieldOptions(database, fieldPath, recordType, repo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QueryDefApi#getQueryFieldOptions");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *database = database_example; // The name of a database (within the repository) which contains the field path to retrieve options for
String *fieldPath = fieldPath_example; // The field path to retrieve options for. The field path can be dot-separated to refer to nested fields.
String *recordType = recordType_example; // The record type that contains the field path to retreive options for
String *repo = repo_example; // The name of a CCM repository containing field path to retrieve options for

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

// Retrieves field options for a field path in a query definition
[apiInstance getQueryFieldOptionsWith:database
    fieldPath:fieldPath
    recordType:recordType
    repo:repo
              completionHandler: ^(FieldOptions output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.QueryDefApi()

var database = database_example; // {String} The name of a database (within the repository) which contains the field path to retrieve options for

var fieldPath = fieldPath_example; // {String} The field path to retrieve options for. The field path can be dot-separated to refer to nested fields.

var recordType = recordType_example; // {String} The record type that contains the field path to retreive options for

var repo = repo_example; // {String} The name of a CCM repository containing field path to retrieve options for


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

namespace Example
{
    public class getQueryFieldOptionsExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new QueryDefApi();
            var database = database_example;  // String | The name of a database (within the repository) which contains the field path to retrieve options for
            var fieldPath = fieldPath_example;  // String | The field path to retrieve options for. The field path can be dot-separated to refer to nested fields.
            var recordType = recordType_example;  // String | The record type that contains the field path to retreive options for
            var repo = repo_example;  // String | The name of a CCM repository containing field path to retrieve options for

            try
            {
                // Retrieves field options for a field path in a query definition
                FieldOptions result = apiInstance.getQueryFieldOptions(database, fieldPath, recordType, repo);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling QueryDefApi.getQueryFieldOptions: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\QueryDefApi();
$database = database_example; // String | The name of a database (within the repository) which contains the field path to retrieve options for
$fieldPath = fieldPath_example; // String | The field path to retrieve options for. The field path can be dot-separated to refer to nested fields.
$recordType = recordType_example; // String | The record type that contains the field path to retreive options for
$repo = repo_example; // String | The name of a CCM repository containing field path to retrieve options for

try {
    $result = $api_instance->getQueryFieldOptions($database, $fieldPath, $recordType, $repo);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QueryDefApi->getQueryFieldOptions: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::QueryDefApi;

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

my $api_instance = WWW::SwaggerClient::QueryDefApi->new();
my $database = database_example; # String | The name of a database (within the repository) which contains the field path to retrieve options for
my $fieldPath = fieldPath_example; # String | The field path to retrieve options for. The field path can be dot-separated to refer to nested fields.
my $recordType = recordType_example; # String | The record type that contains the field path to retreive options for
my $repo = repo_example; # String | The name of a CCM repository containing field path to retrieve options for

eval { 
    my $result = $api_instance->getQueryFieldOptions(database => $database, fieldPath => $fieldPath, recordType => $recordType, repo => $repo);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QueryDefApi->getQueryFieldOptions: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.QueryDefApi()
database = database_example # String | The name of a database (within the repository) which contains the field path to retrieve options for
fieldPath = fieldPath_example # String | The field path to retrieve options for. The field path can be dot-separated to refer to nested fields.
recordType = recordType_example # String | The record type that contains the field path to retreive options for
repo = repo_example # String | The name of a CCM repository containing field path to retrieve options for

try: 
    # Retrieves field options for a field path in a query definition
    api_response = api_instance.get_query_field_options(database, fieldPath, recordType, repo)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QueryDefApi->getQueryFieldOptions: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
The name of a database (within the repository) which contains the field path to retrieve options for
Required
fieldPath*
String
The field path to retrieve options for. The field path can be dot-separated to refer to nested fields.
Required
recordType*
String
The record type that contains the field path to retreive options for
Required
repo*
String
The name of a CCM repository containing field path to retrieve options for
Required

Responses

Status: 200 - OK.

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found


modifyQueryDef

Modifies a query definition

Modifies an existing query definition.


/ccmweb/rest/repos/{repo}/databases/{database}/workspace/queryDefs/{query_dbid}

Usage and SDK Samples

curl -X PATCH -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/workspace/queryDefs/{query_dbid}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.QueryDefApi;

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

public class QueryDefApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        QueryDefApi apiInstance = new QueryDefApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the query definition to modify
        QueryDef queryDef = ; // QueryDef | A request body containing updated values for the desired query definition. Modifying a query definition requires a valid base structure to be supplied: a name, a primary entity definition name, at least one query field definition that is set to be shown, and a root filter node, which includes a boolean operation. The desired query definition values should be included in addition to this. The API will not apply only what has changed between the current definition and the provided, modified definition. Therefore, the full desired definition must be provided.
        String queryDbid = queryDbid_example; // String | The database ID (dbId) of the query definition to modify
        String repo = repo_example; // String | The name of a CCM repository containing the query definition to modify
        try {
            QueryDef result = apiInstance.modifyQueryDef(database, queryDef, queryDbid, repo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QueryDefApi#modifyQueryDef");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.QueryDefApi;

public class QueryDefApiExample {

    public static void main(String[] args) {
        QueryDefApi apiInstance = new QueryDefApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the query definition to modify
        QueryDef queryDef = ; // QueryDef | A request body containing updated values for the desired query definition. Modifying a query definition requires a valid base structure to be supplied: a name, a primary entity definition name, at least one query field definition that is set to be shown, and a root filter node, which includes a boolean operation. The desired query definition values should be included in addition to this. The API will not apply only what has changed between the current definition and the provided, modified definition. Therefore, the full desired definition must be provided.
        String queryDbid = queryDbid_example; // String | The database ID (dbId) of the query definition to modify
        String repo = repo_example; // String | The name of a CCM repository containing the query definition to modify
        try {
            QueryDef result = apiInstance.modifyQueryDef(database, queryDef, queryDbid, repo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QueryDefApi#modifyQueryDef");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *database = database_example; // The name of a database (within the repository) which contains the query definition to modify
QueryDef *queryDef = ; // A request body containing updated values for the desired query definition. Modifying a query definition requires a valid base structure to be supplied: a name, a primary entity definition name, at least one query field definition that is set to be shown, and a root filter node, which includes a boolean operation. The desired query definition values should be included in addition to this. The API will not apply only what has changed between the current definition and the provided, modified definition. Therefore, the full desired definition must be provided.
String *queryDbid = queryDbid_example; // The database ID (dbId) of the query definition to modify
String *repo = repo_example; // The name of a CCM repository containing the query definition to modify

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

// Modifies a query definition
[apiInstance modifyQueryDefWith:database
    queryDef:queryDef
    queryDbid:queryDbid
    repo:repo
              completionHandler: ^(QueryDef output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.QueryDefApi()

var database = database_example; // {String} The name of a database (within the repository) which contains the query definition to modify

var queryDef = ; // {QueryDef} A request body containing updated values for the desired query definition. Modifying a query definition requires a valid base structure to be supplied: a name, a primary entity definition name, at least one query field definition that is set to be shown, and a root filter node, which includes a boolean operation. The desired query definition values should be included in addition to this. The API will not apply only what has changed between the current definition and the provided, modified definition. Therefore, the full desired definition must be provided.

var queryDbid = queryDbid_example; // {String} The database ID (dbId) of the query definition to modify

var repo = repo_example; // {String} The name of a CCM repository containing the query definition to modify


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

namespace Example
{
    public class modifyQueryDefExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new QueryDefApi();
            var database = database_example;  // String | The name of a database (within the repository) which contains the query definition to modify
            var queryDef = new QueryDef(); // QueryDef | A request body containing updated values for the desired query definition. Modifying a query definition requires a valid base structure to be supplied: a name, a primary entity definition name, at least one query field definition that is set to be shown, and a root filter node, which includes a boolean operation. The desired query definition values should be included in addition to this. The API will not apply only what has changed between the current definition and the provided, modified definition. Therefore, the full desired definition must be provided.
            var queryDbid = queryDbid_example;  // String | The database ID (dbId) of the query definition to modify
            var repo = repo_example;  // String | The name of a CCM repository containing the query definition to modify

            try
            {
                // Modifies a query definition
                QueryDef result = apiInstance.modifyQueryDef(database, queryDef, queryDbid, repo);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling QueryDefApi.modifyQueryDef: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\QueryDefApi();
$database = database_example; // String | The name of a database (within the repository) which contains the query definition to modify
$queryDef = ; // QueryDef | A request body containing updated values for the desired query definition. Modifying a query definition requires a valid base structure to be supplied: a name, a primary entity definition name, at least one query field definition that is set to be shown, and a root filter node, which includes a boolean operation. The desired query definition values should be included in addition to this. The API will not apply only what has changed between the current definition and the provided, modified definition. Therefore, the full desired definition must be provided.
$queryDbid = queryDbid_example; // String | The database ID (dbId) of the query definition to modify
$repo = repo_example; // String | The name of a CCM repository containing the query definition to modify

try {
    $result = $api_instance->modifyQueryDef($database, $queryDef, $queryDbid, $repo);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling QueryDefApi->modifyQueryDef: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::QueryDefApi;

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

my $api_instance = WWW::SwaggerClient::QueryDefApi->new();
my $database = database_example; # String | The name of a database (within the repository) which contains the query definition to modify
my $queryDef = WWW::SwaggerClient::Object::QueryDef->new(); # QueryDef | A request body containing updated values for the desired query definition. Modifying a query definition requires a valid base structure to be supplied: a name, a primary entity definition name, at least one query field definition that is set to be shown, and a root filter node, which includes a boolean operation. The desired query definition values should be included in addition to this. The API will not apply only what has changed between the current definition and the provided, modified definition. Therefore, the full desired definition must be provided.
my $queryDbid = queryDbid_example; # String | The database ID (dbId) of the query definition to modify
my $repo = repo_example; # String | The name of a CCM repository containing the query definition to modify

eval { 
    my $result = $api_instance->modifyQueryDef(database => $database, queryDef => $queryDef, queryDbid => $queryDbid, repo => $repo);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QueryDefApi->modifyQueryDef: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['Authorization'] = 'Bearer'

# create an instance of the API class
api_instance = swagger_client.QueryDefApi()
database = database_example # String | The name of a database (within the repository) which contains the query definition to modify
queryDef =  # QueryDef | A request body containing updated values for the desired query definition. Modifying a query definition requires a valid base structure to be supplied: a name, a primary entity definition name, at least one query field definition that is set to be shown, and a root filter node, which includes a boolean operation. The desired query definition values should be included in addition to this. The API will not apply only what has changed between the current definition and the provided, modified definition. Therefore, the full desired definition must be provided.
queryDbid = queryDbid_example # String | The database ID (dbId) of the query definition to modify
repo = repo_example # String | The name of a CCM repository containing the query definition to modify

try: 
    # Modifies a query definition
    api_response = api_instance.modify_query_def(database, queryDef, queryDbid, repo)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling QueryDefApi->modifyQueryDef: %s\n" % e)

Parameters

Path parameters
Name Description
database*
String
The name of a database (within the repository) which contains the query definition to modify
Required
query_dbid*
String
The database ID (dbId) of the query definition to modify
Required
repo*
String
The name of a CCM repository containing the query definition to modify
Required
Body parameters
Name Description
queryDef *

Responses

Status: 201 - Query definition modified successfully.

Status: 204 - No Content

Status: 401 - Unauthorized

Status: 403 - Forbidden


QueryDefs

createQueryDef

Creates a query definition

Creates a new query definition with the provided fields and filters and places it within the specified parent folder.


/ccmweb/rest/repos/{repo}/databases/{database}/workspace/queryDefs

Usage and SDK Samples

curl -X POST -H "Authorization: [[apiKey]]" "https://192.168.1.245:8190/ccmweb/rest/repos/{repo}/databases/{database}/workspace/queryDefs"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.QueryDefsApi;

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

public class QueryDefsApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure API key authorization: Authorization
        ApiKeyAuth Authorization = (ApiKeyAuth) defaultClient.getAuthentication("Authorization");
        Authorization.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //Authorization.setApiKeyPrefix("Token");

        QueryDefsApi apiInstance = new QueryDefsApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the desired workspace to create the query definition in
        QueryDef queryDef = ; // QueryDef | Represents information required to create a query definition in CCM. At minimum, a name, parent database ID (where the query definition will be placed in the workspace), primary entity definition name, at least one query field definition that is set to be shown, and a root filter node with a boolean operator are required to create a query definition.
        String repo = repo_example; // String | The name of a CCM repository containing the desired workspace to create the query definition in
        try {
            QueryDef result = apiInstance.createQueryDef(database, queryDef, repo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QueryDefsApi#createQueryDef");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.QueryDefsApi;

public class QueryDefsApiExample {

    public static void main(String[] args) {
        QueryDefsApi apiInstance = new QueryDefsApi();
        String database = database_example; // String | The name of a database (within the repository) which contains the desired workspace to create the query definition in
        QueryDef queryDef = ; // QueryDef | Represents information required to create a query definition in CCM. At minimum, a name, parent database ID (where the query definition will be placed in the workspace), primary entity definition name, at least one query field definition that is set to be shown, and a root filter node with a boolean operator are required to create a query definition.
        String repo = repo_example; // String | The name of a CCM repository containing the desired workspace to create the query definition in
        try {
            QueryDef result = apiInstance.createQueryDef(database, queryDef, repo);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling QueryDefsApi#createQueryDef");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: Authorization)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Authorization"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"Authorization"];

String *database = database_example; // The name of a database (within the repository) which contains the desired workspace to create the query definition in
QueryDef *queryDef = ; // Represents information required to create a query definition in CCM. At minimum, a name, parent database ID (where the query definition will be placed in the workspace), primary entity definition name, at least one query field definition that is set to be shown, and a root filter node with a boolean operator are required to create a query definition.
String *repo = repo_example; // The name of a CCM repository containing the desired workspace to create the query definition in

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

// Creates a query definition
[apiInstance createQueryDefWith:database
    queryDef:queryDef
    repo:repo
              completionHandler: ^(QueryDef output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var CcmRestApi = require('ccm_rest_api');
var defaultClient = CcmRestApi.ApiClient.instance;

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

var api = new CcmRestApi.QueryDefsApi()

var database = database_example; // {String} The name of a database (within the repository) which contains the desired workspace to create the query definition in

var queryDef = ; // {QueryDef} Represents information required to create a query definition in CCM. At minimum, a name, parent database ID (where the query definition will be placed in the workspace), primary entity definition name, at least one query field definition that is set to be shown, and a root filter node with a boolean operator are required to create a query definition.

var repo = repo_example; // {String} The name of a CCM repository containing the desired workspace to create the query definition in


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

namespace Example
{
    public class createQueryDefExample
    {
        public void main()
        {
            
            // Configure API key authorization: Authorization
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new QueryDefsApi();
            var database = database_example;  // String | The name of a database (within the repository) which contains the desired workspace to create the query definition in
            var queryDef = new QueryDef(); // QueryDef | Represents information required to create a query definition in CCM. At minimum, a name, parent database ID (where the query definition will be placed in the workspace), primary entity definition name, at least one query field definition that is set to be shown, and a root filter node with a boolean operator are required to create a query definition.
            var repo = repo_example;  // String | The name of a CCM repository containing the desired workspace to create the query definition in

            try
            {
                // Creates a query definition
                QueryDef result = apiInstance.createQueryDef(database, queryDef, repo);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling QueryDefsApi.createQueryDef: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

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

$api_instance = new Swagger\Client\Api\QueryDefsApi();
$database = database_example; // String | The name of a database (within the repository) which contains the desired workspace to create the query definition in
$queryDef = ; // QueryDef | Represents information required to create a query definition in CCM. At minimum, a name, parent database ID (where the query definition will be placed in the workspace), primary entity definition name, at least one query field definition that is set to be shown, and a root filter node with a boolean operator are required to create a query definition.
$repo = repo_example; // String | The name of a CCM repository containing the desired workspace to create the query definition in

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

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

my $api_instance = WWW::SwaggerClient::QueryDefsApi->new();
my $database = database_example; # String | The name of a database (within the repository) which contains the desired workspace to create the query definition in
my $queryDef = WWW::SwaggerClient::Object::QueryDef->new(); # QueryDef | Represents information required to create a query definition in CCM. At minimum, a name, parent database ID (where the query definition will be placed in the workspace), primary entity definition name, at least one query field definition that is set to be shown, and a root filter node with a boolean operator are required to create a query definition.
my $repo = repo_example; # String | The name of a CCM repository containing the desired workspace to create the query definition in

eval { 
    my $result = $api_instance->createQueryDef(database => $database, queryDef => $queryDef, repo => $repo);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling QueryDefsApi->createQueryDef: $@\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: Authorization
swagger_client.configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup pref