Skip to main content
Version: v5.0

File Service Metrics

Metrics available#

The File Service supports the following Metrics Service APIs:

FileCount#

This API call returns the number of files (excluding graphics file) in a namespace, typically a workspace namespace.

Endpoints#

Two forms of endpoints are available:

GET /metricsvc/api/v1/metrics/dtplatform.filesvc.FileCount?{dimensions}

GET /metricsvc/api/v1/metrics/dtplatform.filesvc.FileCount/by-dimension;{dimensions}?{period parameters}

Request#

Query parameters#

ParameterTypeDescriptionRequired
namespaceStringFilter by workspace namespace.Required

Body#

Example:

This example shows a request to return the FileCount for the namespace called digitaltwin_XYZ

GET /metricsvc/api/v1/metrics/dtplatform.filesvc.FileCount?namespace=digitaltwin_XYZ

Response#

This example response shows that number of files in the digitaltwin_XYZ namespace was counted as 2215 at 14:00 on 15th July, and 2289 at 04:00 on 16th July.

{    "metricName": "dtplatform.filesvc.FileCount",    "dimensions": {        "namespace": "digitaltwin_XYZ"    },    "metrics": [        {            "timestamp": "2024-07-15T14:00:00Z",            "value": 2215        },        {            "timestamp": "2024-07-16T04:00:00Z",            "value": 2289        }    ]}    

FileVersionCount#

This API call returns the number of file versions (excluding graphics file) in a namespace, typically a workspace namespace, for a particular file ID.

Endpoints#

Two forms of endpoints are available:

GET /metricsvc/api/v1/metrics/dtplatform.filesvc.FileVersionCount?{dimensions}

GET /metricsvc/api/v1/metrics/dtplatform.filesvc.FileVersionCount/by-dimension;{dimensions}?{period parameters}

Request#

Query parameters#

ParameterTypeDescriptionRequired
namespaceStringFilter by workspace namespaceRequired
file_idStringFilter by file IDOptional

Note: The parameter file_id is optional, not required. If file_id is specified, it will return the count of file versions for the specified file. If this parameter is not specified, it will return the count of all versions of all files in the namespace.

Examples#

Example 1:

Body#

This example shows a request to return the FileVersionCount for the namespace called digitaltwin_XYZ where the file_id is not specified.

GET /metricsvc/api/v1/metrics/dtplatform.filesvc.FileVersionCount?namespace=digitaltwin_XYZ

Response#

This response returns the count of all versions of all files in the namespace.

{    "metricName": "dtplatform.filesvc.FileVersionCount",    "dimensions": {        "namespace": "digitaltwin_XYZ"    },    "metrics": [        {            "timestamp": "2024-07-22T08:00:00Z",            "value": 2        },        {            "timestamp": "2024-07-24T00:00:00Z",            "value": 3        },        {            "timestamp": "2024-07-24T00:00:00Z",            "value": 4        },        {            "timestamp": "2024-07-31T23:00:00Z",            "value": 5        }    ]}  

Body#

Example 2:

This example shows a request to return the FileVersionCount for the namespace called digitaltwin_XYZ where the file ID is specified as af654457-d159-4408-984f-dfe4a3ba0641

GET /metricsvc/api/v1/metrics/dtplatform.filesvc.FileVersionCount?namespace=digitaltwin_XYZ&file_id=af654457-d159-4408-984f-dfe4a3ba0641

Response#

This example response shows that the number of file versions in the digitaltwin_XYZ namespace for file_id af654457-d159-4408-984f-dfe4a3ba0641 was counted as 2 at 08:00 on 22nd July.

{    "metricName": "dtplatform.filesvc.FileVersionCount",    "dimensions": {        "namespace": "digitaltwin_XYZ",        "file_id": "af654457-d159-4408-984f-dfe4a3ba0641"    },    "metrics": [        {            "timestamp": "2024-07-22T08:00:00Z",            "value": 2        }    ]}

FileVersionSize#

This API call returns the size on disk of the file version (excluding graphics files) in a workspace namespace, for a particular file ID and file version. The values returned are in bytes.

Endpoints#

Two endpoints are available:

GET /metricsvc/api/v1/metrics/dtplatform.filesvc.FileVersionSize?{dimensions}

GET /metricsvc/api/v1/metrics/dtplatform.filesvc.FileVersionSize/by-dimension;{dimensions}?{period parameters}

Request#

Query parameters#

ParameterTypeDescriptionRequired
namespaceStringFilter by workspace namespace.Required
file_idStringFilter by file IDOptional
versionStringFilter by file versionOptional

Note: The parameter file_id is optional and is not required. If file_id is specified, it will return the file version size for the specified file. If this parameter is not specified, it will return the sizes of all versions of all files in the name space. However, if the version parameter is supplied then the file_id parameter must also be supplied. Specifying namespace and version only, will not return any results.

Body#

Example:

This example shows a request to return the FileVersionSize for the namespace called digitaltwin_XYZ for a specified time period from 23/07/24 to 25/07/24.

GET /metricsvc/api/v1/metrics/dtplatform.filesvc.FileVersionSize/by-dimension;namespace=digitaltwin_XYZ?period.from=2024-07-23T00:00:00Z&period.to=2024-07-25T00:00:00Z

Response#

This example response shows that file version size in the digitaltwin_XYZ namespace was 16345 bytes at timestamp "2024-07-15T14:00:00Z" and 2289 bytes at time stamp "2024-07-16T04:00:00Z".

{    "metricName": "dtplatform.filesvc.FileVersionSize",    "dimensions": {        "namespace": "digitaltwin_XYZ"    },    "metrics": [        {            "timestamp": "2024-07-15T14:00:00Z",            "value": 16345        },        {            "timestamp": "2024-07-16T04:00:00Z",            "value": 2289        }    ]}    

PreviewImageFileSize#

This API call returns the size on disk of the image preview file version in a workspace namespace, for a particular file ID and file version. The values returned are in bytes.

Endpoints#

Two forms of endpoints are available:

GET /metricsvc/api/v1/metrics/dtplatform.filesvc.PreviewImageFileSize?{dimensions}

GET /metricsvc/api/v1/metrics/dtplatform.filesvc.PreviewImageFileSize/by-dimension;{dimensions}?{period parameters}

Request#

Query parameters#

ParameterTypeDescriptionRequired
namespaceStringFilter by workspace namespace.Required
file_idStringFilter by file IDOptional
versionStringFilter by file versionOptional

Note: The parameter file_id is optional and is not required. If file_id is specified, it will return the preview image file size for the specified file. If this parameter is not specified, it will return the size of all versions of all preview image files in the name space. However, if the version parameter is supplied then the file_id parameter must also be supplied. Specifying namespace and version only, will not return any results.

Body#

Example:

This example shows a request to return the PreviewImageFileSize for the namespace called digitaltwin_XYZ

GET /metricsvc/api/v1/metrics/dtplatform.filesvc.PreviewImageFileSize?namespace=digitaltwin_XYZ

Response#

This example response shows that preview image file size for the digitaltwin_XYZ namespace was 24653 bytes on 9th July 2024.

{    "metricName": "dtplatform.filesvc.PreviewImageFileSize",    "dimensions": {        "namespace": "digitaltwin_XYZ"    },    "metrics": [        {            "timestamp": "2024-07-09T14:00:00Z",            "value": 24653        }            ]}    

FileCount.graphics#

This API call returns the number of graphics files in a namespace, typically a workspace namespace. It is similar to the FileCount metric.

Endpoints#

Two forms of endpoints are available:

GET /metricsvc/api/v1/metrics/dtplatform.filesvc.FileCount.graphics?{dimensions}

GET /metricsvc/api/v1/metrics/dtplatform.filesvc.FileCount.graphics/by-dimension;{dimensions}?{period parameters}

Request#

Query parameters#

ParameterTypeDescriptionRequired
namespaceStringFilter by workspace namespace.Required

Body#

Example:

This example shows a request to return the graphics FileCount for the namespace called digitaltwin_XYZ

GET /metricsvc/api/v1/metrics/dtplatform.filesvc.FileCount.graphics?namespace=digitaltwin_XYZ

Response#

This example response shows that number of graphics files in the digitaltwin_XYZ namespace was counted as 2106 at 14:00 on 14th July, and 1289 at 04:00 on 15th July.

{    "metricName": "dtplatform.filesvc.FileCount.graphics",    "dimensions": {        "namespace": "digitaltwin_XYZ"    },    "metrics": [        {            "timestamp": "2024-07-14T14:00:00Z",            "value": 2106        },        {            "timestamp": "2024-07-15T04:00:00Z",            "value": 1289        }    ]}    

FileVersionCount.graphics#

This API call returns the number of graphics file versions in a namespace, typically a workspace namespace, for a particular file ID. It is similar to the FileVersionCount metric.

Endpoints#

Two forms of endpoints are available:

GET /metricsvc/api/v1/metrics/dtplatform.filesvc.FileVersionCount.graphics?{dimensions}

GET /metricsvc/api/v1/metrics/dtplatform.filesvc.FileVersionCount.graphics/by-dimension;{dimensions}?{period parameters}

Request#

Query parameters#

ParameterTypeDescriptionRequired
namespaceStringFilter by workspace namespaceRequired
file_idStringFilter by file IDOptional

Note: The parameter file_id is optional, not required. If file_id is specified, it will return the count of file versions for the specified graphics file. If this parameter is not specified, it will return the count of all versions of all graphics files in the namespace.

Example#

Body#

This example shows a request to return the graphics files version count for the namespace called digitaltwin_XYZ where the file_id is not specified.

GET /metricsvc/api/v1/metrics/dtplatform.filesvc.FileVersionCount.graphics?namespace=digitaltwin_XYZ

Response#

This response returns the count of all versions of all graphics files in the namespace digitaltwin_XYZ.

{    "metricName": "dtplatform.filesvc.FileVersionCount.graphics",    "dimensions": {        "namespace": "digitaltwin_XYZ"    },    "metrics": [        {            "timestamp": "2024-07-20T08:00:00Z",            "value": 7        },        {            "timestamp": "2024-07-22T00:00:00Z",            "value": 9        },        {            "timestamp": "2024-07-23T00:00:00Z",            "value":11        },        {            "timestamp": "2024-07-26T23:00:00Z",            "value": 16        }    ]}  

FileVersionSize.graphics#

This API call returns the size on disk of the graphics file version in a workspace namespace, for a particular file ID and file version. The values returned are in bytes. It is similar to the FileVersionSize metric.

Endpoints#

Two forms of endpoints are available:

GET /metricsvc/api/v1/metrics/dtplatform.filesvc.FileVersionSize.graphics?{dimensions}

GET /metricsvc/api/v1/metrics/dtplatform.filesvc.FileVersionSize.graphics/by-dimension;{dimensions}?{period parameters}

Request#

Query parameters#

ParameterTypeDescriptionRequired
namespaceStringFilter by workspace namespace.Required
file_idStringFilter by file IDOptional
versionStringFilter by file versionOptional

Note: The parameter file_id is optional and is not required. If file_id is specified, it will return the sizes of all graphic file versions for the specified file. If this parameter is not specified, it will return the sizes of all graphics file versions in the name space. However, if the version parameter is supplied then the file_id parameter must also be supplied. Specifying namespace and version only, will not return any results.

Body#

Example:

This example shows a request to return the FileVersionSize for the namespace called digitaltwin_XYZ for a specified time period from 23/07/24 to 25/07/24.

GET /metricsvc/api/v1/metrics/dtplatform.filesvc.FileVersionSize.graphics/by-dimension;namespace=digitaltwin_XYZ?period.from=2024-07-23T00:00:00Z&period.to=2024-07-25T00:00:00Z

Response#

This example response shows that graphics file version size in the digitaltwin_XYZ namespace was 10345 bytes at timestamp "2024-07-14T14:00:00Z" and 12280 bytes at time stamp "2024-07-15T04:00:00Z".

{    "metricName": "dtplatform.filesvc.FileVersionSize.graphics",    "dimensions": {        "namespace": "digitaltwin_XYZ"    },    "metrics": [        {            "timestamp": "2024-07-14T14:00:00Z",            "value": 10345        },        {            "timestamp": "2024-07-15T04:00:00Z",            "value": 12280        }    ]}