Cost Centers

Attributes

  • id uuid

    the unique ID of the cost center.

  • name string

    The name of the cost center.

Endpoints

List Cost Centers

get /api/cost_centers

Get the cost renters from the PPG database and return a JSON response.

Arguments

  • name string

    The name of the cost center.

  • limit integer

    A limit on the number of objects to be returned. Limit can range between 1 and 1000.

    Default value: 250

  • page integer

    Page-numbering is based on the value of the "limit" argument. If limit=20, then page=0 will display the hits from 1 to 20. (Page numbers are zero-based.) Using page without a limit returns all items.

  • countOnly boolean

    When "true", will only return a count of the amount of items in the query.

    Default value: false

Request with curl
curl "http://[Your IP] /api/cost_centers" \ -X get \ -H "Content-Type: application/json" \ -H "Authorization: Bearer [Your JWT Access Token]"
Example Response
{ "cost_centers": [{ "id": " uuid ", "name": " string ", }] }] }

Show Cost Center

get /api/cost_centers/[id]

Get a single cost center from the PPG database and return a JSON response.

Request with curl
curl "http://[Your IP] /api/cost_centers/[id]" \ -X get \ -H "Content-Type: application/json" \ -H "Authorization: Bearer [Your JWT Access Token]"
Example Response
{ "cost_center": { "id": uuid , "name": " string " , } }