Library Entity Attributes ========================= .. code-block:: http /api/repositories/(string:repository)/library/entities/(int:libraryID)/attributes .. csv-table:: :header: Parameter, Type, Purpose :widths: 20, 20, 60 :stub-columns: 1 repository, string, The :doc:`repository` name library, int, The :doc:`library ` ID .. _lea_show_all: Show ~~~~ .. http:get:: /api/repositories/(string:repository)/library/entities/(int:libraryID)/attributes :synopsis: List attributes in a library entity Get a list of all attributes for :doc:`libraryentity`. The GET request supports page and pageSize parameters on the URL. If you require a subset of this data (filtering, sorting, or columns), POST to this url with the :doc:`standard request ` body. .. code-block:: http GET /api/repositories/jupiter/library/entities/1/attributes HTTP/1.1 Accept: application/json .. csv-table:: :header: Response Code, Reason :widths: 25, 75 200, Success 500, Server error The response will be a :doc:`standard-response`, with a list of the attributes in the :doc:`libraryentity`. The ``columns`` array will contain a list of the columns for each row: .. csv-table:: :header: Human Name, Column Name, Description :widths: 25, 25, 50 "ID", "model_entity_id", "Internal entity reference" "ID", "model_attribute_id", "Internal entity reference" "Name", "name", "The schema name for the library entity" "Description", "description", "Business Description" "Attributes Used", "attr_used", "Boolean flag to show if the attribute is used" "Created By", "CREATED_BY", "User who created the attribute" "Date Created", "_created_date", "When the attribute was created" "Edited By", "EDITED_BY", "The user who last edited the attribute" "Edited Date", "_edited_date", "When the attribute was last edited" Each data row contains the data for a single attribute; the metadata contains the URL to drill-down to the attribute: .. code-block:: json { "dataRow": [ "2", "1", "Sales Person", "", "bob", "2014/11/13 11:55:01", "bob", "2014/11/13 11:55:01" ], "metadata": { "url": "/api/repositories/jupiter/library/entities/2/attributes/1" } } .. _lea_show_some: Show Some ~~~~~~~~~ .. http:post:: /api/repositories/(string:repository)/library/entities/(int:libraryID)/attributes :synopsis: List attributes in a library entity matching certain criteria Get a list of all attributes for :doc:`libraryentity` that match various criteria :jsonparam body: The request body .. code-block:: http POST /api/repositories/jupiter/library/entities/1/attributes HTTP/1.1 Content-Type: application/json { "command": "get", "options": { "where": "Name = \"Status\"" } } The request requires a :doc:`standard-request` packet. see the :ref:`get command ` for the contents of the request.. The response will contain a list of library entity attributes matching the given criteria. .. _lea_add: Add ~~~ .. http:post:: /api/repositories/(string:repository)/library/entities/(int:libraryID)/attributes :synopsis: Add an attribute to the library Adds 1 or more attributes to the library. :jsonparam body: The request body The request requires a :doc:`standard-request` packet. .. code-block:: http POST /api/repositories/test/library/entities/1/attributes { "command": "add", "data": [ { "name": "newattr1", "description": "a new attribute" }, { "name": "newattr2", "description": "another new attribute" } ] } .. csv-table:: :header: Response Code, Reason :widths: 25, 75 200, Success 500, Server error