Dependency Conflicts for an Entity ================================== .. code-block:: http /api/repositories/{repository}/entities/{entity}/dependencies/{dependencyKey}/conflicts/ .. 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 dependencyKey, string, The dependency key Get ~~~ .. http:get:: /api/repositories/(string:repository)/entities/(int:entityID)/dependencies/(string:dependencyKey)/conflicts/ :synopsis: Lists dependency conflicts of an entity Lists dependency conflicts of the corresponding :doc:`entity` .. code-block:: http GET /api/repositories/alpha/entities/1/dependencies/2-1_21/conflicts/ 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 dependency conflicts in the corresponding :doc:`entity`. .. _ent_dep_conf_columns_label: Columns ------- The ``columns`` array will contain the list of columns for each data row. It will contain Frequency and Column names on which the dependency is created. An example is shown in the below table. .. csv-table:: :header: Human Name, Column Name, Description :widths: 25, 25, 50 "Frequency", "contradiction.COUNT", "Number of rows with this lhs value" "Account ID", "Account_id", "" "Attr21", "Attr21", "" "Customer ID", "Customer_id", "" .. _ent_dep_conf_datarow_label: Data Row -------- The ``data row`` will contain the list of conflicts of the corresponding :doc:`entity`: .. code-block:: json "rows": [ { "dataRow": [ "1", "71621", "", "A00938" ] }, { "dataRow": [ "1", "71621", "", "A00288" ] } ] } If there are no dependency conflicts in the :doc:`entity`, ``rows`` will be an empty string. Post ~~~~ .. http:post:: /api/repositories/(string:repository)/entities/(int:entityID)/dependencies/(dependencyKey)/conflicts/ :synopsis: Lists dependency conflicts of an entity using post. Lists dependency conflict of the corresponding :doc:`entity `, allow user to pass in supported options (Paging & Cache) see :doc:`standard-request` for more information on these options. .. code-block:: http POST /api/repositories/{repository}/entities/{entity}/dependencies/{dependencyKey}/conflicts/ HTTP/1.1 Content-Type: application/json { "command": "get", "options": { "pageStart": "1", "pageSize": "65" } } .. 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`, with a list of any conflict in the corresponding :doc:`entity`. The ``columns`` array will contain the list of columns for each data row as listed in above :ref:`columns `. It will contain Frequency and Column names on which the dependency is created. The ``data row`` will contain the list of conflicts of the corresponding :doc:`entity` similar to ones listed in above :ref:`data row ` Export ~~~~~~~ Some or all of the rows may be exported as a scheduled task. .. code-block:: http POST /api/repositories/jupiter/entities/1/dependencies/1-10/conflicts HTTP/1.1 Content-Type: application/json { "command": "export", "data": { "filename": "filename.csv", "filetype": "csv", "encoding": "utf-8" }, "options": { "where": "Frequency = 1" } } .. 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" } Dependency Conflicts for an Attribute ===================================== .. code-block:: http /api/repositories/{repository}/entities/{entity}/attributes/{attribute}/dependencies/{dependencyKey}/conflicts/ .. 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 attribute, int, The ID of the attribute to view dependencyKey, string, The dependency key Get ~~~ .. http:get:: /api/repositories/(string:repository)/entities/(int:entityID)/attributes/(int:attributeID)/dependencies/(string:dependencyKey)/conflicts/ :synopsis: Lists dependency conflicts of an attribute Lists dependency conflicts of the corresponding :doc:`attribute ` .. code-block:: http GET /api/repositories/alpha/entities/1/attributes/1/dependencies/1-3/conflicts/ 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 dependency conflicts in the corresponding :doc:`attributes`. .. _attr_dep_conf_columns_label: Columns ------- The ``columns`` array will contain the list of columns for each data row. It will contain Frequency and Column names on which the dependency is created. An example is shown in the below table. .. csv-table:: :header: Human Name, Column Name, Description :widths: 25, 25, 50 "Frequency", "contradiction.COUNT", "Number of rows with this lhs value" "Line 03", "Line_03", "" "Line 01", "Line_01", "" .. _attr_dep_conf_datarow_label: Data Row -------- The ``data row`` will contain the list of conflicts of the corresponding :doc:`attributes`: .. code-block:: json "rows": [ { "dataRow": [ "1", "19 Lois Lane", "Ms Della Street" ] }, { "dataRow": [ "1", "19 Lois Lane", "Lois Lane H674532867" ] } ] If there are no dependency conflicts in the :doc:`attributes`, ``rows`` will be an empty string. Post ~~~~ .. http:post:: /api/repositories/(string:repository)/entities/(int:entityID)/attributes/(int:attributeID)/dependencies/(dependencyKey)/conflicts/ :synopsis: Lists dependency conflicts of an entity using post. Lists dependency conflict of the corresponding :doc:`attribute `, allow user to pass in supported options (Paging & Cache) see :doc:`standard-request` for more information on these options. .. code-block:: http POST /api/repositories/{repository}/entities/{entity}/attributes/{attribute}/dependencies/{dependencyKey}/conflicts/ HTTP/1.1 Content-Type: application/json { "command": "get", "options": { "pageStart": "1", "pageSize": "65" } } .. 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`, with a list of any conflict in the corresponding :doc:`attribute `. The ``columns`` array will contain the list of columns for each data row as listed in above :ref:`columns `. It will contain Frequency and Column names on which the dependency is created. The ``data row`` will contain the list of conflicts of the corresponding :doc:`attribute ` similar to ones listed in above :ref:`data row ` .. _resolve_dep_conflicts: Resolve Dependency Conflicts for an Entity ========================================== .. code-block:: http POST /api/repositories/test/entities/1/dependencies HTTP/1.1 Content-Type: application/json { "command": "resolveConflicts", "data": { "eid": "1", "lhNames":"Line 02, Line 05, Vin Number", "rhName":"Line 01", "rhAttr":"1", "lhAttrs":"2 5 6", "rhValue":"Dr Mark Pederson and Dr Anmarie Russo ", "lhValues":"{Russo Eye Associates} {} F748264832", "lhText":"Russo Eye Associates,,F748264832", "rhValueResolved": "Dr Mark Pederson and Dr Anmarie Russo TESTING" } } .. 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. Available commands are: .. csv-table:: :header: Command, Description :widths: 30, 70 resolveConflicts, Resolve dependency conflicts. The request packet must contain the ``command`` and ``data`` elements. The following fields should be sent as part of ``data``: .. csv-table:: :header: Name, Mandatory, Default Value, Description :widths: 10, 10, 12, 75 eid, Yes, NA, Entity Id lhNames, Yes, NA, Left hand attribute names. rhName, Yes, NA, Right hand attribute name. rhAttr, Yes, NA, Right hand attribute Id. lhAttrs, Yes, NA, Left hand attribute Ids. rhValue, Yes, NA, Right hand attribute value. lhValues, Yes, NA, Left hand attribute values. lhText, Yes, NA, Left hand attribute values as text. rhValueResolved, Yes, NA, Resolved value for the right hand attribute. The response will contain the URL to the resolved dependency coflict. .. code-block:: json "uri": "/api/repositories/test/entities/1/dependencies/1-2_5_6/conflicts/" Resolve Dependency Conflicts for an Attribute ============================================= .. code-block:: http POST /api/repositories/test/entities/1/attributes/1/dependencies HTTP/1.1 Content-Type: application/json { "command": "resolveConflicts", "data": { "eid": "1", "lhNames":"Line 02", "rhName":"Line 01", "rhAttr":"1", "lhAttrs":"2", "rhValue":"Dr Mark Pederson and Dr Anmarie Russo ", "lhValues":"{Russo Eye Associates}", "lhText":"Russo Eye Associates", "rhValueResolved": "Dr Mark Pederson and Dr Anmarie Russo ATTRIBUTE" } } .. 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. Available commands are: .. csv-table:: :header: Command, Description :widths: 30, 70 resolveConflicts, Resolve dependency conflicts. The request packet must contain the ``command`` and ``data`` elements. The following fields should be sent as part of ``data``: .. csv-table:: :header: Name, Mandatory, Default Value, Description :widths: 10, 10, 12, 75 eid, Yes, NA, Entity Id lhNames, Yes, NA, Left hand attribute names. rhName, Yes, NA, Right hand attribute name. rhAttr, Yes, NA, Right hand attribute Id. lhAttrs, Yes, NA, Left hand attribute Ids. rhValue, Yes, NA, Right hand attribute value. lhValues, Yes, NA, Left hand attribute values. lhText, Yes, NA, Left hand attribute values as text. rhValueResolved, Yes, NA, Resolved value for the right hand attribute. The response will contain the URL to the resolved dependency coflict. .. code-block:: json "uri": "/api/repositories/test/entities/1/attributes/1/dependencies/1-2/conflicts/"