1.7. API Endpoints - Monitoring and Analytics¶
1.7.1. Alerts¶
1.7.1.1. GET /alerts/¶
Description
Retrieves a list of active, non-muted alerts from the Ngenea Hub system.
This endpoint is primarily used by the Hub UI to populate both Global and Site-specific alert dashboards.
The API supports filtering by multiple parameters such as name, site, node, severity, and more.
Note
All parameters in the Swagger UI for this endpoint are optional.
The response will be filtered based on the parameters you provide (e.g., filtering by
name,site, orseverity).If no parameters are specified, the API will return all active and non-muted alerts by default.
Request Parameters
Name |
Type |
Location |
Description |
|---|---|---|---|
|
string |
query |
Filter alerts by name (e.g., |
|
string |
query |
Filter alerts by site name |
|
string |
query |
Filter alerts by node name |
|
string |
query |
Filter alerts by severity ( |
|
string |
query |
Filter alerts by summary text |
|
string |
query |
Filter alerts by timestamp (ISO 8601 format) |
|
string |
query |
Filter alerts by suppression status |
Example Request
curl -X 'GET' \
'http://your-hub-address:8000/api/alerts/?name=SiteHealth' \
-H 'accept: application/json' \
-H 'Authorization: Api-Key your-api-key'
Successful Response
HTTP Status Code: 200 OK
Content-Type: application/json
Example Response
[
{
"id": 99,
"site": "testexample",
"name": "SiteHealth",
"node": null,
"queue": null,
"created": "2025-07-03T14:33:00.031598Z",
"timestamp": "2025-08-07T12:16:00.018308Z",
"severity": "INFO",
"summary": "No workers are joined",
"suppressed": false
}
]
Response Fields
Field |
Type |
Description |
|---|---|---|
|
integer |
Unique ID of the alert |
|
string |
Name of the site where the alert occurred |
|
string |
Alert name/type (e.g., |
|
string |
Node name if applicable |
|
string |
Queue name if applicable |
|
string |
ISO timestamp when alert was created |
|
string |
ISO timestamp of the most recent alert event |
|
string |
Alert severity ( |
|
string |
Short summary of the alert |
|
boolean |
Whether the alert is currently suppressed |
1.7.1.2. GET /alerts/{id}/¶
Description
Fetch detailed information about a specific alert using its unique ID. This endpoint returns the full alert object, including metadata such as severity, timestamps, and associated site or node.
Used by the Hub system to display detailed alert information in dashboards or drill-down views.
Request Parameters
Name |
Type |
Location |
Description |
|---|---|---|---|
|
integer |
path |
A unique integer identifying the alert. (Required) |
Example Request
curl -X 'GET' \
'http://your-hub-address:8000/api/alerts/99/' \
-H 'accept: application/json' \
-H 'Authorization: Api-Key your-api-key'
Successful Response
HTTP Status Code: 200 OK
Content-Type: application/json
Example Response
{
"id": 99,
"site": "testexample",
"name": "SiteHealth",
"node": null,
"queue": null,
"created": "2025-07-03T14:33:00.031598Z",
"timestamp": "2025-08-07T12:28:00.014935Z",
"severity": "INFO",
"summary": "No workers are joined",
"suppressed": false
}
Response Fields
Please refer to the response feilds under GET /alerts/.
1.7.2. Health¶
1.7.2.1. GET /health/¶
Description
The GET /health/ endpoint provides a real-time overview of the health status of the Ngenea Hub and all connected infrastructure components.
This endpoint is used to monitor:
The health of the Hub service itself
All registered sites
The nodes (servers/machines) within each site
Any associated queues
The system reports health using the following states:
ok: All nodes in the site are functioning normallywarning: Some nodes are offline or unresponsivecritical: An entire site is offline (no working nodes)
By querying this endpoint, administrators can quickly assess which parts of the infrastructure are healthy and identify potential issues at the site or node level. This is useful for operational monitoring, alerting, and overall system visibility.
Request Parameters
This endpoint does not require any parameters. Simply calling the endpoint returns the health status of the Hub and all registered Sites.
Example Request
curl -X 'GET' \
'http://your-hub-address:8000/api/health/' \
-H 'accept: application/json' \
-H 'Authorization: Api-Key your-api-key'
Successful Response
HTTP Status Code: 200 OK
Content-Type: application/json
Example Response
{
"overall_health": "ok",
"hub_status": {
"health": "ok"
},
"site_status": [
{
"site": "Site 1",
"health": "ok",
"nodes": [
{
"name": "Site 1",
"health": "ok",
"online": true,
"has_default_queue": true,
"last_heartbeat": "2025-08-07T13:34:23.276099+00:00",
"worker_version": "2.6.0",
"ngenea_version": "1.31.0",
"analytics_version": "2.7.1",
"search_version": "1.2.0"
}
],
"queues": [
{
"name": "default",
"health": "ok",
"online": true,
"last_heartbeat": "2025-08-07T13:34:23.276099+00:00"
}
]
},
{
"site": "Site 2",
"health": "ok",
"nodes": [
{
"name": "Site 1",
"health": "ok",
"online": true,
"has_default_queue": true,
"last_heartbeat": "2025-08-07T13:34:24.781445+00:00",
"worker_version": "2.6.0",
"ngenea_version": "1.31.0",
"analytics_version": "2.7.1",
"search_version": "1.2.0"
},
{
"name": "sitetest",
"health": "ok",
"online": true,
"has_default_queue": true,
"last_heartbeat": "2025-07-01T10:54:54.269000+00:00",
"version_details": "Could not retrieve version information for example@sitetest"
}
],
"queues": [
{
"name": "default",
"health": "ok",
"online": true,
"last_heartbeat": "2025-08-07T13:34:34.791954+00:00"
}
]
},
{
"site": "testexample",
"health": "ok",
"nodes": [],
"queues": []
}
]
}
Response Fields
Field |
Type |
Description |
|---|---|---|
|
string |
Overall system health status ( |
|
string |
Health status of the central Hub component |
|
array |
List of health status entries per site |
|
string |
Name of the site |
|
string |
Health of the site ( |
|
array |
List of nodes for that site |
|
string |
Node name |
|
string |
Health of the node |
|
boolean |
Whether the node is online |
|
boolean |
Whether the node has the default queue |
|
string |
Timestamp of last node heartbeat |
|
string |
Worker component version (if available) |
|
string |
Ngenea service version (if available) |
|
string |
Analytics service version |
|
string |
Search service version |
|
string |
Additional version info or errors (optional) |
|
array |
List of queue objects for the site |
|
string |
Name of the queue |
|
string |
Health of the queue |
|
boolean |
Whether the queue is online |
|
string |
Timestamp of last queue heartbeat |
1.7.3. Search¶
Ngenea Hub’s Search feature allows users to quickly locate files and folders across all connected sites, making it easier to manage distributed storage environments. Built on top of PixStor, the search functionality supports both PixStor Search and PixStor Analytics backends.
Before using the search APIs, it’s important to ensure the appropriate backend is configured and that the system points to the correct instance (based on your PixStor version).
There are two ways to interact with the search capability:
Via REST API : Ideal for developers or automated tools needing programmatic access
Via UI : A user-friendly global search page within the Ngenea Hub web interface
Depending on the setup, users can switch between search backends (e.g., from Analytics to PixStor Search) using configuration API calls. The actual data source (Elasticsearch) must also be correctly pointed to, especially for systems running PixStor 6+.
With the proper configuration, Ngenea Search enables efficient, site-wide or global file discovery with minimal effort.
Note
When the search backend is configured as analytics, metadata updates are not supported.
To switch to the PixStor Search backend, please refer to the Search documentation.
1.7.3.1. POST /search/¶
Description
Initiates a file or folder search across one or more sites managed by the Ngenea Hub. This endpoint allows users to search for files within a specified path using optional filters and settings.
The request body includes search criteria such as:
The target site(s)
Path to search from
Filters (e.g., metadata)
Whether to search recursively
Whether to merge results from multiple sites
Once triggered, the search operation is submitted, and a unique search ID is returned.
Request Parameters
Name |
Type |
Location |
Description |
|---|---|---|---|
|
object |
body |
JSON object containing search criteria (Required) |
Example Request
curl -X 'POST' \
'http://your-hub-address:8000/api/search/' \
-H 'accept: application/json' \
-H 'Authorization: Api-Key your-api-key' \
-H 'Content-Type: application/json' \
-d '{
"sites": [
"siteA"
],
"path": "/path/to/file",
"filters": {},
"merge": false,
"metadata_fields": [],
"recursive": true
}'
Request Body Fields
Field |
Type |
Required |
Description |
|---|---|---|---|
|
array |
Yes |
List of site names to search in |
|
string |
Yes |
Root path where the search should begin |
|
object |
No |
Optional key-value filters (e.g., by metadata attributes) |
|
boolean |
No |
Whether to merge results from multiple sites (default: |
|
array |
No |
List of specific metadata fields to include in the response |
|
boolean |
No |
Whether to search recursively through subdirectories (default: |
Successful Response
HTTP Status Code: 201 Created
Content-Type: application/json
Returns a unique ID for the search task and a URL to retrieve results.
Example Response
{
"id": 21,
"url": "http://your-hub-address:8000/api/search/21/"
}
Response Fields
Field |
Type |
Description |
|---|---|---|
|
integer |
Unique identifier for the search job |
|
string |
URL to access the status or results of the search |
1.7.3.2. PATCH /search/metadata/¶
Description
This endpoint is used to set or update metadata tags on files or folders in the Ngenea Hub search index. These metadata updates help improve search relevance and filtering by associating custom tags or attributes with files.
Note
This endpoint is primarily used for setting tags on files within the search system.
For detailed information on how tags work and how to use them effectively, please refer to the Tags section in the Search documentation.
Request Parameters
Name |
Type |
Location |
Description |
|---|---|---|---|
|
array |
body |
Array of objects containing file path, site, and metadata updates (Required) |
Example Request
curl -X 'PATCH' \
'http://your-hub-address:8000/api/search/metadata/' \
-H 'accept: application/json' \
-H 'Authorization: Api-Key your-api-key' \
-H 'Content-Type: application/json' \
-d '[
{
"pathname": "/path/to/file",
"site": "site A",
"metadata": {
"search.tags": ["example", "two", "three"]
}
}
]'
Request Body Fields
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
The file or folder path where metadata is updated |
|
string |
Yes |
Site name where the file/folder resides |
|
object |
Yes |
Key-value pairs representing metadata updates (e.g., tags) |
Successful Response
HTTP Status Code: 201 Created
Content-Type: application/json
Indicates the metadata updates have been accepted and will be applied asynchronously.
Example Response
{
"message": "updates accepted, they will be applied asynchronously"
}
Response Fields
Field |
Type |
Description |
|---|---|---|
|
string |
Confirmation that updates have been accepted for asynchronous processing |
1.7.3.3. GET /search/metadata_fields/¶
Description
This endpoint retrieves a list of available metadata fields that can be used for searching or filtering files and folders across one or more sites in Ngenea Hub.
These metadata fields describe file attributes (e.g., size, owner, mimetype), file system details (e.g., GPFS fields), and custom fields like search.tags.
Request Parameters
Name |
Type |
Required |
Description |
|---|---|---|---|
|
integer |
No |
Page number of the result set. Defaults to 1 if not specified. |
|
integer |
No |
Number of results to return per page. Must be between 20 and 100. Use 0 to return all results without pagination. Defaults to 20 if not specified or below the minimum. |
Example Request
curl -X 'GET' \
'http://your-hub-address:8000/api/search/metadata_fields/?page=1&page_size=1' \
-H 'accept: application/json' \
-H 'Authorization: Api-Key your-api-key'
Successful Response
HTTP Status Code: 200 OK
Content-Type: application/json
Example Response
{
"siteA": [
{
"name": "core.accesstime",
"type": "datetime"
},
{
"name": "core.blocksize",
"type": "long"
},
{
"name": "search.tags",
"type": "set"
}
],
"siteB": [
{
"name": "core.accesstime",
"type": "datetime"
},
{
"name": "search.tags",
"type": "set"
}
]
}
Response Fields
Field |
Type |
Description |
|---|---|---|
|
string |
Name of the site (e.g., |
|
string |
Name of the metadata field |
|
string |
Data type (e.g., |
1.7.3.4. GET /search/{id}/¶
Description
This endpoint retrieves the results of a previously initiated search operation using the search ID returned from the POST /search/ request.
It supports pagination, sorting, and optional grouping of results across multiple sites. This endpoint is useful for retrieving large result sets in a controlled, page-by-page manner or for merging matching file paths by name across different sites.
Request Parameters
Name |
Type |
In |
Description |
|---|---|---|---|
|
string |
path |
(Required) Unique ID of the search operation. |
|
integer |
query |
Page number within the paginated result set. Defaults to the first page if not provided. |
|
integer |
query |
Number of results per page. |
|
string |
query |
One or more metadata fields to sort the results by. |
|
boolean |
query |
If true, groups results by matching file names across multiple sites. Useful for comparing file presence and metadata consistency. |
Example Request
curl -X 'GET' \
'http://your-hub-address:8000/api/search/21/' \
-H 'accept: application/json' \
-H 'Authorization: Api-Key your-api-key'
Successful Response
HTTP Status Code: 200 OK
Content-Type: application/json
Example Response
{
"count": 1,
"next": null,
"previous": null,
"id": 34,
"parameters": {
"path": "/",
"sites": ["siteA"],
"filters": {
"core.pathname": "*helloworld*"
}
},
"more_results": false,
"items": [
{
"href": "http://your-hub-address:8000/api/file/?path=%2Fmmfs1%2Fdata%2Fsample_data%2Fhelloworld.txt&site=siteA",
"site": "siteA",
"path": "/mmfs1/data/sample_data",
"name": "helloworld.txt",
"metadata": {
"core.size": 116,
"core.type": "file",
"core.inode": 30984,
"core.user.name": "root",
"core.group.name": "root",
"core.pathname": "/mmfs1/data/sample_data/helloworld.txt",
"core.modificationtime": "2017-05-26T14:26:28",
"core.changetime": "2025-05-14T11:57:08",
"gpfs.poolname": "sas1",
"gpfs.filesetname": "root"
},
"proxies": {}
}
],
"complete": false,
"errors": {}
}
Response Fields
Field |
Type |
Description |
|---|---|---|
|
integer |
Total number of matching items returned. |
|
string/null |
Pagination links for next/previous result pages, if available. |
|
integer |
Unique request or search ID, useful for tracking and debugging. |
|
string |
Root path used in the search query. |
|
array |
List of site names where the search was performed. |
|
object |
Filters used in the search query (e.g., pathname match patterns). |
|
boolean |
Indicates whether more results are available beyond the current response. |
|
array |
Array of matching file entries from the search. |
|
string |
Site where the file was found. |
|
string |
Directory path where the file is located. |
|
string |
File name. |
|
string |
API link to fetch file metadata or access the file. |
|
object |
Key-value pairs containing detailed metadata about the file. |
|
boolean |
Indicates whether the search has completed across all queried sites. |
|
object |
Any site-specific errors encountered during the search (empty if none). |
1.7.3.5. DELETE /search/{id}/¶
Description
This endpoint is used to delete a previously created search operation and its associated results from the system. It is typically used to clean up resources once the search is complete and no longer needed.
Request Parameters
Name |
Type |
In |
Description |
|---|---|---|---|
|
string |
path |
(Required) The unique search ID to be deleted. |
Example Request
curl -X 'DELETE' \
'http://your-hub-address:8000/api/search/21/' \
-H 'accept: application/json' \
-H 'Authorization: Api-Key your-api-key'
Successful Response
HTTP Status Code: 204 No Content
The search and its results were successfully deleted. No content is returned in the response body.
Response Fields
No response body is returned for this request.
This action is irreversible. Once a search is deleted, its results and metadata are permanently removed and cannot be retrieved again. Be sure you no longer need the data before performing this operation.
1.7.4. Analytics¶
1.7.4.1. GET /analytics¶
Description
The GET /analytics/ endpoint retrieves analytics data related to file storage usage for a specified site and directory path. It provides information such as the total number of files, total bytes used, and per-directory or per-storage pool statistics. The API supports optional parameters like pagination, child directory inclusion, CSV downloads, and customizable timeout or cache settings.
This API is used when there is a need to understand how storage is being utilized within a site. It is particularly useful for analyzing a specific directory or for retrieving detailed data across child directories.
Administrators can call this endpoint periodically or on demand to review current storage metrics.
It is useful for storage monitoring, capacity planning, and troubleshooting. By analyzing file count and storage consumption, teams can optimize storage usage, detect anomalies or growth patterns, and generate reports for internal audits or compliance purposes. The option to export data as CSV makes it convenient for external reporting or integration with other tools.
Request Parameters
Name |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
The name of the site to retrieve analytics for. Minimum length: 1. |
|
string |
No |
The target directory path to analyze. If not provided, analytics will be retrieved for all space roots. |
|
integer |
No |
Page number within the paginated result set. Defaults to 1 if not provided. |
|
integer |
No |
Number of results per page. Must be between 20 and 100. Use |
|
boolean |
No |
Whether to include child directories in the response. Default is |
|
integer |
No |
Optional cache time-to-live for the analytics data (in seconds). |
|
integer |
No |
Custom timeout (in seconds) for fetching analytics data. |
|
string |
No |
If set to |
Example Request
curl -X GET \
'http://your-hub-address:8000/api/analytics/?page=1&site=siteB&children=true' \
-H 'accept: application/json' \
-H 'Authorization: Api-Key <your-api-key>'
Successful Response
HTTP Status Code: 200 OK
Content-Type: application/json
Example Response
{
"children": {
"count": 1,
"next": null,
"previous": null,
"results": [
{
"site": "siteB",
"pools": [
{
"name": "sas1",
"total_used_bytes": 475529216,
"total_files_count": 532
},
{
"name": "cloud",
"total_used_bytes": 0,
"total_files_count": 0
}
],
"path": "/mmfs1",
"total_used_bytes": 475529216,
"total_files_count": 532
}
]
},
"site": "siteB",
"pools": [],
"path": "",
"total_used_bytes": null,
"total_files_count": null
}
Response Fields
Field |
Type |
Description |
|---|---|---|
|
object |
Contains results for child directories (if |
|
integer |
Total number of items returned. |
|
array |
List of objects representing directories under the target path. |
|
string |
Name of the site queried. |
|
array |
List of storage pools (only filled when the path is not specified or children are not included). |
|
string |
The requested directory path. |
|
integer |
Total disk usage in bytes for the specified path. |
|
integer |
Total number of files under the specified path. |