# Tempo

> Log and review time, timesheets, accounts and plans in Tempo for Jira.

App · 32 actions. Web page: https://docs.lodol.com/docs/integrations/tempo

## Actions

### Approve a timesheet

Approve a person's timesheet for a period.

**Inputs**

- Jira account ID (`jira_account_id`, text, required): The person's Jira account ID, as in the address of their Jira profile.
- Period start (`period_from`, date, required): A date inside the timesheet period, such as its first day.
- Period end (`period_to`, date): The last day of the timesheet period. Leave empty for the period that holds the start date.
- Comment (`comment`, text): A note shown with the timesheet's history.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "period": {
      "from": "example",
      "to": "example"
    },
    "requiredSeconds": 1,
    "reviewer": {
      "accountId": "example",
      "self": "example"
    },
    "self": "example",
    "status": {
      "actor": {
        "accountId": "example",
        "displayName": "example",
        "type": "example"
      },
      "comment": "example",
      "key": "example",
      "updatedAt": "example"
    },
    "timeSpentSeconds": 1,
    "user": {
      "accountId": "example",
      "self": "example"
    },
    "worklogs": {
      "self": "example"
    }
  }
}
```

### Create a customer

Add a customer for Tempo accounts.

**Inputs**

- Key (`key`, text, required): A short unique key for the customer.
- Name (`name`, text, required): The customer's name.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "id": 1,
    "key": "example",
    "name": "example",
    "self": "example"
  }
}
```

### Create a team

Add a Tempo team.

**Inputs**

- Name (`name`, text, required): The team's name.
- Summary (`summary`, text): What the team is for.
- Lead (`lead_account_id`, text): The Jira account ID of the team lead.
- Public (`public`, true/false): Whether everyone can see the team. Tempo makes teams public when empty.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "administrative": true,
    "id": 1,
    "lead": {
      "accountId": "example",
      "self": "example"
    },
    "links": {
      "self": "example"
    },
    "members": {
      "self": "example"
    },
    "name": "example",
    "permissions": {
      "self": "example"
    },
    "public": true,
    "self": "example",
    "status": "example",
    "summary": "example"
  }
}
```

### Create an account

Add a Tempo account to bill time to.

**Inputs**

- Key (`key`, text, required): A short unique key for the account: letters, digits, `_`, `.` and `-`.
- Name (`name`, text, required): The account's name.
- Status (`status`, text, required): Whether time can be logged to the account. One of: `OPEN`, `CLOSED`, `ARCHIVED`.
- Lead (`lead_account_id`, text, required): The Jira account ID of the account's lead.
- Customer (`customer_key`, text): The customer the account belongs to.
- Category (`category_key`, text): The account category.
- Monthly budget (`monthly_budget`, number): The account's monthly budget, in hours. At least 0.
- Global (`is_global`, true/false): Whether the account can be used in every Jira project.
- Contact (`contact_account_id`, text): The Jira account ID of the account's contact, if they use Jira.
- External contact (`external_contact_name`, text): The contact's name, if they don't use Jira.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "category": {
      "id": 1,
      "key": "example",
      "name": "example"
    },
    "contact": {
      "accountId": "example",
      "displayName": "example",
      "type": "example"
    },
    "customer": {
      "id": 1,
      "key": "example",
      "name": "example",
      "self": "example"
    },
    "global": true,
    "id": 1,
    "key": "example",
    "lead": {
      "accountId": "example",
      "self": "example"
    },
    "links": {
      "self": "example"
    },
    "monthlyBudget": 1,
    "name": "example",
    "self": "example",
    "status": "OPEN"
  }
}
```

### Delete a customer

Delete a customer for good.

**Inputs**

- Customer (`customer_key`, text, required): The customer, by its key.

**Outputs**

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

**Example output**

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

### Delete a plan

Delete planned time for good.

**Inputs**

- Plan ID (`plan_id`, text, required): The plan's ID.

**Outputs**

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

**Example output**

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

### Delete a team

Delete a Tempo team for good.

**Inputs**

- Team (`tempo_team_id`, text, required): The Tempo team.

**Outputs**

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

**Example output**

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

### Delete a worklog

Delete a worklog for good.

**Inputs**

- Worklog ID (`worklog_id`, text, required): The Tempo worklog's ID (tempoWorklogId).
- Bypass closed periods (`bypass_approvals`, true/false): Delete it even in a closed period or an approved timesheet (needs Tempo administrator rights).

**Outputs**

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

**Example output**

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

### Delete an account

Delete a Tempo account for good.

**Inputs**

- Account (`account_key`, text, required): The Tempo account, by its key.

**Outputs**

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

**Example output**

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

### Get a person's schedule

Get the hours a person is expected to work each day, with holidays.

**Inputs**

- Jira account ID (`jira_account_id`, text, required): The person's Jira account ID, as in the address of their Jira profile.
- From (`from_date`, date, required): Only results on or after this date.
- To (`to_date`, date, required): Only results on or before this date.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "metadata": {
      "count": 1
    },
    "results": [
      {
        "date": "example",
        "holiday": {
          "description": "example",
          "durationSeconds": 1,
          "name": "example"
        },
        "requiredSeconds": 1,
        "type": "example"
      }
    ],
    "self": "example"
  }
}
```

### Get a timesheet

Get one person's timesheet for a period, with its approval status and hours.

**Inputs**

- Jira account ID (`jira_account_id`, text, required): The person's Jira account ID, as in the address of their Jira profile.
- Period start (`period_from`, date, required): A date inside the timesheet period, such as its first day.
- Period end (`period_to`, date): The last day of the timesheet period. Leave empty for the period that holds the start date.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "period": {
      "from": "example",
      "to": "example"
    },
    "requiredSeconds": 1,
    "reviewer": {
      "accountId": "example",
      "self": "example"
    },
    "self": "example",
    "status": {
      "actor": {
        "accountId": "example",
        "displayName": "example",
        "type": "example"
      },
      "comment": "example",
      "key": "example",
      "updatedAt": "example"
    },
    "timeSpentSeconds": 1,
    "user": {
      "accountId": "example",
      "self": "example"
    },
    "worklogs": {
      "self": "example"
    }
  }
}
```

### Get a worklog

Get one worklog with its issue, author and work attributes.

**Inputs**

- Worklog ID (`worklog_id`, text, required): The Tempo worklog's ID (tempoWorklogId).

**Outputs**

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

**Example output**

```json
{
  "data": {
    "attributes": {
      "self": "example",
      "values": [
        {
          "key": "example",
          "self": "example",
          "value": "example"
        }
      ]
    },
    "author": {
      "accountId": "example",
      "self": "example"
    },
    "billableSeconds": 1,
    "createdAt": "example",
    "description": "example",
    "issue": {
      "id": 1,
      "self": "example"
    },
    "self": "example",
    "startDate": "example",
    "startDateTimeUtc": "example",
    "startTime": "example",
    "tempoWorklogId": 1,
    "timeSpentSeconds": 1,
    "updatedAt": "example"
  }
}
```

### List a person's worklogs

List the worklogs one person logged, in a date range.

**Inputs**

- Jira account ID (`jira_account_id`, text, required): The person's Jira account ID, as in the address of their Jira profile.
- From (`from_date`, date): Only results on or after this date.
- To (`to_date`, date): Only results on or before this date.
- Updated since (`updated_from`, date and time): Only results changed at or after this time.
- Offset (`offset`, number): How many results to skip, for the next page. At least 0.
- Limit (`limit`, number): How many results to return, up to 1,000. Tempo returns 50 when empty. From 1 to 1000.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "metadata": {
      "count": 1,
      "limit": 1,
      "next": "example",
      "offset": 1,
      "previous": "example"
    },
    "results": [
      {
        "attributes": {
          "self": "example",
          "values": [
            {
              "key": "example",
              "self": "example",
              "value": "example"
            }
          ]
        },
        "author": {
          "accountId": "example",
          "self": "example"
        },
        "billableSeconds": 1,
        "createdAt": "example",
        "description": "example",
        "issue": {
          "id": 1,
          "self": "example"
        },
        "self": "example",
        "startDate": "example",
        "startDateTimeUtc": "example",
        "startTime": "example",
        "tempoWorklogId": 1,
        "timeSpentSeconds": 1,
        "updatedAt": "example"
      }
    ],
    "self": "example"
  }
}
```

### List a team's timesheets

List the approval status of each team member's timesheet for a period.

**Inputs**

- Team (`tempo_team_id`, text, required): The Tempo team.
- Period start (`period_from`, date, required): A date inside the timesheet period, such as its first day.
- Period end (`period_to`, date): The last day of the timesheet period. Leave empty for the period that holds the start date.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "metadata": {
      "count": 1
    },
    "results": [
      {
        "period": {
          "from": "example",
          "to": "example"
        },
        "requiredSeconds": 1,
        "reviewer": {
          "accountId": "example",
          "self": "example"
        },
        "self": "example",
        "status": {
          "actor": {
            "accountId": "example",
            "displayName": "example",
            "type": "example"
          },
          "comment": "example",
          "key": "example",
          "updatedAt": "example"
        },
        "timeSpentSeconds": 1,
        "user": {
          "accountId": "example",
          "self": "example"
        },
        "worklogs": {
          "self": "example"
        }
      }
    ],
    "self": "example"
  }
}
```

### List account categories

List the categories Tempo accounts are filed under.

**Inputs**: None.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "metadata": {
      "count": 1
    },
    "results": [
      {
        "id": 1,
        "key": "example",
        "name": "example",
        "self": "example",
        "type": {
          "name": "example"
        }
      }
    ],
    "self": "example"
  }
}
```

### List accounts

List the Tempo accounts time can be billed to.

**Inputs**

- Offset (`offset`, number): How many results to skip, for the next page. At least 0.
- Limit (`limit`, number): How many results to return, up to 1,000. Tempo returns 50 when empty. From 1 to 1000.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "metadata": {
      "count": 1,
      "limit": 1,
      "next": "example",
      "offset": 1,
      "previous": "example"
    },
    "results": [
      {
        "category": {
          "id": 1,
          "key": "example",
          "name": "example"
        },
        "contact": {
          "accountId": "example",
          "displayName": "example",
          "type": "example"
        },
        "customer": {
          "id": 1,
          "key": "example",
          "name": "example",
          "self": "example"
        },
        "global": true,
        "id": 1,
        "key": "example",
        "lead": {
          "accountId": "example",
          "self": "example"
        },
        "links": {
          "self": "example"
        },
        "monthlyBudget": 1,
        "name": "example",
        "self": "example",
        "status": "OPEN"
      }
    ],
    "self": "example"
  }
}
```

### List customers

List the customers Tempo accounts belong to.

**Inputs**

- Offset (`offset`, number): How many results to skip, for the next page. At least 0.
- Limit (`limit`, number): How many results to return, up to 1,000. Tempo returns 50 when empty. From 1 to 1000.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "metadata": {
      "count": 1,
      "limit": 1,
      "next": "example",
      "offset": 1,
      "previous": "example"
    },
    "results": [
      {
        "id": 1,
        "key": "example",
        "name": "example",
        "self": "example"
      }
    ],
    "self": "example"
  }
}
```

### List plans

List planned time (resource plans) in a date range.

**Inputs**

- From (`from_date`, date, required): Only results on or after this date.
- To (`to_date`, date, required): Only results on or before this date.
- Assignees (`assignee_ids`, list): Only plans for these people, by Jira account ID.
- Updated since (`updated_from`, date and time): Only results changed at or after this time.
- Offset (`offset`, number): How many results to skip, for the next page. At least 0.
- Limit (`limit`, number): How many results to return, up to 1,000. Tempo returns 50 when empty. From 1 to 1000.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "metadata": {
      "count": 1,
      "limit": 1,
      "next": "example",
      "offset": 1,
      "previous": "example"
    },
    "results": [
      {
        "assignee": {
          "id": "example",
          "self": "example",
          "type": "example"
        },
        "createdAt": "example",
        "description": "example",
        "effortPersistenceType": "example",
        "endDate": "example",
        "id": 1,
        "includeNonWorkingDays": true,
        "planCreatorId": "example",
        "planItem": {
          "id": "example",
          "self": "example",
          "type": "example"
        },
        "plannedSecondsPerDay": 1,
        "recurrenceEndDate": "example",
        "rule": "example",
        "self": "example",
        "startDate": "example",
        "startTime": "example",
        "totalPlannedSeconds": 1,
        "updatedAt": "example"
      }
    ],
    "self": "example"
  }
}
```

### List team members

List a team's active members and their memberships.

**Inputs**

- Team (`tempo_team_id`, text, required): The Tempo team.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "metadata": {
      "count": 1,
      "limit": 1,
      "next": "example",
      "offset": 1,
      "previous": "example"
    },
    "results": [
      {
        "member": {
          "accountId": "example",
          "self": "example"
        },
        "memberships": {
          "active": {
            "commitmentPercent": 1,
            "id": 1,
            "role": {
              "id": 1,
              "name": "example"
            },
            "self": "example"
          },
          "self": "example"
        },
        "team": {
          "self": "example"
        }
      }
    ],
    "self": "example"
  }
}
```

### List teams

List Tempo teams, by name or by member.

**Inputs**

- Name (`name`, text): Only teams with this name.
- Members (`member_ids`, list): Only teams these people belong to, by Jira account ID.
- Status (`status`, text): Active teams, archived teams or both. Tempo shows active teams when empty. One of: `ACTIVE`, `ARCHIVED`, `ALL`.
- Offset (`offset`, number): How many results to skip, for the next page. At least 0.
- Limit (`limit`, number): How many results to return, up to 1,000. Tempo returns 50 when empty. From 1 to 1000.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "metadata": {
      "count": 1,
      "limit": 1,
      "next": "example",
      "offset": 1,
      "previous": "example"
    },
    "results": [
      {
        "administrative": true,
        "id": 1,
        "lead": {
          "accountId": "example",
          "self": "example"
        },
        "links": {
          "self": "example"
        },
        "members": {
          "self": "example"
        },
        "name": "example",
        "permissions": {
          "self": "example"
        },
        "public": true,
        "self": "example",
        "status": "example",
        "summary": "example"
      }
    ],
    "self": "example"
  }
}
```

### List timesheets waiting for approval

List the timesheets waiting for you to review.

**Inputs**: None.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "metadata": {
      "count": 1
    },
    "results": [
      {
        "period": {
          "from": "example",
          "to": "example"
        },
        "requiredSeconds": 1,
        "reviewer": {
          "accountId": "example",
          "self": "example"
        },
        "self": "example",
        "status": {
          "actor": {
            "accountId": "example",
            "displayName": "example",
            "type": "example"
          },
          "comment": "example",
          "key": "example",
          "updatedAt": "example"
        },
        "timeSpentSeconds": 1,
        "user": {
          "accountId": "example",
          "self": "example"
        },
        "worklogs": {
          "self": "example"
        }
      }
    ],
    "self": "example"
  }
}
```

### List work attributes

List the extra fields worklogs can carry, with their keys and values.

**Inputs**

- Offset (`offset`, number): How many results to skip, for the next page. At least 0.
- Limit (`limit`, number): How many results to return, up to 1,000. Tempo returns 50 when empty. From 1 to 1000.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "metadata": {
      "count": 1,
      "limit": 1,
      "next": "example",
      "offset": 1,
      "previous": "example"
    },
    "results": [
      {
        "key": "example",
        "name": "example",
        "required": true,
        "self": "example",
        "type": "example",
        "values": [
          "example"
        ]
      }
    ],
    "self": "example"
  }
}
```

### List worklogs

List worklogs, newest changes first when sorted by update, filtered by project, issue, date or change time.

**Inputs**

- Project IDs (`project_ids`, list): Only worklogs in these Jira projects, by their numeric IDs.
- Issue IDs (`issue_ids`, list): Only worklogs on these Jira issues, by their numeric IDs (not their keys).
- From (`from_date`, date): Only results on or after this date.
- To (`to_date`, date): Only results on or before this date.
- Updated since (`updated_from`, date and time): Only results changed at or after this time.
- Sort by (`order_by`, text): How to sort the worklogs, latest first. One of: `START_DATE_TIME` (Work date), `UPDATED` (Last changed), `ID` (Worklog ID).
- Offset (`offset`, number): How many results to skip, for the next page. At least 0.
- Limit (`limit`, number): How many results to return, up to 1,000. Tempo returns 50 when empty. From 1 to 1000.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "metadata": {
      "count": 1,
      "limit": 1,
      "next": "example",
      "offset": 1,
      "previous": "example"
    },
    "results": [
      {
        "attributes": {
          "self": "example",
          "values": [
            {
              "key": "example",
              "self": "example",
              "value": "example"
            }
          ]
        },
        "author": {
          "accountId": "example",
          "self": "example"
        },
        "billableSeconds": 1,
        "createdAt": "example",
        "description": "example",
        "issue": {
          "id": 1,
          "self": "example"
        },
        "self": "example",
        "startDate": "example",
        "startDateTimeUtc": "example",
        "startTime": "example",
        "tempoWorklogId": 1,
        "timeSpentSeconds": 1,
        "updatedAt": "example"
      }
    ],
    "self": "example"
  }
}
```

### Log time

Log time on a Jira issue for a person.

**Inputs**

- Issue ID (`issue_id`, number, required): The Jira issue's numeric ID (not its key such as `PROJ-12`). At least 1.
- Author (`author_account_id`, text, required): The Jira account ID of the person who did the work.
- Date (`start_date`, date, required): The day the work was done.
- Hours spent (`hours_spent`, number, required): How long the work took, in hours (1.5 is an hour and a half). At least 0.
- Start time (`start_time`, time): The time of day the work started.
- Billable hours (`billable_hours`, number): Hours to bill, if different from the hours spent. At least 0.
- Remaining estimate (hours) (`remaining_estimate_hours`, number): Hours left on the issue after this work. At least 0.
- Description (`description`, text): What the work was.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "attributes": {
      "self": "example",
      "values": [
        {
          "key": "example",
          "self": "example",
          "value": "example"
        }
      ]
    },
    "author": {
      "accountId": "example",
      "self": "example"
    },
    "billableSeconds": 1,
    "createdAt": "example",
    "description": "example",
    "issue": {
      "id": 1,
      "self": "example"
    },
    "self": "example",
    "startDate": "example",
    "startDateTimeUtc": "example",
    "startTime": "example",
    "tempoWorklogId": 1,
    "timeSpentSeconds": 1,
    "updatedAt": "example"
  }
}
```

### Plan time

Plan time for a person on a Jira issue or project.

**Inputs**

- Assignee (`assignee_account_id`, text, required): The Jira account ID of the person the time is planned for.
- Planned on (`item_type`, text, required): Whether the time is planned on an issue or a whole project. One of: `ISSUE`, `PROJECT`.
- Issue or project ID (`item_id`, text, required): The numeric ID of the Jira issue or project.
- Start date (`start_date`, date, required): The plan's first day.
- End date (`end_date`, date, required): The plan's last day.
- Hours per day (`hours_per_day`, number): Hours planned each day. At least 0.
- Description (`description`, text): What the time is for.
- Include non-working days (`include_non_working_days`, true/false): Whether the plan also covers weekends and holidays.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "assignee": {
      "id": "example",
      "self": "example",
      "type": "example"
    },
    "createdAt": "example",
    "description": "example",
    "effortPersistenceType": "example",
    "endDate": "example",
    "id": 1,
    "includeNonWorkingDays": true,
    "planCreatorId": "example",
    "planItem": {
      "id": "example",
      "self": "example",
      "type": "example"
    },
    "plannedSecondsPerDay": 1,
    "recurrenceEndDate": "example",
    "rule": "example",
    "self": "example",
    "startDate": "example",
    "startTime": "example",
    "totalPlannedSeconds": 1,
    "updatedAt": "example"
  }
}
```

### Reject a timesheet

Send a person's timesheet back to them to correct.

**Inputs**

- Jira account ID (`jira_account_id`, text, required): The person's Jira account ID, as in the address of their Jira profile.
- Period start (`period_from`, date, required): A date inside the timesheet period, such as its first day.
- Period end (`period_to`, date): The last day of the timesheet period. Leave empty for the period that holds the start date.
- Comment (`comment`, text): A note shown with the timesheet's history.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "period": {
      "from": "example",
      "to": "example"
    },
    "requiredSeconds": 1,
    "reviewer": {
      "accountId": "example",
      "self": "example"
    },
    "self": "example",
    "status": {
      "actor": {
        "accountId": "example",
        "displayName": "example",
        "type": "example"
      },
      "comment": "example",
      "key": "example",
      "updatedAt": "example"
    },
    "timeSpentSeconds": 1,
    "user": {
      "accountId": "example",
      "self": "example"
    },
    "worklogs": {
      "self": "example"
    }
  }
}
```

### Reopen a timesheet

Reopen an approved timesheet so it can be changed.

**Inputs**

- Jira account ID (`jira_account_id`, text, required): The person's Jira account ID, as in the address of their Jira profile.
- Period start (`period_from`, date, required): A date inside the timesheet period, such as its first day.
- Period end (`period_to`, date): The last day of the timesheet period. Leave empty for the period that holds the start date.
- Comment (`comment`, text): A note shown with the timesheet's history.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "period": {
      "from": "example",
      "to": "example"
    },
    "requiredSeconds": 1,
    "reviewer": {
      "accountId": "example",
      "self": "example"
    },
    "self": "example",
    "status": {
      "actor": {
        "accountId": "example",
        "displayName": "example",
        "type": "example"
      },
      "comment": "example",
      "key": "example",
      "updatedAt": "example"
    },
    "timeSpentSeconds": 1,
    "user": {
      "accountId": "example",
      "self": "example"
    },
    "worklogs": {
      "self": "example"
    }
  }
}
```

### Search worklogs

Find worklogs by author, project, issue and date range.

**Inputs**

- Authors (`author_ids`, list): Only worklogs by these people, by Jira account ID.
- Project IDs (`project_ids`, list): Only worklogs in these Jira projects, by numeric ID.
- Issue IDs (`issue_ids`, list): Only worklogs on these Jira issues, by numeric ID.
- From (`from_date`, date): Only worklogs on or after this date.
- To (`to_date`, date): Only worklogs on or before this date.
- Updated since (`updated_from`, date and time): Only worklogs changed at or after this time.
- Offset (`offset`, number): How many results to skip, for the next page. At least 0.
- Limit (`limit`, number): How many results to return, up to 1,000. Tempo returns 50 when empty. From 1 to 1000.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "metadata": {
      "count": 1,
      "limit": 1,
      "next": "example",
      "offset": 1,
      "previous": "example"
    },
    "results": [
      {
        "attributes": {
          "self": "example",
          "values": [
            {
              "key": "example",
              "self": "example",
              "value": "example"
            }
          ]
        },
        "author": {
          "accountId": "example",
          "self": "example"
        },
        "billableSeconds": 1,
        "createdAt": "example",
        "description": "example",
        "issue": {
          "id": 1,
          "self": "example"
        },
        "self": "example",
        "startDate": "example",
        "startDateTimeUtc": "example",
        "startTime": "example",
        "tempoWorklogId": 1,
        "timeSpentSeconds": 1,
        "updatedAt": "example"
      }
    ],
    "self": "example"
  }
}
```

### Submit a timesheet

Send a person's timesheet for a period to a reviewer.

**Inputs**

- Jira account ID (`jira_account_id`, text, required): The person's Jira account ID, as in the address of their Jira profile.
- Period start (`period_from`, date, required): A date inside the timesheet period, such as its first day.
- Period end (`period_to`, date): The last day of the timesheet period. Leave empty for the period that holds the start date.
- Reviewer (`reviewer_account_id`, text): The Jira account ID of the person who reviews it.
- Comment (`comment`, text): A note shown with the timesheet's history.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "period": {
      "from": "example",
      "to": "example"
    },
    "requiredSeconds": 1,
    "reviewer": {
      "accountId": "example",
      "self": "example"
    },
    "self": "example",
    "status": {
      "actor": {
        "accountId": "example",
        "displayName": "example",
        "type": "example"
      },
      "comment": "example",
      "key": "example",
      "updatedAt": "example"
    },
    "timeSpentSeconds": 1,
    "user": {
      "accountId": "example",
      "self": "example"
    },
    "worklogs": {
      "self": "example"
    }
  }
}
```

### Update a customer

Rename a customer or change its key.

**Inputs**

- Customer (`customer_key`, text, required): The customer, by its key.
- New key (`new_key`, text): A new key for the customer. Leave empty to keep the current one.
- Name (`name`, text, required): The customer's name.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "id": 1,
    "key": "example",
    "name": "example",
    "self": "example"
  }
}
```

### Update a worklog

Change a worklog. Fields left empty keep their current value.

**Inputs**

- Worklog ID (`worklog_id`, text, required): The Tempo worklog's ID (tempoWorklogId).
- Author (`author_account_id`, text): The Jira account ID of the person who did the work.
- Date (`start_date`, date): The day the work was done.
- Hours spent (`hours_spent`, number): How long the work took, in hours (1.5 is an hour and a half). At least 0.
- Start time (`start_time`, time): The time of day the work started.
- Billable hours (`billable_hours`, number): Hours to bill, if different from the hours spent. At least 0.
- Remaining estimate (hours) (`remaining_estimate_hours`, number): Hours left on the issue after this work. At least 0.
- Description (`description`, text): What the work was.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "attributes": {
      "self": "example",
      "values": [
        {
          "key": "example",
          "self": "example",
          "value": "example"
        }
      ]
    },
    "author": {
      "accountId": "example",
      "self": "example"
    },
    "billableSeconds": 1,
    "createdAt": "example",
    "description": "example",
    "issue": {
      "id": 1,
      "self": "example"
    },
    "self": "example",
    "startDate": "example",
    "startDateTimeUtc": "example",
    "startTime": "example",
    "tempoWorklogId": 1,
    "timeSpentSeconds": 1,
    "updatedAt": "example"
  }
}
```

### Update an account

Change a Tempo account. Fields left empty keep their current value.

**Inputs**

- Account (`account_key`, text, required): The Tempo account, by its key.
- Name (`name`, text): The account's name.
- Status (`status`, text): Whether time can be logged to the account. One of: `OPEN`, `CLOSED`, `ARCHIVED`.
- Lead (`lead_account_id`, text): The Jira account ID of the account's lead.
- Customer (`customer_key`, text): The customer the account belongs to.
- Category (`category_key`, text): The account category.
- Monthly budget (`monthly_budget`, number): The account's monthly budget, in hours. At least 0.
- Global (`is_global`, true/false): Whether the account can be used in every Jira project.
- Contact (`contact_account_id`, text): The Jira account ID of the account's contact, if they use Jira.
- External contact (`external_contact_name`, text): The contact's name, if they don't use Jira.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "category": {
      "id": 1,
      "key": "example",
      "name": "example"
    },
    "contact": {
      "accountId": "example",
      "displayName": "example",
      "type": "example"
    },
    "customer": {
      "id": 1,
      "key": "example",
      "name": "example",
      "self": "example"
    },
    "global": true,
    "id": 1,
    "key": "example",
    "lead": {
      "accountId": "example",
      "self": "example"
    },
    "links": {
      "self": "example"
    },
    "monthlyBudget": 1,
    "name": "example",
    "self": "example",
    "status": "OPEN"
  }
}
```
