Returns information on a query in the ERM solution. Each user can only access queries of which they are author or an audience member.
URL
{RMUrl}/api/enterpriseriskmanagement/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/enterpriseriskmanagement/queries/Enterprise Objectives/metadata
{RMUrl}/api/enterpriseriskmanagement/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":"7b06ee69-12d6-11e5-80d9-00155d00020d","AuthorName":"Rachel Price","AuthorPhone":"16544654","AuthorEmail":"rprice@exemplo.com","Id":"8e73d274-efa5-4582-a6aa-1ccbcb4fb69b","Name":"API_02","Columns":[{"Name":"AccountingDate","SmallCaption":"Accounting Date","Caption":"Accounting Date","Order":0,"IsGroup":false,"IsCustomAttribute":true,"Type":"DateTime","SortOrder":"None"},
{"Name":"Name","SmallCaption":"Nome","Caption":"Nome","Order":1,"IsGroup":false,"IsCustomAttribute":true,"Type":"Text","SortOrder":"None"},
{"Name":"LossEventResponsible","SmallCaption":"Responsable","Caption":"Responsable","Order":2,"IsGroup":false,"IsCustomAttribute":true,"Type":"HRReference","SortOrder":"None"},
{"Name":"text","SmallCaption":"Required Text","Caption":"Required Text","Order":3,"IsGroup":false,"IsCustomAttribute":true,"Type":"Text","SortOrder":"None"},
{"Name":"Type","SmallCaption":"Type","Caption":"Type","Order":4,"IsGroup":false,"IsCustomAttribute":true,"Type":"Text","SortOrder":"None"},
{"Name":"Value","SmallCaption":"Value","Caption":"Value","Order":5,"IsGroup":false,"IsCustomAttribute":true,"Type":"Number","SortOrder":"None"}],"UpdatedOn":"\/Date(-62135596800000)\/"}