Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Tip

Available from CRM.COM R11.0.0

Table of Contents
maxLevel2

GET attachments/list

This method returns the attachments related with a specific entity. Multiple attachments are returned by each call.

Resource URL

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

entity

(mandatory)

String

The name of the entity related with the attachment. The supported entities are the following:

  • ACCOUNTSRECEIVABLE
  • ACTIVITIES
  • COMMUNICATIONS
  • CONTACTINFORMATION
  • INSTALLEDITEMS
  • JOBS
  • LEADS
  • PRODUCTS
  • SERVICEREQUESTS

entity_id

(mandatory)

StringThe ID of the entity related with the attachment

fields_set
(optional)

List of Strings, comma separated 

A list of fields that should be included in the results. If not specified then all the available fields will be returned

Restrictions

  • It is mandatory to specify at least one of the semi-optional parameters. Only one of those parameters is allowed to be specified.

Response Data

...

Examples

Expand
titleExample 1

HTTP Method: GET

 

Request:

Response:

Code Block
themeConfluence
languagejs
linenumberstrue
 {
  "data": [
    {
      "comments": "polina",
      "file": {
        "file_name": "bill subscriber error.txt",
        "file_content_url": "cyn1lnx025:8080/crm/FileDownloadServlet?id=01239852D674447D88374321FD922E7A",
        "file_mime_type": "text/plain"
      },
      "log_information": {
        "created_by_unit": {
          "alternative_code": "adminunit",
          "name": "Admin Unit",
          "description": "admin unit",
          "id": "1"
        },
        "updated_by_unit": {
          "alternative_code": "adminunit",
          "name": "Admin Unit",
          "description": "admin unit",
          "id": "1"
        },
        "created_date": "2016-11-03T13:42:06",
        "updated_date": "2016-11-03T13:42:06",
        "updated_by_user": {
          "person_name": "MPAdministrator",
          "id": "1",
          "username": "MPAdministrator"
        },
        "created_by_user": {
          "person_name": "MPAdministrator",
          "id": "1",
          "username": "MPAdministrator"
        }
      },
      "id": "01239852D674447D88374321FD922E7A",
      "entity_id": "10A149D60365488AB53DCB889CFD98F8",
      "entity": "ACCOUNTSRECEIVABLE",
      "url": null
    },
    {
      "notes": "polina",
      "file": {
        "file_name": "bill subscriber error.txt",
        "file_content_url": "cyn1lnx025:8080/crm/FileDownloadServlet?id=479FAB4E732B44EAA66B41522A5AE126",
        "file_mime_type": "text/plain"
      },
      "log_information": {
        "created_by_unit": {
          "alternative_code": "adminunit",
          "name": "Admin Unit",
          "description": "admin unit",
          "id": "1"
        },
        "updated_by_unit": {
          "alternative_code": "adminunit",
          "name": "Admin Unit",
          "description": "admin unit",
          "id": "1"
        },
        "created_date": "2016-11-03T13:34:29",
        "updated_date": "2016-11-03T13:34:32",
        "updated_by_user": {
          "person_name": "MPAdministrator",
          "id": "1",
          "username": "MPAdministrator"
        },
        "created_by_user": {
          "person_name": "MPAdministrator",
          "id": "1",
          "username": "MPAdministrator"
        }
      },
      "id": "479FAB4E732B44EAA66B41522A5AE126",
      "entity_id": "10A149D60365488AB53DCB889CFD98F8",
      "entity": "ACCOUNTSRECEIVABLE",
      "url": null
    },
    {
      "notes": "test",
      "file": {
        "file_name": "bill subscriber error.txt",
        "file_content_url": "cyn1lnx025:8080/crm/FileDownloadServlet?id=0B8B13EFADF34D9899F633639F6D460E",
        "file_mime_type": "text/plain"
      },
      "log_information": {
        "created_by_unit": {
          "alternative_code": "adminunit",
          "name": "Admin Unit",
          "description": "admin unit",
          "id": "1"
        },
        "updated_by_unit": {
          "alternative_code": "adminunit",
          "name": "Admin Unit",
          "description": "admin unit",
          "id": "1"
        },
        "created_date": "2016-11-03T13:26:08",
        "updated_date": "2016-11-03T13:28:06",
        "updated_by_user": {
          "person_name": "MPAdministrator",
          "id": "1",
          "username": "MPAdministrator"
        },
        "created_by_user": {
          "person_name": "MPAdministrator",
          "id": "1",
          "username": "MPAdministrator"
        }
      },
      "id": "0B8B13EFADF34D9899F633639F6D460E",
      "entity_id": "10A149D60365488AB53DCB889CFD98F8",
      "entity": "ACCOUNTSRECEIVABLE",
      "url": null
    },
    {
      "notes": null,
      "file": {
        "file_name": "bill subscriber error.txt",
        "file_content_url": "cyn1lnx025:8080/crm/FileDownloadServlet?id=927EEC9B3C16495B9A76B0D4219687C2",
        "file_mime_type": "text/plain"
      },
      "log_information": {
        "created_by_unit": {
          "alternative_code": "adminunit",
          "name": "Admin Unit",
          "description": "admin unit",
          "id": "1"
        },
        "updated_by_unit": {
          "alternative_code": "adminunit",
          "name": "Admin Unit",
          "description": "admin unit",
          "id": "1"
        },
        "created_date": "2016-11-02T13:21:04",
        "updated_date": "2016-11-02T13:21:06",
        "updated_by_user": {
          "person_name": "MPAdministrator",
          "id": "1",
          "username": "MPAdministrator"
        },
        "created_by_user": {
          "person_name": "MPAdministrator",
          "id": "1",
          "username": "MPAdministrator"
        }
      },
      "id": "927EEC9B3C16495B9A76B0D4219687C2",
      "entity_id": "10A149D60365488AB53DCB889CFD98F8",
      "entity": "ACCOUNTSRECEIVABLE",
      "url": null
    }
  ],
  "status": {
    "code": "OK",
    "description": "",
    "message": ""
  }
}

POST attachments/add

This method is used to add attachments on an existing entity.  This Web API method requires a multipart/form-data post, as defined in RFC 1867. There are many libraries available that can be used in order to submit multipart/form-data posts (for example MultipartEntity in Java). A single attachment can be added through each call

Resource URL

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

entity

(mandatory)

String

The name of the entity related with the attachments that should be returned as a result. The supported entities are the following:

  • ACCOUNTSRECEIVABLE
  • ACTIVITIES
  • COMMUNICATIONS
  • CONTACTINFORMATION
  • INSTALLEDITEMS
  • JOBS
  • LEADS
  • PRODUCTS
  • SERVICEREQUESTS

entity_id

(mandatory)

StringThe ID of the entity related with the attachments that should be returned as a result

file

(semi-optional)

FileThe file that should be added as an attachment

url

(semi-optional)

StringThe URL that should be added as an attachment

notes

(optional)

StringThe notes related with the attachment

fields_set
(optional)

List of Strings, comma separated 

A list of fields that should be included in the results. If not specified then all the available fields will be returned

Restrictions

  • It is mandatory to specify one of the semi-optional parameters. Only one of those parameters is allowed to be specified.

Response Data

...

Examples

Expand
titleExample 1

HTTP Method: POST

 

Headers:

KeyValueComments
   
   

 

Request:

Body:

Code Block
themeConfluence
languagejs
linenumberstrue
 

 

Response:

Code Block
themeConfluence
languagejavascript
linenumberstrue
 

POST attachments/delete

This method is used to delete attachments.  A single attachment can be deleted through this method

Resource URL

Parameters

Name

Type

Description

token

String

The token retrieved from the login method

id

 (mandatory)

String

The id of the attachment that should be deleted

 

Response Data

Not applicable

Examples

HTTP Method: POST

 

Request:

Body:

Expand
titleExample 1
Code Block
themeConfluence
languagejs
linenumberstrue
 {
"token":"{{token}}",
"id":"F7FF2E30AAD94720B844B1035B195955"
} 

 

Response:

Code Block
themeConfluence
languagejavascript
linenumberstrue
 { "data": {}, "status": { "code": "OK", "description": "", "message": "" } } Panel
nameblue

Child pages (Children Display)
alltrue
excerpttrue