Query Automatic Work Item (Task)

API Type

REST

HTTP Method

POST

Description

Retrieves a list of system activities (automatic work items) that match a specified query expression.

URL Format (OnPremises, PrivateCloud)

https://[domain]:[port]/AgilePointServer/Workflow/QueryProcedureList

URL Format (OnDemand)

https://[domain]:[port]/AgilePointService/Workflow/QueryProcedureList

Request Parameters

Name Description
None Not Applicable

Request Body Properties

Name Description

expr

Function:
Specifies the where clause of a SQL query expression.
Type
WFQueryExprHelper
Accepted Values:
A valid WFQueryExpr object.

ColumnName

Function:
Gets and sets the associated database column name.
Type
string
Accepted Values:
A valid database column name.

Operator

Function:
Specifies the operator used for comparison.
Type
int
Accepted Values:
A valid operator.

WhereClause

Function:
Sets the conditions against a query.
Type
string
Accepted Values:
A valid SQL WHERE clause.

IsValue

Function:
Gets and sets the flag that indicates if it compares a value or column of the table.
Type
bool
Accepted Values:
  • True - It compares a value or column of the table.
  • False - It does not compare a value or column of the table.

JavaScript Code Example

$("#btnQueryProcedureList").click(function () {
  
  var JSONObject = {
    ColumnName: "SYNCHRONOUS", Operator: "EQ", WhereClause: "No", IsValue: true
  };
  $.ajax({
    url: "https://mydomain:9011/AgilePointServer/Workflow/QueryProcedureList",
    data: JSON.stringify(JSONObject)
  });
  
});

Java Code Example

public String QueryProcedureList() {

  String URI = "https://mydomain:9011/AgilePointServer/Workflow/QueryProcedureList";

  HTTPOperations ops = new HTTPOperations(domain, userName, 
                       password, appID, locale);

  JSONObject postData = new JSONObject();
  
    postData.put("ColumnName", "SYNCHRONOUS");
    postData.put("Operator", "EQ");
    postData.put("WhereClause", "No");
    postData.put("IsValue", true);

    return ops.POSTMethod(URI, postData.toString());
  return "";
}

C# Code Example

public string QueryProcedureList()
  {
    string URI = "https://mydomain:9011/AgilePointServer/Workflow/QueryProcedureList";

    string jsonRequestData="{
      \"ColumnName\":\"" + "SYNCHRONOUS" + "\",
      \"Operator\":\"" +"EQ"+ "\",
      \"WhereClause\":\"" +"No"+ "\",
      \"IsValue\":\"" +"true"+ "\"}";

    HTTPOperations ops = new HTTPOperations(domain, this.userName, 
                         password, appID, locale);

    return ops.POSTMethod(URI, jsonRequestData);
  }

cURL Code Example

Note: The authorization code is an example. You must generate your own authorization code in base64 encoded format with the syntax Domain\Username:Password.
curl --header "Content-Type: application/json" 
                         --header "Authorization:Basic QVAtNDI0XEFkbWluOnBhc3M=" 
                         --request POST 
                         --data {\"ColumnName\":\"SYNCHRONOUS\",
                         \"Operator\":\"EQ\",
                         \"WhereClause\":\"yes\",
                         \"IsValue\":\"true\"} 
                         https://mydomain:9011/AgilePointServer/Workflow/QueryProcedureList

Output

An array of automatic work items.

JSON Response Body Example

[{
  "ActivityInstID": "F002ECAF07764DE5B0ADE53D4FB7C2F4",
  "ApplName": "MyApplication",
  "CompletedDate": "\/Date(928149600000+0000)\/",
  "CreatedDate": "\/Date(1390771702547+0000)\/",
  "DueDate": "\/Date(1390771732547+0000)\/",
  "DueHandled": false,
  "Pending": false,
  "ProcInstID": "0E05B456F489468D90414A7E9AF8CDF3",
  "ProcedureInfo": "#AgilePart:Ascentn.AgilePart.Process, 
                     Version=1.0.0.0, Culture=neutral, 
                     PublicKeyToken=2973ddf2dfd2d294:Ascentn.Workflow.Extension.ProcessManagementAgilePart:Delay",
  "Session": 32,
  "Status": "Cancelled",
  "Synchronous": false,
  "WorkItemID": "0078B6ECE50A47B3A3907341DF8F8B5E"
}]

Supported Versions

AgilePoint v5.0 R2 and higher

Code Examples in the AgilePoint NX Documentation

The AgilePoint NX Product Documentation is intended as a basic reference to help you understand how to complete basic coding tasks, such as make API or JavaScript method calls. Code examples that show specific use cases, the solutions to specific business problems, or detailed implementation scenarios are outside the scope of the AgilePoint NX Product Documentation. For specific and/or advanced types of examples that may better meet your requirements, AgilePoint provides several resources:

  • AgilePoint Community Forums - A free, AgilePoint-moderated, crowd-sourcing user forum where you can ask questions about specific techniques, the solutions to use cases, workarounds, or other topics that may not be covered in the Product Documentation.
  • Professional Services - If you can not find the information you need for your specific business problem, mentoring is available through AgilePoint Professional Services.
  • Personalized Training - AgilePoint can provide personalized training for your organization. To request personalized training, contact AgilePoint Sales.