Informational API Calls for WebReports
Trouble seeing the images? Right click on images and open in new tab to enlarge or zoom in on the page (Ctrl + mousewheel).
In this article we provide detail on the informational API calls. These calls return lists / tables associated with users / roles / connections / UDFs.
- Returns lists for Connections, Roles, and Users in WebReports
- Returns a table for UDFs displaying the Name, Description and Query Identifier
Why Use the Informational API Calls?
The informational API calls will allow users with the API role, or API key, to retrieve user / management information such as the available UDFs, connections, roles and users list.
Example Informational API Calls include the following:
- UserDefinedFields (returns a list of the UDFs)
- Connections (returns a list of connections)
- Roles (returns a list of roles)
- GetUsersList (returns a list of usernames)
API Prerequisites:
- Must have the API role in WebReports
- Established Connection/Cookie
Video Tutorial:
Not yet available.
Structure / Examples of Informational API Calls
Informational API Endpoints
UserDefinedFields: /api/Service/UserDefinedFields
Connections: /api/Service/Connections
Roles: /api/Service/Roles
GetUsersList: /api/Service/GetUsersList
GetReportAssignments: /api/Service/GetReportAssignments
Informational API Endpoints using the API Key Controller
/extapi/APIWebReport/UserDefinedFields
/extapi/APIWebReport/Connections
/extapi/APIWebReport/Roles
/extapi/APIWebReport/GetUsersList
Example getting Connections
Dim Params As StringContent = New StringContent(JsonConvert.SerializeObject("", Formatting.Indented), Encoding.UTF8, "application/json")
Dim openResponse = client.PostAsync("server/api/Service/Connections",Params).GetAwaiter().GetResult()
Example getting Roles
Dim Params As StringContent = New StringContent(JsonConvert.SerializeObject("", Formatting.Indented), Encoding.UTF8, "application/json")
Dim openResponse = client.PostAsync("server/api/Service/Roles",Params).GetAwaiter().GetResult()
Example getting User List
Dim Params As StringContent = New StringContent(JsonConvert.SerializeObject("", Formatting.Indented), Encoding.UTF8, "application/json")
Dim openResponse = client.PostAsync("server/api/Service/GetUsersList",Params).GetAwaiter().GetResult()
Example GetReportAssignments
GetReportAssignments returns a list of "ReportAssignment". The structure for this list is below:
public class ReportAssignment
{
public string Id { get; set; }
public string Name { get; set; }
public string ViewId { get; set; }
public string ConnectionName { get; set; }
public string Role { get; set; }
public string Category { get; set; }
public string Description { get; set; }
public string Type { get; set; }
}
Dim Params As StringContent = New StringContent(JsonConvert.SerializeObject("", Formatting.Indented), Encoding.UTF8, "application/json")
Dim openResponse = client.PostAsync("server/api/Service/GetReportAssignments",Params).GetAwaiter().GetResult()
Comments
0 comments
Please sign in to leave a comment.