Maximum Row Length Matches ========================== .. code-block:: http /api/repositories/{repository}/entities/{entity}/rows/maxlength/matches .. 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 Get ~~~ .. http:get:: /api/repositories/(string:repository)/entities/(int:entityID)/rows/maxlength/matches :synopsis: Lists the longest row(s) in the entity Lists the longest row(s) in the :doc:`entity` .. code-block:: http GET /api/repositories/jupiter/entities/1/rows/maxlength/matches 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`, showing the longest rows in the :doc:`entity`. The ``columns`` array will contain the list of columns for each data row. The first 4 column will be: .. csv-table:: :header: Human Name, Column Name, Description :widths: 25, 25, 50 Row, \:rowid\:, The row number Row Length, _original_row_length, The row length Checksum, _hex_checksum, The checksum of the row (Identifies candidate duplicate rows) Row Value Count, _value_count, The number of non-null values in the row Each :doc:`attribute ` in the :doc:`entity ` will have an element in the array. The ``rows`` array data row will contain the rows from the :doc:`entity`; the metadata will contain the URL to drill-down to row details: .. code-block:: json { "rows": [ { "dataRow": [ "51", "116", "91485c51", "15", "41401", "/06/1", "989H6", "7541001007", "01/06/", "198", "9 \ ", "\ \ ", "" ], "metadata": { "url": "/api/repositories/alpha/entities/36/rows/maxlength/matches/51/details" } } ] } If there are no rows in the :doc:`entity`, ``rows`` will be an empty string. Post ~~~~ .. http:post:: /api/repositories/(string:repository)/entities/(int:entityID)/rows/maxlength/matches :synopsis: Lists the longest row(s) in the entity Lists the longest row(s) in the :doc:`entity`, allow user to pass in supported options (Paging, Columns & Cache) see :doc:`standard-request` for more information on these options. .. code-block:: http POST /api/repositories/jupiter/entities/1/rows/maxlength/matches HTTP/1.1 Content-Type: application/json { "command": "get", "options": { "pageStart": "1", "pageSize": "65", "columns": ["Line_01"] } } .. csv-table:: :header: Response Code, Reason :widths: 25, 75 200, Success 400, Bad Request 500, Server error The request packet must contain the ``command`` element. The ``options`` elements is optional. The response will be a :doc:`standard-response`, showing the longest rows in the :doc:`entity`. The ``columns`` array will contain the list of columns for each data row, similar to the 'GET' request, unless they are filtered using the 'columns' option. NOTE: Please note that this view is cached on the server, hence if columns were filtered previously, you must reset the view to return all columns again by forcing the view to flush the cache as shown: .. code-block:: http POST /api/repositories/jupiter/entities/1/rows/maxlength/matches HTTP/1.1 Content-Type: application/json { "command": "get", "options": { "cache": "flush" } } Export ~~~~~~~ Some or all of the rows may be exported as a scheduled task. .. code-block:: http POST /api/repositories/jupiter/entities/1/rows/maxlength/matches HTTP/1.1 Content-Type: application/json { "command": "export", "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" }