API Documentation

API Endpoint

Widgets

Widgets

Supported filter params

  • dashboard_id (array)
GET /api/v2/widgets
Requestsreturns widgets

GET  /api/v2/widgets

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": [
    {
      "id": "1",
      "type": "widgets",
      "attributes": {
        "widget_type_id": 1,
        "default_filter_id": null,
        "width": 2,
        "height": 2,
        "row_position": 0,
        "column_position": 0,
        "report_layout_id": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 706
          }
        },
        "dashboard": {
          "data": {
            "type": "dashboards",
            "id": "19"
          }
        }
      }
    },
    {
      "id": "2",
      "type": "widgets",
      "attributes": {
        "widget_type_id": 1,
        "default_filter_id": null,
        "width": 2,
        "height": 2,
        "row_position": 0,
        "column_position": 0,
        "report_layout_id": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 706
          }
        },
        "dashboard": {
          "data": {
            "type": "dashboards",
            "id": "19"
          }
        }
      }
    },
    {
      "id": "3",
      "type": "widgets",
      "attributes": {
        "widget_type_id": 1,
        "default_filter_id": null,
        "width": 2,
        "height": 2,
        "row_position": 0,
        "column_position": 0,
        "report_layout_id": null
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 706
          }
        },
        "dashboard": {
          "data": {
            "type": "dashboards",
            "id": "19"
          }
        }
      }
    }
  ],
  "included": [
    {
      "id": "19",
      "type": "dashboards",
      "attributes": {
        "name": "dashboard_name"
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 706
          }
        },
        "person": {
          "data": {
            "type": "people",
            "id": "1910"
          }
        }
      }
    },
    {
      "id": "1910",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user1863@email.com",
        "title": null,
        "joined_at": "2020-08-11T01:06:23.000+02:00",
        "last_seen_at": "2020-08-11T01:06:23.206+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:06:23.155+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 706
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "2637"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "2637",
      "type": "companies",
      "attributes": {
        "name": "Organization706",
        "default_currency": "USD",
        "created_at": "2020-08-11T01:06:23.154+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 706
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "links": {
    "first": "http://www.example.com/api/v2/widgets?page%5Bnumber%5D=1&page%5Bsize%5D=30",
    "last": "http://www.example.com/api/v2/widgets?page%5Bnumber%5D=1&page%5Bsize%5D=30"
  },
  "meta": {
    "current_page": 1,
    "total_pages": 1,
    "total_count": 3,
    "page_size": 30,
    "max_page_size": 200,
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      }
    }
  }
}

Get all widgets
GET/api/v2/widgets


GET /api/v2/widgets/4
Requestsreturns widget

GET  /api/v2/widgets/4

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "4",
    "type": "widgets",
    "attributes": {
      "widget_type_id": 1,
      "default_filter_id": null,
      "width": 2,
      "height": 2,
      "row_position": 0,
      "column_position": 0,
      "report_layout_id": null
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 707
        }
      },
      "dashboard": {
        "data": {
          "type": "dashboards",
          "id": "20"
        }
      }
    }
  },
  "included": [
    {
      "id": "20",
      "type": "dashboards",
      "attributes": {
        "name": "dashboard_name"
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 707
          }
        },
        "person": {
          "data": {
            "type": "people",
            "id": "1911"
          }
        }
      }
    },
    {
      "id": "1911",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user1864@email.com",
        "title": null,
        "joined_at": "2020-08-11T01:06:23.000+02:00",
        "last_seen_at": "2020-08-11T01:06:23.300+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:06:23.268+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 707
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "2638"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "2638",
      "type": "companies",
      "attributes": {
        "name": "Organization707",
        "default_currency": "USD",
        "created_at": "2020-08-11T01:06:23.266+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 707
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      }
    }
  }
}

Get a widget
GET/api/v2/widgets/{id}

URI Parameters
HideShow
id
number (required) Example: 4

POST /api/v2/widgets
Requestscreates a widgetcreates a widgetreturns error

POST  /api/v2/widgets

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "widgets",
    "attributes": {
      "width": 2,
      "height": 2,
      "row_position": 2,
      "column_position": 2,
      "widget_type_id": 1
    },
    "relationships": {
      "dashboard": {
        "data": {
          "type": "dashboards",
          "id": "21"
        }
      }
    }
  }
}
Responses201
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "6",
    "type": "widgets",
    "attributes": {
      "widget_type_id": 1,
      "default_filter_id": null,
      "width": 2,
      "height": 2,
      "row_position": 2,
      "column_position": 2,
      "report_layout_id": null
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 708
        }
      },
      "dashboard": {
        "data": {
          "type": "dashboards",
          "id": "21"
        }
      }
    }
  },
  "included": [
    {
      "id": "21",
      "type": "dashboards",
      "attributes": {
        "name": "dashboard_name"
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 708
          }
        },
        "person": {
          "data": {
            "type": "people",
            "id": "1912"
          }
        }
      }
    },
    {
      "id": "1912",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user1865@email.com",
        "title": null,
        "joined_at": "2020-08-11T01:06:23.000+02:00",
        "last_seen_at": "2020-08-11T01:06:23.390+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:06:23.358+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 708
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "2639"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "2639",
      "type": "companies",
      "attributes": {
        "name": "Organization708",
        "default_currency": "USD",
        "created_at": "2020-08-11T01:06:23.356+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 708
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      }
    }
  }
}

POST  /api/v2/widgets

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "widgets",
    "attributes": {
      "width": 2,
      "height": 2,
      "row_position": 2,
      "column_position": 2,
      "widget_type_id": 1
    },
    "relationships": {
      "dashboard": {
        "data": {
          "type": "dashboards",
          "id": "0"
        }
      }
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "attribute is invalid",
      "source": {
        "pointer": "data/attributes/dashboard"
      }
    }
  ]
}

POST  /api/v2/widgets

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "type": "widgets",
  "attributes": {
    "width": "",
    "height": ""
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/height"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "is not a number",
      "source": {
        "pointer": "data/attributes/height"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/width"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "is not a number",
      "source": {
        "pointer": "data/attributes/width"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/widget_type"
      }
    },
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/dashboard"
      }
    }
  ]
}

Create a widget
POST/api/v2/widgets

URI Parameters
HideShow
column
number (required) Example: 1

column

row
number (required) Example: 1

row

height
number (required) Example: 1

height

width
number (required) Example: 1

width

widget_type_id
number (required) Example: 1

widget type id

dashboard_id
number (required) Example: 1

dashboard id


PATCH /api/v2/widgets/1
Requestsupdates widgetreturns error

PATCH  /api/v2/widgets/9

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "widgets",
    "attributes": {
      "row_position": 5
    }
  }
}
Responses200
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "data": {
    "id": "9",
    "type": "widgets",
    "attributes": {
      "widget_type_id": 1,
      "default_filter_id": null,
      "width": 2,
      "height": 2,
      "row_position": 5,
      "column_position": 0,
      "report_layout_id": null
    },
    "relationships": {
      "organization": {
        "data": {
          "type": "organizations",
          "id": 711
        }
      },
      "dashboard": {
        "data": {
          "type": "dashboards",
          "id": "24"
        }
      }
    }
  },
  "included": [
    {
      "id": "24",
      "type": "dashboards",
      "attributes": {
        "name": "dashboard_name"
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 711
          }
        },
        "person": {
          "data": {
            "type": "people",
            "id": "1915"
          }
        }
      }
    },
    {
      "id": "1915",
      "type": "people",
      "attributes": {
        "first_name": "test first name",
        "last_name": "test last name",
        "email": "user1868@email.com",
        "title": null,
        "joined_at": "2020-08-11T01:06:23.000+02:00",
        "last_seen_at": "2020-08-11T01:06:23.640+02:00",
        "deactivated_at": null,
        "archived_at": null,
        "role_id": 1,
        "invited_at": null,
        "is_user": true,
        "tag_list": [],
        "avatar_url": null,
        "virtual": false,
        "custom_fields": null,
        "autotracking": false,
        "created_at": "2020-08-11T01:06:23.607+02:00",
        "placeholder": false,
        "color_id": null,
        "private_custom_reports_used": 0
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 711
          }
        },
        "company": {
          "data": {
            "type": "companies",
            "id": "2642"
          }
        },
        "subsidiary": {
          "data": null
        }
      }
    },
    {
      "id": "2642",
      "type": "companies",
      "attributes": {
        "name": "Organization711",
        "default_currency": "USD",
        "created_at": "2020-08-11T01:06:23.606+02:00",
        "archived_at": null,
        "avatar_url": null,
        "invoice_email_recipients": {},
        "custom_fields": null,
        "description": null,
        "due_days": null,
        "tag_list": []
      },
      "relationships": {
        "organization": {
          "data": {
            "type": "organizations",
            "id": 711
          }
        },
        "bill_to": {
          "data": null
        }
      }
    }
  ],
  "meta": {
    "organization_features": {
      "custom_fields": {
        "type": "metered",
        "limit": 15,
        "used": 0
      },
      "custom_fields_per_project": {
        "type": "metered",
        "limit": 10,
        "used": 0
      },
      "public_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "private_custom_reports": {
        "type": "metered",
        "limit": 30,
        "used": 0
      },
      "scheduling_placeholders": {
        "type": "metered",
        "limit": 5,
        "used": 0
      },
      "multigrouping": {
        "type": "switch",
        "available": true
      },
      "client_access_to_budgets": {
        "type": "switch",
        "available": true
      },
      "subsidiaries": {
        "type": "switch",
        "available": true
      },
      "time_approvals": {
        "type": "switch",
        "available": true
      },
      "expenses_approvals": {
        "type": "switch",
        "available": true
      },
      "timeoff_approvals": {
        "type": "switch",
        "available": true
      },
      "autotracking": {
        "type": "switch",
        "available": true
      },
      "forecasting": {
        "type": "switch",
        "available": true
      },
      "webhooks": {
        "type": "switch",
        "available": true
      },
      "table_pivoting": {
        "type": "switch",
        "available": true
      },
      "formula_fields": {
        "type": "switch",
        "available": true
      },
      "single_sign_on": {
        "type": "switch",
        "available": true
      }
    }
  }
}

PATCH  /api/v2/widgets/10

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
  "data": {
    "type": "widgets",
    "attributes": {
      "row_position": ""
    }
  }
}
Responses422
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
  "errors": [
    {
      "status": "422",
      "code": "invalid_attribute",
      "title": "Invalid Attribute",
      "detail": "can't be blank",
      "source": {
        "pointer": "data/attributes/row_position"
      }
    }
  ]
}

Update a widget
PATCH/api/v2/widgets/{id}

URI Parameters
HideShow
id
number (required) Example: 1

widget id


DELETE /api/v2/widgets/1
Requestsdeletes widget

DELETE  /api/v2/widgets/11

Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Responses204
This response has no content.

Deletes a widget
DELETE/api/v2/widgets/{id}

URI Parameters
HideShow
id
number (required) Example: 1

widget id


Generated by aglio on 10 Aug 2020