Groups ================================================= Note: Every endpoint listed in this document is managing JSON objects, so the path structure shown for nested keys is represented in a JSON-style access pattern. Root Path: ``/groups/`` Model ------------------------------------------------------ .. list-table:: API endpoint for managing group properties. :widths: 15 5 5 75 :header-rows: 1 :class: table-striped table-bordered table-hover * - Key - Type - Default - Description * - name - string - - * - group_type - string - - * - description - string - - * - parent - string - - * - members - []string - [] - * - managers - []string - [] - List ---- Return a list of this collection's items, matching the filter parameters if provided. HTTP Verb: ``GET`` Endpoint: ``/api/v1/groups/`` Example Request (cURL):: curl -X GET -H "App-Token: [APP_TOKEN]" -H "Token: [TOKEN]" -H "Content-Type: application/json" https://.enfixlp.com/api/v1/groups/ Example Response:: [ { "managers": [], "name": "Heavy Equipment Drivers", "parent": "", "members": [], "group_type": "", "description": "" } ] Get One ------- Return the specified collection item. HTTP Verb: ``GET`` Endpoint: ``/api/v1/groups/[id]`` Example Request (cURL):: curl -X GET -H "App-Token: [APP_TOKEN]" -H "Token: [TOKEN]" -H "Content-Type: application/json" https://.enfixlp.com/api/v1/groups/[id] Example Response:: { "managers": [], "name": "Heavy Equipment Drivers", "parent": "", "members": [], "group_type": "", "description": "" } Create ------ Store a new instance of the object in the system. All required fields must be specified. HTTP Verb: ``POST`` Endpoint: ``/api/v1/groups/`` Example Request (cURL):: curl -X POST -H "App-Token: [APP_TOKEN]" -H "Token: [TOKEN]" -H "Content-Type: application/json" -d '{"managers": [], "name": "Heavy Equipment Drivers", "parent": "", "members": [], "group_type": "", "description": ""}' https://.enfixlp.com/api/v1/groups/ Example Response:: { "resource_url": "https://.enfixlp.com/api/v1/groups/51b1e78dbd7a844089b652a9/", "_id": "51b1e78dbd7a844089b652a9" } Replace ------- This is a full model replacement of the specified item, every required field must be specified. HTTP Verb: ``PUT`` Endpoint: ``/api/v1/groups/[id]`` Example Request (cURL):: curl -X PUT -H "App-Token: [APP_TOKEN]" -H "Token: [TOKEN]" -H "Content-Type: application/json" -d '{"managers": [], "name": "Heavy Equipment Drivers", "parent": "", "members": [], "group_type": "", "description": ""}' https://.enfixlp.com/api/v1/groups/[id] Example Response:: No body, Status Code 204. Update ------ On an update, you may specify only the fields you wish to update. All other fields will be preserved as currently stored. HTTP Verb: ``PATCH`` Endpoint: ``/api/v1/groups/[id]`` Example Request (cURL):: curl -X PUT -H "App-Token: [APP_TOKEN]" -H "Token: [TOKEN]" -H "Content-Type: application/json" -d '{"managers": []}' https://.enfixlp.com/api/v1/groups/[id] Example Response:: No body, Status Code 204. Delete ------ Permanently remove an item from the collection. HTTP Verb: ``DELETE`` Endpoint: ``/api/v1/groups/[id]`` Example Request (cURL):: curl -X DELETE -H "App-Token: [APP_TOKEN]" -H "Token: [TOKEN]" -H "Content-Type: application/json" https://.enfixlp.com/api/v1/groups/[id] Example Response:: No body, Status Code 200.