Describe a Table's Metadata
Description
Returns metadata for a named table in the repository. Information in the response includes the table coordinate reference system, bounding box, columns and their types, and geohash index details (scale and precision). It also includes bind parameters if there are any.
ACL Authorization Flow
To return metadata for a single named table in the repository, the user (or the role they belong to) needs EXECUTE permission on the Named table.
HTTP GET URL Format
The following format is used for HTTP GET requests:
HTTP GET /tables/tablename/metadata.rep
Parameters
For information on the parameter types listed below, see Request URL Data Types.
Parameter | Type | Required | Description |
---|---|---|---|
tablename | String | yes | Specifies the name of the table for which the metadata needs to be described. The
table is specified by a regular expression (Regex) for the named
table to render based on the location of the named table in the
repository. The name of the named table is defined between the
/tables portion of the URL and the /metadata.rep
portion of the URL. For example, to return the metadata for a named
table located at
/Samples/NamedTables/WorldTable in the
repository, the following URL would be
used:.../FeatureService/tables/Samples/NamedTables /WorldTable/metadata.json;... |
rep | String | yes | Specifies the representation to be returned. The supported representation is json. |
Returns
Returns metadata for a named table in the repository.
Example
Returns the metadata for the table WorldTable located in the /Samples/NamedTables directory in the repository.
POST http://hostname:port/rest/Spatial/FeatureService/tables/Samples/NamedTables/WorldTable/
metadata.json
Example: Raster
In case of Named Table referring to a raster, the Describe Named Table operation returns raster-specific information.
Request
POST http://hostname:port/rest/Spatial/FeatureService/tables/Samples/NamedTables/MRRWorldTable/
metadata.json
Response
{
"Metadata":[
{
"name":"MI_RASTER",
"type":"Raster",
"crs":{
"type":"name",
"properties":{
"name":"epsg:3395"
}
},
"bbox":[
-70.0,
-173.46657488287798,
186.0,
82.53342511712202
]
},
{
"name":"MI_Style",
"type":"Style"
}
],
"TableMetadata":{
"supportsInsert":false,
"supportsDelete":false,
"supportsUpdate":false,
"KeyDefinition":{
"type":"Implicit",
"attributes":[
"MapInfo_ID"
]
},
"rasterMetadata":{
"width":128,
"height":128,
"supportsGridCellValue":true,
"fields":[
{
"name":"Field0",
"type":"Imagery",
"bands":[
{
"name":"Band00",
"type":"Concrete",
"dataType":"Integer",
"mapInfoUnits":"Undefined"
},
{
"name":"RED",
"type":"Component",
"dataType":"Integer",
"mapInfoUnits":"Undefined"
},
{
"name":"GREEN",
"type":"Component",
"dataType":"Integer",
"mapInfoUnits":"Undefined"
},
{
"name":"BLUE",
"type":"Component",
"dataType":"Integer",
"mapInfoUnits":"Undefined"
}
]
},
{
"name":"Field1",
"type":"Imagery",
"bands":[
{
"name":"Band00",
"type":"Concrete",
"dataType":"Integer",
"mapInfoUnits":"Undefined"
},
{
"name":"RED",
"type":"Component",
"dataType":"Integer",
"mapInfoUnits":"Undefined"
},
{
"name":"GREEN",
"type":"Component",
"dataType":"Integer",
"mapInfoUnits":"Undefined"
},
{
"name":"BLUE",
"type":"Component",
"dataType":"Integer",
"mapInfoUnits":"Undefined"
}
]
},
{
"name":"Field2",
"type":"Imagery",
"bands":[
{
"name":"Band00",
"type":"Concrete",
"dataType":"Integer",
"mapInfoUnits":"Undefined"
},
{
"name":"RED",
"type":"Component",
"dataType":"Integer",
"mapInfoUnits":"Undefined"
},
{
"name":"GREEN",
"type":"Component",
"dataType":"Integer",
"mapInfoUnits":"Undefined"
},
{
"name":"BLUE",
"type":"Component",
"dataType":"Integer",
"mapInfoUnits":"Undefined"
}
]
}
]
}
}
}
This response contains additional raster size, field, and band details under the “rasterMetadata”. The following table describes the fields used in the response:
Parameter | Description |
---|---|
rasterMetadata | Specifies the metadata of the raster in terms of raster size, field, and band details. |
width | Specifies the width of raster in pixels. |
height | Specifies the height of raster in pixels. |
supportsGridCellValue | Specifies whether the raster supports the grid cell value. |
fields | Specifies fields as an array object. Each field object contains its name, type, and bands in it. This is applicable only for MRR. |
name | Specifies the name of the field. |
type | Specifies the types of fields supported in the MapInfo Pro Advanced. There are four
types of fields:
|
bands | Specifies bands in the MRR Field as an array. Band object contains its name, type, data type, and mapinfoUnits. |
name | Specifies the name of the band. |
type | Specifies the source of the raster band values. Band types can be of the following
types:
|
dataType | Specifies the data type of the band. For example, Byte, Short, Integer, Long, BigInteger, Double, String, and so on. |
mapInfoUnits | Defines the MapInfo units. For example, miles, meters, chains, nautical miles, degree, arc minute, and so on. |
Example: Metadata from a Pramaterized View Table
This example uses a view table that contains bind parameters (a parameterized view table).
Request
POST http://hostname:port/rest/Spatial/FeatureService/tables/NamedTables/ViewTableWithParameters/metadata.json
Response
{
"Metadata": [
{
"name": "World.Obj",
"type": "Geometry",
"bbox": [
-182.79333499999998,
-90,
180,
83.62735699999999
],
"styleColumn": "MI_Style"
},
{
"name": "WorldCap.Country",
"type": "String"
}
],
"TableMetadata": {
"supportsInsert": false,
"supportsDelete": false,
"supportsUpdate": false,
"KeyDefinition": {
"type": "None",
"attributes": []
},
"parameters": [
{
"name": "param",
"description": "List of Countries",
"value": [
"Canada",
"United States"
],
"type": "STRING"
}
],
"referencedTables": [
"/Samples/NamedTables/WorldTable"
]
}
}
The response contains a list of the bind parameters defined in the named view table. It also contains all of the named tables that are used in the SQL query. For a join query, all of the named tables that are used in the join would be part of referencedTables.