Logilica Documentation
HomepageDemoBlogContact
  • About Logilica
    • Overview
  • Getting Started
    • Onboarding Data
    • Onboarding Users
    • Setting up Teams
  • Integration
    • Connecting Tools
    • Uploading Custom Data
  • Metrics & Reports
    • Introduction
      • Navigation
      • Dashboards
      • Data Exploration
    • Epics Delivery Tracker
    • Planning
      • Ticket Lead Time
      • Ticket Velocity
      • Ticket Overload
      • Sprint Health
      • Ticket Activities / Risks
    • Code
      • Code Cycle Time
      • Coding Velocity
      • Review Process
      • Developer Health
      • Code Activities / Risks
    • Build
    • Team Management
      • Teams Overview
      • Team Pulse
      • Activity Lens
    • Reports
    • Customization
    • Glossary
  • Configuration
    • User Management
    • Managing Contributors
    • Menu Management
    • Release Detection
    • Targets & Thresholds
    • DORA Configuration
  • Advanced
    • API Token Management
    • Import API
      • API Overview
      • Uploading Planning Data
      • Uploading CI Build Data
        • CDEvents Integration
      • Uploading Test Data
      • Uploading Team Data (beta)
      • Repositories
    • Export API
    • DataStudio
      • Data Models
        • CI Build
        • CI Build Stage
        • Contributor
        • Coverage Commit
        • Coverage File
        • Coverage Label
        • Coverage Test Result
        • Jira Component
        • Jira Epic
        • Jira Hierarchy Issues
        • Jira Issue Hierarchy Link
        • Jira Issue
        • Jira Issue
        • Jira Label
        • Jira Project
        • Jira Release
        • Jira Sprint
        • Project
        • Pull Request
        • Pull Request
        • Release
        • Team
      • Advanced Transformations
    • Integrations: Data Mapping
      • GitHub Projects Support
  • SSO Integration
    • Keycloak SSO
  • Subprocessors
  • Changelog
Powered by GitBook
On this page
  1. Advanced
  2. Import API

Uploading CI Build Data

PreviousUploading Planning DataNextCDEvents Integration

Last updated 2 months ago

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 can be used to retrieve the repoId for the endpoint.

The cURL POST command is below. Note, that 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.

Repositories API
  • Upload Example Using cURL
  • API Schema for Importing CI Build Data
  • POSTci_build/{repoID}/create
  • Questions?
post

Create or update a CI build

Path parameters
repoIDstringRequired
Body
originstringRequired

The service / app that the build pipeline belongs to, e.g. 'GITHUB', 'GITLAB'

originalIDstringRequired

The ID of this build job with the service origin

namestringRequired

Name of the CI build

urlstring · uriRequired

The URL to which this CI build may be accessed

startedAtnumberRequired

UNIX timestamp of when the CI build began running

createdAtnumberRequired

UNIX timestamp of when the CI build was submitted

completedAtnumberRequired

UNIX timestamp of when the CI build ended

statusstringRequired

Status of the CI build, e.g. 'Completed', 'Running'

conclusionstringRequired

Outcome of the CI build, e.g. 'Success', 'Fail'

repoUrlstring · uriRequired

URL for the git repository this belongs to

commitstringRequired

The git commit hash that identifies the git commit this workflow run corresponds to

pullRequestUrlsstring[]Required

An array of URLs of pull requests that are linked to this CI build

isDeploymentbooleanRequired

Boolean indicating whether the CI build is a deployment run or not

Responses
200
Success in creating CI build
application/json
400
Data given doesn't match schema. Return value will be ZodError with validation message
401
Unauthorized
404
ProjectID not found
application/json
post
POST /api/import/v1/ci_build/{repoID}/create HTTP/1.1
Host: logilica.io
Content-Type: application/json
Accept: */*
Content-Length: 571

[
  {
    "origin": "text",
    "originalID": "text",
    "name": "text",
    "url": "https://example.com",
    "startedAt": 1,
    "createdAt": 1,
    "completedAt": 1,
    "triggeredBy": {
      "name": "text",
      "email": "name@gmail.com",
      "accountId": "text",
      "lastActivity": 1
    },
    "status": "text",
    "conclusion": "text",
    "repoUrl": "https://example.com",
    "commit": "text",
    "pullRequestUrls": [
      "text"
    ],
    "isDeployment": true,
    "stages": [
      {
        "name": "text",
        "id": "text",
        "url": "https://example.com",
        "startedAt": 1,
        "completedAt": 1,
        "status": "text",
        "conclusion": "text",
        "jobs": [
          {
            "name": "text",
            "startedAt": 1,
            "completedAt": 1,
            "status": "text",
            "conclusion": "text"
          }
        ]
      }
    ]
  }
]
{
  "warnings": {
    "message": "text",
    "ids": [
      "text"
    ]
  }
}