Work Periods

No description given.

Endpoints

get /api/v3/workflow/work_periods get /api/v3/workflow/work_periods/:resource_id patch /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 workflow/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
is_updated?: unknown
read_only?: unknown
project_id?: unknown
activity_id?: unknown
started_at__gte?: unknown
started_at__lte?: unknown
ended_at__gte?: unknown
ended_at__lte?: unknown
related_to_project_id?: unknown
activity_id__exists?: unknown
The related resources to include in the response. Allowed resources are:
- `project`
- `activity`
- `activity.work_unit`
included?:
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?:
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;
    is_updated?: any;
    read_only?: any;
    project_id?: any;
    activity_id?: any;
    started_at__gte?: any;
    started_at__lte?: any;
    ended_at__gte?: any;
    ended_at__lte?: any;
    related_to_project_id?: any;
    activity_id__exists?: any;
  };
  // The related resources to include in the response. Allowed resources are:
  // - `project`
  // - `activity`
  // - `activity.work_unit`
  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
is_updated?: boolean
read_only?: 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;
      is_updated?: boolean;
      read_only?: boolean;
    };
    relationships?: Record<string, any>;
  }>;
  included?: Array<Record<string, any>>;
};


get/api/v3/workflow/work_periods/:resource_id

Show a specific workflow/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
is_updated?: boolean
read_only?: 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;
      is_updated?: boolean;
      read_only?: boolean;
    };
    relationships?: Record<string, any>;
  };
  included?: Array<Record<string, any>>;
};


patch/api/v3/workflow/work_periods/:resource_id

Update a workflow/work_periods

Input Schema

object
resource_id: integer
data:
object
type: string
attributes:
object
id?: integer
started_at?: datetime
ended_at?: datetime
account_id?: integer
details?: string
billable?: boolean
read_only?: boolean

Typescript

type InputSchema = {
  resource_id: number;
  data: {
    type: string;
    attributes: {
      id?: number;
      started_at?: Date;
      ended_at?: Date;
      account_id?: number;
      details?: string;
      billable?: boolean;
      read_only?: boolean;
    };
  };
};


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;
    };
  };
};