Library Rule Groups =================== .. code-block:: http /api/repositories/{repository}/rulegroups .. csv-table:: :header: Parameter, Type, Purpose :widths: 20, 20, 60 :stub-columns: 1 repository, string, the name of the :doc:`repository` .. _lrg_show: Get ~~~ .. http:get:: /api/repositories/(string:repository)/rulegroups :synopsis: List all library rule groups in a repository Returns a list of all library rule groups in a :doc:`repository` .. code-block:: http GET /api/repositories/jupiter/rulegroups HTTP/1.1 Accept: application/json .. csv-table:: :header: Response Code, Reason :widths: 25, 75 200, No error The response will be a :doc:`standard-response`. The columns displayed for each :doc:`libraryentity` are: .. csv-table:: :header: Human Name, Column Name, Description :widths: 25, 25, 50 "Name", "name", "The name for the library rule group" "Description", "description", "Description of the library rule group" "Folder ID", "fid", "Rule Group Identifier" "Parent Folder ID", "parent_eid", "Rule Group Identifier of the parent rule group" The ``rows`` array will contain one element for each :doc:`rulegroup`: .. code-block:: json { "dataRow": [ "rulegroup1", "My rule group", "1", "0", ], "metadata": { "url": "/api/repositories/jupiter/rulegroups/1" } } If there are no library rule groups, the 'rows' value will be an empty array. Commands ~~~~~~~~ .. http:post:: /api/repositories/(string:repository)/rulegroups :synopsis: Associate/Disassociate/Promote a real entity to/from library entity Add a library rule group :jsonparam body: The request body .. code-block:: http POST /api/repositories/jupiter/rulegroups HTTP/1.1 Content-Type: application/json { "command": "add", "data": { "name": "rulegp3", "description": "new rule group", "folderID": "1" } } .. csv-table:: :header: Response Code, Reason :widths: 25, 75 204, No error 400, Invalid data passed with request 500, Server error The request requires a :doc:`standard-request` packet. Available commands are: .. csv-table:: :header: Command, Description :widths: 30, 70 add, Add new library rule group The request packet must contain the ``command`` and ``data`` elements. The ``options`` element is not required. The ``name`` and ``folderID`` fields are required. ``description`` field is optional. ``folderID`` is the ID of the parent folder where the new rule group is to be created.