Skip to content

Instantly share code, notes, and snippets.

@mdbenito
Last active April 22, 2022 09:18
Show Gist options
  • Save mdbenito/4619ae3a6ae4d245d7a16c5c31405956 to your computer and use it in GitHub Desktop.
Save mdbenito/4619ae3a6ae4d245d7a16c5c31405956 to your computer and use it in GitHub Desktop.
An (incomplete) OpenApi spec for float.com's v3 API
openapi: 3.0.0
info:
version: '3.0'
title: Float API
description: This API allows 3rd party integration of your Float data.
security:
- bearerAuth: []
paths:
/accounts:
get:
tags:
- Company
description: List of accounts that have been granted access to this team.
parameters:
- $ref: '#/components/parameters/pageParameter'
- $ref: '#/components/parameters/perPageParameter'
responses:
'200':
description: List of accounts that have been granted access to this team.
headers:
X-Pagination-Total-Count:
$ref: '#/components/headers/X-Pagination-Total-Count'
X-Pagination-Page-Count:
$ref: '#/components/headers/X-Pagination-Page-Count'
X-Pagination-Current-Page:
$ref: '#/components/headers/X-Pagination-Current-Page'
X-Pagination-Per-Page:
$ref: '#/components/headers/X-Pagination-Per-Page'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Account'
/people:
get:
tags:
- Company
description: Search for all people in your organization.
parameters:
- $ref: '#/components/parameters/pageParameter'
- $ref: '#/components/parameters/perPageParameter'
responses:
'200':
description: 'OK'
headers:
X-Pagination-Total-Count:
$ref: '#/components/headers/X-Pagination-Total-Count'
X-Pagination-Page-Count:
$ref: '#/components/headers/X-Pagination-Page-Count'
X-Pagination-Current-Page:
$ref: '#/components/headers/X-Pagination-Current-Page'
X-Pagination-Per-Page:
$ref: '#/components/headers/X-Pagination-Per-Page'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Person'
post:
tags:
- Company
description: Add a new person
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PersonRequest'
responses:
'201':
description: If the person was succesfully created, the response returns the full information about that person.
content:
application/json:
schema:
$ref: '#/components/schemas/Person'
'422':
description: Data validation failure
'/people/{people_id}':
get:
tags:
- Company
description: Retrieve a single person
parameters:
- name: people_id
in: path
required: true
description: The person's id
schema:
type: integer
minimum: 1
responses:
'200':
description: Details of a single person
content:
application/json:
schema:
$ref: '#/components/schemas/Person'
'404':
description: The person does not exist
patch:
tags:
- Company
description: Update a person's details
parameters:
- name: people_id
in: path
required: true
description: The person's id
schema:
type: integer
minimum: 1
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PersonRequest'
responses:
'200':
description: On a successful update of a person, the response returns the full information about that person.
content:
application/json:
schema:
$ref: '#/components/schemas/Person'
'422':
description: Data validation failure
delete:
tags:
- Company
description: Delete a person
parameters:
- name: people_id
in: path
required: true
description: The person's id
schema:
type: integer
minimum: 1
responses:
'204':
description: Successful deletion.
'404':
description: The person does not exist
/departments:
get:
tags:
- Company
description: List all departments in your organization.
parameters:
- $ref: '#/components/parameters/pageParameter'
- $ref: '#/components/parameters/perPageParameter'
responses:
'200':
description: 'OK'
headers:
X-Pagination-Total-Count:
$ref: '#/components/headers/X-Pagination-Total-Count'
X-Pagination-Page-Count:
$ref: '#/components/headers/X-Pagination-Page-Count'
X-Pagination-Current-Page:
$ref: '#/components/headers/X-Pagination-Current-Page'
X-Pagination-Per-Page:
$ref: '#/components/headers/X-Pagination-Per-Page'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Department'
post:
tags:
- Company
description: Add a new department
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DepartmentRequest'
responses:
'201':
description: If the departmentwas succesfully created, the response returns the full information about that department.
content:
application/json:
schema:
$ref: '#/components/schemas/Department'
'422':
description: Data validation failure
'/departments/{department_id}':
get:
tags:
- Company
description: Retrieve a single department
parameters:
- name: department_id
in: path
required: true
description: The department's id
schema:
type: integer
minimum: 1
responses:
'200':
description: Details of a single department
content:
application/json:
schema:
$ref: '#/components/schemas/Department'
'404':
description: The department does not exist
patch:
tags:
- Company
description: Update a department's details
parameters:
- name: department_id
in: path
required: true
description: The department's id
schema:
type: integer
minimum: 1
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DepartmentRequest'
responses:
'200':
description: On a successful update of a department, the response returns the full information about that department.
content:
application/json:
schema:
$ref: '#/components/schemas/Department'
'422':
description: Data validation failure
delete:
tags:
- Company
description: Delete a department
parameters:
- name: department_id
in: path
required: true
description: The department's id
schema:
type: integer
minimum: 1
responses:
'204':
description: Successful deletion.
'404':
description: The department does not exist
/clients:
get:
tags:
- Company
description: Search for all clients in your organization.
parameters:
- $ref: '#/components/parameters/pageParameter'
- $ref: '#/components/parameters/perPageParameter'
responses:
'200':
description: 'OK'
headers:
X-Pagination-Total-Count:
$ref: '#/components/headers/X-Pagination-Total-Count'
X-Pagination-Page-Count:
$ref: '#/components/headers/X-Pagination-Page-Count'
X-Pagination-Current-Page:
$ref: '#/components/headers/X-Pagination-Current-Page'
X-Pagination-Per-Page:
$ref: '#/components/headers/X-Pagination-Per-Page'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Client'
post:
tags:
- Company
description: Add a new client
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ClientRequest'
responses:
'201':
description: If the client was succesfully created, the response returns the full information about that client.
content:
application/json:
schema:
$ref: '#/components/schemas/Client'
'422':
description: Data validation failure
'/clients/{clients_id}':
get:
tags:
- Company
description: Retrieve a single client
parameters:
- name: clients_id
in: path
required: true
description: The client's id
schema:
type: integer
minimum: 1
responses:
'200':
description: Details of a single client
content:
application/json:
schema:
$ref: '#/components/schemas/Client'
'404':
description: The client does not exist
patch:
tags:
- Company
description: Update a client's details
parameters:
- name: clients_id
in: path
required: true
description: The client's id
schema:
type: integer
minimum: 0
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ClientRequest'
responses:
'200':
description: On a successful update of a client, the response returns the full information about that client.
content:
application/json:
schema:
$ref: '#/components/schemas/Client'
'422':
description: Data validation failure
delete:
tags:
- Company
description: Delete a client
parameters:
- name: clients_id
in: path
required: true
description: The client's id
schema:
type: integer
minimum: 1
responses:
'204':
description: Successful deletion.
'404':
description: The client does not exist
/projects:
get:
tags:
- Projects
description: List all projects in your organization.
parameters:
- $ref: '#/components/parameters/pageParameter'
- $ref: '#/components/parameters/perPageParameter'
responses:
'200':
description: The list of projects
headers:
X-Pagination-Total-Count:
$ref: '#/components/headers/X-Pagination-Total-Count'
X-Pagination-Page-Count:
$ref: '#/components/headers/X-Pagination-Page-Count'
X-Pagination-Current-Page:
$ref: '#/components/headers/X-Pagination-Current-Page'
X-Pagination-Per-Page:
$ref: '#/components/headers/X-Pagination-Per-Page'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Project'
post:
tags:
- Projects
description: Add a new project
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ProjectRequest'
responses:
'201':
description: If the project was succesfully created, the response returns the full information about that project.
content:
application/json:
schema:
$ref: '#/components/schemas/Project'
'422':
description: Data validation failure
'/projects/{project_id}':
get:
tags:
- Projects
description: Retrieve a single project
parameters:
- name: project_id
in: path
required: true
description: The project's id
schema:
type: integer
responses:
'200':
description: Details of a single project
content:
application/json:
schema:
$ref: '#/components/schemas/Project'
'404':
description: The project does not exist
patch:
tags:
- Projects
description: Update a project's details
parameters:
- name: project_id
in: path
required: true
description: The project's id
schema:
type: integer
minimum: 1
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ProjectRequest'
responses:
'200':
description: On a successful update of a project, the response returns the full information about that project.
content:
application/json:
schema:
$ref: '#/components/schemas/Project'
'422':
description: Data validation failure
delete:
tags:
- Projects
description: Delete a project
parameters:
- name: project_id
in: path
required: true
description: The project's id
schema:
type: integer
responses:
'204':
description: Successful deletion.
'404':
description: The project does not exist
/phases:
get:
tags:
- Projects
description: List all phases in your organization.
parameters:
- $ref: '#/components/parameters/pageParameter'
- $ref: '#/components/parameters/perPageParameter'
responses:
'200':
description: The list of phases
headers:
X-Pagination-Total-Count:
$ref: '#/components/headers/X-Pagination-Total-Count'
X-Pagination-Page-Count:
$ref: '#/components/headers/X-Pagination-Page-Count'
X-Pagination-Current-Page:
$ref: '#/components/headers/X-Pagination-Current-Page'
X-Pagination-Per-Page:
$ref: '#/components/headers/X-Pagination-Per-Page'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Phase'
post:
tags:
- Projects
description: Add a new phase
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PhaseRequest'
responses:
'201':
description: If the phase was succesfully created, the response returns the full information about that phase.
content:
application/json:
schema:
$ref: '#/components/schemas/Phase'
'422':
description: Data validation failure
'/phases/{phase_id}':
get:
tags:
- Projects
description: Retrieve a single phase
parameters:
- name: phase_id
in: path
required: true
description: The phase's id
schema:
type: integer
responses:
'200':
description: Details of a single phase
content:
application/json:
schema:
$ref: '#/components/schemas/Phase'
'404':
description: The phase does not exist
patch:
tags:
- Projects
description: Update a phase's details
parameters:
- name: phase_id
in: path
required: true
description: The phase's id
schema:
type: integer
minimum: 1
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PhaseRequest'
responses:
'200':
description: On a successful update of a phase, the response returns the full information about that phase.
content:
application/json:
schema:
$ref: '#/components/schemas/Phase'
'422':
description: Data validation failure
delete:
tags:
- Projects
description: Delete a phase
parameters:
- name: phase_id
in: path
required: true
description: The phase's id
schema:
type: integer
responses:
'204':
description: Successful deletion.
'404':
description: The phase does not exist
/tasks:
get:
tags:
- Projects
description: List tasks. This includes any tasks or repeating task sets that start or end within the date range specified.
parameters:
- $ref: '#/components/parameters/pageParameter'
- $ref: '#/components/parameters/perPageParameter'
responses:
'200':
description: The list of tasks
headers:
X-Pagination-Total-Count:
$ref: '#/components/headers/X-Pagination-Total-Count'
X-Pagination-Page-Count:
$ref: '#/components/headers/X-Pagination-Page-Count'
X-Pagination-Current-Page:
$ref: '#/components/headers/X-Pagination-Current-Page'
X-Pagination-Per-Page:
$ref: '#/components/headers/X-Pagination-Per-Page'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Task'
post:
tags:
- Projects
description: Add a new task
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TaskRequest'
responses:
'201':
description: If the task was succesfully created, the response returns the full information about that task.
content:
application/json:
schema:
$ref: '#/components/schemas/Task'
'422':
description: Data validation failure
'/tasks/{task_id}':
get:
tags:
- Projects
description: Retrieve a single task
parameters:
- name: task_id
in: path
required: true
description: The task's id
schema:
type: integer
responses:
'200':
description: Details of a single task
content:
application/json:
schema:
$ref: '#/components/schemas/Task'
'404':
description: The task does not exist
patch:
tags:
- Projects
description: Update a task's details
parameters:
- name: task_id
in: path
required: true
description: The task's id
schema:
type: integer
minimum: 1
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TaskRequest'
responses:
'200':
description: On a successful update of a task, the response returns the full information about that task.
content:
application/json:
schema:
$ref: '#/components/schemas/Task'
'422':
description: Data validation failure
delete:
tags:
- Projects
description: Delete a task
parameters:
- name: task_id
in: path
required: true
description: The task's id
schema:
type: integer
responses:
'204':
description: Successful deletion.
'404':
description: The task does not exist
/milestones:
get:
tags:
- Projects
description: List project milestones
parameters:
- $ref: '#/components/parameters/pageParameter'
- $ref: '#/components/parameters/perPageParameter'
responses:
'200':
description: 'List of milestones for all projects'
headers:
X-Pagination-Total-Count:
$ref: '#/components/headers/X-Pagination-Total-Count'
X-Pagination-Page-Count:
$ref: '#/components/headers/X-Pagination-Page-Count'
X-Pagination-Current-Page:
$ref: '#/components/headers/X-Pagination-Current-Page'
X-Pagination-Per-Page:
$ref: '#/components/headers/X-Pagination-Per-Page'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Milestone'
post:
tags:
- Projects
description: Add a new project milestone
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/MilestoneRequest'
responses:
'201':
description: If the milestone was succesfully created, the response returns the full information about that milestone.
content:
application/json:
schema:
$ref: '#/components/schemas/Milestone'
'422':
description: Data validation failure if fields are missing or the milestone already exists.
'/milestones/{milestones_id}':
get:
tags:
- Projects
description: Retrieve a single milestone
parameters:
- name: milestones_id
in: path
required: true
description: The milestone's id
schema:
type: integer
minimum: 1
responses:
'200':
description: Details of a single milestone
content:
application/json:
schema:
$ref: '#/components/schemas/Milestone'
'404':
description: The milestone does not exist
patch:
tags:
- Projects
description: Update a milestone's details
parameters:
- name: milestones_id
in: path
required: true
description: The milestone's id
schema:
type: integer
minimum: 0
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/MilestoneRequest'
responses:
'200':
description: On a successful update of a milestone, the response returns the full information about that milestone.
content:
application/json:
schema:
$ref: '#/components/schemas/Milestone'
'422':
description: Data validation failure
delete:
tags:
- Projects
description: Delete a milestone
parameters:
- name: milestones_id
in: path
required: true
description: The milestone's id
schema:
type: integer
minimum: 1
responses:
'204':
description: Successful deletion.
'404':
description: The milestone does not exist
/timeoffs:
get:
tags:
- Time
description: List of time off scheduled
parameters:
- $ref: '#/components/parameters/pageParameter'
- $ref: '#/components/parameters/perPageParameter'
responses:
'200':
description: 'OK'
headers:
X-Pagination-Total-Count:
$ref: '#/components/headers/X-Pagination-Total-Count'
X-Pagination-Page-Count:
$ref: '#/components/headers/X-Pagination-Page-Count'
X-Pagination-Current-Page:
$ref: '#/components/headers/X-Pagination-Current-Page'
X-Pagination-Per-Page:
$ref: '#/components/headers/X-Pagination-Per-Page'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Timeoff'
post:
tags:
- Time
description: Add a new time off
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TimeoffRequest'
responses:
'201':
description: If the time off was succesfully created, the response returns the full information about that time off.
content:
application/json:
schema:
$ref: '#/components/schemas/Timeoff'
'422':
description: Data validation failure if fields are missing or the time off already exists.
'/timeoffs/{timeoff_id}':
get:
tags:
- Time
description: Retrieve a single time off
parameters:
- name: timeoff_id
in: path
required: true
description: The time off's id
schema:
type: integer
minimum: 1
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Timeoff'
'404':
description: Time off not found
patch:
tags:
- Time
description: Update a time off's details
parameters:
- name: timeoff_id
in: path
required: true
description: The time off's id
schema:
type: integer
minimum: 1
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TimeoffRequest'
responses:
'200':
description: On a successful update of a time off, the response returns the full information about that time off.
content:
application/json:
schema:
$ref: '#/components/schemas/Timeoff'
'422':
description: Data validation failure if fields are missing or the time off already exists.
delete:
tags:
- Time
description: Delete a time off
parameters:
- name: timeoff_id
in: path
required: true
description: The time off's id
schema:
type: integer
minimum: 1
responses:
'204':
description: Successful deletion.
'404':
description: The time off record does not exist
/timeoff-types:
get:
tags:
- Time
parameters:
- $ref: '#/components/parameters/pageParameter'
- $ref: '#/components/parameters/perPageParameter'
description: List of time off types
responses:
'200':
description: List of time off types that can be assigned to your team
headers:
X-Pagination-Total-Count:
$ref: '#/components/headers/X-Pagination-Total-Count'
X-Pagination-Page-Count:
$ref: '#/components/headers/X-Pagination-Page-Count'
X-Pagination-Current-Page:
$ref: '#/components/headers/X-Pagination-Current-Page'
X-Pagination-Per-Page:
$ref: '#/components/headers/X-Pagination-Per-Page'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/TimeoffType'
post:
tags:
- Time
description: Add a new time off type
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TimeoffTypeRequest'
responses:
'201':
description: If the time off type was succesfully created, the response returns the full information about that time off type.
content:
application/json:
schema:
$ref: '#/components/schemas/TimeoffType'
'422':
description: Data validation failure if fields are missing or the time off type already exists.
'/timeoff-types/{timeoff_type_id}':
get:
tags:
- Time
description: Retrieve a single time off type
parameters:
- name: timeoff_type_id
in: path
required: true
description: The time off type's id
schema:
type: integer
minimum: 1
responses:
'200':
description: A time off type
content:
application/json:
schema:
$ref: '#/components/schemas/TimeoffType'
'404':
description: Time off type not found
patch:
tags:
- Time
description: Update a time off type's details
parameters:
- name: timeoff_type_id
in: path
required: true
description: The time off type's id
schema:
type: integer
minimum: 1
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/TimeoffTypeRequest'
responses:
'200':
description: On a successful update of a time off type, the response returns the full information about that time off type.
content:
application/json:
schema:
$ref: '#/components/schemas/TimeoffType'
'422':
description: Data validation failure if fields are missing or the time off type already exists.
/logged-time:
get:
tags:
- Time
description: Returns a list of logged time for the specified person or project within the specified date range
parameters:
- name: people_id
in: query
required: false
description: ID of the person for whom to list logged time required if project_id omitted
schema:
type: integer
minimum: 1
- name: project_id
in: query
required: false
description: ID of the project for which to list logged time required if people_id omitted
schema:
type: integer
minimum: 1
- name: start_date
in: query
required: true
description: Start of date range in format YYYY-MM-DD
schema:
type: string
format: date
- name: end_date
in: query
required: true
description: End of date range in format YYYY-MM-DD
schema:
type: string
format: date
- $ref: '#/components/parameters/pageParameter'
- $ref: '#/components/parameters/perPageParameter'
responses:
'200':
description: An array of logged time entries for the specified person/project between the specified dates
headers:
X-Pagination-Total-Count:
$ref: '#/components/headers/X-Pagination-Total-Count'
X-Pagination-Page-Count:
$ref: '#/components/headers/X-Pagination-Page-Count'
X-Pagination-Current-Page:
$ref: '#/components/headers/X-Pagination-Current-Page'
X-Pagination-Per-Page:
$ref: '#/components/headers/X-Pagination-Per-Page'
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/LoggedTime'
'403':
description: Time tracking is not enabled for this team
'422':
description: Data validation error.
post:
tags:
- Time
description: Create a logged time entry for a person
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/LoggedTimeRequest'
responses:
'201':
description: Time successfully logged
content:
application/json:
schema:
$ref: '#/components/schemas/LoggedTime'
'403':
description: Time tracking is not enabled for this team
'422':
description: Data validation error.
'/logged-time/{logged_time_id}':
get:
tags:
- Time
description: Returns a single logged time entry
parameters:
- name: logged_time_id
in: path
required: true
description: Unique ID of the specific logged time entry to be retrieved
schema:
type: string
responses:
'200':
description: A logged time entry
content:
application/json:
schema:
$ref: '#/components/schemas/LoggedTime'
'403':
description: Time Tracking is not enabled for this team
'404':
description: The specified logged time entry does not exist
'422':
description: Data validation error
patch:
tags:
- Time
description: Modify an existing logged time entry.
parameters:
- name: logged_time_id
in: path
required: true
description: Unique ID of the specific logged time entry to be modified
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/LoggedTimeRequest'
responses:
'200':
description: On a successful update of a logged time, the response returns the full information about that logged time.
content:
application/json:
schema:
$ref: '#/components/schemas/LoggedTime'
'403':
description: Time Tracking is not enabled for this team
'404':
description: The specified logged time entry does not exist
'422':
description: Data validation error
delete:
tags:
- Time
description: Delete an existing logged time entry.
parameters:
- name: logged_time_id
in: path
required: true
description: The time off's id
schema:
type: string
responses:
'204':
description: The logged time entry was successfully deleted.
'403':
description: Time Tracking is not enabled for this team
'404':
description: The specified logged time entry does not exist
'422':
description: Data validation error
servers:
- url: https://api.float.com/v3
components:
securitySchemes:
bearerAuth: # arbitrary name for the security scheme
type: http
scheme: bearer
bearerFormat: JWT
schemas:
RecordTimestamps:
title: Timestamp metadata common to many resources
type: object
required:
- created
- modified
properties:
created:
type: string
format: date-time
description: Date this record was created (read-only)
modified:
type: string
format: date-time
description: Date this record was last modified (read-only)
RecordOwnership:
title: Ownership data common to many resources
type: object
required:
- created_by
- modified_by
properties:
created_by:
type: integer
description: ID of the account that created this record read-only
modified_by:
type: integer
description: ID of the account that last modified this record. read-only
Account:
title: Account data
description: accounts are different from People in that they can access the app and edit resources.
allOf:
- $ref: '#/components/schemas/RecordTimestamps'
- type: object
required:
- account_id
- name
- email
properties:
account_id:
type: integer
description: The ID of this account. Read-only
name:
type: string
maxLength: 200
description: Name of the account
email:
type: string
maxLength: 200
description: The email address for this account
account_type:
$ref: '#/components/schemas/AccountType'
department_filter_id:
type: integer
description: The department ID if this account is filtered by a department
view_rights:
type: integer
description: Do they have rights to view the team? 1 = Yes, 0 = No
edit_rights:
type: integer
description: If they're a Member, do they have rights to edit their schedule? 1 = Yes, 0 = No
active:
type: integer
description: Is this account active? 1 = Yes, 0 = No
AccountType:
type: integer
description: Account type. Account Owner = 1, Admin = 2, Project Manager = 3, Member = 4, Billing = 5
enum: [1, 2, 3, 4, 5]
x-enum-varnames: [AccountOwner, Admin, ProjectManager, Member, Billing]
DepartmentRequest:
title: Data required to create or update a Department
type: object
required:
- name
properties:
name:
type: string
maxLength: 200
description: The name of the department
Department:
title: Department data
allOf:
- type: object
required:
- department_id
properties:
department_id:
type: integer
description: The ID of this department.
- $ref: '#/components/schemas/DepartmentRequest'
LoggedTimeRequest:
title: Data required to create or update a logged time
type: object
required:
- people_id
- project_id
- hours
- date
properties:
date:
type: string
format: date
description: Date for which time is logged
hours:
type: number
description: Amount of time logged
billable:
type: integer
enum: [0, 1]
description: Integer flag (1 = true, 0 = false) identifying whether the time logged is billable; if omitted, the billable status of the project is used. Note that non-billable projects cannot have billable time
people_id:
type: integer
description: ID of the person for whom time is logged
project_id:
type: integer
description: ID of the project for which time is logged
phase_id:
type: integer
description: The ID of the project phase for which this entry is logged
task_id:
type: integer
description: ID of the scheduled task for which time is logged
task_name:
type: string
description: Name of the task for which time is logged
notes:
type: string
description: Additional notes about this logged time entry
LoggedTime:
title: Logged time data
allOf:
- type: object
required:
- logged_time_id
- locked
properties:
logged_time_id:
type: string
description: Unique ID of the logged time entry
locked:
type: integer
enum: [0, 1]
description: Is the logged time entry locked? (1 = true, 0 = false)
locked_date:
type: string
format: date
description: Date this logged time entry was last locked read-only
- $ref: '#/components/schemas/LoggedTimeRequest'
- $ref: '#/components/schemas/RecordTimestamps'
PersonRequest:
title: Data required to create or update a person
type: object
required:
- name
properties:
name:
type: string
maxLength: 150
description: The person's full name
email:
type: string
maxLength: 200
description: Email address for this person
job_title:
type: string
maxLength: 200
description: The person's job title
department:
$ref: '#/components/schemas/Department'
notes:
type: string
maxLength: 65535
description: Any notes related to this person
avatar_file:
type: string
maxLength: 40
description: Filename of thumbnail image for this person (read-only)
auto_email:
type: integer
minimum: 0
maximum: 1
description: Should this person's schedule be emailed at start of week? 1 = Yes, 0 = No
employee_type:
type: integer
minimum: 0
maximum: 1
description: Full-time or part-type. 1 = Full-time, 0 = Part-time
work_days_hours:
type: array
items:
type: integer
description: Hours that a part-time person is available for scheduling each day in order from Sunday to Saturday
active:
type: integer
enum: [0, 1]
description: Is this person active or archived? 1 = Active, 0 = Archived
people_type_id:
type: integer
enum: [1, 2, 3]
description: Is this person an 1 = Employee (default), 2 = Contractor, 3 = Placeholder?
tags:
type: array
items:
$ref: '#/components/schemas/PeopleTag'
start_date:
type: string
format: date
end_date:
type: string
format: date
default_hourly_rate:
type: integer
description: Default hourly rate for fee-based projects
contractor:
deprecated: true
type: integer
description: (DEPRECATED, use people_type_id instead) 1 if a contractor, 0 otherwise
non_work_days:
deprecated: true
type: array
items:
type: integer
description: (DEPRECATED, use work_days_hours instead)
Person:
title: Person data
allOf:
- type: object
required:
- people_id
properties:
people_id:
type: number
description: The unique identifier for this person
- $ref: '#/components/schemas/PersonRequest'
- $ref: '#/components/schemas/RecordTimestamps'
PeopleTag:
title: People tag data
type: object
required:
- name
properties:
name:
type: string
maxLength: 64
type:
deprecated: true
type: integer
description: (DEPRECATED) Setting the type on a tag has no effect
ClientRequest:
title: Data required to create or update a client
type: object
required:
- name
properties:
name:
type: string
maxLength: 200
description: The name of the client
Client:
title: Client data
allOf:
- type: object
required:
- client_id
properties:
client_id:
type: integer
description: The ID of this client. Read-only.
- $ref: '#/components/schemas/ClientRequest'
ProjectRequest:
title: Data required to create or update a project
type: object
required:
- name
properties:
name:
type: string
maxLength: 200
description: The name of the project
client_id:
type: integer
description: The ID of the project's client
color:
type: string
format: color
description: Project's color in hexadecimal
example: 00a1b3
notes:
type: string
description: Notes for this project
tags:
type: array
description: List of tags
items:
type: string
maxLength: 32
budget_type:
$ref: '#/components/schemas/ProjectBudgetType'
budget_per_phase:
type: integer
minimum: 0
maximum: 1
description: 1 if each phase has its own budget
budget_total:
type: string
format: decimal
description: The budget amount for Total hours or Total fee budgets
example: '5832.0000'
default_hourly_rate:
type: number
format: float
description: The default hourly rate for fee-based budgets
non_billable:
type: integer
enum: [0, 1]
description: Is this project billable? 0 = Billable, 1 = Non-billable
tentative:
type: integer
enum: [0, 1]
description: Is this project tentative? 1 = Yes, 0 = No
active:
type: integer
enum: [0, 1]
description: Is this project active or archived? 1 = Active, 0 = Archived
project_manager:
type: integer
description: Account ID of the assigned project manager. Note that this is NOT a person_id, but an account.
all_pms_schedule:
type: integer
enum: [0, 1]
description: Do all project managers have scheduling rights? 1 = Yes, 0 = No
Project:
title: Project data
allOf:
- type: object
required:
- project_id
- created
- modified
properties:
project_id:
type: integer
description: 'The ID of this project. Read-only: ignored when creating a project'
tags:
type: array
description: List of tags
items:
$ref: '#/components/schemas/ProjectTag'
- $ref: '#/components/schemas/ProjectRequest'
- $ref: '#/components/schemas/RecordTimestamps'
ProjectTag:
title: Project tag data
type: object
required:
- tag_name
- project_id
properties:
tag_name:
type: string
maxLength: 32
description: The name of the tag
project_id:
type: integer
description: The project that this tag belongs to
ProjectBudgetType:
title: Types of budget for projects
description: Is there a project budget? 1 = Total hours, 2 = Total fee, 3 = Hourly fee
type: integer
# FIXME: with OpenAPI v3.1 we can use oneOf instead of enum and support other generators
enum: [1, 2, 3]
x-enum-varnames: [totalHours, totalFee, hourlyFee]
MilestoneRequest:
title: Data for a request to create or update a milestone
type: object
required:
- name
- project_id
- date
properties:
name:
type: string
maxLength: 200
description: The name of the milestone
project_id:
type: integer
minimum: 1
description: The project that this milestone belongs to
date:
type: string
format: date
description: Start date of the milestone
end_date:
type: string
format: date
description: End date of the milestone if more than 1 day
Milestone:
title: Milestone data
allOf:
- type: object
required:
- milestone_id
properties:
milestone_id:
type: integer
description: The ID of this milestone
- $ref: '#/components/schemas/MilestoneRequest'
PhaseRequest:
title: Data for a request to create or update a project phase
type: object
required:
- project_id
- name
- start_date
- end_date
properties:
project_id:
type: integer
minimum: 1
description: The ID of the project to which this phase belongs
name:
type: string
maxLength: 200
description: The name of the phase
start_date:
type: string
format: date
description: Start date of this phase
end_date:
type: string
format: date
description: End date of this phase
color:
type: string
description: Phase's color in hexadecimal (defaults to project color)
example: 00c1a3
notes:
type: string
description: Additional notes about the phase
budget_total:
type: string
format: decimal
description: The budget amount for Total hours or Total fee budgets if this phase's project budget is per phase
example: '1500.0000'
default_hourly_rate:
type: number
description: The default hourly rate for fee-based budgets
non_billable:
type: integer
enum: [0, 1]
description: Is this phase billable? 0 = Billable, 1 = Non-billable
tentative:
type: integer
enum: [0, 1]
description: Is this phase tentative? 1 = Yes, 0 = No
active:
type: integer
enum: [0, 1]
description: Is this phase active or archived? 1 = Active, 0 = Archived
Phase:
allOf:
- type: object
required:
- phase_id
properties:
phase_id:
type: integer
description: The ID of this phase
- $ref: '#/components/schemas/PhaseRequest'
- $ref: '#/components/schemas/RecordTimestamps'
TaskRequest:
title: Data for a request to create or update a task
type: object
required:
- project_id
- start_date
- end_date
- hours
properties:
project_id:
type: integer
minimum: 1
description: The ID of the project that this task belongs to
phase_id:
type: integer
minimum: 1
description: The ID of the project phase that this task belongs to
start_date:
type: string
format: date
description: Start date of this task
end_date:
type: string
format: date
description: End date of this task
start_time:
type: string
format: time
description: Start time of this task in 24 hr format
hours:
type: number
description: Number of hours per day to spend on this task
people_id:
type: integer
description: The ID of the person assigned to this task (omit when using people_ids field)
people_ids:
type: array
items:
type: integer
minimum: 1
description: List of one or more people IDs assigned to this task (ignored if people_id is set)
status:
type: integer
enum: [1, 2, 3]
description: Status of this task. 1 = Tentative, 2 = Confirmed, 3 = Complete
priority:
type: integer
enum: [0, 1]
description: Is this task a priority? 1 = Priority, 0 = Not a priority
name:
type: string
description: Name of this task
notes:
type: string
description: Additional notes about the task
repeat_state:
type: integer
enum: [0, 1, 2, 3]
description: Frequency that this task repeats. 0 = No repeat, 1 = Weekly, 2 = Monthly, 3 = Every 2 Weeks
repeat_end_date:
type: string
format: date
description: Date that the repeating task will cease
Task:
allOf:
- type: object
required:
- task_id
properties:
task_id:
type: integer
minimum: 1
description: The ID of this task.
- $ref: '#/components/schemas/TaskRequest'
- $ref: '#/components/schemas/RecordTimestamps'
- $ref: '#/components/schemas/RecordOwnership'
TimeoffRequest:
title: Time off data
type: object
required:
- timeoff_type_id
- start_date
- end_date
- people_ids
properties:
timeoff_type_id:
type: integer
description: The ID of this time off type
start_date:
type: string
format: date
description: Start date of this time off
end_date:
type: string
format: date
description: End date of this time off
start_time:
type: string
format: time
description: Start time of this time off in 24 hr format
hours:
type: number
description: Number of hours per day for this time off. Not required when a full day
timeoff_notes:
type: string
description: Additional notes about the time off
repeat_state:
type: integer
enum: [0, 1, 2, 3]
description: Frequency that this time off repeats. 0 = No repeat, 1 = Weekly, 2 = Monthly, 3 = Every 2 Weeks
repeat_end:
type: string
format: date
description: Date that the repeating time off will cease
full_day:
type: integer
enum: [0, 1]
description: Is this time off for a full day? 1 = Yes, 0 = No
people_ids:
type: array
items:
type: integer
description: List of people IDs assigned to this time off
Timeoff:
allOf:
- type: object
required:
- timeoff_id
properties:
timeoff_id:
type: integer
description: 'The ID of this time off. Read-only: ignored when creating a time off'
- $ref: '#/components/schemas/TimeoffRequest'
- $ref: '#/components/schemas/RecordTimestamps'
- $ref: '#/components/schemas/RecordOwnership'
TimeoffTypeRequest:
title: Data for a request to create or update a time off type
type: object
required:
- timeoff_type_name
properties:
timeoff_type_name:
type: string
description: The name of this time off type
color:
type: string
format: color
description: Time off type's color in hexadecimal
example: 00c1a3
TimeoffType:
title: Time off type data
allOf:
- type: object
required:
- timeoff_type_id
- created_by
properties:
timeoff_type_id:
type: integer
description: The ID of this time off type
created_by:
type: integer
description: Account ID of person who created this time off type
- $ref: '#/components/schemas/TimeoffTypeRequest'
headers:
X-Pagination-Total-Count:
description: Total number of items
schema:
type: integer
X-Pagination-Page-Count:
description: Total number of pages
schema:
type: integer
X-Pagination-Current-Page:
description: Current page number
schema:
type: integer
X-Pagination-Per-Page:
description: Number of items per page
schema:
type: integer
parameters:
pageParameter:
name: page
in: query
required: false
description: The page number of the page of results to return
schema:
type: integer
minimum: 0
perPageParameter:
name: per-page
in: query
required: false
description: The number of items per page
schema:
type: integer
minimum: 0
@mdbenito
Copy link
Author

v7 adds (undocumented) pagination parameters for GET /logged-time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment