Work Periods
No description given.
Endpoints
- get /api/v3/workflow/work_periods
- get /api/v3/workflow/work_periods/:resource_id
- post /api/v3/workflow/work_periods/start
get/api/v3/workflow/work_periods
Return a paginated list of work_periods
Input Schema
object
page?:
object
The page number, default to 1
number?: integer
The number of items per page, default to 1000
size?: integer
The sort order, comma separated list of fields. See sorting section for more details
sort?: string
Set to true to return the total number of items in the collection
count?: boolean
filter?:
object
id?: unknown
started_at?: unknown
ended_at?: unknown
project_id?: unknown
account_id?: unknown
activity_id?: unknown
details?: unknown
billable?: unknown
productive?: unknown
project_id?: unknown
activity_id?: unknown
started_at__gte?: unknown
started_at__lte?: unknown
ended_at__gte?: unknown
ended_at__lte?: unknown
with_null_project?: unknown
The related resources to include in the response. Allowed resources are:
- `project`
- `activity`
included?: - `project`
- `activity`
array
Elements: string
The fields to include in the response.
The key is the resource type and the value is an array of fields.
fields?: The key is the resource type and the value is an array of fields.
dictionary
Values: array
Typescript
type InputSchema = {
page?: {
// The page number, default to 1
number?: number;
// The number of items per page, default to 1000
size?: number;
};
// The sort order, comma separated list of fields. See sorting section for more details
sort?: string;
// Set to true to return the total number of items in the collection
count?: boolean;
filter?: {
id?: any;
started_at?: any;
ended_at?: any;
project_id?: any;
account_id?: any;
activity_id?: any;
details?: any;
billable?: any;
productive?: any;
project_id?: any;
activity_id?: any;
started_at__gte?: any;
started_at__lte?: any;
ended_at__gte?: any;
ended_at__lte?: any;
with_null_project?: any;
};
// The related resources to include in the response. Allowed resources are:
// - `project`
// - `activity`
included?: Array<string>;
// The fields to include in the response.
// The key is the resource type and the value is an array of fields.
fields?: { [key: string]: Array<any> };
};
Output Schema
object
data:
array
Elements:
object
type: string
id?: string
attributes?:
object
id?: integer
started_at?: datetime
ended_at?: datetime
account_id?: integer
activity_id?: integer
details?: string
billable?: boolean
productive?: boolean
relationships?: open struct
included?:
array
Elements: open struct
Typescript
type OutputSchema = {
data: Array<{
type: string;
id?: string;
attributes?: {
id?: number;
started_at?: Date;
ended_at?: Date;
account_id?: number;
activity_id?: number;
details?: string;
billable?: boolean;
productive?: boolean;
};
relationships?: Record<string, any>;
}>;
included?: Array<Record<string, any>>;
};
get/api/v3/workflow/work_periods/:resource_id
Show a specific work_periods
Input Schema
object
resource_id: integer
included?:
array
Elements: string
fields?:
dictionary
Values: array
Typescript
type InputSchema = {
resource_id: number;
included?: Array<string>;
fields?: { [key: string]: Array<any> };
};
Output Schema
object
data:
object
type: string
id?: string
attributes?:
object
id?: integer
started_at?: datetime
ended_at?: datetime
account_id?: integer
activity_id?: integer
details?: string
billable?: boolean
productive?: boolean
relationships?: open struct
included?:
array
Elements: open struct
Typescript
type OutputSchema = {
data: {
type: string;
id?: string;
attributes?: {
id?: number;
started_at?: Date;
ended_at?: Date;
account_id?: number;
activity_id?: number;
details?: string;
billable?: boolean;
productive?: boolean;
};
relationships?: Record<string, any>;
};
included?: Array<Record<string, any>>;
};
post/api/v3/workflow/work_periods/start
start a time period of work, on a specific activity or project.
Input Schema
object
data:
object
attributes:
object
activity_id?: integer
project_id?: integer
billable?: boolean
details?: string
Typescript
type InputSchema = {
data: {
attributes: {
activity_id?: number;
project_id?: number;
billable?: boolean;
details?: string;
};
};
};