Returns information on a query in the Risk module. Each user can only access queries of which they are author, editor, or an audience member.
URL
{RMUrl}/api/Risk/queries/<Query>/metadata
REQUEST METHOD
GET
URL PARAMETERS
Query: This parameter is provided in the URL and can be either the query name or the query GUID. Queries with special characters in their names cannot be run through the API.
REQUEST EXAMPLE
{RMUrl}/api/Risk/queries/Asset Components/metadata
{RMUrl}/api/Risk/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":"dfc3d913-f338-11e4-8263-74867afcbde0","AuthorName":"John Smith","AuthorPhone":"+1-212-555-1001","AuthorEmail":"jsmith@example.com","Id":"75057254-9392-466f-95bf-e9a93baac364","Name":"Risk Results","Columns":[{"Name":"Name","SmallCaption":"Asset Comp","Caption":"Asset Component Name (Asset Comp)","Order":0,"IsGroup":false,"IsCustomAttribute":false,"Type":"Text","SortOrder":"None"},{"Name":"AssetName","SmallCaption":"Asset","Caption":"Asset Name (Asset)","Order":1,"IsGroup":false,"IsCustomAttribute":false,"Type":"Text","SortOrder":"None"},{"Name":"AssetType","SmallCaption":"Asset Type","Caption":"Asset Type","Order":2,"IsGroup":false,"IsCustomAttribute":false,"Type":"Text","SortOrder":"None"},{"Name":"IdentifiedRisk","SmallCaption":"Ident PSR","Caption":"Identified Risk (Ident PSR)","Order":3,"IsGroup":false,"IsCustomAttribute":false,"Type":"Number","SortOrder":"None"},{"Name":"GapIndex","SmallCaption":"Gap Index","Caption":"Gap Index","Order":4,"IsGroup":false,"IsCustomAttribute":false,"Type":"Percentual","SortOrder":"None"},{"Name":"RiskIndex","SmallCaption":"RI","Caption":"Risk Index (RI)","Order":5,"IsGroup":false,"IsCustomAttribute":false,"Type":"Percentual","SortOrder":"None"},{"Name":"SecurityIndex","SmallCaption":"SI","Caption":"Security Index (SI)","Order":6,"IsGroup":false,"IsCustomAttribute":false,"Type":"Percentual","SortOrder":"None"},{"Name":"ControlIndex","SmallCaption":"Ctrl Index","Caption":"Control Index (Ctrl Index)","Order":7,"IsGroup":false,"IsCustomAttribute":false,"Type":"Percentual","SortOrder":"None"}],"UpdatedOn":"\/Date(-62135596800000)\/"}