FunctionalSpecs_Add Operation

Applies to QAComplete 14.3, last modified on February 19, 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.

Adds a new requirement into the database and returns the ID of the created item.

Requirements

The authenticating user must belong to a security group that has the Add privilege for Requirements.

Parameters

The operation uses the following parameters:

AuthenticationData  :  AuthenticationData, required

An AuthenticationData object containing the login information and the project ID to which you want to add a release.

FunctionalSpecs  :  , required

The FunctionalSpec object that contains the requirement information.

SendEmailAlert  :  string, required

Y means send an email alert to the subscribed users after adding the requirement.

Any other value (for example, N or empty string) means do not send email alerts.

NewNotes  :  string, required

New note attached to the requirement. Specify empty string if you do not want to create a note.

Result

The ID of the added requirement.

Remarks

The FunctionalSpec object has matching Id and Name properties, for example, FolderId and FolderName. To set them, specify the value only for the Id property. The corresponding Name property will be set automatically.

Example

Sample Code

C#

string login = "[email protected]";
string password = "p@ssword";
int projId = 10372;

ServiceSoapClient service = new ServiceSoapClient();

// Preparing AuthenticationData
LoginInfo loginInfo = service.GetLoginInfo("", login, password);
AuthenticationData authData = new AuthenticationData();
authData.AppCode = loginInfo.AppCode;
authData.UserId = loginInfo.UserId;
authData.PassCode = password;
authData.DeptId = loginInfo.DeptId;
authData.ProjId = projId;

// Preparing the FunctionalSpec object
FunctionalSpec requirement = new FunctionalSpec();
requirement.Title = "API-XXXX - Add Visual Studio Support";
requirement.StatusCode = "Awaiting Approval";

// Adding the requirement
int FunctSpecID = service.FunctionalSpecs_Add(authData, requirement, "N", "");
Console.WriteLine("ID of the added requirement:" + FunctSpecID);

Java

String login = "[email protected]";
String password = "p@ssword";
int projId = 10372;

ServiceSoap service = new Service().getServiceSoap12();

// Preparing AuthenticationData
LoginInfo loginInfo = service.getLoginInfo("", login, password);
AuthenticationData authData = new AuthenticationData();
authData.setAppCode(loginInfo.getAppCode());
authData.setUserId(loginInfo.getUserId());
authData.setPassCode(password);
authData.setDeptId(loginInfo.getDeptId());
authData.setProjId(projId);

// Preparing the FunctionalSpec object
FunctionalSpec requirement = new FunctionalSpec();
requirement.setTitle("API-XXXX - Add Visual Studio Support");
requirement.setStatusCode("Awaiting Approval");

// Adding the requirement
int FunctSpecId = service.functionalSpecsAdd(authData, requirement, "", null);
System.out.println("ID of the added requirement:" + FunctSpecId);

Sample Request XML

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

<?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>
    <FunctionalSpecs_Add xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <FunctionalSpecs>
        <Title>API-XXXX - Add Visual Studio Support</Title>
        <StatusCode>Active</StatusCode>
      </FunctionalSpecs>
      <SendEmailAlert>N</SendEmailAlert>
      <NewNotes></NewNotes>
    </FunctionalSpecs_Add>
  </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: 662 {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>
    <FunctionalSpecs_Add xmlns="http://www.pragmaticsw.com/">
      <AuthenticationData>
        <AppCode>agSP</AppCode>
        <DeptId>7154</DeptId>
        <ProjId>1032</ProjId>
        <UserId>25315</UserId>
        <PassCode>p@ssword</PassCode>
      </AuthenticationData>
      <FunctionalSpecs>
        <Title>API-XXXX - Add Visual Studio Support</Title>
        <StatusCode>Active</StatusCode>
      </FunctionalSpecs>
      <SendEmailAlert>N</SendEmailAlert>
      <NewNotes></NewNotes>
    </FunctionalSpecs_Add>
  </soap12:Body>
</soap12:Envelope>

Sample Response XML

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: 397 {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>
    <FunctionalSpecs_AddResponse xmlns="http://www.pragmaticsw.com/">
      <FunctionalSpecs_AddResult>3</FunctionalSpecs_AddResult>
    </FunctionalSpecs_AddResponse>
  </soap:Body>
</soap:Envelope>

SOAP 1.2

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 407 {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>
    <FunctionalSpecs_AddResponse xmlns="http://www.pragmaticsw.com/">
      <FunctionalSpecs_AddResult>3</FunctionalSpecs_AddResult>
    </FunctionalSpecs_AddResponse>
  </soap12:Body>
</soap12:Envelope>

See Also

FunctionalSpecs_Delete
FunctionalSpecs_Load
FunctionalSpecs_LoadByCriteria
FunctionalSpecs_Update
Requirements Operations
SOAP API Reference

Highlight search results