Location API
Welcome to the Location API documentation. This API provides a comprehensive set of functions for managing and interacting with locations within the system. Below is a list of available functions, each with a brief description and a link to its detailed documentation.
Function List
newLocation
Generates an empty non-persisted Locations object to provide the structure required by the API to save a new record into the database. This method must be combined with the saveLocation method in order to persist the record. Returns a JSON representation of the newly created location object.
saveLocation
Creates or updates a Locations record in the system based on the provided parameters. Returns a JSON representation of the saved location.
findLocations
Retrieves Locations records based on the specified pagination, sort, and column constraint parameters. Returns a Query Result object.
getLocation
Retrieves a Locations record by its ID or path. Returns a JSON representation of the location. Returns nothing if no location is found.
getLocationsByPartialPath
Retrieves all Locations records with paths that contain the specified partial path. Returns a list of JSON objects representing all locations with paths that include the given partial path.
getLocationsByPropertyValue
Retrieves all Locations records that have a property value that matches the provided value. Returns a JSON list of all locations that have the specified property value.
getAllLocations
Retrieves a list of all Locations records in the system. Returns a list of JSON objects representing all locations.
getLocationTree
No Filter: Retrieves all Locations records as a tree structure.
With a Filter: Retrieves all Locations records whose names contain a substring that matches the filter. Returns the parent locations even if they don't contain the filter.
Returns a list of JSON objects.
getLocationReferences
Retrieves a list of references to a Locations record by its ID or path. Returns a list of JSON objects.
validateLocation
Validates the specified parameters for a Locations record and returns any validation errors. This only checks if the location object can be saved based on the attributes given. Returns a JSON object where keys are field names and values are lists of validation violation messages.
deleteLocation
Deletes a Locations record by its ID or path. This cannot delete a location with references to it. If successful, an ApiResponse Object is returned with the success bool set True. If the location that's being deleted has a reference, a JSON object is returned with details about the encountered error.
newProperty
Generates an empty non-persisted Location Properties object to provide the structure required by the API to save a new record into the database. This method must be combined with the saveProperty method in order to persist the record. Returns a JSON representation of the newly created location property object.
saveProperty
Creates or updates a Location Properties record in the system based on the provided parameters. Returns a JSON representation of the saved location property.