Interface IArcherRestAPI
Assembly: Estrelica.Archer.Utility.dll
Syntax
[StayPublic]
[DoNotObfuscateType]
public interface IArcherRestAPI
Properties
Returns the Archer version number from the connected Archer instance
Declaration
string ArcherVersion { get; }
Property Value
Methods
Adds an Archer Group to an Archer Role
Declaration
bool AddGroupToRole(int groupId, int roleId)
Parameters
int
groupId
The id of the group to be added
|
int
roleId
The id of the role to which the group is to be added
|
Returns
bool
true if the add was successful
|
Adds an Archer User to an Archer Group
Declaration
bool AddUserToGroup(int userId, int groupId)
Parameters
int
userId
The id of the user to be added
|
int
groupId
The id of the group to which the user is to be added
|
Returns
bool
true if the add was successful
|
Adds an Archer User to an Archer Role
Declaration
bool AddUserToRole(int userId, int roleId)
Parameters
int
userId
The id of the user to be added
|
int
roleId
The id of the role to which the user is to be added
|
Returns
bool
true if the add was successful
|
Changes an Archer User's password
Declaration
bool ChangeUserPassword(int userId, string newPassword)
Parameters
int
userId
The id of the user to be modified
|
string
newPassword
The new password to be set for the user
|
Returns
bool
true if the password change was successful
|
Creates a new Archer Group having the given name, description, parent and child groups, and users
Declaration
int CreateGroup(string groupName, string description = null, IEnumerable<int> parentGroupIds = null, IEnumerable<int> childGroupIds = null, IEnumerable<int> userIds = null)
Parameters
Returns
int
The id of the created group
|
Creates a new Archer Role having the given name, description, alias, groups, users, and default assignment status
Declaration
int CreateRole(string roleName, string description = null, string alias = null, IEnumerable<int> groupIds = null, IEnumerable<int> userIds = null, bool isDefault = false)
Parameters
Returns
int
The id of the created role
|
Creates a new Archer User
Declaration
int CreateUser(string firstName, string lastName, string password, string middleName = null, string username = null, int? domainId = null, int? languageId = null, string timezone = null, bool forcePasswordChange = false, AccountStatus accountStatus = AccountStatus.Active, int securityParameterId = 1, IEnumerable<int> groupIds = null, IEnumerable<int> roleIds = null)
Parameters
string
firstName
The user's first name (required)
|
string
lastName
The user's last name (required)
|
string
password
The user's password (required)
|
string
middleName
The user's middle name
|
string
username
The user's username. If null (or already in use) Archer will compose a username automatically.
|
int?
domainId
The integer Id of the user's domain, if applicable
|
int?
languageId
The integer Id of the user's preferred language, if applicable
|
string
timezone
The user's Timezone string. See Estrelica.Archer.Metadata.Timezone.Ids for valid values.
If null, the user will be assigned the default Timezone configured for the Archer instance. If invalid, an exception will be raised.
|
bool
forcePasswordChange
Indicates whether the user will be required to set a new password on first login
|
AccountStatus
accountStatus
The status of the user account. Valid values are Active (default), Inactive, Locked or Deleted
|
int
securityParameterId
The Security Parameter Id of the user. Default is 1 (General User).
|
IEnumerable<int>
groupIds
The Ids of the groups, if any, that the user should be added to.
|
IEnumerable<int>
roleIds
The Ids of the roles, if any, that the user should be added to.
|
Returns
int
The id of the created user
|
Deletes an Archer Content record
Declaration
bool DeleteContent(int contentId, bool throwExceptionIfInvalid = false)
Parameters
int
contentId
The id of the content to be deleted
|
bool
throwExceptionIfInvalid
|
Returns
bool
true if the deletion was successful
|
Declaration
bool DeleteGroup(int groupId)
Parameters
int
groupId
The id of the group to be deleted
|
Returns
bool
true if the deletion was successful
|
Declaration
bool DeleteRole(int roleId)
Parameters
int
roleId
The id of the role to be deleted
|
Returns
bool
true if the deletion was successful
|
Declaration
bool DeleteUser(int userId)
Parameters
int
userId
The id of the user to be deleted
|
Returns
bool
true if the deletion was successful
|
Queues a datafeed for execution, optionally including any referenced datafeeds
Declaration
void ExecuteDatafeed(Guid datafeedGuid, bool includeReferenceFeeds = false)
Parameters
Guid
datafeedGuid
The guid of the datafeed to be executed
|
bool
includeReferenceFeeds
True if other datafeeds referenced by the datafeed should also be executed, false if not
|
Returns all available applications in the Archer environment
Declaration
IEnumerable<IDictionary<string, dynamic>> GetAllApplications(int pageSize = 100)
Parameters
Returns
IEnumerable<IDictionary<string, dynamic>>
Returns all available application metadata deserialized into IEnumerable<IDictionary<string,dynamic>gt;
|
Declaration
IEnumerable<IDictionary<string, dynamic>> GetAllDatafeedsArcher()
Returns
Declaration
IEnumerable<IDictionary<string, dynamic>> GetAllGroupMemberships(int pageSize = 100)
Parameters
Returns
Declaration
IEnumerable<IDictionary<string, dynamic>> GetAllGroups(int pageSize = 100)
Parameters
Returns
Returns layouts available for the specified level. If extensions are available this will include non-default layouts, otherwise
the returned enumeration will only contain the default layout.
Declaration
IEnumerable<IDictionary<string, dynamic>> GetAllLayoutsByLevelId(int levelId)
Parameters
Returns
Declaration
IEnumerable<IDictionary<string, dynamic>> GetAllLevels(int pageSize = 100)
Parameters
Returns
Declaration
IEnumerable<IDictionary<string, dynamic>> GetAllQuestionnaires(int pageSize = 100, bool treatResourceNotFoundAsEmptyResult = true)
Parameters
int
pageSize
|
bool
treatResourceNotFoundAsEmptyResult
|
Returns
Declaration
IEnumerable<IDictionary<string, dynamic>> GetAllRoleMemberships(int pageSize = 100, bool treatResourceNotFoundAsEmptyResult = true)
Parameters
int
pageSize
|
bool
treatResourceNotFoundAsEmptyResult
|
Returns
Returns all available Roles in the system. If extensions are available these will be augmented with additional information.
Declaration
IEnumerable<IDictionary<string, dynamic>> GetAllRoles(int pageSize = 100)
Parameters
Returns
Declaration
IEnumerable<IDictionary<string, dynamic>> GetAllSecurityParameters(int pageSize = 100, bool treatResourceNotFoundAsEmptyResult = true)
Parameters
int
pageSize
|
bool
treatResourceNotFoundAsEmptyResult
|
Returns
Declaration
IEnumerable<IDictionary<string, dynamic>> GetAllUsers(int pageSize = 1000)
Parameters
Returns
Declaration
IDictionary<string, dynamic> GetApplication(int applicationId, bool treatResourceNotFoundAsNull = true)
Parameters
int
applicationId
|
bool
treatResourceNotFoundAsNull
|
Returns
Declaration
IDictionary<string, dynamic> GetAttachment(int attachmentId, bool treatResourceNotFoundAsNull = true)
Parameters
int
attachmentId
|
bool
treatResourceNotFoundAsNull
|
Returns
Declaration
Tuple<string, byte[]> GetAttachmentDecoded(int attachmentId, bool treatResourceNotFoundAsNull = true)
Parameters
int
attachmentId
|
bool
treatResourceNotFoundAsNull
|
Returns
Declaration
IEnumerable<IDictionary<string, dynamic>> GetContentByContentIdsAndFieldIds(IEnumerable<int> contentIds, IEnumerable<int> fieldIds, DateTime? lastUpdatedStartDate = null, DateTime? lastUpdatedEndDate = null, int pageSize = 1000, bool treatResourceNotFoundAsEmptyResult = false)
Parameters
Returns
Declaration
IDictionary<string, dynamic> GetContentById(int contentId)
Parameters
Returns
Declaration
XElement GetContentByIdAsXml(int contentId)
Parameters
Returns
Declaration
IEnumerable<IDictionary<string, dynamic>> GetContentByReferenceFieldId(int fieldId, int pageSize = 1000)
Parameters
Returns
Declaration
IEnumerable<IDictionary<string, dynamic>> GetContentHistory(int contentId, bool treatResourceNotFoundAsEmptyResult = true)
Parameters
int
contentId
|
bool
treatResourceNotFoundAsEmptyResult
|
Returns
Declaration
IEnumerable<IDictionary<string, dynamic>> GetDatafeedHistory(Guid datafeedGuid, int pageSize = 2147483647)
Parameters
Returns
Declaration
IEnumerable<IDictionary<string, dynamic>> GetDatafeedHistoryMessages(int historyMessageId)
Parameters
Returns
Declaration
IDictionary<string, dynamic> GetDatafeedRecentRunDetail(Guid datafeedGuid)
Parameters
Returns
Declaration
IDictionary<string, dynamic> GetDefaultLayoutForLevel(int levelId, bool treatResourceNotFoundAsNull = true)
Parameters
int
levelId
|
bool
treatResourceNotFoundAsNull
|
Returns
Declaration
IDictionary<string, dynamic> GetEventAction(int eventActionId)
Parameters
Returns
Declaration
IEnumerable<IDictionary<string, dynamic>> GetEventActionsForEventRule(int eventRuleId, int pageSize = 100)
Parameters
Returns
Declaration
IDictionary<string, dynamic> GetEventRule(int eventRuleId)
Parameters
Returns
Declaration
IEnumerable<IDictionary<string, dynamic>> GetEventRulesForLevel(int levelId, int pageSize = 100)
Parameters
Returns
Declaration
IDictionary<string, dynamic> GetFieldDefinition(int fieldId, bool treatResourceNotFoundAsEmptyResult = true)
Parameters
int
fieldId
|
bool
treatResourceNotFoundAsEmptyResult
|
Returns
Declaration
IEnumerable<IDictionary<string, dynamic>> GetFieldDefinitionsForLevel(int levelId, int pageSize = 1000, bool treatResourceNotFoundAsEmptyResult = true)
Parameters
int
levelId
|
int
pageSize
|
bool
treatResourceNotFoundAsEmptyResult
|
Returns
Declaration
IEnumerable<IDictionary<string, dynamic>> GetFieldDisplaysForLevel(int levelId, int pageSize = 100, bool treatResourceNotFoundAsEmptyResult = true)
Parameters
int
levelId
|
int
pageSize
|
bool
treatResourceNotFoundAsEmptyResult
|
Returns
Declaration
IEnumerable<int> GetFieldIdsByEventRuleFilterByLevelId(int levelId)
Parameters
Returns
Declaration
IDictionary<string, dynamic> GetGroup(int groupId, bool treatResourceNotFoundAsNull = true)
Parameters
int
groupId
|
bool
treatResourceNotFoundAsNull
|
Returns
Declaration
IEnumerable<IDictionary<string, dynamic>> GetGroupHierarchy(int pageSize = 100)
Parameters
Returns
Declaration
IDictionary<string, dynamic> GetGroupMembership(int groupId)
Parameters
Returns
Declaration
IEnumerable<IDictionary<string, dynamic>> GetGroupsForUser(int userId, int pageSize = 100)
Parameters
Returns
Declaration
IDictionary<string, dynamic> GetHierarchicalValuesForValuesList(int valuesListId, bool treatResourceNotFoundAsNull = true)
Parameters
int
valuesListId
|
bool
treatResourceNotFoundAsNull
|
Returns
Declaration
IDictionary<string, dynamic> GetLevel(int levelId, bool treatResourceNotFoundAsNull = true)
Parameters
int
levelId
|
bool
treatResourceNotFoundAsNull
|
Returns
Declaration
IEnumerable<IDictionary<string, dynamic>> GetLevelsForReferenceField(int fieldId, int pageSize = 100, bool treatResourceNotFoundAsEmptyResult = true)
Parameters
int
fieldId
|
int
pageSize
|
bool
treatResourceNotFoundAsEmptyResult
|
Returns
Declaration
IDictionary<string, dynamic> GetQuestionnaire(int questionnaireId, bool treatResourceNotFoundAsNull = true)
Parameters
int
questionnaireId
|
bool
treatResourceNotFoundAsNull
|
Returns
Declaration
IDictionary<string, dynamic> GetQuestionnaireRule(int questionnaireRuleId, bool treatResourceNotFoundAsNull = true)
Parameters
int
questionnaireRuleId
|
bool
treatResourceNotFoundAsNull
|
Returns
Declaration
IEnumerable<IDictionary<string, dynamic>> GetQuestionnaireRulesForLevel(int levelId, int pageSize = 100, bool treatResourceNotFoundAsEmptyResult = true)
Parameters
int
levelId
|
int
pageSize
|
bool
treatResourceNotFoundAsEmptyResult
|
Returns
Declaration
IDictionary<string, dynamic> GetRole(int roleId)
Parameters
Returns
Declaration
IDictionary<string, dynamic> GetRoleMembership(int roleId, bool treatResourceNotFoundAsEmptyResult = true)
Parameters
int
roleId
|
bool
treatResourceNotFoundAsEmptyResult
|
Returns
Declaration
IDictionary<string, dynamic> GetSecurityParameter(int securityParameterId, bool treatResourceNotFoundAsNull = true)
Parameters
int
securityParameterId
|
bool
treatResourceNotFoundAsNull
|
Returns
Declaration
IDictionary<string, dynamic> GetUser(int userId, bool treatResourceNotFoundAsNull = true)
Parameters
int
userId
|
bool
treatResourceNotFoundAsNull
|
Returns
Declaration
IEnumerable<IDictionary<string, dynamic>> GetUserGroupSelectionsForField(int fieldId, int pageSize = 100, bool treatResourceNotFoundAsEmptyResult = true)
Parameters
int
fieldId
|
int
pageSize
|
bool
treatResourceNotFoundAsEmptyResult
|
Returns
Declaration
IEnumerable<int> GetUserIdsForGroup(int groupId, int pageSize = 1000)
Parameters
Returns
Declaration
IEnumerable<IDictionary<string, dynamic>> GetUsersForGroup(int groupId, int pageSize = 1000, string requestBody = null)
Parameters
Returns
Declaration
IDictionary<string, dynamic> GetValuesListDefinition(int valuesListId, bool treateResourceNotFoundAsNull = true)
Parameters
int
valuesListId
|
bool
treateResourceNotFoundAsNull
|
Returns
Declaration
IEnumerable<IDictionary<string, dynamic>> GetValuesListFieldDefinitionsForLevel(int levelId, int pageSize = 1000, bool treatResourceNotFoundAsEmptyResult = true)
Parameters
int
levelId
|
int
pageSize
|
bool
treatResourceNotFoundAsEmptyResult
|
Returns
Declaration
IEnumerable<IDictionary<string, dynamic>> GetValuesListValuesForValuesList(int valuesListId, bool treatResourceNotFoundAsEmptyResult = true)
Parameters
int
valuesListId
|
bool
treatResourceNotFoundAsEmptyResult
|
Returns
Declaration
IDictionary<string, dynamic> GetWorkflowActions(int contentId, bool treatResourceNotFoundAsNull = true)
Parameters
int
contentId
|
bool
treatResourceNotFoundAsNull
|
Returns
Declaration
IDictionary<string, dynamic> InsertContent(string jsonContent)
Parameters
Returns
Declaration
bool Logout(IArcherAuthProvider sessionProvider)
Parameters
Returns
Declaration
int PostAttachment(string sourceFilename, string attachmentName = null, bool encryptBeforeSaving = false)
Parameters
Returns
Declaration
int PostAttachmentFromBase64(string base64content, string attachmentName, bool encryptBeforeSaving = false)
Parameters
Returns
Declaration
int PostAttachmentFromBytes(byte[] content, string attachmentName, bool encryptBeforeSaving = false)
Parameters
Returns
Declaration
IDictionary<string, dynamic> PostContent(IDictionary<string, dynamic> content)
Parameters
Returns
Removes an Archer Group from an Archer Role
Declaration
bool RemoveGroupFromRole(int groupId, int roleId)
Parameters
int
groupId
The id of the group to be removed
|
int
roleId
The id of the role to which the group is to be removed
|
Returns
bool
true if the removal was successful
|
Declaration
bool RemoveUserFromGroup(int userId, int groupId)
Parameters
Returns
Removes an Archer Group from an Archer Role
Declaration
bool RemoveUserFromRole(int userId, int roleId)
Parameters
int
userId
The id of the user to be removed
|
int
roleId
The id of the role to which the user is to be removed
|
Returns
bool
true if the removal was successful
|
Declaration
bool TerminateSession(string sessionToken)
Parameters
Returns
Declaration
IDictionary<string, dynamic> UpdateContent(string jsonContent)
Parameters
Returns
Extension Methods