Skip to content

Latest commit

 

History

History
416 lines (287 loc) · 13.1 KB

AttachmentApi.md

File metadata and controls

416 lines (287 loc) · 13.1 KB

SynergiTech\Iplicit\AttachmentApi

All URIs are relative to https://api.iplicit.com, except if the operation defines another base path.

Method HTTP request Description
createAttachment() POST /api/Attachment/create/{attributeRef}/{sourceId}/AttachmentGroup/{attachmentGroupId} Create a new attachment on a specified source item
deleteAttachment() DELETE /api/Attachment/{attachmentId} Delete an attachment
getAttachmentDetails() GET /api/Attachment/{attachmentId}/Details Get attachment details
getAttachmentFile() GET /api/Attachment/{attachmentId}/File Get attachment file
getAttachmentGroups() GET /api/Attribute/{attributeRef}/AttachmentGroup Get a list of attachment groups defined on a specified attribute.
getAttachmentsInGroup() GET /api/Attachment/search/{attributeRef}/{sourceId}/AttachmentGroup/{attachmentGroupId} Get a list of attachments in an attachment group on a specified source item with a search filter.
updateAttachmentDetails() PATCH /api/Attachment/{attachmentId} Update attachment details

createAttachment()

createAttachment($attributeRef, $sourceId, $attachmentGroupId, $file, $description, $documentDate): string

Create a new attachment on a specified source item

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new SynergiTech\Iplicit\Api\AttachmentApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    config: $config
);
$attributeRef = 'attributeRef_example'; // string | Id or name of the attribute
$sourceId = 'sourceId_example'; // string | id of the source item to attach to
$attachmentGroupId = 'attachmentGroupId_example'; // string | Id of the attachment group. Use special value 'other' to get attachments without a group.
$file = "/path/to/file.txt"; // \SplFileObject | Attachment file information
$description = 'description_example'; // string | Attachment description
$documentDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Attachment document date

try {
    $result = $apiInstance->createAttachment($attributeRef, $sourceId, $attachmentGroupId, $file, $description, $documentDate);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentApi->createAttachment: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
attributeRef string Id or name of the attribute
sourceId string id of the source item to attach to
attachmentGroupId string Id of the attachment group. Use special value 'other' to get attachments without a group.
file \SplFileObject**\SplFileObject** Attachment file information
description string Attachment description [optional]
documentDate \DateTime Attachment document date [optional]

Return type

string

Authorization

No authorization required

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: text/plain, application/json, text/json

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

deleteAttachment()

deleteAttachment($attachmentId): string

Delete an attachment

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new SynergiTech\Iplicit\Api\AttachmentApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    config: $config
);
$attachmentId = 'attachmentId_example'; // string | Id of the attachment

try {
    $result = $apiInstance->deleteAttachment($attachmentId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentApi->deleteAttachment: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
attachmentId string Id of the attachment

Return type

string

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

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

getAttachmentDetails()

getAttachmentDetails($attachmentId): \SynergiTech\Iplicit\Model\AttachmentRead

Get attachment details

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new SynergiTech\Iplicit\Api\AttachmentApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    config: $config
);
$attachmentId = 'attachmentId_example'; // string | Id of the attachment

try {
    $result = $apiInstance->getAttachmentDetails($attachmentId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentApi->getAttachmentDetails: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
attachmentId string Id of the attachment

Return type

\SynergiTech\Iplicit\Model\AttachmentRead

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

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

getAttachmentFile()

getAttachmentFile($attachmentId): \SplFileObject

Get attachment file

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new SynergiTech\Iplicit\Api\AttachmentApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    config: $config
);
$attachmentId = 'attachmentId_example'; // string | Id of the attachment

try {
    $result = $apiInstance->getAttachmentFile($attachmentId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentApi->getAttachmentFile: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
attachmentId string Id of the attachment

Return type

\SplFileObject

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

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

getAttachmentGroups()

getAttachmentGroups($attributeRef): \SynergiTech\Iplicit\Model\AttachmentGroupRead[]

Get a list of attachment groups defined on a specified attribute.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new SynergiTech\Iplicit\Api\AttachmentApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    config: $config
);
$attributeRef = 'attributeRef_example'; // string | Id or type name of the attribute

try {
    $result = $apiInstance->getAttachmentGroups($attributeRef);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentApi->getAttachmentGroups: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
attributeRef string Id or type name of the attribute

Return type

\SynergiTech\Iplicit\Model\AttachmentGroupRead[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

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

getAttachmentsInGroup()

getAttachmentsInGroup($attributeRef, $sourceId, $attachmentGroupId, $createdFrom, $fileName, $take, $skip): \SynergiTech\Iplicit\Model\AttachmentRead[]

Get a list of attachments in an attachment group on a specified source item with a search filter.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new SynergiTech\Iplicit\Api\AttachmentApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    config: $config
);
$attributeRef = 'attributeRef_example'; // string | Id or name of the attribute
$sourceId = 'sourceId_example'; // string | Id of the source item
$attachmentGroupId = 'attachmentGroupId_example'; // string | Id of the attachment group. Use special value 'other' to get attachments without a group.
$createdFrom = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Filter attachments created after a specific date time
$fileName = 'fileName_example'; // string | Filter attachments with a specific file name
$take = 100; // int | The number of records to return
$skip = 0; // int | The number of records to skip

try {
    $result = $apiInstance->getAttachmentsInGroup($attributeRef, $sourceId, $attachmentGroupId, $createdFrom, $fileName, $take, $skip);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentApi->getAttachmentsInGroup: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
attributeRef string Id or name of the attribute
sourceId string Id of the source item
attachmentGroupId string Id of the attachment group. Use special value 'other' to get attachments without a group.
createdFrom \DateTime Filter attachments created after a specific date time [optional]
fileName string Filter attachments with a specific file name [optional]
take int The number of records to return [optional] [default to 100]
skip int The number of records to skip [optional] [default to 0]

Return type

\SynergiTech\Iplicit\Model\AttachmentRead[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json, text/json

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

updateAttachmentDetails()

updateAttachmentDetails($attachmentId, $attachmentUpdate): string

Update attachment details

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new SynergiTech\Iplicit\Api\AttachmentApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    config: $config
);
$attachmentId = 'attachmentId_example'; // string | Id of the attachment
$attachmentUpdate = new \SynergiTech\Iplicit\Model\AttachmentUpdate(); // \SynergiTech\Iplicit\Model\AttachmentUpdate |

try {
    $result = $apiInstance->updateAttachmentDetails($attachmentId, $attachmentUpdate);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AttachmentApi->updateAttachmentDetails: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
attachmentId string Id of the attachment
attachmentUpdate \SynergiTech\Iplicit\Model\AttachmentUpdate [optional]

Return type

string

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, text/json, application/*+json
  • Accept: text/plain, application/json, text/json

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