API User Stories

Please update your scripts. GET [Entity] JSON response will be updated in late April 2019.  

Plutora’s API has a number of user stories to keep in mind.

Track Development Team Task and Hours

User Story: As an Engineering Manager, I want to use Plutora’s API to track my development team’s hours and tasks.

To track a development team’s hours and tasks using Swagger:

  1. Go to Swagger and follow steps 1a to 5a to set up a token.
  2.  Go to Users > POST /users/GenerateReport/{startdate}/{enddate}.
  3. Input a:
    • startdate (for example, 2018-12-01).
    • enddate (for example, 2018-12-05).
    • userIdList (for example, [“d2450c29-7e78-476f-b0c9-05a3b6db9d9e”])
  4. Click Try it out!

To track a development team’s hours and tasks using Postman:

  1. Open Postman. (Follow steps 1a (or 1b), 2, and 3 to download and install Postman and set up a token if you haven’t already done so.)
  2. Use the URL format (for example, POST https://auapi.plutora.com/users/GenerateReport/2018-12-01/2018-12-05) with the request body [“d2450c29-7e78-476f-b0c9-05a3b6db9d9e”].
  3. Click Send.

 

Using POST Entity/filter

The API equivalent of grid column filter for Releases, Changes, TECRs, and TEBRs is /filter with the parameter searchFilters. 

General Rules for Requests “POST [entity]/filter” and “POST [entity]/search”

Plutora API allows the following filter requests to be executed:

  • POST TEBRs/filter.
  • POST Changes/filter.
  • POST Releases/filter.
  • POST TECRs/filter.

Plutora Test API allows the following search requests to be executed:

  • POST Categorysettings/search.
  • POST Defects/search.
  • POST Defects/BulkUpdateSearch.
  • POST Requirement/search.
  • POST Requirement/BulkUpdateSearch.
  • POST Testcase/search.
  • POST Testcase/SearchWithExecutionSummary.
  • POST Testcase/BulkUpdateSearch.
  • POST Testplan/search.

All the above requests allow the following operators to be used:

  • Equals.
  • NotEquals.
  • Contains (not applicable for date, date time, or GUID values).
  • NotContains (not applicable for date, date time, or GUID values).
  • LessThan.
  • LessOrEqual.
  • GreaterOrEqual.
  • GreaterThan.
  • IsWithin (also allows multiple values to be separated by commas).
  • NotWithin.

Filters do not work on custom fields, only main entity fields.

The following is a general request template for Releases, Changes, TECRs, and TEBRs. The property and value will need to be inherent to the entity.

Zero is the first page number. Typing “1” will get the second page number and so on. 
{
  "searchFilters": [
    {
      
      "property": "string",
      "direction": "ASC",
      "value": "string",
      "operator": "Equals"
    }
  ],
  "recordsPerPage": 0,
  "pageNum": 0
}

 

User Story: Retrieve Changes or Requirements which have the Status “Testing” or “Review”

Retrieve multiple values by using the operator IsWithin and by separating the multiple values with commas.

Filter: POST Changes/filter or POST Requirements/search.

Request body:

{
    "searchFilters": [
    {
      "property": "Status",
      "direction": "ASC",
      "value": "Testing,Review",
      "operator": "IsWithin"
    }
  ]
}

Now retrieve the same data showing page 3 of the results with 10 records per page. (Note that attempting to retrieve the page beyond the maximum one with data will return a blank response.)

{
	"PageNum":3,
	"RecordsPerPage":10,
	"searchFilters": [
    {
      "property": "Status",
      "direction": "ASC",
      "value": "Testing,Review",
      "operator": "Equals"
    }
  ]
}

User Story: Retrieve Changes that have “ABC” in the name

Request body:

{

  "searchFilters": [

    {

      "Property": "name",

      "Direction": "ASC",

      "Value": "ABC",

      "Operator": "Contains"

    }

  ]

}

User Story: Retrieve the Changes that were last modified by “John Smith”

Request body:

{

  "searchFilters": [

    {

      "Property": "lastModifiedBy",

      "Direction": "ASC",

      "Value": "John Smith",

      "Operator": "Contains"

    }

  ]

}

Or:

{

  "searchFilters": [

    {

      "Property": "lastModifiedBy",

      "Direction": "ASC",

      "Value": "John Smith",

      "Operator": "Equals"

    }

  ]

}

 

Existing Entities Only

Some data cannot be added to an entity at the time the entity is created, but only to an existing entity. For example, Systems, Stakeholders, Phases, and Gates can only be added to existing Releases, not at the time the Release is created.

Entity Add these to existing entities only
Releases Systems, Stakeholders, Phases, and Gates
Phases Activities
Gates Criteria
Systems Stakeholders
Environments Hosts
Hosts and Components Layers (cannot save without a Component)

 

 

Required IDs and their Location

When performing the following actions, you require the following IDs, which can be found at the following locations.

Action ID Required ID Location
Adding a Phase to a Release Phase’s workItemId /workitemnames/phases
Adding a Gate to a Release Gate’s workItemId /workitemnames/gates
Adding an Activity to a Phase Phase’s assigned WorkItemId from the Release /releases/{{releaseId}}/phases
Phase Name’s workItemId  /workitemnames/phases
Adding a Criterion to a Gate Gate assigned WorkItemId  /releases/{{releaseId}}/gates
Gate Name’s workItemId  /workitemnames/gates

 

 

How to access System Layer data via API

The majority of system customizations settings can be found via the /lookupfields/<type> API calls.

Specifically, StackLayer configurations can be found under: /lookupfields/StackLayer.

To create a Layer, you must first create an Environment (to get environmentId) and Host (to get hostId), separately.  You can then create a new layer with a “child”-entity Component, associated back to the environmentId and hostId.

POST https://{{API_host}}/layers

{

"ComponentName": "{{ComponentName}}",

"HostID": "{{hostId}}",

"EnvironmentID": "{{environmentId}}",

"StackLayerID": "{{stackLayerId}}",

"Version": "{{value}}"

}

 

Back to the top arrow

Be the first to find out about new features. Subscribe to the Release Notes email. Subscribe Now

Was this article helpful?

1 found this helpful.