Support

Introduction

The Support module allows Clever IT Group to check the status of the platform at any moment. This non-intrusive method can inform on demand whether the initial process was executed successfully, evaluating any data and reading the special logs stored in the database. All of this is achieved through REST services, meaning the communication is between Clever IT Group and their clients.

Why is it a "non-intrusive method"?

The webhook and initial load are processes running internally, and their configuration is set by environment variables. Clever IT Group will provide guidance to set them up appropriately, without intervention. However, we need a process to validate that each internal process was completed correctly.

Does the client have access to support services?

Unfortunately, we do not provide access to these services. However, we can show the data if the client requests it to demonstrate that the data is not about the client, but about the health of the system, processing, and more.

What happens if there is a problem loading the historical data?

Clever IT Group can re-run the complete process from scratch and detect the point at which the data is failing, including the reason, origin, and other details.

What happens if there is a webhook problem with any data?

The client should be aware that Clever IT Group cannot get information directly from the repository in case of a webhook problem. However, the support team knows that every provider (Bitbucket, GitLab, GitHub, and Azure DevOps) keeps the historical data of each webhook trigger. Together, the client and the Clever Support Team can collaborate to identify the failed request and re-run it.

Technically, how will Clever IT Group get the logs?

The dashboard contains a REST service to get the logs information. It is possible through this:

Verb: GET
URL: http://server:port/api/dashboard/support/logs

Query Parameters:

  • provider: Can be one of the following: GITHUB, GITLAB, BITBUCKET, AZUREDEVOPS.
  • internalProcess: Can be one of the following: WEBHOOK, INITIAL_LOAD.
  • level: Can be one of the following: CRITICAL, HIGH, MEDIUM, LOW, MINIMAL.
  • fromTime: Format YYYY-MM-DD HH:MM:SS.
  • toTime: Format YYYY-MM-DD HH:MM:SS.
  • limit: An integer greater than 1.
  • desc: A boolean, default is false.
  • entity: Can be one of the following: REPOSITORY, COMMIT, PULLREQUEST, REVIEW, TEAM.

If none of these parameters are sent, all the logs will be requested.

Getting a pull request by its ID

Verb: GET
URL: http://server:port/api/dashboard/support/pull-requests/{ID}

Request

GET
/api/dashboard/support/pull-requests/{ID}
curl -G https://api.pulzen-gateway/api/dashboard/support/pull-requests/{ID} \
  -H "Authorization: Basic {token}"

Response

{
    "id": "2788",
    "url": "https://dev.azure.com/cleveritcl/8142dc36-13fb-4ac5-94b5-12e1a2b96fa4/_apis/git/repositories/24d02b56-f87a-4a7c-9d47-240d03a9e80b/pullRequests/2788",
    "state": "merged",
    "title": "prueba",
    "login": "Luis Rolando Ventocilla Santibañez",
    "userId": "Luis Rolando Ventocilla Santibañez",
    "createdAt": "2024-01-15T19:48:45Z",
    "updatedAt": null,
    "closedAt": "2024-02-08T17:41:56Z",
    "mergedAt": "2024-02-08T17:41:56Z",
    "commitsQuantity": 3,
    "additions": 3,
    "deletions": 0,
    "changedFiles": 0,
    "reviewsQuantity": 7,
    "repositoryId": "24d02b56-f87a-4a7c-9d47-240d03a9e80b",
    "repositoryName": "Pulzen Gateway",
    "approvalState": "APPROVED",
    "approverUser": "Luis Rolando Ventocilla Santibañez",
    "codingTime": 0.45,
    "codingTimeExplain": "No issues with coding time. ",
    "pickupTime": 5768.38,
    "pickupTimeExplain": "No issues with pickupTime. ",
    "reviewTime": 63096.78,
    "reviewTimeExplain": "No issues with review until merge. ",
    "reviewUntilMerge": 0.13,
    "reviewUntilMergeExplain": "No issues with review time",
    "closeTime": 0,
    "closeTimeExplain": "Causes: No issues with closeTime - Review list is empty. ",
    "timeUntilDeploy": 806622.98,
    "timeUntilDeployExplain": "No issues with timeUntilDeploy. ",
    "deployTime": 0,
    "deployTimeExplain": "Causes: DeployCreatedAt is null. ",
    "mergedBy": "Luis Rolando Ventocilla Santibañez",
    "commits": [
        {
            "sha": "b77ab23b408526eaecaa296187fcf4b7df984442",
            "url": "https://dev.azure.com/cleveritcl/8142dc36-13fb-4ac5-94b5-12e1a2b96fa4/_apis/git/repositories/24d02b56-f87a-4a7c-9d47-240d03a9e80b/commits/b77ab23b408526eaecaa296187fcf4b7df984442",
            "createdAt": "2024-02-08T17:39:23Z",
            "message": null,
            "repositoryId": "24d02b56-f87a-4a7c-9d47-240d03a9e80b",
            "repositoryName": "Pulzen Gateway",
            "pullRequestId": "2788",
            "percentageOfRefactor": 0,
            "percentageOfRework": 0,
            "totalChanges": 0,
            "totalSize": 0,
            "totalChangesRework": 0,
            "author": {
                "name": "lventocilla",
                "email": null,
                "date": null,
                "id": null
            },
            "stats": {
                "total": 1,
                "additions": 1,
                "deletions": 0
            },
            "teams": [],
            "provider": "AZUREDEVOPS",
            "pullRequests": [
                "2817",
                "2788",
                "2815"
            ]
        },
        {
            "sha": "b9bf88a9bffd93e5bd60f728f0fc5c9b79564d73",
            "url": "https://dev.azure.com/cleveritcl/8142dc36-13fb-4ac5-94b5-12e1a2b96fa4/_apis/git/repositories/24d02b56-f87a-4a7c-9d47-240d03a9e80b/commits/b9bf88a9bffd93e5bd60f728f0fc5c9b79564d73",
            "createdAt": "2024-01-15T19:48:18Z",
            "message": null,
            "repositoryId": "24d02b56-f87a-4a7c-9d47-240d03a9e80b",
            "repositoryName": "Pulzen Gateway",
            "pullRequestId": "2788",
            "percentageOfRefactor": 0,
            "percentageOfRework": 0,
            "totalChanges": 0,
            "totalSize": 0,
            "totalChangesRework": 0,
            "author": {
                "name": "lventocilla",
                "email": null,
                "date": null,
                "id": null
            },
            "stats": {
                "total": 1,
                "additions": 1,
                "deletions": 0
            },
            "teams": [],
            "provider": "AZUREDEVOPS",
            "pullRequests": [
                "2817",
                "2788",
                "2815"
            ]
        }
    ],
    "reviews": [
        {
            "id": "6964-1",
            "user": null,
            "body": "The reference refs/heads/develop was updated.",
            "commitId": null,
            "submittedAt": null,
            "createdAt": "2024-01-17T19:53:09Z",
            "closedAt": null,
            "state": "PENDING",
            "pullRequestId": "2788"
        },
        {
            "id": "7029-1",
            "user": null,
            "body": "Luis Rolando Ventocilla Santibañez voted 10",
            "commitId": null,
            "submittedAt": null,
            "createdAt": "2024-02-08T17:41:03Z",
            "closedAt": null,
            "state": "PENDING",
            "pullRequestId": "2788"
        }
    ],
    "teams": [],
    "provider": "AZUREDEVOPS"
}

Getting a deployment by its ID

Verb: GET
URL: http://server:port/api/dashboard/support/deploys/{ID}

Request

GET
/api/dashboard/support/deploys/{ID}
curl -G https://api.pulzen-gateway/api/dashboard/support/deploys/{ID} \
  -H "Authorization: Basic {token}"

Response

{
    "url": null,
    "id": "7",
    "sha": null,
    "originalEnvironment": null,
    "environment": "Dev",
    "createdAt": "2024-09-23T19:00:18Z",
    "updatedAt": "2024-09-23T19:03:47Z",
    "repositoryId": "fb989020-75a3-4c09-bb21-935114f0f7aa",
    "provider": "AZUREDEVOPS",
    "releaseId": "7"
}

Getting a release by its ID

Verb: GET
URL: http://server:port/api/dashboard/support/releases/{ID}

Request

GET
/api/dashboard/support/releases/{ID}
curl -G https://api.pulzen-gateway/api/dashboard/support/releases/{ID} \
  -H "Authorization: Basic {token}"

Response

{
    "id": "7",
    "name": "Release-1",
    "createdAt": "2024-09-23T18:59:55Z",
    "updatedAt": "2024-09-23T18:59:55Z",
    "publishedAt": "2024-09-23T18:59:55Z",
    "url": "https://vsrm.dev.azure.com/cleveritcl/aeb9f2e5-d8e4-486b-9a01-b3e303f875b5/_apis/Release/releases/7",
    "author": "Sebastian Ureta",
    "tagCommit": null,
    "commits": [
        "ffd51a31d38eeb2d90ffeb717e13d68f820df6b7"
    ],
    "repositoryId": "fb989020-75a3-4c09-bb21-935114f0f7aa",
    "projectId": "aeb9f2e5-d8e4-486b-9a01-b3e303f875b5",
    "provider": "AZUREDEVOPS"
}

Getting a workflow by its run ID

Verb: GET
URL: http://server:port/api/dashboard/support/workflows/{ID}

Request

GET
/api/dashboard/support/workflows/{ID}
curl -G https://api.pulzen-gateway/api/dashboard/support/workflows/{ID} \
  -H "Authorization: Basic {token}"

Response

    {    
        "id": "6208484147",
        "name": "CodeQL",
        "headBranch": "main",
        "path": ".github/workflows/codeql-analysis.yml",
        "displayTitle": "CodeQL",
        "runNumber": 72,
        "event": "schedule",
        "status": "COMPLETED",
        "conclusion": "SUCCESS",
        "workflowId": "27775026",
        "htmlUrl": "https://github.com/CleveritDemo/demo_github/actions/runs/6208484147",
        "createdAt": "2023-09-16T16:38:49Z",
        "updatedAt": "2024-12-17T03:13:30Z",
        "pullRequests": [
            {
                "number": 9
            }
        ],
        "actor": {
            "login": "dvalleit"
        },
        "triggeringActor": {
            "login": "dvalleit"
        },
        "runAttempt": 1,
        "repositoryName": "demo_github",
        "repositoryId": "R_kgDOHd5N5A",
        "mergeBy": "",
        "provider": "GITHUB",
        "commit": null,
        "prInfo": null,
        "pullRequestIds": [
            "PR_kwDOHd5N5M5qtmnX"
        ],
        "firstPr": {
            "number": 9
        }
    }

Getting a commit by its ID

Verb: GET
URL: http://server:port/api/dashboard/support/commits/{ID}

Request

GET
/api/dashboard/support/commits/{ID}
curl -G https://api.pulzen-gateway/api/dashboard/support/commits/{ID} \
  -H "Authorization: Basic {token}"

Response

    {
        "sha": "5744e5d8f331d4bee58d195cd27fee56305cff99",
        "url": "https://github.com/CleveritDemo/taylor-backend/commit/5744e5d8f331d4bee58d195cd27fee56305cff99",
        "createdAt": "2023-12-11T19:31:04Z",
        "message": null,
        "repositoryId": "R_kgDOJqnfdw",
        "repositoryName": "taylor-backend",
        "pullRequestId": "PR_kwDOJqnfd85huS5M",
        "percentageOfRefactor": 0,
        "percentageOfRework": 0,
        "totalChanges": 0,
        "totalSize": 0,
        "totalChangesRework": 0,
        "author": {
            "name": "Catalina Salinas",
            "email": null,
            "date": null,
            "id": null
        },
        "stats": {
            "total": 7,
            "additions": 5,
            "deletions": -2
        },
        "teams": [],
        "provider": "GITHUB",
        "pullRequests": [
            "PR_kwDOJqnfd85huS5M",
            "PR_kwDOJqnfd85huHv2"
        ]
    }

Restarting application

Verb: DELETE
URL: http://server:port/api/dashboard/app/restart

Request

DELETE
/api/dashboard/app/restart
curl -G https://api.pulzen-gateway/api/dashboard/app/restart \
  -H "Authorization: Basic {token}"