Webapi - Creating a failure

Webapi - Creating a failure

This method allows to create a failure in a simplified manner.

 The method to be used when creating a failure is:
 
POST url/api/mytenant/myorganization/maintenancecore/failures

 Json example for creating a failure:

  1. {
            "failureKey""001",
            "description""fail 001",
            "failureDate""2021-08-09T11:21:13+01:00",
            "causedEnvironmentalDamage"false,
            "causedPersonalInjury"true,
            "increasedRiskPersonalInjury"false,
            "remarks"null,
            "workOrder""000001",
            "assetType"2,
            "equipment""ATC02",
            "tool"null,
            "failureTypifications": [
                {
                    "failureSymptom""S01",
                    "failureCause""C01",
                    "failureAction""A01"
                }
            ],
            "company""DEMO"
        }
This method allows to create a failure according to the parameters filled in:
  1. failureKey: The key of the failure. Mandatory field.
  2. description: Short description of the failure. Mandatory field.
  3. failureDate: Failure date.
  4. causedEnvironmentalDamage: "caused environmental damage?" Fill in this field with true or false.
  5. causedPersonalInjury: "caused personal injury?" Fill in this field with true or false.
  6. increasedRiskPersonalInjury: "increased risk of personal injury?" Fill in this field with true or false.
  7. remarks: Remarks.
  8. WorkOrder: The key of the work order the failure will be associated to. Mandatory field.
  9. AssetType: The asset type (2- equipment; 3- tool). It is only possible to associate to a failure, an asset of type 2 or 3. Mandatory field.
  10. equipment: The equipment key..
  11. tool: The tool's key.
  12. failureTypifications: In these parameters, we can associate the failure symptoms, causes and actions, placing in each parameter the corresponding key.
  13. company: The company's key. Mandatory field.

When this method is executed successfully, it returns HttpStatusCode.201Created.





    • Related Articles

    • WebAPI - Creating a warehouse

      This method allows to create a warehouse in a simplified manner. The method to be used when creating a warehouse: POST url/api/mytenant/myorganization/inventorycore/warehouses Json example for creating a warehouse: 1. { "warehouseKey": "W2", ...
    • WebAPI - Creating a request

      This method allows to create a request in a simplified manner. The method to be used when creating a request: POST url/api/mytenant/myorganization/Requests/requests Json example for creating a request: { "requestKey": "00001", "description": "Vidro ...
    • WebAPI - Creating a failure action

      This method allows to create a failure action in a simplified manner. The method to be used when creating a failure action:  POST url/api/mytenant/myorganization/maintenancecore/failureactions  Json example for creating a failure action:  1.        { ...
    • WebAPI - Creating a failure cause

      This method allows to create a failure cause in a simplified manner. The method to be used when creating a failure cause: POST url/api/mytenant/myorganization/maintenancecore/failurecauses Json example for creating a failure cause:  1.          { ...
    • Webapi - Creating a failure symptom

      This method allows to create a failure symptom in a simplified manner.  The method to be used when creating a failure symptom is:   POST url/api/mytenant/myorganization/maintenancecore/failuresymptoms  Json example for creating a failure symptom: { ...