Dependency Conflicts ==================== .. code-block:: http /api/repositories/{repository}/entities/{entity}/rows/conflictdependencies .. csv-table:: :header: Parameter, Type, Purpose :widths: 20, 20, 60 :stub-columns: 1 repository, string, the name of the :doc:`repository` entity, int, The ID of the entity to view .. http:post:: /api/repositories/(string:repository)/entities/(int:entity)/rows/conflictdependencies :synopsis: Lists conflict dependencies in a real entity Lists conflict dependencies in a real :doc:`entity` :jsonparam body: The request body .. code-block:: http POST /api/repositories/jupiter/entities/1/rows/conflictdependencies HTTP/1.1 Content-Type: application/json { "command": "get", "attribute": ["Account_id", "Attr21"], "values": ["71621", ""] } .. csv-table:: :header: Response Code, Reason :widths: 25, 75 200, No error 400, Invalid data passed with request 500, Server error The request requires a :doc:`standard-request` packet. The request packet must contain the ``attribute`` and ``values`` elements. ``attribute`` element should contain an array of all the right hand attribute names for the dependency conflict. The ``values`` field should contain an array of values corresponding to each attribute. The response will be a :doc:`standard-response`, with a list of dependency conflict in the corresponding :doc:`entity` that matches the parameters passed. The ``columns`` array will contain the list of columns for each data row. The first element is :row ID:. The remaining elements are the :doc:`attributes` of the entity. data row will contain the list of permanent duplicate keys of the corresponding :doc:`entity`: .. code-block:: json "rows": [ { "dataRow": [ "624", "71621", "A00938", "610", "", "", "", "", "", "", "R", "C", "", "", "Sir Roderick Ruggles", "", "2222977047548610", "19-Mar-2004", "06-Feb-1992", "", "", "" ], "metadata": { "url": "/api/repositories/alpha/entities/1/rows/624/details" } }, { "dataRow": [ "625", "71621", "A00288", "508", "", "", "", "", "", "", "R", "A", "NatEast Bank", "35830779", "Dr Rosemary Teare", "60-38-48", "", "07-Oct-1902", "06-Feb-1992", "", "", "" ], "metadata": { "url": "/api/repositories/alpha/entities/1/rows/625/details" } } ] If there are no dependency conflict in the :doc:`entity`, ``rows`` will be an empty string. Export ~~~~~~~ Some or all of the rows may be exported as a scheduled task. .. code-block:: http POST /api/repositories/jupiter/entities/1/rows/conflictdependencies HTTP/1.1 Content-Type: application/json { "command": "export", "attribute": ["Account_id", "Attr21"], "values": ["71621", ""], "data": { "filename": "filename.csv", "filetype": "csv", "encoding": "utf-8" }, "options": { "where": "Row = 21" } } .. csv-table:: :header: Response Code, Reason :widths: 25, 75 200, No error 400, Invalid data passed with request 500, Server error The request packet must contain the ``command`` and ``data`` elements. The ``options`` element is not required, but may specify the columns to export, and/or the rows to filter. The following table shows which fields are required in the ``data`` element: .. csv-table:: :header: Field, Required :widths: 20, 10 filename, Y filetype, N encoding, N If ``filetype`` is not specified, it defaults to csv. If ``encoding`` is not specified, it defaults to the server native encoding. The response will contain the URL of the scheduled task and the link to download the exported file. .. code-block:: json { "job": "/api/repositories/jupiter/scheduler/1", "file": "/api/repositories/jupiter/download/filename.csv" }