Applies to QAComplete 12.21 SaaS, last modified on July 15, 2019

Use this operation to get projects where the specified user has at least Read access to the specified QAComplete screen – Releases, Defects, Agile Tasks, and so on.

Parameters

The operation uses the following parameters:

AppCode  :  string, required

For QAComplete SaaS (hosted on qacomplete.smartbear.com), use agSP.

For QAComplete On-Premises (hosted on your company-owned server), this is typically agSPEnt.

You can see the needed AppCode value on the Setup tab in QAComplete.

Email  :  string, required

The user’s email address.

Password  :  string, required

The user’s password.

EntityCode  :  string, required

QAComplete area that you want to check the user’s access to. 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

Result

A LoginInfo object whose Projects array contains the projects where the user can access the specified area. If the Projects array is empty, the user does not have access to the specified area in any of QAComplete projects.

Example

Sample Code

This code lists all projects where the users can access defects.

C#

ServiceSoapClient service = new ServiceSoapClient();
LoginInfo loginInfo = service.GetLoginInfoByEntity("agSPEnt", "john.doe@example.com", "p@ssword", "Bugs");

if (loginInfo.Projects != null)
{
   Console.WriteLine("The user can access defects in the following projects:");
   foreach (Project proj in loginInfo.Projects)
   {
      Console.WriteLine("{0} {1}", proj.ProjId, proj.ProjName);
   }
}
else
   Console.WriteLine("The user cannot access defects in any projects.");

Java

ServiceSoap service = new Service().getServiceSoap12();
LoginInfo loginInfo = service.getLoginInfoByEntity("agSPEnt", "john.doe@example.com", "p@ssword", "Bugs");

if (loginInfo.getProjects() != null)
{
   System.out.println("The user can access defects in the following projects:");
   for (Project proj : loginInfo.getProjects().getProject())
   {
      System.out.format("%d %s%n", proj.getProjId(), proj.getProjName());
   }
}
else {
   System.out.println("The user cannot access defects in any projects.");
}

Sample Request XML

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

<?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>
    <GetLoginInfoByEntity xmlns="http://www.pragmaticsw.com/">
      <AppCode>agSP</AppCode>
      <Email>john.doe@example.com</Email>
      <Password>p@ssword</Password>
      <EntityCode>Bugs</EntityCode>
    </GetLoginInfoByEntity>
  </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: 451 {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>
    <GetLoginInfoByEntity xmlns="http://www.pragmaticsw.com/">
      <AppCode>agSP</AppCode>
      <Email>john.doe@example.com</Email>
      <Password>p@ssword</Password>
      <EntityCode>Bugs</EntityCode>
    </GetLoginInfoByEntity>
  </soap12:Body>
</soap12:Envelope>

Sample Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 769 {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>
    <GetLoginInfoByEntityResponse xmlns="http://www.pragmaticsw.com/">
      <GetLoginInfoByEntityResult>
        <UserId>24661</UserId>
        <AppCode>agSP</AppCode>
        <ProjId>10372</ProjId>
        <DeptId>7154</DeptId>
        <Projects>
          <Project>
            <DeptId>7154</DeptId>
            <DeptName>Edgar Solutions</DeptName>
            <ProjId>10372</ProjId>
            <ProjName>FamilyAlbum</ProjName>
          </Project>
          <Project>
            <DeptId>7154</DeptId>
            <DeptName>Edgar Solutions</DeptName>
            <ProjId>10369</ProjId>
            <ProjName>ScreenSaver</ProjName>
          </Project>
        </Projects>
      </GetLoginInfoByEntityResult>
    </GetLoginInfoByEntityResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 779 {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>
    <GetLoginInfoByEntityResponse xmlns="http://www.pragmaticsw.com/">
      <GetLoginInfoByEntityResult>
        <UserId>24661</UserId>
        <AppCode>agSP</AppCode>
        <ProjId>10372</ProjId>
        <DeptId>7154</DeptId>
        <Projects>
          <Project>
            <DeptId>7154</DeptId>
            <DeptName>Edgar Solutions</DeptName>
            <ProjId>10372</ProjId>
            <ProjName>FamilyAlbum</ProjName>
          </Project>
          <Project>
            <DeptId>7154</DeptId>
            <DeptName>Edgar Solutions</DeptName>
            <ProjId>10369</ProjId>
            <ProjName>ScreenSaver</ProjName>
          </Project>
        </Projects>
      </GetLoginInfoByEntityResult>
    </GetLoginInfoByEntityResponse>
  </soap12:Body>
</soap12:Envelope>

See Also

SOAP API Introduction
Users Operations
GetLoginInfo

Highlight search results