Skip to end of metadata
Go to start of metadata

The general rules and assumptions for API entities are:

  • Responses from entities are returned as JSON Objects. The header should contain the string: Content-Type: application/json
  • The following request types (CRUD) are supported:
    • DELETE – This request type removes a particular resource. It has NO response body. Response code 200 (OK) or 204 (No Content) imply "resource deleted successfully." If content does not exist, then status code 404 is returned
    • GET – This request type requests the resource.
    • POST – This request type creates a new resource. Successful creation returns JSon array of new element IDs along with OK HTML status code. Unsuccessful operation returns HTML error code and JSON object with error description.
    • PUT – This request type modifies an existing resource. Multiple calls should yield the same result. It has NO response body. Unsuccessful operation returns HTML error code and JSON object with error description. Response code 200 (OK) or 204 (No Content) imply "resource updated successfully."
  • All URL paths are case-insensitive.
  • All write procedures are affected by the same logic as the processes from the user interface front end:
    • Oracle and Java triggers, as well as Groovy scripts, can apply to the end result.
    • Typically, such procedures carry additional, customer-specific logic.
    • This is a mechanism to customize the generic API.
    • Example: API call to delete a work order should go and delete the work order. However, the client might want to forbid the deletion of approved (Status = 4) work orders. By using Java triggers, the client can add that functionality and AgileAssets would not need to create a custom work order deletion API call for that client.
  • The geometry in API responses will be in the projection of its source.
  • The Date data type is always in the AgileAssets internal date data type representation. It should be sent in the API request as text, not as a number.
  • Some end points take "/map/" at the end of URL path. This feature yields a JSON Object that represents key-value pairs for that end point. This is useful when populating choice boxes.
  • Examples given in this documentation use the CURL app to execute calls and have been written using single and double quotes for *nix environments. On Windows machines, pay careful attention to the quotation marks.
  • No labels