#' List DatabaseTableSizes
#'
#' This function returns a dataframe or json object of DatabaseTableSizes
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given DatabaseTableSizes. Defaults to FALSE for all return fields which, for convenience, returns all fields for the DatabaseTableSizes.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('DatabaseTableSize') to get more field paths.
#' @param searchConditionsList A list of search conditions to filter results which are joined by the searchConditionsGroupType. Of the form {FieldName} {ConditionType} {SearchCondition}. For example, c('StudentID LessEqual 500', 'LastName Like Ander\%'). Run \code{\link{listSearchConditionTypes}} for a list of ConditionTypes. Defaults to NULL (unfiltered).
#' @param searchConditionsGroupType The conjunction which joins multiple searchConditions in the searchConditionsList. Either 'Or' or 'And'. Defaults to 'And'.
#' @param searchSortFieldNamesList The list of fields sort results by. Defaults to NULL (unsorted).
#' @param searchSortFieldNamesDescendingList A list of T/F values corresponding to whether to sort each field in searchSortFieldNamesList in descending order. Defaults to F for each FieldName in searchSortFieldNamesList.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param page Results are paginated. The page of results to return. Default is 1.
#' @param pageSize Results are paginated. The number of records per page to return. Default is 100,000 (essentially all records for most objects).
#' @param flatten Whether to flatten results into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return A list of DatabaseTableSizes
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
listDatabaseTableSizes <- function(searchConditionsList = NULL, CreatedTime = F, DatabaseTableID = F, DatabaseTableSizeID = F, DataKB = F, IndexKB = F, ModifiedTime = F, Records = F, RemainingFreeSpaceKB = F, ReservedKB = F, UnusedKB = F, UsedKB = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, searchConditionsGroupType = "And", searchSortFieldNamesList = NULL, searchSortFieldNamesDescendingList = NULL, entityId = 1, query = NULL, page = 1, pageSize = 100000, flatten = T, returnResponse = F){
params <- as.list(environment())
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
listSkyObjects(module = "Monitor", objectName = "DatabaseTableSize", searchFields = searchFields %>% append(fieldPaths), page = page, pageSize = pageSize, SearchConditionsList = searchConditionsList, SearchConditionsGroupType = searchConditionsGroupType, SearchSortFieldNamesList = searchSortFieldNamesList, SearchSortFieldNamesDescendingList = searchSortFieldNamesDescendingList, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Get a DatabaseTableSize
#'
#' This function returns a dataframe or json object of a DatabaseTableSize
#' @param DatabaseTableSizeID The ID of the DatabaseTableSize to return.
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given DatabaseTableSize. Defaults to FALSE for all return fields which, for convenience, returns all fields for the DatabaseTableSize.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('DatabaseTableSize') to get more field paths.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return A dataframe or of DatabaseTableSize
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
getDatabaseTableSize <- function(DatabaseTableSizeID, CreatedTime = F, DatabaseTableID = F, DataKB = F, IndexKB = F, ModifiedTime = F, Records = F, RemainingFreeSpaceKB = F, ReservedKB = F, UnusedKB = F, UsedKB = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment()) %>% purrr::keep(names(.) != "DatabaseTableSizeID")
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
getSkyObject(module = "Monitor", objectName = "DatabaseTableSize", objectId = DatabaseTableSizeID, searchFields = searchFields, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Delete a DatabaseTableSize
#'
#' This function deletes a DatabaseTableSize
#' @param DatabaseTableSizeID The ID of the DatabaseTableSize to delete
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return The DatabaseTableSizeID of the deleted DatabaseTableSize.
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
deleteDatabaseTableSize <- function(DatabaseTableSizeID, ignoreWarnings = F, entityId = 1, query = NULL, flatten = T, returnResponse = F){
deleteSkyObject(module = "Monitor", objectName = "DatabaseTableSize", objectId = DatabaseTableSizeID, ignoreWarnings = ignoreWarnings, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Create a DatabaseTableSize
#'
#' This function creates a DatabaseTableSize
#' @param fieldNames The field values to give the created DatabaseTableSize. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return A newly created DatabaseTableSize
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
createDatabaseTableSize <- function(DatabaseTableID = NULL, DataKB = NULL, IndexKB = NULL, Records = NULL, ReservedKB = NULL, UnusedKB = NULL, UsedKB = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
createSkyObject(module = "Monitor", objectName = "DatabaseTableSize", body = list(DataObject = body), searchFields = append("DatabaseTableSizeID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Modify a DatabaseTableSize
#'
#' This function modifies a DatabaseTableSize
#' @param fieldNames The field values to give the modified DatabaseTableSize. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return The modified DatabaseTableSize
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
modifyDatabaseTableSize <- function(DatabaseTableSizeID, DatabaseTableID = NULL, DataKB = NULL, IndexKB = NULL, Records = NULL, ReservedKB = NULL, UnusedKB = NULL, UsedKB = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
modifySkyObject(module = "Monitor", objectName = "DatabaseTableSize", objectId = DatabaseTableSizeID, body = list(DataObject = body), searchFields = append("DatabaseTableSizeID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' List DatabaseTables
#'
#' This function returns a dataframe or json object of DatabaseTables
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given DatabaseTables. Defaults to FALSE for all return fields which, for convenience, returns all fields for the DatabaseTables.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('DatabaseTable') to get more field paths.
#' @param searchConditionsList A list of search conditions to filter results which are joined by the searchConditionsGroupType. Of the form {FieldName} {ConditionType} {SearchCondition}. For example, c('StudentID LessEqual 500', 'LastName Like Ander\%'). Run \code{\link{listSearchConditionTypes}} for a list of ConditionTypes. Defaults to NULL (unfiltered).
#' @param searchConditionsGroupType The conjunction which joins multiple searchConditions in the searchConditionsList. Either 'Or' or 'And'. Defaults to 'And'.
#' @param searchSortFieldNamesList The list of fields sort results by. Defaults to NULL (unsorted).
#' @param searchSortFieldNamesDescendingList A list of T/F values corresponding to whether to sort each field in searchSortFieldNamesList in descending order. Defaults to F for each FieldName in searchSortFieldNamesList.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param page Results are paginated. The page of results to return. Default is 1.
#' @param pageSize Results are paginated. The number of records per page to return. Default is 100,000 (essentially all records for most objects).
#' @param flatten Whether to flatten results into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return A list of DatabaseTables
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
listDatabaseTables <- function(searchConditionsList = NULL, CreatedTime = F, DatabaseTableID = F, ModifiedTime = F, Name = F, Schema = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, searchConditionsGroupType = "And", searchSortFieldNamesList = NULL, searchSortFieldNamesDescendingList = NULL, entityId = 1, query = NULL, page = 1, pageSize = 100000, flatten = T, returnResponse = F){
params <- as.list(environment())
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
listSkyObjects(module = "Monitor", objectName = "DatabaseTable", searchFields = searchFields %>% append(fieldPaths), page = page, pageSize = pageSize, SearchConditionsList = searchConditionsList, SearchConditionsGroupType = searchConditionsGroupType, SearchSortFieldNamesList = searchSortFieldNamesList, SearchSortFieldNamesDescendingList = searchSortFieldNamesDescendingList, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Get a DatabaseTable
#'
#' This function returns a dataframe or json object of a DatabaseTable
#' @param DatabaseTableID The ID of the DatabaseTable to return.
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given DatabaseTable. Defaults to FALSE for all return fields which, for convenience, returns all fields for the DatabaseTable.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('DatabaseTable') to get more field paths.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return A dataframe or of DatabaseTable
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
getDatabaseTable <- function(DatabaseTableID, CreatedTime = F, ModifiedTime = F, Name = F, Schema = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment()) %>% purrr::keep(names(.) != "DatabaseTableID")
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
getSkyObject(module = "Monitor", objectName = "DatabaseTable", objectId = DatabaseTableID, searchFields = searchFields, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Delete a DatabaseTable
#'
#' This function deletes a DatabaseTable
#' @param DatabaseTableID The ID of the DatabaseTable to delete
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return The DatabaseTableID of the deleted DatabaseTable.
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
deleteDatabaseTable <- function(DatabaseTableID, ignoreWarnings = F, entityId = 1, query = NULL, flatten = T, returnResponse = F){
deleteSkyObject(module = "Monitor", objectName = "DatabaseTable", objectId = DatabaseTableID, ignoreWarnings = ignoreWarnings, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Create a DatabaseTable
#'
#' This function creates a DatabaseTable
#' @param fieldNames The field values to give the created DatabaseTable. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return A newly created DatabaseTable
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
createDatabaseTable <- function(Name = NULL, Schema = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
createSkyObject(module = "Monitor", objectName = "DatabaseTable", body = list(DataObject = body), searchFields = append("DatabaseTableID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Modify a DatabaseTable
#'
#' This function modifies a DatabaseTable
#' @param fieldNames The field values to give the modified DatabaseTable. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return The modified DatabaseTable
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
modifyDatabaseTable <- function(DatabaseTableID, Name = NULL, Schema = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
modifySkyObject(module = "Monitor", objectName = "DatabaseTable", objectId = DatabaseTableID, body = list(DataObject = body), searchFields = append("DatabaseTableID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' List DatabaseFileSizes
#'
#' This function returns a dataframe or json object of DatabaseFileSizes
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given DatabaseFileSizes. Defaults to FALSE for all return fields which, for convenience, returns all fields for the DatabaseFileSizes.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('DatabaseFileSize') to get more field paths.
#' @param searchConditionsList A list of search conditions to filter results which are joined by the searchConditionsGroupType. Of the form {FieldName} {ConditionType} {SearchCondition}. For example, c('StudentID LessEqual 500', 'LastName Like Ander\%'). Run \code{\link{listSearchConditionTypes}} for a list of ConditionTypes. Defaults to NULL (unfiltered).
#' @param searchConditionsGroupType The conjunction which joins multiple searchConditions in the searchConditionsList. Either 'Or' or 'And'. Defaults to 'And'.
#' @param searchSortFieldNamesList The list of fields sort results by. Defaults to NULL (unsorted).
#' @param searchSortFieldNamesDescendingList A list of T/F values corresponding to whether to sort each field in searchSortFieldNamesList in descending order. Defaults to F for each FieldName in searchSortFieldNamesList.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param page Results are paginated. The page of results to return. Default is 1.
#' @param pageSize Results are paginated. The number of records per page to return. Default is 100,000 (essentially all records for most objects).
#' @param flatten Whether to flatten results into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return A list of DatabaseFileSizes
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
listDatabaseFileSizes <- function(searchConditionsList = NULL, CreatedTime = F, DatabaseFileID = F, DatabaseFileSizeID = F, ModifiedTime = F, RemainingFreeSpaceMB = F, TotalMB = F, UsedMB = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, searchConditionsGroupType = "And", searchSortFieldNamesList = NULL, searchSortFieldNamesDescendingList = NULL, entityId = 1, query = NULL, page = 1, pageSize = 100000, flatten = T, returnResponse = F){
params <- as.list(environment())
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
listSkyObjects(module = "Monitor", objectName = "DatabaseFileSize", searchFields = searchFields %>% append(fieldPaths), page = page, pageSize = pageSize, SearchConditionsList = searchConditionsList, SearchConditionsGroupType = searchConditionsGroupType, SearchSortFieldNamesList = searchSortFieldNamesList, SearchSortFieldNamesDescendingList = searchSortFieldNamesDescendingList, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Get a DatabaseFileSize
#'
#' This function returns a dataframe or json object of a DatabaseFileSize
#' @param DatabaseFileSizeID The ID of the DatabaseFileSize to return.
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given DatabaseFileSize. Defaults to FALSE for all return fields which, for convenience, returns all fields for the DatabaseFileSize.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('DatabaseFileSize') to get more field paths.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return A dataframe or of DatabaseFileSize
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
getDatabaseFileSize <- function(DatabaseFileSizeID, CreatedTime = F, DatabaseFileID = F, ModifiedTime = F, RemainingFreeSpaceMB = F, TotalMB = F, UsedMB = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment()) %>% purrr::keep(names(.) != "DatabaseFileSizeID")
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
getSkyObject(module = "Monitor", objectName = "DatabaseFileSize", objectId = DatabaseFileSizeID, searchFields = searchFields, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Delete a DatabaseFileSize
#'
#' This function deletes a DatabaseFileSize
#' @param DatabaseFileSizeID The ID of the DatabaseFileSize to delete
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return The DatabaseFileSizeID of the deleted DatabaseFileSize.
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
deleteDatabaseFileSize <- function(DatabaseFileSizeID, ignoreWarnings = F, entityId = 1, query = NULL, flatten = T, returnResponse = F){
deleteSkyObject(module = "Monitor", objectName = "DatabaseFileSize", objectId = DatabaseFileSizeID, ignoreWarnings = ignoreWarnings, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Create a DatabaseFileSize
#'
#' This function creates a DatabaseFileSize
#' @param fieldNames The field values to give the created DatabaseFileSize. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return A newly created DatabaseFileSize
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
createDatabaseFileSize <- function(DatabaseFileID = NULL, TotalMB = NULL, UsedMB = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
createSkyObject(module = "Monitor", objectName = "DatabaseFileSize", body = list(DataObject = body), searchFields = append("DatabaseFileSizeID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Modify a DatabaseFileSize
#'
#' This function modifies a DatabaseFileSize
#' @param fieldNames The field values to give the modified DatabaseFileSize. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return The modified DatabaseFileSize
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
modifyDatabaseFileSize <- function(DatabaseFileSizeID, DatabaseFileID = NULL, TotalMB = NULL, UsedMB = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
modifySkyObject(module = "Monitor", objectName = "DatabaseFileSize", objectId = DatabaseFileSizeID, body = list(DataObject = body), searchFields = append("DatabaseFileSizeID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' List DatabaseFiles
#'
#' This function returns a dataframe or json object of DatabaseFiles
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given DatabaseFiles. Defaults to FALSE for all return fields which, for convenience, returns all fields for the DatabaseFiles.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('DatabaseFile') to get more field paths.
#' @param searchConditionsList A list of search conditions to filter results which are joined by the searchConditionsGroupType. Of the form {FieldName} {ConditionType} {SearchCondition}. For example, c('StudentID LessEqual 500', 'LastName Like Ander\%'). Run \code{\link{listSearchConditionTypes}} for a list of ConditionTypes. Defaults to NULL (unfiltered).
#' @param searchConditionsGroupType The conjunction which joins multiple searchConditions in the searchConditionsList. Either 'Or' or 'And'. Defaults to 'And'.
#' @param searchSortFieldNamesList The list of fields sort results by. Defaults to NULL (unsorted).
#' @param searchSortFieldNamesDescendingList A list of T/F values corresponding to whether to sort each field in searchSortFieldNamesList in descending order. Defaults to F for each FieldName in searchSortFieldNamesList.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param page Results are paginated. The page of results to return. Default is 1.
#' @param pageSize Results are paginated. The number of records per page to return. Default is 100,000 (essentially all records for most objects).
#' @param flatten Whether to flatten results into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return A list of DatabaseFiles
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
listDatabaseFiles <- function(searchConditionsList = NULL, CreatedTime = F, DatabaseFileID = F, DatabaseType = F, GrowthRate = F, GrowthRateConcat = F, GrowthType = F, MaxSizeMB = F, ModifiedTime = F, Name = F, PhysicalPath = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, searchConditionsGroupType = "And", searchSortFieldNamesList = NULL, searchSortFieldNamesDescendingList = NULL, entityId = 1, query = NULL, page = 1, pageSize = 100000, flatten = T, returnResponse = F){
params <- as.list(environment())
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
listSkyObjects(module = "Monitor", objectName = "DatabaseFile", searchFields = searchFields %>% append(fieldPaths), page = page, pageSize = pageSize, SearchConditionsList = searchConditionsList, SearchConditionsGroupType = searchConditionsGroupType, SearchSortFieldNamesList = searchSortFieldNamesList, SearchSortFieldNamesDescendingList = searchSortFieldNamesDescendingList, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Get a DatabaseFile
#'
#' This function returns a dataframe or json object of a DatabaseFile
#' @param DatabaseFileID The ID of the DatabaseFile to return.
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given DatabaseFile. Defaults to FALSE for all return fields which, for convenience, returns all fields for the DatabaseFile.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('DatabaseFile') to get more field paths.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return A dataframe or of DatabaseFile
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
getDatabaseFile <- function(DatabaseFileID, CreatedTime = F, DatabaseType = F, GrowthRate = F, GrowthRateConcat = F, GrowthType = F, MaxSizeMB = F, ModifiedTime = F, Name = F, PhysicalPath = F, UserIDCreatedBy = F, UserIDModifiedBy = F, fieldPaths = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment()) %>% purrr::keep(names(.) != "DatabaseFileID")
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
getSkyObject(module = "Monitor", objectName = "DatabaseFile", objectId = DatabaseFileID, searchFields = searchFields, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Delete a DatabaseFile
#'
#' This function deletes a DatabaseFile
#' @param DatabaseFileID The ID of the DatabaseFile to delete
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return The DatabaseFileID of the deleted DatabaseFile.
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
deleteDatabaseFile <- function(DatabaseFileID, ignoreWarnings = F, entityId = 1, query = NULL, flatten = T, returnResponse = F){
deleteSkyObject(module = "Monitor", objectName = "DatabaseFile", objectId = DatabaseFileID, ignoreWarnings = ignoreWarnings, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Create a DatabaseFile
#'
#' This function creates a DatabaseFile
#' @param fieldNames The field values to give the created DatabaseFile. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return A newly created DatabaseFile
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
createDatabaseFile <- function(DatabaseType = NULL, GrowthRate = NULL, GrowthType = NULL, MaxSizeMB = NULL, Name = NULL, PhysicalPath = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
createSkyObject(module = "Monitor", objectName = "DatabaseFile", body = list(DataObject = body), searchFields = append("DatabaseFileID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Modify a DatabaseFile
#'
#' This function modifies a DatabaseFile
#' @param fieldNames The field values to give the modified DatabaseFile. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return The modified DatabaseFile
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
modifyDatabaseFile <- function(DatabaseFileID, DatabaseType = NULL, GrowthRate = NULL, GrowthType = NULL, MaxSizeMB = NULL, Name = NULL, PhysicalPath = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
modifySkyObject(module = "Monitor", objectName = "DatabaseFile", objectId = DatabaseFileID, body = list(DataObject = body), searchFields = append("DatabaseFileID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' List MonitorThresholds
#'
#' This function returns a dataframe or json object of MonitorThresholds
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given MonitorThresholds. Defaults to FALSE for all return fields which, for convenience, returns all fields for the MonitorThresholds.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('MonitorThreshold') to get more field paths.
#' @param searchConditionsList A list of search conditions to filter results which are joined by the searchConditionsGroupType. Of the form {FieldName} {ConditionType} {SearchCondition}. For example, c('StudentID LessEqual 500', 'LastName Like Ander\%'). Run \code{\link{listSearchConditionTypes}} for a list of ConditionTypes. Defaults to NULL (unfiltered).
#' @param searchConditionsGroupType The conjunction which joins multiple searchConditions in the searchConditionsList. Either 'Or' or 'And'. Defaults to 'And'.
#' @param searchSortFieldNamesList The list of fields sort results by. Defaults to NULL (unsorted).
#' @param searchSortFieldNamesDescendingList A list of T/F values corresponding to whether to sort each field in searchSortFieldNamesList in descending order. Defaults to F for each FieldName in searchSortFieldNamesList.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param page Results are paginated. The page of results to return. Default is 1.
#' @param pageSize Results are paginated. The number of records per page to return. Default is 100,000 (essentially all records for most objects).
#' @param flatten Whether to flatten results into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return A list of MonitorThresholds
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
listMonitorThresholds <- function(searchConditionsList = NULL, CreatedTime = F, ErrorRange = F, ErrorRangeConcat = F, ModifiedTime = F, MonitorThresholdID = F, Name = F, RelatedMonitorID = F, Type = F, UserIDCreatedBy = F, UserIDModifiedBy = F, WarningRange = F, WarningRangeConcat = F, XMLFilter = F, fieldPaths = NULL, searchConditionsGroupType = "And", searchSortFieldNamesList = NULL, searchSortFieldNamesDescendingList = NULL, entityId = 1, query = NULL, page = 1, pageSize = 100000, flatten = T, returnResponse = F){
params <- as.list(environment())
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
listSkyObjects(module = "Monitor", objectName = "MonitorThreshold", searchFields = searchFields %>% append(fieldPaths), page = page, pageSize = pageSize, SearchConditionsList = searchConditionsList, SearchConditionsGroupType = searchConditionsGroupType, SearchSortFieldNamesList = searchSortFieldNamesList, SearchSortFieldNamesDescendingList = searchSortFieldNamesDescendingList, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Get a MonitorThreshold
#'
#' This function returns a dataframe or json object of a MonitorThreshold
#' @param MonitorThresholdID The ID of the MonitorThreshold to return.
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given MonitorThreshold. Defaults to FALSE for all return fields which, for convenience, returns all fields for the MonitorThreshold.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('MonitorThreshold') to get more field paths.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return A dataframe or of MonitorThreshold
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
getMonitorThreshold <- function(MonitorThresholdID, CreatedTime = F, ErrorRange = F, ErrorRangeConcat = F, ModifiedTime = F, Name = F, RelatedMonitorID = F, Type = F, UserIDCreatedBy = F, UserIDModifiedBy = F, WarningRange = F, WarningRangeConcat = F, XMLFilter = F, fieldPaths = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment()) %>% purrr::keep(names(.) != "MonitorThresholdID")
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
getSkyObject(module = "Monitor", objectName = "MonitorThreshold", objectId = MonitorThresholdID, searchFields = searchFields, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Delete a MonitorThreshold
#'
#' This function deletes a MonitorThreshold
#' @param MonitorThresholdID The ID of the MonitorThreshold to delete
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return The MonitorThresholdID of the deleted MonitorThreshold.
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
deleteMonitorThreshold <- function(MonitorThresholdID, ignoreWarnings = F, entityId = 1, query = NULL, flatten = T, returnResponse = F){
deleteSkyObject(module = "Monitor", objectName = "MonitorThreshold", objectId = MonitorThresholdID, ignoreWarnings = ignoreWarnings, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Create a MonitorThreshold
#'
#' This function creates a MonitorThreshold
#' @param fieldNames The field values to give the created MonitorThreshold. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return A newly created MonitorThreshold
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
createMonitorThreshold <- function(ErrorRange = NULL, Name = NULL, RelatedMonitorID = NULL, Type = NULL, WarningRange = NULL, XMLFilter = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
createSkyObject(module = "Monitor", objectName = "MonitorThreshold", body = list(DataObject = body), searchFields = append("MonitorThresholdID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Modify a MonitorThreshold
#'
#' This function modifies a MonitorThreshold
#' @param fieldNames The field values to give the modified MonitorThreshold. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return The modified MonitorThreshold
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
modifyMonitorThreshold <- function(MonitorThresholdID, ErrorRange = NULL, Name = NULL, RelatedMonitorID = NULL, Type = NULL, WarningRange = NULL, XMLFilter = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
modifySkyObject(module = "Monitor", objectName = "MonitorThreshold", objectId = MonitorThresholdID, body = list(DataObject = body), searchFields = append("MonitorThresholdID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' List MonitorThresholdHistories
#'
#' This function returns a dataframe or json object of MonitorThresholdHistories
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given MonitorThresholdHistories. Defaults to FALSE for all return fields which, for convenience, returns all fields for the MonitorThresholdHistories.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('MonitorThresholdHistory') to get more field paths.
#' @param searchConditionsList A list of search conditions to filter results which are joined by the searchConditionsGroupType. Of the form {FieldName} {ConditionType} {SearchCondition}. For example, c('StudentID LessEqual 500', 'LastName Like Ander\%'). Run \code{\link{listSearchConditionTypes}} for a list of ConditionTypes. Defaults to NULL (unfiltered).
#' @param searchConditionsGroupType The conjunction which joins multiple searchConditions in the searchConditionsList. Either 'Or' or 'And'. Defaults to 'And'.
#' @param searchSortFieldNamesList The list of fields sort results by. Defaults to NULL (unsorted).
#' @param searchSortFieldNamesDescendingList A list of T/F values corresponding to whether to sort each field in searchSortFieldNamesList in descending order. Defaults to F for each FieldName in searchSortFieldNamesList.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param page Results are paginated. The page of results to return. Default is 1.
#' @param pageSize Results are paginated. The number of records per page to return. Default is 100,000 (essentially all records for most objects).
#' @param flatten Whether to flatten results into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return A list of MonitorThresholdHistories
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
listMonitorThresholdHistories <- function(searchConditionsList = NULL, CreatedTime = F, CurrentValue = F, CurrentValueConcat = F, ErrorRange = F, ErrorRangeConcat = F, ModifiedTime = F, MonitorThresholdHistoryID = F, MonitorThresholdID = F, Status = F, UserIDCreatedBy = F, UserIDModifiedBy = F, WarningRange = F, WarningRangeConcat = F, XMLFilter = F, fieldPaths = NULL, searchConditionsGroupType = "And", searchSortFieldNamesList = NULL, searchSortFieldNamesDescendingList = NULL, entityId = 1, query = NULL, page = 1, pageSize = 100000, flatten = T, returnResponse = F){
params <- as.list(environment())
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
listSkyObjects(module = "Monitor", objectName = "MonitorThresholdHistory", searchFields = searchFields %>% append(fieldPaths), page = page, pageSize = pageSize, SearchConditionsList = searchConditionsList, SearchConditionsGroupType = searchConditionsGroupType, SearchSortFieldNamesList = searchSortFieldNamesList, SearchSortFieldNamesDescendingList = searchSortFieldNamesDescendingList, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Get a MonitorThresholdHistory
#'
#' This function returns a dataframe or json object of a MonitorThresholdHistory
#' @param MonitorThresholdHistoryID The ID of the MonitorThresholdHistory to return.
#' @param fieldNames A TRUE or FALSE value determining whether or not to return the field for the given MonitorThresholdHistory. Defaults to FALSE for all return fields which, for convenience, returns all fields for the MonitorThresholdHistory.
#' @param fieldPaths Fields from other objects with 'Many to One' or 'One to One' relationships to the given object listed as text. Run \code{\link{getSchemaForObjects}}('MonitorThresholdHistory') to get more field paths.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return A dataframe or of MonitorThresholdHistory
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
getMonitorThresholdHistory <- function(MonitorThresholdHistoryID, CreatedTime = F, CurrentValue = F, CurrentValueConcat = F, ErrorRange = F, ErrorRangeConcat = F, ModifiedTime = F, MonitorThresholdID = F, Status = F, UserIDCreatedBy = F, UserIDModifiedBy = F, WarningRange = F, WarningRangeConcat = F, XMLFilter = F, fieldPaths = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment()) %>% purrr::keep(names(.) != "MonitorThresholdHistoryID")
searchFields <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper())
ifelse(!any(searchFields %>% unlist()), searchFields <- searchFields %>% names(), searchFields <- searchFields %>% purrr::keep(~.x) %>% names())
getSkyObject(module = "Monitor", objectName = "MonitorThresholdHistory", objectId = MonitorThresholdHistoryID, searchFields = searchFields, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Delete a MonitorThresholdHistory
#'
#' This function deletes a MonitorThresholdHistory
#' @param MonitorThresholdHistoryID The ID of the MonitorThresholdHistory to delete
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return The MonitorThresholdHistoryID of the deleted MonitorThresholdHistory.
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
deleteMonitorThresholdHistory <- function(MonitorThresholdHistoryID, ignoreWarnings = F, entityId = 1, query = NULL, flatten = T, returnResponse = F){
deleteSkyObject(module = "Monitor", objectName = "MonitorThresholdHistory", objectId = MonitorThresholdHistoryID, ignoreWarnings = ignoreWarnings, entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Create a MonitorThresholdHistory
#'
#' This function creates a MonitorThresholdHistory
#' @param fieldNames The field values to give the created MonitorThresholdHistory. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return A newly created MonitorThresholdHistory
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
createMonitorThresholdHistory <- function(CurrentValue = NULL, ErrorRange = NULL, MonitorThresholdID = NULL, Status = NULL, WarningRange = NULL, XMLFilter = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
createSkyObject(module = "Monitor", objectName = "MonitorThresholdHistory", body = list(DataObject = body), searchFields = append("MonitorThresholdHistoryID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
#' Modify a MonitorThresholdHistory
#'
#' This function modifies a MonitorThresholdHistory
#' @param fieldNames The field values to give the modified MonitorThresholdHistory. Each defaults to NULL.
#' @param entityId The id of the entity (school). Run \code{\link{listEntities}} for a list of entities. Defaults to 1 (district).
#' @param query Queries to be added to the request. Ex. list(SchoolYearID = 1). Defaults to NULL.
#' @param flatten Whether to flatten result into a dataframe or return the json object. Default is TRUE (flatten to dataframe).
#' @param returnResponse Whether to return the server response instead of the results. Useful for debugging. Default is FALSE.
#' @concept Monitor
#' @return The modified MonitorThresholdHistory
#' \href{https://help.skyward.com/}{Skyward's Knowledge Hub}
#' @export
modifyMonitorThresholdHistory <- function(MonitorThresholdHistoryID, CurrentValue = NULL, ErrorRange = NULL, MonitorThresholdID = NULL, Status = NULL, WarningRange = NULL, XMLFilter = NULL, entityId = 1, query = NULL, flatten = T, returnResponse = F){
params <- as.list(environment())
body <- params %>% purrr::keep(names(params) %>% stringr::str_sub(1,1) == names(params) %>% stringr::str_sub(1,1) %>% stringr::str_to_upper()) %>% purrr::compact()
modifySkyObject(module = "Monitor", objectName = "MonitorThresholdHistory", objectId = MonitorThresholdHistoryID, body = list(DataObject = body), searchFields = append("MonitorThresholdHistoryID", body %>% names()), entityId = entityId, query = query, flatten = flatten, returnResponse = returnResponse)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.