WebAPI

WebAPI – Issues

122 views 30 June, 2017 3 February, 2020 Valuekeep 0

This service allows you to retrieve Issues in Valuekeep. Below you can find an analysis of the methods available through the service.

Get Issues List

GET /api/mytenant/myorganization/maintenancemanagementcore/Issues/GetIssuesByFilter This method allows you to retrieve a list of Issues, applying several filters. You can retrieve this list using the following filters:

  • StateKey: States list (values in "Issues States Table")
  • MaxRecords: Maximum number of records (you can request 200 records at a time)
  • DaysLimit: Maximum number of days after the Issue’s creation date
  • Issuer: Username of the employee who reported the Issue
  • Version: Version
  • Responsible: Person in Charge of the Asset, Location or Route
  • WOResponsible: Person in Charge of WO
  • WCResponsible: Person in Charge of the Work Center
  • WOOrWCResponsible: Person in Charge of the WO or Work Center
  • CreatedBy: Username of the employee who created the WO

All filters are optional. The list of Issues returned is sorted by version ascendingly. Example: GET /api/mytenant/myorganization/maintenancemanagementcore/Issues/GetIssuesByFilter?stateKey=001&stateKey=002&maxRecords=50&daysLimit=30&issuer=myuser&version=AAAAAAAAAAA= Retrieves a maximum of 50 issues in the "Waiting for Approval" and "Approved" states, created within the last 30 days, reported by the employee with the "myuser" username and using version "AAAAAAAAAAA=" or later.

Get Issue SLA List

GET /api/mytenant/myorganization/maintenancemanagementcore/Issues/GetIssuesSLAByFilter This method allows you to retrieve a list of Issues, applying several filters. You can retrieve the list of Issue SLAs using the following filters:

  • StateKey: States list (values in "Issues States Table")
  • MaxRecords: Maximum number of records (you can request 200 records at a time)
  • issueKey: The Issue's key.
  • Issuer: Username of the employee who reported the Issue
  • Version: Version
  • DaysLimit: Maximum number of days since the issue was created.
  • Year: Year of the issues. Displays all records of issues for which the year is the same or after the value set in the filter.
  • Responsible: Username of the employee in charge of the issue's asset.

All filters are optional. The list of Issue SLAs returned is sorted by version ascendingly. Example: GET /api/mytenant/myorganization/maintenancemanagementcore/Issues/GetIssuesSLAByFilter?stateKey=001&stateKey=002&maxRecords=50&issuer=myuser&version=AAAAAAAAAAA= Retrieves a maximum of 200 SLA records of Issues in the "Waiting for Approval" and "Approved" states, reported by the employee with the "myuser" username and using version "AAAAAAAAAAA=" or later.

Get Issue Response Times List

GET /api/mytenant/myorganization/maintenancemanagementcore/ResponseTimesOfIssues/GetResponseTimesOfIssuesByFilter This method allows you to retrieve a list of Response Times for Issues, applying several filters. You can retrieve the list of Issue Response Times using the following filters:

  • StateKey: States list (values in "Issues States Table")
  • MaxRecords: Maximum number of records (you can request 200 records at a time)
  • issueKey: The Issue's key.
  • Issuer: Username of the employee who reported the Issue
  • Version: Version
  • DaysLimit: Maximum number of days since the issue was created.
  • Year: Year of the issue. All records of issues for which the year is after the value set in the filter are displayed.
  • Responsible: Username of the employee in charge of the issue's asset.

All filters are optional. The list of Issue Response Times returned is sorted by version ascendingly. Example: GET /api/mytenant/myorganization/maintenancemanagementcore/ResponseTimesOfIssues/GetResponseTimesOfIssuesByFilter?stateKey=001&stateKey=002&maxRecords=50&issuer=myuser&version=AAAAAAAAAAA= Retrieves a maximum of 200 Response Times of Issues in the "Waiting for Approval" and "Approved" states, reported by the employee with the "myuser" username and using version "AAAAAAAAAAA=" or later.

Get Issue States List

GET /api/mytenant/myorganization/maintenancemanagementcore/issues/GetIssueStates?version=AAAA This method allows you to retrieve the list of issue states. Only the Version filter is required for this list.

Get Issue State Transitions List

GET /api/mytenant/myorganization/maintenancemanagementcore/issues/GetIssueStateTransitions?version=AAAA This method allows you to retrieve the list of issue state transitions. Only the Version filter is required for this list.

Change Issue State

PUT /api/mytenant/myorganization/maintenancemanagementcore/issues/ChangeIssueState This method allows you to change the state of several Issues. For this, you need to fill in the StateResource. The resource is filled in with the Issue's Natural Key (EntityKey), the State’s Natural Key (NewState), the Reason for the change (only used in case it is rejected) (reason), and the Date of the state transition (StateChangeDate). Example: { "StateLines" : [ { "EntityKey" : "000001", "NewState" : "006.ISSUE", "Reason" : "To executed", "StateChangeDate" : "2017-03-27T11:15:17.477+00:00", }, { "EntityKey" : "000002", "NewState" : "005.ISSUE", "Reason" : "To in progress", "StateChangeDate" : "2017-03-27T11:15:17.477+00:00", } ] }

Change State of Issue with Work Order

PUT /api/mytenant/myorganization/maintenancemanagementcore/issues/ChangeIssueStateAndGenerate?issueKey=IS000020 This method allows you to change the state of an issue with the option to generate a work order. For this, you need to fill in the IssueToGenerateResource. The resource is filled in with the Issue's Natural Key (EntityKey), the State’s Natural Key (NewState), the Reason for the change (only used in case it is rejected) (reason), the Date of the state transition (StateChangeDate) and remaining necessary fields for creating the Work Order, the Maintenance Plan’s natural key (MaintenancePlanKey), the Work Center’s key (WorkCenterKey), the Work Order Type key (WorkOrderTypeKey), the setting for creating the work order or not and the state in which this work order must be. If the asset’s natural key (AssetKey) or the location's natural key (LocationKey) fields are filled in the resource, the issue is updated for the filled in asset or location. Example: { "IssueKey" : "IS000020", "NewState" : "002.ISSUE", "Reason" : "Approve Issue.", "StateChangeDate" : "2017-08-09T11:26:18.477+00:00", "MaintenancePlanKey" : "MP-000001.1", "WorkCenterKey" : "MN", "WorkOrderTypeKey" : "CR", "AssetKey": "", "LocationKey": "L0001", "CreateWorkOrder" : true, "WorkOrderStateToCreate": "001.WORKORDER" }

Change Issue Classification

PUT /api/mytenant/myorganization/maintenancemanagementcore/issues/ChangeIssueRate?IssueKey={issueKey} This method allows you to change the classification of Issues. For this, you need to fill in the IssueRateResource. This resource is filled in with the Issue's Natural Key (IssueKey), the Classification and the Remarks on the Issue's Classification. Example: { "IssueKey" : "IS000007", "Rate" : "5", "RateRemarks" : "The Issue was correctly solved." }

Issue States Table

These are the default states available for issues. To retrieve the states configured for issues use the method described in "Get Issue States List".

Code  State
001  Waiting for Approval
002  Approved
003  Canceled
004  Closed
005  Executed
006  In Progress
007  Suspended
008  Pending

Create Issue

POST /api/mytenant/myorganization/maintenancemanagementcore/Issues/CreateIssue This method allows you to create issues, the required resource is described here:

  • IssueTypeKey: The key of the Issue Type
  • Description: The Issue’s description
  • PriorityLevelKey: The key of the priority level of the Issue's requester
  • ApprovedPriorityLevelKey: The key of the priority level of the Issue's approver
  • IssueDate: The Issue’s date
  • AssetKey: The key of the asset associated with the Issue
  • LocationKey: The key of the location associated with the Issue
  • IssuerKey: The key of the Issue's requester
  • Remarks: Comments about the Issue

Example: { "IssueTypeKey" : "EE", "Description" : "The TV doesn't work.", "PriorityLevelKey" : "N", "IssueDate" : "2017-08-09T11:26:18.477+00:00", "AssetKey" : "A-00012", "LocationKey" : "", "Remarks": "Need it fixed ASAP." }

Change Issue fields

PUT /api/mytenant/myorganization/maintenancemanagementcore/Issues/UpdateIssueInfo This method allows you to change some fields of the issue; the required resource is described here:

  • IssueKey: The Issue's key
  • Description: The Issue’s description
  • IssueDate: The Issue’s date
  • IssueTypeKey: The key of the Issue Type
  • AssetKey: The key of the asset associated with the Issue
  • LocationKey: The key of the location associated with the Issue
  • PriorityLevelKey: The key of the priority level of the issue's requester
  • Remarks: Comments about the Issue

Example: { "IssueKey" : "IS000020", "Description" : "The TV doesn't work.", "IssueDate" : "2017-08-09T11:26:18.477+00:00", "IssueTypeKey" : "EE", "AssetKey" : "A-00012", "LocationKey" : "", "PriorityLevelKey" : "N", "Remarks": "Need it fixed ASAP.” }

Tags:

Foi útil?