StarterTemplate ASP.NET Host

<back to all web services

RequestMetadataAll

Metadata Service

The following routes are available for this service:
GET/service/api/v1/projects/{ProjectId}/metadataReturns metadata for the specified entityThe authenticating user must belong to a security group that has the Read privilege for the target entity (Defects, Tests and so on).
Parameters:
NameParameterData TypeRequiredDescription
OffsetqueryintNoThe number of entity fields to skip before counting the returned fields
LimitqueryintNoThe maximum number of fields to return
ProjectIdpathintYesThe ID of the project the entity belongs to
EntityCodequerystringYesThe type of the item that has metadata you need to get

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/RequestMetadataAll HTTP/1.1 
Host: rest.qacomplete.smartbear.com 
Content-Type: application/xml
Content-Length: length

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

<ResponseMetadataCollection xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SwpStack.Service.Entity.Metadata">
  <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.Metadata" xmlns="http://schemas.datacontract.org/2004/07/SwpStack.Service.Entity.Common">
    <d2p1:ResponseMetadataSingle>
      <d2p1:AllowedValues>
        <d2p1:AllowedValue>
          <d2p1:Key>String</d2p1:Key>
          <d2p1:Value>String</d2p1:Value>
        </d2p1:AllowedValue>
      </d2p1:AllowedValues>
      <d2p1:Caption>String</d2p1:Caption>
      <d2p1:FieldType>String</d2p1:FieldType>
      <d2p1:IsRequired>false</d2p1:IsRequired>
      <d2p1:Name>String</d2p1:Name>
    </d2p1:ResponseMetadataSingle>
  </Results>
</ResponseMetadataCollection>