Check XML Expression from Library Entity ======================================== .. code-block:: http /api/repositories/{repository}/library/entities/{libraryID}/checkxmlexpressionfromentity .. csv-table:: :header: Parameter, Type, Purpose :widths: 20, 20, 60 :stub-columns: 1 repository, string, The name of the :doc:`repository` to access libraryID, int, The ID of the library entity Post ~~~~ .. http:post:: /api/repositories/(string:repository)/library/entities/(int:libraryID)/checkxmlexpressionfromentity :synopsis: Validate an expression against an entity .. code-block:: http POST /api/repositories/jupiter/library/entities/2/checkxmlexpressionfromentity HTTP/1.1 Content-Type: application/json { "entity": "2", "expression": "'Bank Name'" } The message body is a JSON string containing two key-value pairs: the first, ``ENTITY``, is the :doc:`entity` ID to check against; the second, ``expression``, is the expression to check. .. csv-table:: :header: Response Code, Reason :widths: 25, 75 200, Success 500, Server error A successful response contains the expression transformed into XML. The request above would result in the following response: .. code-block:: http HTTP/1.1 200 OK Content-type: text/xml 'Bank Name' Bank Name If an attribute referenced in the expression doesn't exist in the :doc:`entity`, the reponse will be: .. code-block:: http HTTP/1.1 200 ok Content-type: text/xml unrecognized variable 'Bank Name'