This documentation supports the 23.3 version of BMC Helix ITSM.To view an earlier version, select the version from the Product version menu.

Example of using the simplified REST API to download an attachment


The following example demonstrates how you can use the BMC Helix ITSM simplified API to download an attachment from a specified BMC Helix ITSM form.

You must provide the following parameters in the request URL:

Parameter

Data type

Description

dataSource

String

Name of the form from where you want to download the attachment. For example: HPD:WorkLog

attachmentFieldId

String

The ID of the attachment field. For example: 1000000351.

dataSourceId

String

Unique record Id. For example: AGGADGGXJ6E3GAQX5FEYQX5FEY55OK

cURL example

curl -X 'GET' \
 'https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/attachment/download/HPD%3AWorkLog/1000000351/AGGADGGXJ6E3GAQX5FEYQX5FEY55OK' \
 -H 'accept: */*'

Request URL

https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/attachment/download/HPD%3AWorkLog/1000000351/AGGADGGXJ6E3GAQX5FEYQX5FEY55OK

The following example demonstrate how to perform the operations by using Postman client.

Before you begin

Make sure that you have a valid authentication token. For more information, see Access-and-authentication-for-the-simplified-REST-API.

To download an attachment

  1. Open the Postman - REST Client.
  2. Enter the request URL. For example:

    https://<Innovation Suite server URL>/api/com.bmc.dsm.itsm.itsm-rest-api/attachment/download/HPD%3AWorkLog/1000000351/AGGADGGXJ6E3GAQX5FEYQX5FEY55OK

  3. Select the operation as POST.
  4. Click Headers.
  5. Enter the following data as key value pairs in the header:

    Key

    Value

    X-Requested-By

    XMLHttpRequest

    Content-Type

    application/json

  6. Click Send.
    The results are displayed on the response panel.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*