Duplicate Entity Keys

/api/repositories/{repository}/entities/{entity}/keys/:keyID/duplicates
Parameter Type Purpose
repository string the name of the Repository
entity int The ID of the entity to view
keyID string The ID for the key

Show All

GET /api/repositories/(string: repository)/entities/(int: entityID)/keys/(string: keyID)/duplicates

Lists duplicate values in the corresponding key of an Entity

GET /api/repositories/jupiter/entities/1/keys/1_17/duplicates HTTP/1.1
Accept: application/json
Response Code Reason
200 No error
500 Server error

The response will be a Standard Response, with a list of duplicate values in the corresponding key of the Entity.

The columns array will contain the list of columns for each data row.

Human Name Column Name Description
Duplicate Rows contradiction.COUNT Number of rows with this value
Key Key Key Attribute Value

data row will contain the list of discovered duplicate keys of the corresponding Entity:

"rows": [
    {
        "dataRow": [
            "3",
            "333"
        ]
    },
    {
        "dataRow": [
            "2",
            "111"
        ]
    }
  ]
}

If there are no duplicate values for the corresponding key in the Entity, rows will be an empty string.

Show Some

POST /api/repositories/(string: repository)/entities/(int: entityID)/keys/(string: keyID)/duplicates

Lists duplicate values in the corresponding key of an Entity that match various criteria

POST /api/repositories/jupiter/entities/1/keys/1_17/duplicates HTTP/1.1
Accept: application/json

{
    "command": "get",
    "options": {
        "pageSize": "2",
        "pageStart": "1"
    }
}
Response Code Reason
200 No error
400 Invalid command or option
500 Server error

The request requires a Standard Request packet. Available commands are:

The response will be a Standard Response, with a list of duplicate keys for the corresponding key of the Entity.

Export

Some or all of the rows may be exported as a scheduled task.

POST /api/repositories/jupiter/entities/1/keys/1_17/duplicates HTTP/1.1
Content-Type: application/json

{
    "command": "export",
    "data": {
        "filename": "filename.csv",
        "filetype": "csv",
        "encoding": "utf-8"
    },
    "options": {
        "where": "'Duplicate Rows' = 1"
    }
}
Response Code Reason
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:

Field Required
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.

{
    "job": "/api/repositories/jupiter/scheduler/1",
    "file": "/api/repositories/jupiter/download/filename.csv"
}