logoBack to home screen

Running Health Checks via Repository REST API

This page explains how to use repository REST API to run connection checks and deep health checks on a repository.

Connection Checks

Connection check verifies if the repository can be reached. It's a good practice to run it before the Deep Health Check.

cURL Example

In the example below, we're sending a connection check request identifying the repository to be checked by its ID. Please replace the host, session ID and repository ID accordingly.

curl --location --request GET 'https://[ADX_HOST]/tribefire-services/api/v1/access.adx.admin/v1/repository/connection-check/by-id?sessionId=[SESSION_ID]&repositoryId=[REPOSITORY_ID]

Response

Response contains the overall status of all checks (checkStatus at the top) as well as the status and details of individual checks. checkStatus should read ok in all cases.

{
    "_type": "tribefire.adx.model.deployment.service.repository.CheckResponse",
    "_id": "0",
    "checkStatus": "ok",
    "duration": 385,
    "elapsedTimeInMs": 0.0,
    "entries": [
        {
            "_type": "com.braintribe.model.check.service.CheckResultEntry",
            "_id": "1",
            "checkStatus": "ok",
            "details": "Connection(s) successfully tested with no errors or warnings. Connection Test DB Connection (test.db.connection.cleanadxreponew) is valid, the check took 76 ms.. ",
            "detailsAsMarkdown": false,
            "message": "Database connection configuration: cleanadxreponew",
            "name": "Database connection configuration: cleanadxreponew"
        },
        {
            "_type": "com.braintribe.model.check.service.CheckResultEntry",
            "_id": "2",
            "checkStatus": "ok",
            "details": "Storage Path is a writable folder",
            "detailsAsMarkdown": false,
            "message": "File Storage Check: C:\\Users\\User\\Documents\\adx25\\repository\\content",
            "name": "File Storage Check: C:\\Users\\User\\Documents\\adx25\\repository\\content"
        },
        {
            "_type": "com.braintribe.model.check.service.CheckResultEntry",
            "_id": "3",
            "checkStatus": "ok",
            "details": "Connection(s) successfully tested with no errors or warnings. Connection Test DB Connection (test.db.connection.cleanadxreponew) is valid, the check took 69 ms.. ",
            "detailsAsMarkdown": false,
            "message": "Database connection configuration: cleanadxreponew",
            "name": "Database connection configuration: cleanadxreponew"
        },
        {
            "_type": "com.braintribe.model.check.service.CheckResultEntry",
            "_id": "4",
            "checkStatus": "ok",
            "details": "Storage Path is a writable folder",
            "detailsAsMarkdown": false,
            "message": "File Storage Check: C:\\Users\\User\\Documents\\adx25\\repository-resources\\default\\cache",
            "name": "File Storage Check: C:\\Users\\User\\Documents\\adx25\\repository-resources\\default\\cache"
        },
        {
            "_type": "com.braintribe.model.check.service.CheckResultEntry",
            "_id": "5",
            "checkStatus": "ok",
            "detailsAsMarkdown": false,
            "message": "Content Configuration Check",
            "name": "Content Configuration Check"
        },
        {
            "_type": "com.braintribe.model.check.service.CheckResultEntry",
            "_id": "6",
            "checkStatus": "ok",
            "details": "Remote Conversion used: http://conv-local:8080/tribefire-services",
            "detailsAsMarkdown": false,
            "message": "Conversion Check",
            "name": "Conversion Check"
        },
        {
            "_type": "com.braintribe.model.check.service.CheckResultEntry",
            "_id": "7",
            "checkStatus": "ok",
            "detailsAsMarkdown": false,
            "message": "Async Configuration Check",
            "name": "Async Configuration Check"
        },
        {
            "_type": "com.braintribe.model.check.service.CheckResultEntry",
            "_id": "8",
            "checkStatus": "ok",
            "detailsAsMarkdown": false,
            "message": "Fulltext Configuration Check",
            "name": "Fulltext Configuration Check"
        }
    ],
    "message": "Successfully tested! (Click to see details ...)"

Endpoint Description

Send your connection check requests to the endpoints described below.

Request typeService descriptionEndpointRequest query parametersForm dataReturns
GETRuns connection check on a repository identified by its ID.https://[ADX_HOST]/tribefire-services/api/v1/access.adx.admin/v1/repository/connection-check/by-idsessionId, repositoryIdnoneSee Response
GETRuns connection check on a repository identified by its name.https://[ADX_HOST]/tribefire-services/api/v1/access.adx.admin/v1/repository/connection-check/by-namesessionId, repositoryNamenoneSee Response
GETRuns connection check on a repository identified by its technical name.https://[ADX_HOST]/tribefire-services/api/v1/access.adx.admin/v1/repository/connection-check/by-technical-namesessionId, repositoryTechnicalNamenoneSee Response

Parameters

ParameterData typeDescription
sessionIdstringSession ID returned when you authenticate
repositoryIdstringRepository ID
repositoryNamestringRepository name
repositoryTechnicalNameRepository technical name

Synchronous Deep Health Check

Synchronous Deep Health Check tests repository services and immediately returns a report on their status. The checkStatus value should be ok.

cURL Example

In the example below, we're requesting to run Deep Health Check synchronously on a repository identified by its name. Please replace the host, session ID and repository name accordingly.

curl --location --request GET 'https://[ADX_HOST]/tribefire-services/api/v1/access.adx.admin/v1/repository/deep-check/by-name?sessionId=[SESSION_ID]&repositoryName=[REPOSITORY_NAME]'

Response

The response includes a status of every performed test. The checkStatus property should read ok.

{
    "_type": "tribefire.adx.model.deployment.service.repository.DeepHealthCheckResponse",
    "_id": "0",
    "checkStatus": "ok",
    "duration": 13980,
    "elapsedTimeInMs": 0.0,
    "message": "All checks succeeded!",
    "reportUrl": "/component/report?folderName=Default-2020.11.02.13.04.11-a4bf9fd3-9256-4deb-9d40-6df4c637942c&sessionId=20201102125901599-889a857b-340f-438d-80e2-a3643ffc76a9",
    "test": {
        "_type": "com.braintribe.model.adx.model.service.Test",
        "_id": "1",
        "accessId": "access.adx.content.default",
        "code": "success",
        "listFeatures": [
            {
                "_type": "com.braintribe.model.adx.model.service.Feature",
                "_id": "2",
                "featureDescription": "Get home",
                "featureName": "1. Get home",
                "listScenarios": [
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "3",
                        "scenarioDescription": "Purpose of this test is to get home url",
                        "scenarioName": "GET HOME"
                    }
                ]
            },
            {
                "_type": "com.braintribe.model.adx.model.service.Feature",
                "_id": "4",
                "featureDescription": "Upload File on root to Standard repository with File system",
                "featureName": "2. Upload ADx FS",
                "listScenarios": [
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "5",
                        "scenarioDescription": "Purpose of this test is to upload file to folder: root. As a result file id will be stored.",
                        "scenarioName": "CREATE CONTENT"
                    }
                ]
            },
            {
                "_type": "com.braintribe.model.adx.model.service.Feature",
                "_id": "6",
                "featureDescription": "Create root folder",
                "featureName": "3. Create root folder",
                "listScenarios": [
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "7",
                        "scenarioDescription": "Purpose of this test is to successfully create a new root folder in the repository. As a result folder id will be stored.",
                        "scenarioName": "CREATE FOLDER"
                    }
                ]
            },
            {
                "_type": "com.braintribe.model.adx.model.service.Feature",
                "_id": "8",
                "featureDescription": "Upload File to parent folder on Standard repository with File system",
                "featureName": "4. Upload to root folder ADx FS",
                "listScenarios": [
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "9",
                        "scenarioDescription": "Purpose of this test is to upload file to folder: c598be29-d012-49e4-896e-87d2705f09af. As a result file id will be stored.",
                        "scenarioName": "CREATE CONTENT"
                    }
                ]
            },
            {
                "_type": "com.braintribe.model.adx.model.service.Feature",
                "_id": "10",
                "featureDescription": "Create tag on root content and content under parent folder",
                "featureName": "5. Create tag on contents",
                "listScenarios": [
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "11",
                        "scenarioDescription": "Purpose of this test is to add tag to entry: 72ee9dd4-5118-47b3-823d-22bcd0727bcb. As a result tag will be attached.",
                        "scenarioName": "ADD TAG"
                    },
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "12",
                        "scenarioDescription": "Purpose of this test is to add tag to entry: 64cbb7c4-f125-4701-abf6-6aaec11c2526. As a result tag will be attached.",
                        "scenarioName": "ADD TAG"
                    }
                ]
            },
            {
                "_type": "com.braintribe.model.adx.model.service.Feature",
                "_id": "13",
                "featureDescription": "Create subfolder under root folder",
                "featureName": "6. Create subfolder",
                "listScenarios": [
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "14",
                        "scenarioDescription": "Purpose of this test is to successfully create a new root folder in the repository. As a result folder id will be stored.",
                        "scenarioName": "CREATE FOLDER"
                    }
                ]
            },
            {
                "_type": "com.braintribe.model.adx.model.service.Feature",
                "_id": "15",
                "featureDescription": "Create tag on root content and content under parent folder",
                "featureName": "7. Create tag on folder",
                "listScenarios": [
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "16",
                        "scenarioDescription": "Purpose of this test is to add tag to entry: 3e5fb3e6-223a-46fd-a6ba-a62d923d390c. As a result tag will be attached.",
                        "scenarioName": "ADD TAG"
                    }
                ]
            },
            {
                "_type": "com.braintribe.model.adx.model.service.Feature",
                "_id": "17",
                "featureDescription": "Search root folder content",
                "featureName": "8. Search root folder content",
                "listScenarios": [
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "18",
                        "scenarioDescription": "Purpose of this test is to search for files and folders from repository by parent id and/or by tags: c598be29-d012-49e4-896e-87d2705f09af",
                        "scenarioName": "SEARCH BY PARENT ID AND/OR TAG"
                    }
                ]
            },
            {
                "_type": "com.braintribe.model.adx.model.service.Feature",
                "_id": "19",
                "featureDescription": "Copy root file to subfolder on Standard repository with File system",
                "featureName": "9. Copy content ADx FS",
                "listScenarios": [
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "20",
                        "scenarioDescription": "Purpose of this test is to copy file to folder: 3e5fb3e6-223a-46fd-a6ba-a62d923d390c. As a result file id will be stored.",
                        "scenarioName": "COPY CONTENT"
                    }
                ]
            },
            {
                "_type": "com.braintribe.model.adx.model.service.Feature",
                "_id": "21",
                "featureDescription": "Update content on Standard repository with File system",
                "featureName": "10. Update content ADx FS",
                "listScenarios": [
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "22",
                        "scenarioDescription": "Purpose of this test is to update file with : \"ControlFile2.pdf\".",
                        "scenarioName": "UPDATE CONTENT"
                    }
                ]
            },
            {
                "_type": "com.braintribe.model.adx.model.service.Feature",
                "_id": "23",
                "featureDescription": "Update content on Standard repository with File system",
                "featureName": "11. Update folder",
                "listScenarios": [
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "24",
                        "scenarioDescription": "Purpose of this test is to update folder with : \"TestSubFolderChangedName\".",
                        "scenarioName": "UPDATE FOLDER"
                    }
                ]
            },
            {
                "_type": "com.braintribe.model.adx.model.service.Feature",
                "_id": "25",
                "featureDescription": "Search for contents and folders with tag",
                "featureName": "12. Search by tag",
                "listScenarios": [
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "26",
                        "scenarioDescription": "Purpose of this test is to search for files and folders from repository by parent id and/or by tags: tags=testContentTag1-2020.11.02.13.04.12.223-24737",
                        "scenarioName": "SEARCH BY PARENT ID AND/OR TAG"
                    },
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "27",
                        "scenarioDescription": "Purpose of this test is to search for files and folders from repository by parent id and/or by tags: tags=testContentTag2-2020.11.02.13.04.12.223-84986",
                        "scenarioName": "SEARCH BY PARENT ID AND/OR TAG"
                    }
                ]
            },
            {
                "_type": "com.braintribe.model.adx.model.service.Feature",
                "_id": "28",
                "featureDescription": "Delete tag and verify by search",
                "featureName": "13. Delete tag",
                "listScenarios": [
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "29",
                        "scenarioDescription": "Purpose of this test is to successfully delete the tags created on Content or Folder.",
                        "scenarioName": "DELETE TAG"
                    },
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "30",
                        "scenarioDescription": "Purpose of this test is to search for files and folders from repository by parent id and/or by tags: tags=testContentTag1-2020.11.02.13.04.12.223-24737",
                        "scenarioName": "SEARCH BY PARENT ID AND/OR TAG"
                    },
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "31",
                        "scenarioDescription": "Purpose of this test is to successfully delete the tags created on Content or Folder.",
                        "scenarioName": "DELETE TAG"
                    },
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "32",
                        "scenarioDescription": "Purpose of this test is to search for files and folders from repository by parent id and/or by tags: tags=testContentTag2-2020.11.02.13.04.12.223-84986",
                        "scenarioName": "SEARCH BY PARENT ID AND/OR TAG"
                    }
                ]
            },
            {
                "_type": "com.braintribe.model.adx.model.service.Feature",
                "_id": "33",
                "featureDescription": "Convert content",
                "featureName": "14. Convert content",
                "listScenarios": [
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "34",
                        "scenarioDescription": "Purpose of this test is to successfully convert content to images. As a result job id will be stored.",
                        "scenarioName": "CONVERT CONTENT TO IMAGES"
                    }
                ]
            },
            {
                "_type": "com.braintribe.model.adx.model.service.Feature",
                "_id": "35",
                "featureDescription": "Convert content",
                "featureName": "15. Get convert content job result",
                "listScenarios": [
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "36",
                        "scenarioDescription": "Purpose of this test is to successfully get images of content after async conversion. As a result job id will be stored.",
                        "scenarioName": "GET CONVERTED IMAGES"
                    }
                ]
            },
            {
                "_type": "com.braintribe.model.adx.model.service.Feature",
                "_id": "37",
                "featureDescription": "Search for contents with word",
                "featureName": "16. Elastic search",
                "listScenarios": [
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "38",
                        "scenarioDescription": "Purpose of this test is to search content of files with words: TEST, FILE.",
                        "scenarioName": "ELASTIC SEARCH"
                    },
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "39",
                        "scenarioDescription": "Purpose of this test is to search content of files with words: %22This%20is%20ubiquitous%20prerequisite%22.",
                        "scenarioName": "ELASTIC SEARCH"
                    }
                ]
            },
            {
                "_type": "com.braintribe.model.adx.model.service.Feature",
                "_id": "40",
                "featureDescription": "Check-in root content",
                "featureName": "17. Check-in",
                "listScenarios": [
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "41",
                        "scenarioDescription": "Purpose of this test is to check-in file: 72ee9dd4-5118-47b3-823d-22bcd0727bcb.",
                        "scenarioName": "CHECK-IN CONTENT"
                    }
                ]
            },
            {
                "_type": "com.braintribe.model.adx.model.service.Feature",
                "_id": "42",
                "featureDescription": "Add new version of content",
                "featureName": "18. Check out new version",
                "listScenarios": [
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "43",
                        "scenarioDescription": "Purpose of this test is to check-out file: 72ee9dd4-5118-47b3-823d-22bcd0727bcb. As a result file id will be stored.",
                        "scenarioName": "CHECK-OUT CONTENT"
                    }
                ]
            },
            {
                "_type": "com.braintribe.model.adx.model.service.Feature",
                "_id": "44",
                "featureDescription": "Update content on Standard repository with File system",
                "featureName": "19. Update content to new version ADx FS",
                "listScenarios": [
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "45",
                        "scenarioDescription": "Purpose of this test is to update file with : \"TestFileV2.pdf\".",
                        "scenarioName": "UPDATE CONTENT"
                    }
                ]
            },
            {
                "_type": "com.braintribe.model.adx.model.service.Feature",
                "_id": "46",
                "featureDescription": "Check-in new version",
                "featureName": "20. Check-in new version",
                "listScenarios": [
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "47",
                        "scenarioDescription": "Purpose of this test is to check-in file: de068d3d-721a-4b5b-9cdf-b8d2a505fb27.",
                        "scenarioName": "CHECK-IN CONTENT"
                    }
                ]
            },
            {
                "_type": "com.braintribe.model.adx.model.service.Feature",
                "_id": "48",
                "featureDescription": "Get content",
                "featureName": "21. Download content",
                "listScenarios": [
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "49",
                        "scenarioDescription": "Purpose of this test is to download file from repository. As a result file will be stored.",
                        "scenarioName": "DOWNLOAD CONTENT"
                    }
                ]
            },
            {
                "_type": "com.braintribe.model.adx.model.service.Feature",
                "_id": "50",
                "featureDescription": "Get content",
                "featureName": "22. Get content",
                "listScenarios": [
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "51",
                        "scenarioDescription": "Purpose of this test is to get content from repository by its id: de068d3d-721a-4b5b-9cdf-b8d2a505fb27",
                        "scenarioName": "GET CONTENT BY CONTENT ID"
                    }
                ]
            },
            {
                "_type": "com.braintribe.model.adx.model.service.Feature",
                "_id": "52",
                "featureDescription": "Create tag on root content and content under parent folder",
                "featureName": "23. Delete content",
                "listScenarios": [
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "53",
                        "scenarioDescription": "Purpose of this test is to successfully delete the content created in a previous test.",
                        "scenarioName": "DELETE CONTENT"
                    }
                ]
            },
            {
                "_type": "com.braintribe.model.adx.model.service.Feature",
                "_id": "54",
                "featureDescription": "Create tag on root content and content under parent folder",
                "featureName": "24. Delete folder",
                "listScenarios": [
                    {
                        "_type": "com.braintribe.model.adx.model.service.Scenario",
                        "_id": "55",
                        "scenarioDescription": "Purpose of this test is to successfully delete the folder created in a previous run.",
                        "scenarioName": "DELETE FOLDER"
                    }
                ]
            }
        ],
        "reportLocation": "/component/report?folderName=Default-2020.11.02.13.04.11-a4bf9fd3-9256-4deb-9d40-6df4c637942c&sessionId=20201102125901599-889a857b-340f-438d-80e2-a3643ffc76a9",
        "testDescription": "Deep health check",
        "testName": "Default-2020.11.02.13.04.11-a4bf9fd3-9256-4deb-9d40-6df4c637942c",
        "testTime": "2020.11.02.13.04.24"
    },
    "testDescription": "Deep health check",
    "testName": "Default-2020.11.02.13.04.11-a4bf9fd3-9256-4deb-9d40-6df4c637942c",
    "testTime": "2020.11.02.13.04.24"
}

Endpoint Description

Request typeService descriptionEndpointRequest query parametersForm dataReturns
GETRun Synchronous Deep Health Check by ID/access.adx.admin​/v1​/repository​/deep-check​/by-idsessionId, repositoryIdnoneRepository status
​GETRun Synchronous Deep Health Check by repository name/access.adx.admin​/v1​/repository​/deep-check​/by-namesessionId, repositoryNamenoneRepository status
​GETRun Synchronous Deep Health Check by repository technical name/access.adx.admin​/v1​/repository​/deep-check​/by-technical-namesessionId, repositoryTechnicalNamenoneRepository status

Parameters

ParameterData typeDescription
sessionIdstringSession ID returned when you authenticate
repositoryIdstringRepository ID
repositoryNamestringRepository name
repositoryTechnicalNameRepository technical name

Asynchronous Deep Health Check

Asynchronous Deep Health Check delegates the checks to a separate job and returns the Job ID allowing you to track it. When the job is complete, the checkStatus value should read ok.

cURL Example

You can send the cURL request below to test how it works. Please replace the host, session ID and repository ID accordingly.

curl --location --request GET 'https://[ADX_HOST]/tribefire-services/api/v1/access.adx.admin/v1/repository/async-deep-check/by-id?sessionId=[SESSION_ID]&repositoryId=[REPOSITORY_ID]'

Response

Requesting an asynchronous DHC results in the job ID being returned:

{
    "_type": "tribefire.adx.model.deployment.service.AdxAdminResponse",
    "_id": "0",
    "duration": 64
}

You can query for the job ID to get its current status.

Endpoint Description

Request typeService descriptionEndpointRequest query parametersForm dataReturns
GETRun Asynchronous Deep Health CHeck by ID/access.adx.admin/v1/repository/async-deep-check/by-idsessionId, repositoryIdnoneDHC job ID

Parameters

ParameterData typeDescription
sessionIdstringSession ID returned when you authenticate
repositoryIdstringRepository ID