Projects - GetBric/API GitHub Wiki

Projects Index

  • Route: /projects
  • Method: GET
  • Allowed Fields:
    • client_id (limit projects shown by client)
    • project_type_id (limit projects shown by project_type)
  • Expected Response:
{
  "projects": [
    {
      "id": 1052037175,
      "link": "https://api.getbric.com/v1/projects/1052037175",
      "name": "Homepage Redesign",
      "code": "D-987",
      "description": "Redesign mobile homepage",
      "client": {
        "id": 1070822779,
        "link": "https://api.getbric.com/v1/clients/1070822779",
        "name": "Google"
      },
      "project_type": {
        "id": 36,
        "link": "https://api.getbric.com/v1/project_types/36",
        "name": "Development",
        "billable": true
      },
      "plans": [
        {
          "status": "active",
          "start_date": "2016-03-13",
          "billing_mode": "Billable",
          "projected_revenue": "1000.0",
          "actual_revenue": "500.0"
        }
      ],
      "project_times": [],
      "created_at": "2016-01-20T13:13:31.612-05:00",
      "updated_at": "2016-03-08T15:30:55.860-05:00"
    },
    {
      "id": 1052037188,
      "link": "https://api.getbric.com/v1/projects/1052037188",
      "name": "Oracle Network",
      "code": "N-432",
      "description": "network troubleshooting",
      "client": {
        "id": 1070822794,
        "link": "https://api.getbric.com/v1/clients/1070822794",
        "name": "Yahoo"
      },
      "project_type": {
        "id": 56,
        "link": "https://api.getbric.com/v1/project_types/56",
        "name": "Network Administration",
        "billable": true
      },
      "plans": [],
      "project_times": [
        {
          "id": 209,
          "link": "https://api.getbric.com/v1/project_times/209",
          "person_id": 1062390216,
          "person_role_id": 1018350795,
          "minutes": 4,
          "day": "2016-03-23"
        }
      ],
      "created_at": "2016-03-08T16:24:57.868-05:00",
      "updated_at": "2016-03-08T16:24:57.868-05:00"
    }
  ]
}

Project Create

  • Route: /projects
  • Method: POST
  • Required Fields:
    • name
    • client_id
  • Allowed Fields:
    • code
    • description
    • project_type_id
  • Expected Response:
{
  "projects": {
    "id": 1052037202,
    "link": "https://api.getbric.com/v1/projects/1052037202",
    "name": "Fall Ad Campaign",
    "code": "D-432",
    "description": "2 TV spots, 1 Radio spot",
    "client": {
      "id": 1070822799,
      "link": "https://api.getbric.com/v1/clients/1070822799",
      "name": "MLB.com"
    },
    "project_type": {
      "id": 50,
      "link": "https://api.getbric.com/v1/project_types/50",
      "name": "Advertising",
      "billable": true
    },
    "plans": [],
    "project_times": [],
    "created_at": "2016-04-15T13:24:30.209-04:00",
    "updated_at": "2016-04-15T13:24:30.209-04:00"
  }
}

Project Show

  • Route: /projects/id
  • Method: GET
  • Expected Response:
{
  "projects": {
    "id": 1052037185,
    "link": "https://api.getbric.com/v1/projects/1052037185",
    "name": "Homepage Redesign",
    "code": "D-989",
    "description": "redesign mobile homepage",
    "client": {
      "id": 1070822778,
      "link": "https://api.getbric.com/v1/clients/1070822778",
      "name": "Yahoo"
    },
    "project_type": {
      "id": 36,
      "link": "https://api.getbric.com/v1/project_types/36",
      "name": "Development",
      "billable": true
    },
    "plans": [
      {
        "status": "active",
        "start_date": "2016-01-31",
        "end_date": "2016-02-12",
        "billing_mode": "Billable",
        "projected_revenue": "1210.0",
        "actual_revenue": "206.25"
      }
    ],
    "project_times": [
      {
        "id": 209,
        "link": "https://api.getbric.com/v1/project_times/209",
        "person_id": 1062390216,
        "person_role_id": 1018350795,
        "minutes": 4,
        "day": "2016-03-23"
      },
      {
        "id": 201,
        "link": "https://api.getbric.com/v1/project_times/201",
        "person_id": 1062390216,
        "person_role_id": 1018350795,
        "minutes": 4,
        "day": "2016-03-11"
      }
    ],
    "created_at": "2016-01-28T14:51:53.367-05:00",
    "updated_at": "2016-04-12T14:43:09.757-04:00"
  }
}

Project Update

  • Route: /projects/id
  • Method: PATCH
  • Allowed Fields:
    • name
    • client_id
    • code
    • description
    • project_type_id
  • Expected Response:
{
  "projects": {
    "id": 1052037185,
    "link": "https://api.getbric.com/v1/projects/1052037185",
    "name": "Homepage Redesign",
    "code": "D-989",
    "description": "mobile homepage design",
    "client": {
      "id": 1070822778,
      "link": "https://api.getbric.com/v1/clients/1070822778",
      "name": "Yahoo"
    },
     "project_type": {
      "id": 36,
      "link": "https://api.getbric.com/v1/project_types/36",
      "name": "Development",
      "billable": true
    },
    "plans": [
      {
        "status": "active",
        "start_date": "2016-01-31",
        "end_date": "2016-02-12",
        "billing_mode": "Billable",
        "projected_revenue": "1210.0",
        "actual_revenue": "206.25"
      }
    ],
    "project_times": [
      {
        "id": 209,
        "link": "https://api.getbric.com/v1/project_times/209",
        "person_id": 1062390216,
        "person_role_id": 1018350795,
        "minutes": 4,
        "day": "2016-03-23"
      },
      {
        "id": 201,
        "link": "https://api.getbric.com/v1/project_times/201",
        "person_id": 1062390216,
        "person_role_id": 1018350795,
        "minutes": 4,
        "day": "2016-03-11"
      }
    ],
    "created_at": "2016-01-28T14:51:53.367-05:00",
    "updated_at": "2016-04-15T15:34:18.643-04:00"
  }
}

Project Destroy

  • Route: /projects/id
  • Method: DELETE
  • Expected Response:
{
  "projects": {
    "id": 1052037185,
    "link": "https://api.getbric.com/v1/projects/1052037185",
    "name": "Homepage Redesign",
    "code": "D-989",
    "description": "mobile homepage design",
    "client": {
      "id": 1070822778,
      "link": "https://api.getbric.com/v1/clients/1070822778",
      "name": "Yahoo"
    },
     "project_type": {
      "id": 36,
      "link": "https://api.getbric.com/v1/project_types/36",
      "name": "Development",
      "billable": true
    },
    "plans": [
      {
        "status": "active",
        "start_date": "2016-01-31",
        "end_date": "2016-02-12",
        "billing_mode": "Billable",
        "projected_revenue": "1210.0",
        "actual_revenue": "206.25"
      }
    ],
    "project_times": [
      {
        "id": 209,
        "link": "https://api.getbric.com/v1/project_times/209",
        "person_id": 1062390216,
        "person_role_id": 1018350795,
        "minutes": 4,
        "day": "2016-03-23"
      },
      {
        "id": 201,
        "link": "https://api.getbric.com/v1/project_times/201",
        "person_id": 1062390216,
        "person_role_id": 1018350795,
        "minutes": 4,
        "day": "2016-03-11"
      }
    ],
    "created_at": "2016-01-28T14:51:53.367-05:00",
    "updated_at": "2016-04-15T15:34:18.643-04:00"
  }
}