---
title: "REST - AttachInfo"
canonical: "https://help.agiloft.com/space/HELP/43715898/REST+-+AttachInfo"
format: markdown
---
The EWAttachInfo operation returns information about the attachments of a record in a particular field.

- **Returns**: the position, name, and size for each file in the field.
- **Supported Content-Type: **application/x-www-form-urlencoded
- Accepts a URL with URL-encoded parameters and record data. For more information about general URL conventions, see [REST Interface](https://wiki.agiloft.com/display/HELP/REST+Interface).

## Example

Use the AttachInfo call to get information about files attached to records. The AttachInfo call requires you to input information in the URL about your KB, the logical name of the table you plan on accessing, the logical name of the field, your login, your password, and record ID.

Here is an example URL:

```
https://integration-1.cf/ewws/EWAttachInfo/.json?$KB=example_KB&$table=company&$lang=en&field=attached_file&$login=example_login&$password=example_password&id=1
```

An example return is as follows:

```
{
    "success": true,
    "message": "",
    "result": [
        {
            "fileName": "Contract Title",
            "size": 22126,
            "filePosition": 0
        }
    ]
}
```

# Error Codes

These error codes are for EWAttach only, but are not an extensive list of possible error codes. For any errors not listed here, consult the General Error Codes section of [https://agiloft-public.atlassian.net/wiki/spaces/HELP/pages/43715778](https://agiloft-public.atlassian.net/wiki/spaces/HELP/pages/43715778).

|  |  |  |  |
| --- | --- | --- | --- |
| Scenario | Type | Code | Description |
| Mismatch between the number of attachments and the number of   attachment metadata records available for a record | VALIDATION | 400 | EWWrongDataException → Blob field <fieldName> in   table <tableName> does not contain <metadataNumber> but less   <attachmentNumber> for key <recordId> |