Uploading CI Build Data

Upload Example Using cURL

In the following, we provide an example of how to push your build-run information to Logilica for storage and built-in analytics.

Important: Ensure the repository you build from is already onboarded in Logilica.

The cURL POST command is below. Note, the POST command includes the example API token lgca_UeRxFs_3RYRJEJtdYp7j7Wa6DirG5NjiYslsb and the example workspace myworkspace. The command URL also includes a placeholder for the repoID to associate the uploaded issues with.

curl --location --request POST 'https://logilica.io/api/import/v1/ci_build/<repoID>/create' \
--header 'X-lgca-token: lgca_UeRxFs_3RYRJEJtdYp7j7Wa6DirG5NjiYslsb' \
--header 'x-lgca-domain: myworkspace' \
--header 'Content-Type: application/json' \
--data-raw '[{
  "origin": "GITHUB_TEST",
  "originalID": "1691121120",
  "name": "Pull Request CI",
  "url": "https://github.com/logilica/example/actions/runs/1691121120",
  "createdAt": 1689207410,
  "startedAt": 1689208510,
  "completedAt": 1689209716,
  "triggeredBy": {
    "name": "Joe Doe",
    "email": "jdoe@example.com",
    "accountId": "joe-doe",
    "lastActivity": 1679528275
  },
  "status": "completed",
  "conclusion": "success",
  "repoUrl" : "https://github.com/logilica/example",
  "commit": "c3de81aedf8461324021d61f4dca16dd742db215",
  "pullRequestUrls": [],
  "isDeployment": false,
  "stages": [
    {
      "id" : "4799033011",
      "name": "build / Build Logilica Insights",
      "startedAt": 1689208510,
      "completedAt": 1689209716,
      "status": "completed",
      "conclusion": "success",
      "url": "https://github.com/logilica/example/runs/4799033011?check_suite_focus=true",
      "jobs": [
        {
          "startedAt": 1689208510,
          "completedAt": 1689208540,
          "name": "Set up job",
          "status": "completed",
          "conclusion": "success"
        },
        {
          "startedAt": 1689208545,
          "completedAt": 1689209716,
          "name": "Run actions/checkout@v2",
          "status": "completed",
          "conclusion": "success"
        }
      ]
    }
  ]
}]'

API Schema for Importing CI Build Data

Questions?

If you have any questions or run into issues, please contact us at support@logilica.com.

Last updated