Uploading Planning Data

Upload Example Using cURL

In the following, we provide an example of how to push your Planning data to Logilica for storage and built-in analytics. The following depicts all possible fields that can be included in an upload of a ticket or issue, both the mandatory and optional fields.

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 projectID to associate the uploaded issues with. This projectID is obtained from the pm/projects/create endpoint.

curl --location --request POST \
'https://logilica.io/api/import/v1/pm/<projectID>/issues/create' \
--header 'X-lgca-token: lgca_UeRxFs_3RYRJEJtdYp7j7Wa6DirG5NjiYslsb' \
--header 'x-lgca-domain: myworkspace' \
--header 'Content-Type: application/json' \
--data-raw '[{
    "id": "ABC-123",
    "origin": "JIRA",
    "createdAt": 1689207410,
    "updatedAt": 1689309835,
    "creator": {
        "name": "John Doe",
        "email": "[email protected]",
        "accountId": "johnDoe",
        "lastActivity": 1701436893
    },
    "reporter": {
        "name": "Jane Doe",
        "email": "[email protected]",
        "accountId": "janeDoe",
        "lastActivity": 1699536093
    },
    "assignedAt": 1689207463,
    "assignee": {
        "name": "Sally Smith",
        "email": "[email protected]",
        "accountId": "sallySmith",
        "lastActivity": 1701091293
    },
    "inProgressAt": 1689207487,
    "resolvedAt": 1689309835,
    "resolver": {
        "name": "Sally Smith",
        "email": "[email protected]",
        "accountId": "sallySmith",
        "lastActivity": 1701436893
    },
    "resolution": "Fix",
    "type": "Task",
    "status": "Completed",
    "statusCategory": "Done",
    "summary": "Revive user API endpoints in each service.",
    "description": "Go into each service and enable the API endpoints that both upload and import user data.",
    "url": "https://myworkspacename.atlassian.net/browse/ABC-123",
    "labels": ["backend"],
    "sprintKeys": ["456"],
    "priority": "Low",
    "storyPointEstimate": 1,
    "parentIssue": "ABC-789",
    "events": [
        {
            "type": "PM_ISSUE_CREATED",
            "author": {
                "name": "John Doe",
                "email": "[email protected]",
                "accountId": "johnDoe",
                "lastActivity": 1701436893
            },
            "createdAt": 1689207410,
            "to": ""
        },
        {
            "type": "PM_ISSUE_ASSIGNED",
            "author": {
                "name": "John Doe",
                "email": "[email protected]",
                "accountId": "johnDoe",
                "lastActivity": 1701436893
            },
            "createdAt": 1689207463,
            "to": {
                "name": "Sally Smith",
                "email": "[email protected]",
                "accountId": "sallySmith",
                "lastActivity": 1701091293
            }
        },
        {
            "type": "PM_ISSUE_IN_PROGRESS",
            "author": {
               "name": "Sally Smith",
                "email": "[email protected]",
                "accountId": "sallySmith",
                "lastActivity": 1701091293
            },
            "createdAt": 1689207487,
            "from": "To Do",
            "to": "In Progress"
        },
        {
            "type": "PM_ISSUE_RESOLVED",
            "author": {
               "name": "Sally Smith",
                "email": "[email protected]",
                "accountId": "sallySmith",
                "lastActivity": 1701091293
            },
            "createdAt": 1689309835,
            "from": "In Progress",
            "to": "Done"
        }
    ]
}]'

Method of Importing Planning Data

To ensure the accuracy of data in Logilica, planning data should be imported in the following order:

  1. Create a project and fetch the ID returned to you. You use this ID in subsequent calls to the Logilica Import API for Planning Data.

  2. Import or update sprints

  3. Import or update issues

Data is displayed in Logilica once issues have been imported.

API Schema for Importing Planning Data

Create a new project

post

Add a new project

Body
URLstring · uriRequired

The URL by which this project may be reached in a browser

keystringRequired

For Jira style projects, this maps the the issue prefix, eg in "JIRA-123", key would be "JIRA". For gitlab projects, this is the ID of the project.

Pattern: ^[0-9a-zA-z/\-_.]{1,256}$
orgNamestringRequired

The name of organization / group to which the project belongs. orgName combined with key forms a unique identifier for the project.

Pattern: ^[0-9a-zA-z/\-_.]{1,256}$
Responses
200
The ID of the newly created project
application/json
post
POST /api/import/v1/pm/projects/create HTTP/1.1
Host: logilica.io
Content-Type: application/json
Accept: */*
Content-Length: 59

{
  "URL": "https://example.com",
  "key": "text",
  "orgName": "text"
}
{
  "id": "text"
}

Add or Update Sprints

post

Add or update a list of sprints

Path parameters
projectIDstringRequired
Body
idstringRequired

unique (per board) ID of sprint

namestringRequired

name of sprint

statestringRequired

current state, e.g. "closed" or "in progress"

goalstringRequired

sprint goal or description

startedAtnumberOptional

UNIX timestamp for when sprint started

endedAtnumberOptional

UNIX timestamp for when sprint is set to ended

completedAtnumberOptional

UNIX timestamp for when the sprint was finished

Responses
200
Empty
post
POST /api/import/v1/pm/{projectID}/sprints HTTP/1.1
Host: logilica.io
Content-Type: application/json
Accept: */*
Content-Length: 100

[
  {
    "id": "text",
    "name": "text",
    "state": "text",
    "goal": "text",
    "startedAt": 1,
    "endedAt": 1,
    "completedAt": 1
  }
]

No content

Add or Update Issues

post

Create or update an issue

Path parameters
projectIDstringRequired
Body
idstringRequired

unique global ID of issue

originstringRequired

tool where the issue is from (e.g. Jira)

updatedAtnumberRequired

UNIX timestamp of the last update to the issue

createdAtnumberRequired

UNIX timestamp of when issue was created

assignedAtnumberOptional

UNIX timestamp of when issue was last assigned

inProgressAtnumberOptional

UNIX timestamp of when issue was moved to In Progress

resolvedAtnumberOptional

UNIX timestamp of when issue was moved to Done

resolutionstringOptional

The kind of resolution, e.g. "Fix", "Ignored"

typestringRequired

Issue type (Bug, Task, Subtask, Story, Epic). Subtasks and Epics are treated specially.

statusstringRequired

Issue status

statusCategorystringRequired

Issue status category (one of "To Do", "In Progress", "Done")

summarystringRequired

Issue title

descriptionstringRequired

Issue description

urlstring · uriRequired

URL to issue

labelsstring[]Required

Any labels applied to issue

sprintKeysstring[]Required

IDs of sprints the issue belongs to

prioritystringRequired

Priority of issue

storyPointEstimatenumberRequired

Story point estimate

parentIssuestringOptional

When the issue is part of an epic, the ID of that epic

Responses
200
Success - if any sprintIDs were referenced in the dataset, warnings will be given.
application/json
post
POST /api/import/v1/pm/{projectID}/issues/create HTTP/1.1
Host: logilica.io
Content-Type: application/json
Accept: */*
Content-Length: 882

[
  {
    "id": "text",
    "origin": "text",
    "updatedAt": 1,
    "createdAt": 1,
    "creator": {
      "name": "text",
      "email": "[email protected]",
      "accountId": "text",
      "lastActivity": 1
    },
    "reporter": {
      "name": "text",
      "email": "[email protected]",
      "accountId": "text",
      "lastActivity": 1
    },
    "assignedAt": 1,
    "assignee": {
      "name": "text",
      "email": "[email protected]",
      "accountId": "text",
      "lastActivity": 1
    },
    "inProgressAt": 1,
    "resolvedAt": 1,
    "resolver": {
      "name": "text",
      "email": "[email protected]",
      "accountId": "text",
      "lastActivity": 1
    },
    "resolution": "text",
    "type": "text",
    "status": "text",
    "statusCategory": "text",
    "summary": "text",
    "description": "text",
    "url": "https://example.com",
    "labels": [
      "text"
    ],
    "sprintKeys": [
      "text"
    ],
    "priority": "text",
    "storyPointEstimate": 1,
    "parentIssue": "text",
    "events": [
      {
        "createdAt": 1,
        "sprintID": "text",
        "author": {
          "name": "text",
          "email": "[email protected]",
          "accountId": "text",
          "lastActivity": 1
        },
        "type": "PM_ISSUE_CREATED",
        "from": "text",
        "to": "text"
      }
    ]
  }
]
{
  "warnings": {
    "message": "text",
    "ids": [
      "text"
    ]
  }
}

Last updated