Attribute Metadata

URL Parameters

URL parameters for requests described on this page:

Parameter Type Purpose
repository string The repository name
entity int The entity ID
attribute int The attribute ID

For example:

GET /api/repositories/jupiter/entities/1/attributes/20/values HTTP/1.1
Accept: application/json

Response

The response to all requests described on this page is a Standard Response.

Values

GET /api/repositories/(string: repository)/entities/(int: entityID)/attributes/(int: attributeID)/values

Get a complete list of values in the attribute

POST /api/repositories/(string: repository)/entities/(int: entityID)/attributes/(int: attributeID)/values

Gets a paged list of values in the attribute.

An example of a GET request, retrieving all values:

GET /api/repositories/jupiter/entities/1/attributes/20/values HTTP/1.1
Accept: application/json

An example of a POST request, retrieving the first 32 values:

POST /api/repositories/jupiter/entities/1/attributes/20/values HTTP/1.1
Content-Type: application/json

{
    "command": "get",
    "options": {
        "pageStart": 1,
        "pageSize": 32
    }
}

The columns array will show the following columns:

Human Name Column Name Description
Value VALUE The data value
Frequency FREQUENCY_COUNT The number of times the data value occurs in the attribute
Dist % _distribution A measure of how much of the attribute contains the data value
Length _length The length of the data value
Soundex _soundex The coarse-grain phonetic representation of the data value
Metaphone _metaphone The fine-grain phonetic representation of the data value
Pattern _pattern The structure of the data value
Mask _mask The mask pattern of the data value
Percent Rank _percentile The percentile of the data value
Deviation _deviation The deviation of the data value
Row Id _rowid The row id of the data value

An element of the rows array will look like:

{
    "dataRow": [
        "0011250125",
        "143",
        "10.092",
        "10",
        "",
        "",
        "d10",
        "NNNNNNNNNN",
        "",
        "",
        "123"
    ]
}

The list of values can be filtered by using a filter from the table below:

Filter GET POST Description
minimum All values matching the minimum value
maximum All values matching the maximum value
shortest All values matching the shortest value
longest All values matching the longest value
strings All string values in the attribute
minimumstrings All values matching the maximum string
maximumstrings All values matching the minimum string
decimals All decimal values in the attribute
minimumdecimals All values matching the maximum decimal value
maximumdecimals All values matching the minimum decimal value
integers All integer values in the attribute
minimumintegers All values matching the maximum integer value
maximumintegers All values matching the minimum integer value
modes List values depending on their frequency in the attribute
soundexes Values matching one or more soundexes
masks Values matching one or more masks
patterns Values matching one or more patterns
metaphones Values matching one or more metaphones
deviations Values matching one or more standard deviations
phraseIn Values matching one or more phrases

Add the value from the filter column to the values URL to get a filtered list of values. For example:

GET /api/repositories/jupiter/entities/1/attributes/20/values/decimals HTTP/1.1
Accept: application/json

GET requests have no additional options and will return a complete list of values matching the filter.

All requests can be paged with a POST request with the page options in the request (see Standard Request):

POST /api/repositories/jupiter/entities/1/attributes/20/values/decimals HTTP/1.1
Content-Type: application/json

{
    "command": "get",
    "options": {
        "pageStart": 1,
        "pageSize": 32
    }
}

The modes filter retrieves values based on the frequency of the values in the attribute. The filter supports both GET and POST requests.

The POST request takes a Standard Request as the body; the number of mode values to retrieve can be specified by the modeCount option:

POST /api/repositories/jupiter/entities/1/attributes/20/values/modes HTTP/1.1
Content-Type: application/json

{
    "command": "get",
    "options": {
        "modeCount": 10
    }
}

The POST request above would retrieve values with the 10 highest frequencies.

If the modeCount option isn’t present, or in a GET request, the modeCount is assumed to be 1 (i.e. the value with the highest frequency).

The deviations filter retrieves values depending on the standard deviation level. A GET request must specify the desired deviation level on the URL:

GET /api/repositories/jupiter/entities/1/attributes/2/values/deviations/0 HTTP/1.1
Accept: application/json

The values may be filtered on multiple deviation levels by using a POST request. The desired deviation levels are specified in the data array of a Standard Request.

POST /api/repositories/jupiter/entities/1/attributes/2/values/deviations HTTP/1.1
Content-Type: application/json

{
    "command": "get",
    "options": {
        "pageStart": 1,
        "pageSize": 32
    },
    "data": ["2", "3"]
}

Some of the filters only support POST requests, because additional data is required in the request. These filters are:

Filter Data
soundexes A list of soundexes to filter against
masks A list of masks
patterns A list of patterns
metaphones A list of metaphones
phraseIn A list of phrases

The data to filter against is specified in the data element of the request. The data is an array of items to filter against.

POST /api/repositories/jupiter/entities/1/attributes/20/values/soundexes HTTP/1.1
Content-Type: application/json

{
    "command": "get",
    "options": {
        "pageStart": 1,
        "pageSize": 32
    },
    "data": [
        "H000",
        "A000"
    ]
}

The example above would retrieve a list of all values that match the two soundexes specified in data.

The phraseIn filter has an additional option that indicates the position of the phrase in the value:

{
    "command": "get",
    "options": {
        "pageStart": 1,
        "pageSize": 32,
        "position": "end"
    },
    "data": ["C2 PRIMARY", "LIN C2 PRIMARY"]
}

The position is not mandatory; if it is present, it must be one of:

Position Purpose:
start Phrase appears at the start of the value
middle Phrase is in the middle of the value
end Phrase is at the end of the value
both Phrase is at both the start and end of the value

If the position is not present, it indicates that the phrase(s) may appear anywhere in the value.

Matching Rows

POST /api/repositories/(string: repository)/entities/(int: entityID)/attributes/(int: attributeID)/values/matchingrows

Gets a paged list of matching rows in the attribute.

An example of a POST request, retrieving the first 32 values:

POST /api/repositories/jupiter/entities/1/attributes/20/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"]
    ]
}

Each element in the data array is an array containing the value and frequency count to match against.

This endpoint retrieves a list of rows where the specified attribute matches the value(s) in data. 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"
}

After the row ID element, there will be one element, for each attribute in the entity, showing the columnised name, humanised name and description. The Attributes endpoint shows a list of attributes in an entity.

The datarow element will contain an element for each row, showing the contents of each attribute in that row.

If there are no rows where the attribute matches the value(s), the rows array will be empty.

Masks

GET /api/repositories/(string: repository)/entities/(int: entityID)/attributes/(int: attributeID)/masks

Get a complete list of masks in the attribute

POST /api/repositories/(string: repository)/entities/(int: entityID)/attributes/(int: attributeID)/masks

Gets a paged list of masks in the attribute.

An example of a GET request, retrieving all masks:

GET /api/repositories/jupiter/entities/1/attributes/20/masks HTTP/1.1
Accept: application/json

An example of a POST request, retrieving the first 32 values:

POST /api/repositories/jupiter/entities/1/attributes/20/masks HTTP/1.1
Content-Type: application/json

{
    "command": "get",
    "options": {
        "pageStart": 1,
        "pageSize": 32
    }
}

The columns array will show the following columns:

Human Name Column Name Description
Mask VALUE The mask of the data
Mask Stats _mask_stat The pattern of the mask
Value Count VALUE_COUNT The number of values that match the mask
Frequency FREQUENCY_COUNT The frequency of all the values that match the mask.
Dist % _distribution A measure of how much of the attribute contains values that match the mask

A datarow element will look like:

{
    "dataRow": [
        "NNNNNNNNNN",
        "N10",
        "43",
        "574",
        "40.508"
    ]
}

Metaphones

GET /api/repositories/(string: repository)/entities/(int: entityID)/attributes/(int: attributeID)/metaphones

Get a complete list of metaphones in the attribute

POST /api/repositories/(string: repository)/entities/(int: entityID)/attributes/(int: attributeID)/metaphones

Gets a paged list of metaphones in the attribute.

An example of a GET request, retrieving all metaphones:

GET /api/repositories/jupiter/entities/1/attributes/20/metaphones HTTP/1.1
Accept: application/json

An example of a POST request, retrieving the first 32 values:

POST /api/repositories/jupiter/entities/1/attributes/20/metaphones HTTP/1.1
Content-Type: application/json

{
    "command": "get",
    "options": {
        "pageStart": 1,
        "pageSize": 32
    }
}

The columns array will show the following columns:

Human Name Column Name Description
Metaphone _value The fine-grain phonetic pattern
Value Count VALUE_COUNT The number of values that match the Metaphone.
Frequency FREQUENCY_COUNT The frequency of all the values that match the metaphone.
Dist % _distribution A measure of how much of the attribute contains values that match the Metaphone.

A datarow element will look like:

{
    "dataRow": [
        "BSNSKRTTNJ",
        "1",
        "42",
        "2.964"
    ]
}

Soundexes

GET /api/repositories/(string: repository)/entities/(int: entityID)/attributes/(int: attributeID)/soundexes

Get a complete list of soundexes in the attribute

POST /api/repositories/(string: repository)/entities/(int: entityID)/attributes/(int: attributeID)/soundexes

Gets a paged list of soundexes in the attribute.

An example of a GET request, retrieving all soundexes:

GET /api/repositories/jupiter/entities/1/attributes/20/soundexes HTTP/1.1
Accept: application/json

An example of a POST request, retrieving the first 32 values:

POST /api/repositories/jupiter/entities/1/attributes/20/soundexes HTTP/1.1
Content-Type: application/json

{
    "command": "get",
    "options": {
        "pageStart": 1,
        "pageSize": 32
    }
}

The columns array will show the following columns:

Human Name Column Name Description
Soundex _value The coarse grain phonetic pattern
Value Count VALUE_COUNT The number of values that match the soundex
Frequency FREQUENCY_COUNT The frequency of all the values that match the soundex.
Dist % _distribution A measure of how much of the attribute contains values that match the pattern

A datarow element will look like:

{
    "dataRow": [
        "P521",
        "11",
        "189",
        "13.338"
    ]
}

Patterns

GET /api/repositories/(string: repository)/entities/(int: entityID)/attributes/(int: attributeID)/patterns

Get a complete list of patterns in the attribute

POST /api/repositories/(string: repository)/entities/(int: entityID)/attributes/(int: attributeID)/patterns

Gets a paged list of patterns in the attribute.

An example of a GET request, retrieving all patterns:

GET /api/repositories/jupiter/entities/1/attributes/20/patterns HTTP/1.1
Accept: application/json

An example of a POST request, retrieving the first 32 values:

POST /api/repositories/jupiter/entities/1/attributes/20/patterns HTTP/1.1
Content-Type: application/json

{
    "command": "get",
    "options": {
        "pageStart": 1,
        "pageSize": 32
    }
}

The columns array will show the following columns:

Human Name Column Name Description
Pattern VALUE The structure of the data
Value Length _length The length of the original value that created this pattern
Value Count VALUE_COUNT The number of values that match the structure pattern
Frequency FREQUENCY_COUNT The frequency of all the values that match the structure pattern.
Dist % _distribution A measure of how much of the attribute contains values that match the pattern

A datarow element will look like:

{
    "dataRow": [
        "d10",
        "10",
        "43",
        "574",
        "40.508"
    ]
}

Phrases

GET /api/repositories/(string: repository)/entities/(int: entityID)/attributes/(int: attributeID)/phrases

Get a complete list of phrases in the attribute

POST /api/repositories/(string: repository)/entities/(int: entityID)/attributes/(int: attributeID)/phrases

Gets a paged list of phrases in the attribute.

An example of a GET request, retrieving all phrases:

GET /api/repositories/jupiter/entities/1/attributes/20/phrases HTTP/1.1
Accept: application/json

An example of a POST request, retrieving the first 32 values:

POST /api/repositories/jupiter/entities/1/attributes/20/phrases HTTP/1.1
Content-Type: application/json

{
    "command": "get",
    "options": {
        "pageStart": 1,
        "pageSize": 32
    }
}

An attribute will not have any phrases associated with it unless it has been specifically analyzed for phrases. Currently, an attribute may be analyzed for phrases through the Control Centre.

The columns array will show the following columns:

Human Name Column Name Description
Phrase _value The phrase found in the values
Words _words The number of words in the phrase
Value Count VALUE_COUNT The number of values that contained this phrase
Frequency FREQUENCY_COUNT The number of rows that contained this phrase
Dist % _distribution A measure of how much of the attribute contains this phrase

A datarow element will look like:

{
    "dataRow": [
        "LIN",
        "1",
        "119",
        "460",
        "32.463"
    ]
}

Nulls

GET /api/repositories/(string: repository)/entities/(int: entityID)/attributes/(int: attributeID)/nulls

Get a complete list of nulls in the attribute

POST /api/repositories/(string: repository)/entities/(int: entityID)/attributes/(int: attributeID)/nulls

Gets a paged list of nulls in the attribute.

An example of a GET request, retrieving all nulls:

GET /api/repositories/jupiter/entities/1/attributes/20/nulls HTTP/1.1
Accept: application/json

An example of a POST request, retrieving the first 32 values:

POST /api/repositories/jupiter/entities/1/attributes/20/nulls HTTP/1.1
Content-Type: application/json

{
    "command": "get",
    "options": {
        "pageStart": 1,
        "pageSize": 32
    }
}

This endpoint retrieves a list of rows where the specified attribute is null. Similarly to the Matching Rows endpoint, 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"
}

After the row ID element, there will be one element, for each attribute in the entity, showing the columnised name, humanised name and description. The Attributes endpoint shows a list of attributes in an entity.

The datarow element will contain an element for each row, showing the contents of each attribute in that row. The attribute specified in the request will be NULL.

If there are no rows where the attribute is null, the rows array will be empty.

Spaces

GET /api/repositories/(string: repository)/entities/(int: entityID)/attributes/(int: attributeID)/spaces

Get a complete list of spaces in the attribute

POST /api/repositories/(string: repository)/entities/(int: entityID)/attributes/(int: attributeID)/spaces

Gets a paged list of spaces in the attribute.

An example of a GET request, retrieving all spaces:

GET /api/repositories/jupiter/entities/1/attributes/20/spaces HTTP/1.1
Accept: application/json

An example of a POST request, retrieving the first 32 rows:

POST /api/repositories/jupiter/entities/1/attributes/20/spaces HTTP/1.1
Content-Type: application/json

{
    "command": "get",
    "options": {
        "pageStart": 1,
        "pageSize": 32
    }
}

This endpoint retrieves a list of rows where the specified attribute is a space. Similarly to the Matching Rows endpoint, 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"
}

After the row ID element, there will be one element, for each attribute in the entity, showing the columnised name, humanised name and description. The Attributes endpoint shows a list of attributes in an entity.

The datarow element will contain an element for each row, showing the contents of each attribute in that row. The attribute specified in the request will be a space.

If there are no rows where the attribute is a space, the rows array will be empty.

Deviations

GET /api/repositories/(string: repository)/entities/(int: entityID)/attributes/(int: attributeID)/deviations

Get a complete list of deviation levels in the attribute

POST /api/repositories/(string: repository)/entities/(int: entityID)/attributes/(int: attributeID)/deviations

Gets a paged list of deviation levels in the attribute.

An example of a GET request, retrieving all deviation levels:

GET /api/repositories/jupiter/entities/8/attributes/8/deviations HTTP/1.1
Accept: application/json

An example of a POST request, retrieving the first 32 rows:

POST /api/repositories/jupiter/entities/8/attributes/8/deviations HTTP/1.1
Content-Type: application/json

{
    "command": "get",
    "options": {
        "pageStart": 1,
        "pageSize": 32
    }
}

This endpoint retrieves a list of standard deviation levels in the attribute. The response will be a Standard Response. The columans array will contain the following column elements:

Human Name Column Name Description
Deviation VALUE The mask of the data
Value Count VALUE_COUNT The number of values that match the mask
Frequency FREQUENCY_COUNT The frequency of all the values that match the mask.
Dist % _distribution A measure of how much of the attribute contains values that match the mask

An element in the rows array:

{
    "dataRow": [
        "0",
        "4",
        "34",
        "68.000"
    ],
    "metadata": {
        "url": "/api/repositories/jupiter/entities/8/attributes/8/values/deviations/0"
    }
}

The URL in the metadata is the drill-down to values in the standard deviation level (see values).

Recode Values

Edit

/api/repositories/{repository}/entities/{entity}/attributes/{attribute}/recodevalues
Parameter Type Purpose
repository string The repository name
entity int The entity ID
attribute int The attribute ID
POST /api/repositories/(string: repository)/entities/(int: entityID)/attributes/(int: attributeID)/recodevalues

Recode values for an attribute

POST /api/repositories/jupiter/entities/1/attributes/55/recodevalues HTTP/1.1
Content-Type: application/json

{
   "command": "edit",
   "data": "71002 7 71004 9"
 }

data is a list of “<VALUE1> <VALUE RECODE1> <VALUE2> <VALUE RECODE2>.................” data should contain a list of Value and “Value Recode” pairs. In the above example 71002 is the value and 7 is the value recode. 71002 will be recoded to 7

All fields are required.

Response Code Reason
200 Success
500 Server error

If the recode is successful, the response will contain a URL pointing at the values of the attribute.

Export

/api/repositories/{repository}/entities/{entity}/attributes/{attribute}/recodevalues
Parameter Type Purpose
repository string The repository name
entity int The entity ID
attribute int The attribute ID
POST /api/repositories/(string: repository)/entities/(int: entityID)/attributes/(int: attributeID)/recodevalues

Export recode values of an attribute

POST /api/repositories/jupiter/entities/1/attributes/55/recodevalues HTTP/1.1
Content-Type: application/json

{
    "command": "export",
    "data": {
        "filename": "filename",
        "encoding": "ascii",
        "fieldWidth":"AUTO"
    }
}

All fields are required.

filename enter the filename, the ddx will be created with the same filename but with .ddx extention.

encoding field indicates the character encoding used by the data file. The following are the supported encodings:

cp1252, ascii, big5, cp1250, cp1251, cp1253, cp1254, cp1255, cp1256, cp1257, cp1258, cp437, cp737, cp775, cp850, cp852, cp855, cp857, cp860, cp861, cp862, cp863, cp864, cp865, cp866, cp869, cp874, cp932, cp936, cp949, cp950, dingbats, ebcdic, euc-cn, euc-jp, euc-kr, gb12345, gb1988, gb2312, gb2312-raw, identity, iso2022, iso2022-jp, iso2022-kr, iso8859-1, iso8859-10, iso8859-13, iso8859-14, iso8859-15, iso8859-16, iso8859-2, iso8859-3 iso8859-4, iso8859-5, iso8859-6, iso8859-7, iso8859-8, iso8859-9, jis0201, jis0208, jis0212, koi8-r, koi8-u, ksc5601, macCentEuro, macCroatian macCyrillic, macDingbats, macGreek, macIceland, macJapan, macRoman, macRomania, macThai, macTurkish, macUkraine, shiftjis, symbol, tis-620, unicode, utf-8

fieldWidth should either be set to “AUTO” or to a value between 0 and 100.

Response Code Reason
200 Success
500 Server error

If the export is successful, the response will as follows, containing URL pointing to an export job and URL links to download the created files.

{
  "job": "/api/repositories/jupiter/scheduler/107",
  "file": "/api/repositories/jupiter/download/filename",
  "ddxFile": "/api/repositories/jupiter/download/filename.ddx"
}