Joins Jobs =========== .. code-block:: http /api/repositories/(string:repository)/joins/joinjobs .. csv-table:: :header: Parameter, Type, Purpose :widths: 20, 20, 60 :stub-columns: 1 repository, string, the name of the :doc:`repository` .. _join_jobs_count: Count ~~~~~~ .. http:get:: /api/repositories/(string:repository)/joins/joinjobs/count :synopsis: Get the number of join jobs in the repository Returns the number of join jobs in the repository. .. csv-table:: :header: Response Code, Reason :widths: 25, 75 200, No error 500, Server error The response contains the number of join jobs in the repository. .. code-block:: json { "count": "12" } .. _show_all_join_jobs: Show All ~~~~~~~~~ .. http:get:: /api/repositories/(string:repository)/joins/joinjobs :synopsis: List of join jobs in the repository .. code-block:: http GET /api/repositories/jupiter/joins/joinjobs HTTP/1.1 Accept: application/json .. csv-table:: :header: Response Code, Reason :widths: 25, 75 200, No error 500, Server error The columns displayed are: .. csv-table:: :header: Human Name, Column Name, Description :widths: 25, 25, 50 "JOB_ID", "Ref", "Job reference Id" "_job_name", "Name", "Job reference name" "JOB_CREATE_USER", "Created by", "User who created this job" "_entities", "Entities Analyzed", "Number of entities analyzed" "ORIGINAL", "Original Joins", "Total number of joins originally discovered by this job" "DISCOVERED", "Joins Discovered", "Number of discovered joins still to be analyzed" "DELETED", "Joins Deleted", "The number of joins deleted" "PERMANENT", "Joins Permanent", "The number of joins made permanent" "_pc_reviewed", "Reviewed", "The percentage of joins reviewed" "_created_date", "Date Completed", "When the job was completed" The ``dataRow`` array will contain a list of the join joibs in the :doc:`repository`: .. code-block:: json "dataRow": [ "116", "restjob", "", "0", "1", "0", "1", "0", "100.0%", "2016/08/08 06:59:07" ] The response will be a :doc:`standard-response`, with a list of values on the right hand side that did not join. .. _show_some_join_jobs: Show Some ~~~~~~~~~~ .. http:post:: /api/repositories/(string:repository)/joins/joinjobs :synopsis: Lists join jobs in the repository that match various criteria Lists join jobs in the repository that match various criteria :jsonparam body: The request body .. code-block:: http POST /api/repositories/jupiter/joins/joinjobs HTTP/1.1 Content-Type: application/json { "command": "get", "options": { "where": "'Joins Permanent' > 0" } } .. csv-table:: :header: Response Code, Reason :widths: 25, 75 200, Success 500, Server error The request requires a :doc:`standard-request` packet. Available commands are: .. csv-table:: :header: Command, Description :widths: 20, 80 get, Lists all joins in the repository that match the criteria in Options The response will be a :doc:`standard-response`, with a list of :doc:`joinjobs` in the :doc:`repository` matching the given criteria in Options. Delete ~~~~~~ .. _delete_join_jobs: .. http:post:: /api/repositories/{repository}/joins/joinjobs :synopsis: Delete the join jobs Delete the join jobs .. code-block:: http POST /api/repositories/alpha/joins/joinjobs HTTP/1.1 Content-Type: application/json { "command": "delete", "data": { "jobId":["18", "19"] } } .. csv-table:: :header: Response Code, Reason :widths: 25, 75 204, Success 400, Invalid parameters 500, Server error The delete packet must contain the ``command`` and ``data`` elements. The following fields should be sent as part of ``data``: .. csv-table:: :widths: 20, 80 :header: Field, Purpose jobId, A join job result key. The value of individual key should be similar to the 'Ref'/JOB_ID column returned from :doc:`joinjobs` Export ~~~~~~ .. _export_join_jobs: .. http:post:: /api/repositories/{repository}/joins/joinjobs Some or all of the join jobs may be exported as a scheduled task. .. code-block:: http POST /api/repositories/(string:repository)/joins/joinjobs HTTP/1.1 Content-type:: application/json { "command": "export", "options": { "where": "Name = \"j3\"" }, "data": { "filename": "filename.csv" } } When export is required, the filename for the exported file must be specified. The file will be exported in CSV format using the native encoding of the server. .. csv-table:: :header: Response Code, Reason :widths: 25, 75 200, No error 500, Server error 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" }