Attachments_GetAttachmentsList Operation

Applies to QAComplete 14.5, last modified on August 06, 2024
Since release 10.2, this functionality is obsolete and is supported for backward compatibility only. We recommend that you use QAComplete REST API to access and manage data in QAComplete.

Returns a list of files, URLs and UNC paths attached to the specified item (a defect, release and so on) in QAComplete. To download specific attachments, use Attachments_GetAttachment.

Requirements

The authenticating user must belong to a security group that has the Read privilege for the type of the item (Defects, Releases and so on) that contains the attachment.

Parameters

The operation uses the following parameters:

AuthenticationData  :  AuthenticationData, required

An AuthenticationData object containing the login information and the project ID that contains the attachment.

EntityCode  :  string, required

The type of the item that has attachments. Possible values:

  • Bugs (defects)
  • Contacts
  • FileExchanges (shared documents)
  • FunctionalSpecs (requirements)
  • ProjectPlans
  • ProjectPlanTasks
  • ProjectTasks (agile tasks)
  • Releases
  • TestCases (legacy test cases used in release 9.6.0 and earlier)
  • TestConfigurations
  • Tests
  • TestSets

FKId  :  integer, required

The ID of the item (a defect, release, and so on) that has attachments. For example, BugId of the defect, Id of the release, and so on.

Result

An array of Attachment objects that represent the item’s attachments.

Example

Sample Code

To view sample code that shows how to use the Attachments_GetAttachmentsList operation to get a list of files attached to a defect, see Get List of Files Attached to Item.

Sample Request XML

POST /psws/psws.asmx HTTP/1.1
Host: myteam.mysite.com
Content-Type: text/xml; charset=utf-8
Content-Length: 552 {Insert an appropriate value here}
SOAPAction: "http://www.pragmaticsw.com/Attachments_GetAttachmentsList"
 

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Attachments_GetAttachmentsList xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <EntityCode>Releases</EntityCode>
      <FKId>34</FKId>
    </Attachments_GetAttachmentsList>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

POST /psws/psws.asmx HTTP/1.1
Host: myteam.mysite.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 560 {Insert an appropriate value here}
 

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <Attachments_GetAttachmentsList xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <EntityCode>Releases</EntityCode>
      <FKId>34</FKId>
    </Attachments_GetAttachmentsList>
  </soap12:Body>
</soap12:Envelope>

Sample Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 1354 {The server returns an appropriate value here}
 

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Attachments_GetAttachmentsListResponse xmlns="http://www.pragmaticsw.com/">
      <Attachments_GetAttachmentsListResult>
        <Attachment>
          <AttachmentId>11</AttachmentId>
          <AttachmentTypeCode>File</AttachmentTypeCode>
          <Seq>0</Seq>
          <FileName>doc.pdf</FileName>
          <FileNameZipped>Attach34-1407210102211-doc.zip</FileNameZipped>
          <Title>Sample PDF file</Title>
          <FileFormatCode>Adobe PDF</FileFormatCode>
          <DateCreated>2014-07-21T01:02:21.527</DateCreated>
          <DateUpdated>2014-07-21T04:05:53</DateUpdated>
          <UpdateUserId>25315</UpdateUserId>
          <UserName>Doe, John</UserName>
          <ProjId>0</ProjId>
        </Attachment>
        <Attachment>
          <AttachmentId>12</AttachmentId>
          <AttachmentTypeCode>File</AttachmentTypeCode>
          <Seq>0</Seq>
          <FileName>readme.txt</FileName>
          <FileNameZipped>Attach34-1407210123541-readme.zip</FileNameZipped>
          <Title>Description</Title>
          <FileFormatCode>Text File</FileFormatCode>
          <DateCreated>2014-07-21T01:23:54.103</DateCreated>
          <DateUpdated>2014-07-21T01:23:54.103</DateUpdated>
          <UpdateUserId>27534</UpdateUserId>
          <UserName>Fry, Alex</UserName>
          <ProjId>0</ProjId>
        </Attachment>
      </Attachments_GetAttachmentsListResult>
    </Attachments_GetAttachmentsListResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 1364 {The server returns an appropriate value here}
 

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <Attachments_GetAttachmentsListResponse xmlns="http://www.pragmaticsw.com/">
      <Attachments_GetAttachmentsListResult>
        <Attachment>
          <AttachmentId>11</AttachmentId>
          <AttachmentTypeCode>File</AttachmentTypeCode>
          <Seq>0</Seq>
          <FileName>doc.pdf</FileName>
          <FileNameZipped>Attach34-1407210102211-doc.zip</FileNameZipped>
          <Title>Sample PDF file</Title>
          <FileFormatCode>Adobe PDF</FileFormatCode>
          <DateCreated>2014-07-21T01:02:21.527</DateCreated>
          <DateUpdated>2014-07-21T04:05:53</DateUpdated>
          <UpdateUserId>25315</UpdateUserId>
          <UserName>Doe, John</UserName>
          <ProjId>0</ProjId>
        </Attachment>
        <Attachment>
          <AttachmentId>12</AttachmentId>
          <AttachmentTypeCode>File</AttachmentTypeCode>
          <Seq>0</Seq>
          <FileName>readme.txt</FileName>
          <FileNameZipped>Attach34-1407210123541-readme.zip</FileNameZipped>
          <Title>Description</Title>
          <FileFormatCode>Text File</FileFormatCode>
          <DateCreated>2014-07-21T01:23:54.103</DateCreated>
          <DateUpdated>2014-07-21T01:23:54.103</DateUpdated>
          <UpdateUserId>27534</UpdateUserId>
          <UserName>Fry, Alex</UserName>
          <ProjId>0</ProjId>
        </Attachment>
      </Attachments_GetAttachmentsListResult>
    </Attachments_GetAttachmentsListResponse>
  </soap12:Body>
</soap12:Envelope>

See Also

Attachments Operations
Attachments_Add
Attachments_Delete
Attachments_GetAttachment
SOAP API Reference

Highlight search results