StarterTemplate ASP.NET Host

<back to all web services

RequestFilesAll

Files Service

The following routes are available for this service:
GET/service/api/v1/projects/{ProjectId}/{EntityCode}/{EntityId}/filesReturns a list of attachments of the specified itemThe authenticating user must have the Read privilege for the entity (Defects, Tests and so on) that contains the attachment.
Parameters:
NameParameterData TypeRequiredDescription
EntityIdpathintYesThe ID of the item that has attachments
EntityCodepathstringYesThe type of the item that has attachments
ProjectIdpathintYesThe ID of the project that contains the item
OffsetqueryintNoThe number of attachments to skip before counting the returned attachments
LimitqueryintNoThe maximum number of attachments to return

To override the Content-type in your clients HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /xml/reply/RequestFilesAll HTTP/1.1 
Host: rest.qacomplete.smartbear.com 
Content-Type: application/xml
Content-Length: length

<RequestFilesAll xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SwpStack.Service.Entity.Files">
  <EntityCode>String</EntityCode>
  <EntityId>0</EntityId>
  <Limit>0</Limit>
  <Offset>0</Offset>
  <ProjectId>0</ProjectId>
</RequestFilesAll>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ResponseFilesCollection xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SwpStack.Service.Entity.Files">
  <Metadata i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/SwpStack.Service.Entity.Common" />
  <Results xmlns:d2p1="http://schemas.datacontract.org/2004/07/SwpStack.Service.Entity.Files" xmlns="http://schemas.datacontract.org/2004/07/SwpStack.Service.Entity.Common">
    <d2p1:ResponseFileSingle>
      <d2p1:AttachmentTypeCode>String</d2p1:AttachmentTypeCode>
      <d2p1:Comments>String</d2p1:Comments>
      <d2p1:DateCreated>0001-01-01T00:00:00</d2p1:DateCreated>
      <d2p1:DateUpdated>0001-01-01T00:00:00</d2p1:DateUpdated>
      <d2p1:EntityCode>String</d2p1:EntityCode>
      <d2p1:EntityId>0</d2p1:EntityId>
      <d2p1:FileName>String</d2p1:FileName>
      <d2p1:Id>0</d2p1:Id>
      <d2p1:Title>String</d2p1:Title>
      <d2p1:UpdateUserId>0</d2p1:UpdateUserId>
      <d2p1:UserName>String</d2p1:UserName>
    </d2p1:ResponseFileSingle>
  </Results>
</ResponseFilesCollection>