# Targetprocess

> Plan and track user stories, bugs, tasks, features and epics, with comments, assignments and time, in Targetprocess (Apptio).

App · 23 actions. Web page: https://docs.lodol.com/docs/integrations/targetprocess

## Actions

### Add comment

Comment on a work item, or reply to a comment.

**Inputs**

- Work item ID (`item_id`, number, required): The work item's ID.
- Comment (`text`, text, required): The comment. Formatted as HTML, or Markdown if your account uses it.
- Reply to comment ID (`parent_id`, number): The ID of the comment this replies to.
- Private (`is_private`, true/false): Only people with access to private comments see it.

**Outputs**

- `data` (object): The response from Targetprocess.

**Example output**

```json
{
  "data": {
    "CreateDate": "example",
    "Description": "example",
    "General": {
      "Id": 1,
      "Name": "example"
    },
    "Id": 1,
    "IsPinned": true,
    "IsPrivate": true,
    "Owner": {
      "FullName": "example",
      "Id": 1,
      "Login": "example"
    },
    "ParentId": 1
  }
}
```

### Assign user

Assign a person to a work item, in a role such as Developer.

**Inputs**

- Work item ID (`item_id`, number, required): The work item's ID.
- Person (`person_id`, number, required): The person to assign.
- Role (`role_id`, number): The role they work in.

**Outputs**

- `data` (object): The response from Targetprocess.

**Example output**

```json
{
  "data": {
    "Assignable": {
      "Id": 1,
      "Name": "example"
    },
    "GeneralUser": {
      "FullName": "example",
      "Id": 1,
      "Login": "example"
    },
    "Id": 1,
    "Role": {
      "Id": 1,
      "Name": "example"
    }
  }
}
```

### Create project

Create a project.

**Inputs**

- Name (`name`, text, required): The project's name.
- Description (`description`, text): What the project is for.
- Abbreviation (`abbreviation`, text): A short name for it, such as `WEB`.
- Private (`is_private`, true/false): Only its members can see it.

**Outputs**

- `data` (object): The response from Targetprocess.

**Example output**

```json
{
  "data": {
    "Abbreviation": "example",
    "Color": "example",
    "CreateDate": "example",
    "Description": "example",
    "EndDate": "example",
    "EntityState": {
      "Id": 1,
      "Name": "example"
    },
    "Id": 1,
    "IsActive": true,
    "IsPrivate": true,
    "ModifyDate": "example",
    "Name": "example",
    "Owner": {
      "FullName": "example",
      "Id": 1
    },
    "Process": {
      "Id": 1,
      "Name": "example"
    },
    "StartDate": "example"
  }
}
```

### Create work item

Create a user story, bug, task, feature, epic or request in a project.

**Inputs**

- Type (`type`, text, required): The kind of work item. One of: `UserStories` (User story), `Bugs` (Bug), `Tasks` (Task), `Features` (Feature), `Epics` (Epic), `Requests` (Request).
- Project (`project_id`, number, required): The project it belongs to.
- Name (`name`, text, required): The work item's name.
- Description (`description`, text): What it is about. Formatted as HTML, or Markdown if your account uses it.
- State (`state_id`, number): Its state, such as Open or Done. States depend on the type and the project's process.
- Priority (`priority_id`, number): Its priority.
- Owner (`owner_id`, number): The person who owns it.
- Team (`assigned_team_id`, number): The team responsible for it.
- Release (`release_id`, number): The release it is planned for.
- User story ID (`user_story_id`, number): For a task: the ID of the user story it belongs to.
- Feature ID (`feature_id`, number): For a user story or bug: the ID of its feature.
- Epic ID (`epic_id`, number): For a feature: the ID of its epic.
- Tags (`tags`, list): Its tags. They replace the tags it has.
- Effort (`effort`, number): Its estimated effort, in the account's units (points or hours). At least 0.
- Planned start (`planned_start_date`, date): When work on it is planned to start.
- Planned end (`planned_end_date`, date): When it is planned to be done.

**Outputs**

- `data` (object): The response from Targetprocess.

**Example output**

```json
{
  "data": {
    "CreateDate": "example",
    "Creator": {
      "FullName": "example",
      "Id": 1,
      "Login": "example"
    },
    "CustomFields": [
      {}
    ],
    "Description": "example",
    "Effort": 1,
    "EffortCompleted": 1,
    "EffortToDo": 1,
    "EndDate": "example",
    "EntityState": {
      "Id": 1,
      "IsFinal": true,
      "Name": "example"
    },
    "EntityType": {
      "Id": 1,
      "Name": "example"
    },
    "Epic": {
      "Id": 1,
      "Name": "example"
    },
    "Feature": {
      "Id": 1,
      "Name": "example"
    },
    "Id": 1,
    "LastCommentDate": "example",
    "LastStateChangeDate": "example",
    "ModifyDate": "example",
    "Name": "example",
    "NumericPriority": 1,
    "Owner": {
      "FullName": "example",
      "Id": 1,
      "Login": "example"
    },
    "PlannedEndDate": "example",
    "PlannedStartDate": "example",
    "Priority": {
      "Id": 1,
      "Name": "example"
    },
    "Progress": 1,
    "Project": {
      "Id": 1,
      "Name": "example"
    },
    "Release": {
      "Id": 1,
      "Name": "example"
    },
    "ResourceType": "example",
    "StartDate": "example",
    "Tags": "example",
    "Team": {
      "Id": 1,
      "Name": "example"
    },
    "TimeRemain": 1,
    "TimeSpent": 1,
    "UserStory": {
      "Id": 1,
      "Name": "example"
    }
  }
}
```

### Delete comment

Delete a comment.

**Inputs**

- Comment ID (`comment_id`, number, required): The comment's ID, from List comments or Add comment.

**Outputs**

- `data` (object): The response from Targetprocess.

**Example output**

```json
{
  "data": {}
}
```

### Delete project

Delete a project and the work in it.

**Inputs**

- Project (`project_id`, number, required): The project.

**Outputs**

- `data` (object): The response from Targetprocess.

**Example output**

```json
{
  "data": {}
}
```

### Delete time

Delete a time record.

**Inputs**

- Time ID (`time_id`, number, required): The time record's ID, from List time or Log time.

**Outputs**

- `data` (object): The response from Targetprocess.

**Example output**

```json
{
  "data": {}
}
```

### Delete work item

Delete a work item.

**Inputs**

- Type (`type`, text, required): The kind of work item. One of: `UserStories` (User story), `Bugs` (Bug), `Tasks` (Task), `Features` (Feature), `Epics` (Epic), `Requests` (Request).
- Work item ID (`item_id`, number, required): The work item's ID, from List work items or a trigger.

**Outputs**

- `data` (object): The response from Targetprocess.

**Example output**

```json
{
  "data": {}
}
```

### Get current user

Get the Targetprocess user the token belongs to, with the account's edition.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Targetprocess.

**Example output**

```json
{
  "data": {
    "Acid": "example",
    "Edition": "example",
    "LoggedUser": {
      "CreateDate": "example",
      "Email": "example",
      "FirstName": "example",
      "FullName": "example",
      "Id": 1,
      "IsActive": true,
      "IsAdministrator": true,
      "LastName": "example",
      "Login": "example",
      "ModifyDate": "example"
    }
  }
}
```

### Get project

Get a project.

**Inputs**

- Project (`project_id`, number, required): The project.

**Outputs**

- `data` (object): The response from Targetprocess.

**Example output**

```json
{
  "data": {
    "Abbreviation": "example",
    "Color": "example",
    "CreateDate": "example",
    "Description": "example",
    "EndDate": "example",
    "EntityState": {
      "Id": 1,
      "Name": "example"
    },
    "Id": 1,
    "IsActive": true,
    "IsPrivate": true,
    "ModifyDate": "example",
    "Name": "example",
    "Owner": {
      "FullName": "example",
      "Id": 1
    },
    "Process": {
      "Id": 1,
      "Name": "example"
    },
    "StartDate": "example"
  }
}
```

### Get work item

Get a user story, bug, task, feature, epic or request.

**Inputs**

- Type (`type`, text, required): The kind of work item. One of: `UserStories` (User story), `Bugs` (Bug), `Tasks` (Task), `Features` (Feature), `Epics` (Epic), `Requests` (Request).
- Work item ID (`item_id`, number, required): The work item's ID, from List work items or a trigger.
- Include custom fields (`include_custom_fields`, true/false): Include its custom fields.

**Outputs**

- `data` (object): The response from Targetprocess.

**Example output**

```json
{
  "data": {
    "CreateDate": "example",
    "Creator": {
      "FullName": "example",
      "Id": 1,
      "Login": "example"
    },
    "CustomFields": [
      {}
    ],
    "Description": "example",
    "Effort": 1,
    "EffortCompleted": 1,
    "EffortToDo": 1,
    "EndDate": "example",
    "EntityState": {
      "Id": 1,
      "IsFinal": true,
      "Name": "example"
    },
    "EntityType": {
      "Id": 1,
      "Name": "example"
    },
    "Epic": {
      "Id": 1,
      "Name": "example"
    },
    "Feature": {
      "Id": 1,
      "Name": "example"
    },
    "Id": 1,
    "LastCommentDate": "example",
    "LastStateChangeDate": "example",
    "ModifyDate": "example",
    "Name": "example",
    "NumericPriority": 1,
    "Owner": {
      "FullName": "example",
      "Id": 1,
      "Login": "example"
    },
    "PlannedEndDate": "example",
    "PlannedStartDate": "example",
    "Priority": {
      "Id": 1,
      "Name": "example"
    },
    "Progress": 1,
    "Project": {
      "Id": 1,
      "Name": "example"
    },
    "Release": {
      "Id": 1,
      "Name": "example"
    },
    "ResourceType": "example",
    "StartDate": "example",
    "Tags": "example",
    "Team": {
      "Id": 1,
      "Name": "example"
    },
    "TimeRemain": 1,
    "TimeSpent": 1,
    "UserStory": {
      "Id": 1,
      "Name": "example"
    }
  }
}
```

### List assignments

List the people assigned to a work item, with their roles.

**Inputs**

- Work item ID (`item_id`, number, required): The work item's ID.
- Limit (`take`, number): How many to return. From 1 to 1000. Default: `25`.
- Skip (`skip`, number): How many to skip, for the next page. At least 0. Default: `0`.

**Outputs**

- `data` (object): The response from Targetprocess.

**Example output**

```json
{
  "data": {
    "HasMore": true,
    "Items": [
      {
        "Assignable": {
          "Id": 1,
          "Name": "example"
        },
        "GeneralUser": {
          "FullName": "example",
          "Id": 1,
          "Login": "example"
        },
        "Id": 1,
        "Role": {
          "Id": 1,
          "Name": "example"
        }
      }
    ]
  }
}
```

### List comments

List the comments on a work item, newest first.

**Inputs**

- Work item ID (`item_id`, number, required): The work item's ID.
- Limit (`take`, number): How many to return. From 1 to 1000. Default: `25`.
- Skip (`skip`, number): How many to skip, for the next page. At least 0. Default: `0`.

**Outputs**

- `data` (object): The response from Targetprocess.

**Example output**

```json
{
  "data": {
    "HasMore": true,
    "Items": [
      {
        "CreateDate": "example",
        "Description": "example",
        "General": {
          "Id": 1,
          "Name": "example"
        },
        "Id": 1,
        "IsPinned": true,
        "IsPrivate": true,
        "Owner": {
          "FullName": "example",
          "Id": 1,
          "Login": "example"
        },
        "ParentId": 1
      }
    ]
  }
}
```

### List projects

List the projects the token's user can see, newest first.

**Inputs**

- Name (`name`, text): Part of the project's name.
- Active only (`active_only`, true/false): Leave out inactive projects. Default: `true`.
- Limit (`take`, number): How many to return. From 1 to 1000. Default: `25`.
- Skip (`skip`, number): How many to skip, for the next page. At least 0. Default: `0`.

**Outputs**

- `data` (object): The response from Targetprocess.

**Example output**

```json
{
  "data": {
    "HasMore": true,
    "Items": [
      {
        "Abbreviation": "example",
        "Color": "example",
        "CreateDate": "example",
        "Description": "example",
        "EndDate": "example",
        "EntityState": {
          "Id": 1,
          "Name": "example"
        },
        "Id": 1,
        "IsActive": true,
        "IsPrivate": true,
        "ModifyDate": "example",
        "Name": "example",
        "Owner": {
          "FullName": "example",
          "Id": 1
        },
        "Process": {
          "Id": 1,
          "Name": "example"
        },
        "StartDate": "example"
      }
    ]
  }
}
```

### List releases

List releases, optionally in one project, latest first.

**Inputs**

- Project (`project_id`, number): Only releases in this project.
- Limit (`take`, number): How many to return. From 1 to 1000. Default: `25`.
- Skip (`skip`, number): How many to skip, for the next page. At least 0. Default: `0`.

**Outputs**

- `data` (object): The response from Targetprocess.

**Example output**

```json
{
  "data": {
    "HasMore": true,
    "Items": [
      {
        "EndDate": "example",
        "Id": 1,
        "IsCurrent": true,
        "Name": "example",
        "Project": {
          "Id": 1,
          "Name": "example"
        },
        "StartDate": "example"
      }
    ]
  }
}
```

### List states

List the workflow states of a kind of work item, across the account's processes.

**Inputs**

- Type (`type`, text): The kind of work item. One of: `UserStories` (User story), `Bugs` (Bug), `Tasks` (Task), `Features` (Feature), `Epics` (Epic), `Requests` (Request).

**Outputs**

- `data` (object): The response from Targetprocess.

**Example output**

```json
{
  "data": {
    "HasMore": true,
    "Items": [
      {
        "EntityType": {
          "Id": 1,
          "Name": "example"
        },
        "Id": 1,
        "IsFinal": true,
        "IsInitial": true,
        "IsPlanned": true,
        "Name": "example",
        "NumericPriority": 1,
        "Process": {
          "Id": 1,
          "Name": "example"
        }
      }
    ]
  }
}
```

### List teams

List the account's teams.

**Inputs**

- Limit (`take`, number): How many to return. From 1 to 1000. Default: `25`.
- Skip (`skip`, number): How many to skip, for the next page. At least 0. Default: `0`.

**Outputs**

- `data` (object): The response from Targetprocess.

**Example output**

```json
{
  "data": {
    "HasMore": true,
    "Items": [
      {
        "Abbreviation": "example",
        "Id": 1,
        "IsActive": true,
        "Name": "example"
      }
    ]
  }
}
```

### List time

List the time logged on a work item, newest first.

**Inputs**

- Work item ID (`item_id`, number, required): The work item's ID.
- Limit (`take`, number): How many to return. From 1 to 1000. Default: `25`.
- Skip (`skip`, number): How many to skip, for the next page. At least 0. Default: `0`.

**Outputs**

- `data` (object): The response from Targetprocess.

**Example output**

```json
{
  "data": {
    "HasMore": true,
    "Items": [
      {
        "Assignable": {
          "Id": 1,
          "Name": "example"
        },
        "CreateDate": "example",
        "Date": "example",
        "Description": "example",
        "Id": 1,
        "Project": {
          "Id": 1,
          "Name": "example"
        },
        "Remain": 1,
        "Role": {
          "Id": 1,
          "Name": "example"
        },
        "Spent": 1,
        "User": {
          "FullName": "example",
          "Id": 1,
          "Login": "example"
        }
      }
    ]
  }
}
```

### List users

List the account's people.

**Inputs**

- Email (`email`, text): Only the person with this email.
- Active only (`active_only`, true/false): Leave out deactivated people. Default: `true`.
- Limit (`take`, number): How many to return. From 1 to 1000. Default: `25`.
- Skip (`skip`, number): How many to skip, for the next page. At least 0. Default: `0`.

**Outputs**

- `data` (object): The response from Targetprocess.

**Example output**

```json
{
  "data": {
    "HasMore": true,
    "Items": [
      {
        "CreateDate": "example",
        "Email": "example",
        "FirstName": "example",
        "FullName": "example",
        "Id": 1,
        "IsActive": true,
        "IsAdministrator": true,
        "LastName": "example",
        "Login": "example",
        "ModifyDate": "example"
      }
    ]
  }
}
```

### List work items

List user stories, bugs, tasks, features, epics or requests, with filters.

**Inputs**

- Type (`type`, text, required): The kind of work item. One of: `UserStories` (User story), `Bugs` (Bug), `Tasks` (Task), `Features` (Feature), `Epics` (Epic), `Requests` (Request).
- Project (`project_id`, number): Only work in this project.
- State (`state`, text): Only work in the state with this name, such as `Open` or `Done`.
- Owner (`owner_id`, number): Only work owned by this person.
- Name (`name`, text): Part of the name to look for.
- Tag (`tag`, text): Only work with this tag.
- Changed since (`modified_since`, date): Only work changed on or after this day.
- Sort (`sort`, text): The order to list them in. One of: `ModifyDate` (Recently changed first), `CreateDate` (Newest first), `NumericPriority` (Rank), `Name`. Default: `ModifyDate`.
- Limit (`take`, number): How many to return. From 1 to 1000. Default: `25`.
- Skip (`skip`, number): How many to skip, for the next page. At least 0. Default: `0`.

**Outputs**

- `data` (object): The response from Targetprocess.

**Example output**

```json
{
  "data": {
    "HasMore": true,
    "Items": [
      {
        "CreateDate": "example",
        "Creator": {
          "FullName": "example",
          "Id": 1,
          "Login": "example"
        },
        "CustomFields": [
          {}
        ],
        "Description": "example",
        "Effort": 1,
        "EffortCompleted": 1,
        "EffortToDo": 1,
        "EndDate": "example",
        "EntityState": {
          "Id": 1,
          "IsFinal": true,
          "Name": "example"
        },
        "EntityType": {
          "Id": 1,
          "Name": "example"
        },
        "Epic": {
          "Id": 1,
          "Name": "example"
        },
        "Feature": {
          "Id": 1,
          "Name": "example"
        },
        "Id": 1,
        "LastCommentDate": "example",
        "LastStateChangeDate": "example",
        "ModifyDate": "example",
        "Name": "example",
        "NumericPriority": 1,
        "Owner": {
          "FullName": "example",
          "Id": 1,
          "Login": "example"
        },
        "PlannedEndDate": "example",
        "PlannedStartDate": "example",
        "Priority": {
          "Id": 1,
          "Name": "example"
        },
        "Progress": 1,
        "Project": {
          "Id": 1,
          "Name": "example"
        },
        "Release": {
          "Id": 1,
          "Name": "example"
        },
        "ResourceType": "example",
        "StartDate": "example",
        "Tags": "example",
        "Team": {
          "Id": 1,
          "Name": "example"
        },
        "TimeRemain": 1,
        "TimeSpent": 1,
        "UserStory": {
          "Id": 1,
          "Name": "example"
        }
      }
    ]
  }
}
```

### Log time

Record time spent on a work item.

**Inputs**

- Work item ID (`item_id`, number, required): The work item's ID.
- Hours spent (`spent`, number, required): Hours spent. At least 0.
- Hours remaining (`remain`, number): Hours still to go. At least 0.
- Date (`date`, date): The day the time was spent. Leave empty for today.
- Description (`description`, text): What the time was spent on.
- Person (`person_id`, number): Whose time it is. Leave empty for the token's user.
- Role (`role_id`, number): The role the time was spent in.

**Outputs**

- `data` (object): The response from Targetprocess.

**Example output**

```json
{
  "data": {
    "Assignable": {
      "Id": 1,
      "Name": "example"
    },
    "CreateDate": "example",
    "Date": "example",
    "Description": "example",
    "Id": 1,
    "Project": {
      "Id": 1,
      "Name": "example"
    },
    "Remain": 1,
    "Role": {
      "Id": 1,
      "Name": "example"
    },
    "Spent": 1,
    "User": {
      "FullName": "example",
      "Id": 1,
      "Login": "example"
    }
  }
}
```

### Unassign user

Remove an assignment from a work item.

**Inputs**

- Assignment ID (`assignment_id`, number, required): The assignment's ID, from List assignments or Assign user.

**Outputs**

- `data` (object): The response from Targetprocess.

**Example output**

```json
{
  "data": {}
}
```

### Update work item

Change a work item's name, description, state, priority, owner, team, release, parent, tags, effort or dates.

**Inputs**

- Type (`type`, text, required): The kind of work item. One of: `UserStories` (User story), `Bugs` (Bug), `Tasks` (Task), `Features` (Feature), `Epics` (Epic), `Requests` (Request).
- Work item ID (`item_id`, number, required): The work item's ID, from List work items or a trigger.
- Name (`name`, text): The work item's name.
- Description (`description`, text): What it is about. Formatted as HTML, or Markdown if your account uses it.
- State (`state_id`, number): Its state, such as Open or Done. States depend on the type and the project's process.
- Priority (`priority_id`, number): Its priority.
- Owner (`owner_id`, number): The person who owns it.
- Team (`assigned_team_id`, number): The team responsible for it.
- Release (`release_id`, number): The release it is planned for.
- User story ID (`user_story_id`, number): For a task: the ID of the user story it belongs to.
- Feature ID (`feature_id`, number): For a user story or bug: the ID of its feature.
- Epic ID (`epic_id`, number): For a feature: the ID of its epic.
- Tags (`tags`, list): Its tags. They replace the tags it has.
- Effort (`effort`, number): Its estimated effort, in the account's units (points or hours). At least 0.
- Planned start (`planned_start_date`, date): When work on it is planned to start.
- Planned end (`planned_end_date`, date): When it is planned to be done.

**Outputs**

- `data` (object): The response from Targetprocess.

**Example output**

```json
{
  "data": {
    "CreateDate": "example",
    "Creator": {
      "FullName": "example",
      "Id": 1,
      "Login": "example"
    },
    "CustomFields": [
      {}
    ],
    "Description": "example",
    "Effort": 1,
    "EffortCompleted": 1,
    "EffortToDo": 1,
    "EndDate": "example",
    "EntityState": {
      "Id": 1,
      "IsFinal": true,
      "Name": "example"
    },
    "EntityType": {
      "Id": 1,
      "Name": "example"
    },
    "Epic": {
      "Id": 1,
      "Name": "example"
    },
    "Feature": {
      "Id": 1,
      "Name": "example"
    },
    "Id": 1,
    "LastCommentDate": "example",
    "LastStateChangeDate": "example",
    "ModifyDate": "example",
    "Name": "example",
    "NumericPriority": 1,
    "Owner": {
      "FullName": "example",
      "Id": 1,
      "Login": "example"
    },
    "PlannedEndDate": "example",
    "PlannedStartDate": "example",
    "Priority": {
      "Id": 1,
      "Name": "example"
    },
    "Progress": 1,
    "Project": {
      "Id": 1,
      "Name": "example"
    },
    "Release": {
      "Id": 1,
      "Name": "example"
    },
    "ResourceType": "example",
    "StartDate": "example",
    "Tags": "example",
    "Team": {
      "Id": 1,
      "Name": "example"
    },
    "TimeRemain": 1,
    "TimeSpent": 1,
    "UserStory": {
      "Id": 1,
      "Name": "example"
    }
  }
}
```
