Duplicate Rows Indicator ======================== .. code-block:: http /api/repositories/{repository}/entities/{entity}/duplicatesindicator .. 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:get:: /api/repositories/(string:repository)/entities/(int:entityID)/duplicatesindicator :synopsis: Lists the sets of duplicate rows in the entity Lists the sets of duplicate rows in the :doc:`entity` .. code-block:: http GET /api/repositories/jupiter/entities/1/duplicatesindicator HTTP/1.1 Accept: application/json .. csv-table:: :header: Response Code, Reason :widths: 25, 75 200, No error 500, Server error The response will be a :doc:`standard-response`, with a list of Value, Frequency and distribution of each row in the :doc:`entity`. The ``columns`` array will contain the list of columns for each data row. .. csv-table:: :header: Human Name, Column Name, Description :widths: 25, 25, 50 "Value", "_col0", "The data value" "Frequency", "_col1", "The number of times the value occurs in the entity" "Dist %", "_col2", "A measure of how much of the data contains this value" duplicate rows indicator will contain the details of the corresponding row of the :doc:`entity`: .. code-block:: json "rows": [ { "dataRow": [ "1", "2", "25.000" ], "metadata": { "url": "/api/repositories/beta/entities/9/duplicatesindicator/1/duplicates" } } ] If there are no duplicate rows in the :doc:`entity`, ``rows`` will be an empty string. Commands ~~~~~~~~ .. http:post:: /api/repositories/(string:repository)/entities/{entity}/duplicatesindicator :synopsis: Execute commands against entities metadata duplicate rows indicator Executes commands for the duplicate rows indicator in the repositories. The request requires a :doc:`standard-request` packet. Available commands are: .. csv-table:: :header: Command, Description :widths: 30, 70 get, Get a filtered list of duplicate rows indicator from an entity from the repository The response is a :doc:`standard-response`; the datarows array will have an element for each row that matches the criteria. Get --- .. code-block:: http POST /api/repositories/jupiter/entities/1/duplicatesindicator HTTP/1.1 Content-Type: application/json { "command": "get" } .. csv-table:: :header: Response Code, Reason :widths: 25, 75 200, Success 500, Server error The request packet must contain the ``command`` and ``options`` elements. The ``data`` element is not required. All fields are required. .. _edrows_export: Export ------ Some or all of the rows may be exported as a scheduled task. .. code-block:: http POST /api/repositories/jupiter/entities/1/duplicatesindicator HTTP/1.1 Content-Type: application/json { "command": "export", "data": { "filename": "filename.csv", "filetype": "csv", "encoding": "utf-8" }, "options": { "columns": ["_value", "FREQUENCY_COUNT", "_distribution"], "where": "'Frequency' >= 4" } } .. 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" }