Returns information on a query from the Organization module. Each user can only access queries of which they are author, editor, or an audience member.
URL
{RMUrl}/api/Organization/queries/<Query>/metadata
REQUEST METHOD
GET
URL PARAMETERS
Query: This parameter is provided in the URL and can be either the name or GUID of the query. Queries with special characters in their names cannot be run through the API.
REQUEST EXAMPLE
{RMUrl}/api/Organization/queries/Grouping/metadata
{RMUrl}/api/Organization/queries/cc45b704-b3d5-11e0-8b69-001ec91f4b0a/metadata
SUCCESS RESPONSE
Returns a QueryMetadata in the following format:
QueryMetadata
{
Guid Id;
string Name;
string AuthorId;
string AuthorName;
string AuthorPhone;
string AuthorEmail;
ColumnMetadata[] Columns;
}
The "Columns" field has the following format:
{
string Name;
string SmallCaption;
string Caption;
int? Order;
bool IsGroup;
bool IsCustomAttribute;
ColumnType? Type;
ColumnSortOrder SortOrder;
}
The "ColumnType" field may have the following values: Text, Percentual, Number, Command, TextOrLink, Link, GeoReference, Real, Date, DateTime, Html, Formattable.
The "ColumnSortOrder" field may have the following values: None, Ascending, Descending.
SUCCESS RESPONSE EXAMPLE
{"AuthorId":"ac6b1ec9-b85f-11e5-80f9-00155d00020d","AuthorName":"John Smith","AuthorPhone":"+1-212-555-1001",
"AuthorEmail":"jsmith@example.com","Id":"d94e55f9-0016-47c4-9ced-e3e85b74c84c","Name":"Organization Query","Columns":[{"Name":"Asset 1","SmallCaption":"Asset1","Caption":"Asset1","Order":0,"IsGroup":false,"IsCustomAttribute":false,"Type":"Text","SortOrder":"None"},
{"Name":"AssetTypeName","SmallCaption":"AssetType","Caption":"AssetType","Order":1,"IsGroup":false,"IsCustomAttribute":false,"Type":"Text","SortOrder":"None"},
{"Name":"Description","SmallCaption":"Description","Caption":"Description","Order":2,"IsGroup":false,"IsCustomAttribute":false,"Type":"Text","SortOrder":"None"},{"Name":"Relevance","SmallCaption":"R","Caption":"Relevance (R)","Order":3,"IsGroup":false,"IsCustomAttribute":false,"Type":"Formattable","SortOrder":"None"},
{"Name":"Latitude","SmallCaption":"Latitude","Caption":"Latitude","Order":4,"IsGroup":false,"IsCustomAttribute":false,"Type":"GeoReference","SortOrder":"None"},
{"Name":"Longitude","SmallCaption":"Longitude","Caption":"Longitude","Order":5,"IsGroup":false,"IsCustomAttribute":false,"Type":"GeoReference","SortOrder":"None"}],"UpdatedOn":"\/Date(-62135596800000)\/"}