Attribute Values Matching Rows¶
/api/repositories/{repository}/entities/{entity}/attributes/{attribute}/values/matchingrows
Parameter | Type | Purpose |
---|---|---|
repository | string | The repository name |
entity | int | The entity ID |
attribute | int | The attribute ID |
Only POST requests are supported for this endpoint.
-
POST
/api/repositories/
(string: repository)/entities/
(int: entityID)/attributes/
(int: attributeID)/values/matchingrows
¶ Get a page of matching rows for an attribute
POST /api/repositories/jupiter/entities/1/attributes/55/values/matchingrows HTTP/1.1
Content-Type: application/json
{
"command": "get",
"options": {
"pageStart": 1,
"pageSize": 32
},
"data": [
["BUSINESS CREDIT - NJ", "42"],
["PNC BUSINESS CREDIT-PITTSBURGH", "25"]
]
}
This endpoint retrieves a list of rows where the specified attribute matches the value(s) in data
. Each element in the data
array is an array containing the value and frequency count to match against.
The response is a Standard Response, but the contents of the columns
and rows
arrays depend on the entity.
The first element in the columns
array will be:
{
"columnisedName": ":rowid:",
"humanisedName": "Row",
"description": "The row number for this row"
}
Export¶
Some or all of the rows may be exported as a scheduled task.
POST /api/repositories/jupiter/entities/1/attributes/2/values/matchingrows HTTP/1.1
Content-Type: application/json
{
"command": "export",
"data": [
["BUSINESS CREDIT - NJ", "42"],
["PNC BUSINESS CREDIT-PITTSBURGH", "25"]
],
"exportData": {
"filename": "filename.csv",
"filetype": "csv",
"encoding": "utf-8"
},
"options": {
"where": "Frequency = 3"
}
}
Response Code | Reason |
---|---|
200 | No error |
400 | Invalid data passed with request |
500 | Server error |
The request packet must contain the command
, data
, and exportData
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 exportData
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"
}