# Object Transactions

{% hint style="warning" %}
**Limited Support/End of Life Capabilities**

The Classic API has been replaced by the Alemba RestFul API.  While we will continue to support the Classic API for clients that are still using it, no further development will be done.

If you need to request a hotfix or support for these features, please contact [<mark style="color:blue;">**Alemba Support**</mark>](https://alemba.help/production/Portal.aspx)
{% endhint %}

### ObjectAttach Transaction

The ObjectAttach transaction can be used to link an object to an item.

{% hint style="warning" %}
The object size limit specified for entities in the main application does not apply to any objects uploaded via the API. Alemba® recommends setting any size limit required in your own code.&#x20;
{% endhint %}

To find out the size limits that apply to objects being uploaded via the API, you should run the following queries:

* To find out the size limit when attaching objects to calls and CMDB items, run the query:&#x20;

```
SELECT NUMBER_STATUS FROM SU_SYS_PARAMETERS WHERE REF = 20
```

* To find out the size limit when attaching objects to requests, tasks and workflow templates, run the query:&#x20;

```
SELECT NUMBER_STATUS FROM CR_SYS_PARAMETERS WHERE REF = 5
```

{% hint style="info" %}
These queries will return the object file size in kb.
{% endhint %}

{% hint style="info" %}
The ObjectAttach transaction is only available through the COM/DCOM interface and not the Web Service.

Object uploads cannot be done via Web Services without using an API. Therefore, object uploads cannot be done via the Web Service Tester.&#x20;

As a file object is actually a binary array that cannot be entered in a text field, and the Web Service API tester does not allow for binary fields, the only way to test object uploads is via an API.
{% endhint %}

#### Input Parameters: ObjectAttachRequest

<table data-header-hidden><thead><tr><th></th><th width="120"></th><th></th><th width="78"></th><th></th></tr></thead><tbody><tr><td>Argument</td><td>Type</td><td>Mandatory</td><td>Default</td><td>Description</td></tr><tr><td>sID</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s current Session ID</td></tr><tr><td>sLoginUserID</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s Login ID</td></tr><tr><td>sLoginPassword</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Analyst’s Password</td></tr><tr><td>sDatabase</td><td>String</td><td>No. See Transaction Login.</td><td>“”</td><td>Name of the ASM System for logging in.</td></tr><tr><td>lEntityRef</td><td>Lookup Field</td><td>Yes</td><td>-</td><td>Entity reference in which to attach an object.</td></tr><tr><td>eEntityType</td><td>Enumerated</td><td>Yes</td><td>-</td><td><p>Entity type in which to attach an object. Values:</p><ul><li>User</li><li>Organization</li><li>Location</li><li>Contract</li><li>Agreement</li><li>Knowledge entry</li><li>Bulletin board entry</li><li>Call</li><li>Request</li><li>Task</li><li>CMDB item</li><li>Subscriber group</li></ul></td></tr><tr><td>sFileName</td><td>String</td><td>Yes</td><td>-</td><td>Path of the file to attach to the entity.</td></tr><tr><td>xContent</td><td>Byte()</td><td>No</td><td>-</td><td>Object to attach. This field cannot be used via the WS tester application.</td></tr><tr><td>nContentSize</td><td>Integer</td><td>No</td><td>0</td><td>Size of the object to attach. This field is ignored if the object size can be calculated from the actual content.</td></tr><tr><td>sObjectAbstract</td><td>String</td><td>No</td><td>“”</td><td>Object abstract</td></tr><tr><td>sObjectTitle</td><td>String</td><td>No</td><td>“”</td><td>Object title</td></tr><tr><td>yLite</td><td>Yes/No</td><td>No</td><td>N</td><td><p>Indicate whether this object is visible on the Self Service Portal. Values:</p><ul><li>Y = object will be visible on the Self Service Portal</li><li>N = object will not be visible on the Self Service Portal</li></ul></td></tr><tr><td>nVersion</td><td>Integer</td><td>No</td><td>1</td><td>Object Version</td></tr><tr><td>nVersionOrder</td><td>Integer</td><td>No</td><td>1</td><td>Object Version order</td></tr><tr><td>lSecurityProfile</td><td>Lookup Field</td><td>No</td><td>0</td><td>Security profile to apply to the Object</td></tr><tr><td>aCustomParameters</td><td>Array</td><td>No</td><td>“”</td><td>See Defining Custom Parameters.</td></tr></tbody></table>

#### Return Values: ObjectAttachResponse
