Skip to main content

WEBfactory 2010

WEBfactory 2010 WCF UserService Documentation

Abstract

This article provides all the needed information to learn and understand the WCF UserService documentation.

This WCF web service handles all the User related operations. The following methods are available:

GetCurrentUserDetails(string sessionId, string clientId)

Syntax

GetCurrentUserDetails(string sessionId, string clientId);

Description

Retrieves all available details about the currently logged in user

Parameters

  • sessionId (string) - the WEBfactory session id, obtained from a call to ISignalsService.Connect()

  • clientId (string) - the id of the client

Return Value

The UserDetailsDTO object, containing:

  • Name (string) - the username of the user

  • FirstName (string) - the first name of the user

  • LastName (string) - the last name of the user

  • Plant (string) - the plant to which the user is assigned

  • RFIDSerialNo (string) - the RFID serial number associated with the user

  • Company (string) - the company to which the user is assigned

  • Description (string) - the description of the user

GetAllUsers(string sessionId, string clientId, string userName, bool isDomainUser, int millisecondsTimeOut)

This method follows the WEBfactory 2010 Security Protocol. Read the Security note for more information.

Syntax

GetAllUsers(string sessionId, string clientId, string userName, bool isDomainUser, int millisecondsTimeOut);

Description

Retrieves all the WEBfactory 2010 users

Parameters

  • sessionId (string) - the unique ID of the session, returned by the connect() method

  • clientId (string) - the user defined unique ID of the client from which the web service is called

  • userName (string) - the name of the WEBfactory 2010 defined user in context of which the method is called

  • isDomainUser (bool) - true if the WEBfactory 2010 defined user is an Active Directory user

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

A list of UserDTO objects, each containing:

  • UserName (string) - the name of the user

  • IsDomainUser (bool) - the flag that states true if the user is an Active Directory user; false if the user is a WEBfactory 2010 user

GetAllUsersByToken(string securityToken, int millisecondsTimeOut)

Syntax

GetAllUsersByToken(string securityToken, int millisecondsTimeOut);

Description

Retrieves all the WEBfactory 2010 users using the security token

Parameters

  • securityToken (string) - the security token returned by the Login() method

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

A list of UserDTO objects, each containing:

  • UserName (string) - the name of the user

  • IsDomainUser (bool) - the flag that states true if the user is an Active Directory user; false if the user is a WEBfactory 2010 user

GetAllUserDetails(string sessionId, string clientId, string userName, bool isDomainUser, int millisecondsTimeOut)

This method follows the WEBfactory 2010 Security Protocol. Read the Security note for more information.

Syntax

GetAllUsers(string sessionId, string clientId, string userName, bool isDomainUser, int millisecondsTimeOut);

Description

Retrieves all the WEBfactory 2010 user details for all existing users

Parameters

  • sessionId (string) - the unique ID of the session, returned by the connect() method

  • clientId (string) - the user defined unique ID of the client from which the web service is called

  • userName (string) - the name of the WEBfactory 2010 defined user in context of which the method is called

  • isDomainUser (bool) - true if the WEBfactory 2010 defined user is an Active Directory user

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

A list of UserDetailsDTO objects, each containing:

  • UserName (string) - the name of the user

  • IsDomainUser (bool) - the flag that states true if the user is an Active Directory user; false if the user is a WEBfactory 2010 user

  • AuthorizationGroups (IEnumerable<AuthorizationGroupDTO>) - a list of authorization group data transfer objects, each containing:

    • CheckAccessGroups (bool) - if true, the user will be granted the authorization group permissions only if the conditions specified in the access authorizations are met

    • Version (long) -

    • AccessGroupIDs (IEnumerable<Guid>) - the list of unique IDs of the access groups included in the authorization group

    • AlarmGroupIDs (IEnumerable<Guid>) - the list of unique IDs of the alarm groups included in the authorization group

    • AlarmTypeIDs (IEnumerable<Guid>) - the list of unique IDs of the alarm types included in the authorization group

    • LocationIDs (IEnumerable<Guid>) - the list of unique IDs of the scheduler locations included in the authorization group

    • ProjectAuthorizationIDs (IEnumerable<Guid>) - the list of unique IDs of the project authorizations included in the authorization group

    • SystemAuthorizationIDs (IEnumerable<Guid>) - the list of unique IDs of the system authorizations included in the authorization group

    • WriteGroupIDs (IEnumerable<Guid>) - the list of unique IDs of the write groups included in the authorization group

GetAllUserDetailsByToken(string securityToken, int millisecondsTimeOut)

Syntax

GetAllUserDetailsByToken(string securityToken, int millisecondsTimeOut);

Description

Retrieves all the WEBfactory 2010 user details for all existing users, using the security token

Parameters

  • securityToken (string) - the security token returned by the Login() method

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

A list of UserDetailsDTO objects, each containing:

  • UserName (string) - the name of the user

  • IsDomainUser (bool) - the flag that states true if the user is an Active Directory user; false if the user is a WEBfactory 2010 user

  • AuthorizationGroups (IEnumerable<AuthorizationGroupDTO>) - a list of authorization group data transfer objects, each containing:

    • CheckAccessGroups (bool) - if true, the user will be granted the authorization group permissions only if the conditions specified in the access authorizations are met

    • Version (long) -

    • AccessGroupIDs (IEnumerable<Guid>) - the list of unique IDs of the access groups included in the authorization group

    • AlarmGroupIDs (IEnumerable<Guid>) - the list of unique IDs of the alarm groups included in the authorization group

    • AlarmTypeIDs (IEnumerable<Guid>) - the list of unique IDs of the alarm types included in the authorization group

    • LocationIDs (IEnumerable<Guid>) - the list of unique IDs of the scheduler locations included in the authorization group

    • ProjectAuthorizationIDs (IEnumerable<Guid>) - the list of unique IDs of the project authorizations included in the authorization group

    • SystemAuthorizationIDs (IEnumerable<Guid>) - the list of unique IDs of the system authorizations included in the authorization group

    • WriteGroupIDs (IEnumerable<Guid>) - the list of unique IDs of the write groups included in the authorization group

GetAllUsersWithSameAuthorizationGroups(string sessionId, string clientId, string userName, bool isDomainUser, int millisecondsTimeOut)

This method follows the WEBfactory 2010 Security Protocol. Read the Security note for more information.

Syntax

GetAllUsersWithSameAuthorizationGroups(string sessionId, string clientId, string userName, bool isDomainUser, int millisecondsTimeOut);

Description

Retrieves all the WEBfactory 2010 users which have the same authorization groups

Parameters

  • sessionId (string) - the unique ID of the session, returned by the connect() method

  • clientId (string) - the user defined unique ID of the client from which the web service is called

  • userName (string) - the name of the WEBfactory 2010 defined user in context of which the method is called

  • isDomainUser (bool) - true if the WEBfactory 2010 defined user is an Active Directory user

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

A list of UserDTO objects, each containing:

  • UserName (string) - the name of the user

  • IsDomainUser (bool) - the flag that states true if the user is an Active Directory user; false if the user is a WEBfactory 2010 user

GetAllUsersWithSameAuthorizationGroupsByToken(string securityToken, int millisecondsTimeOut)

Syntax

GetAllUsersWithSameAuthorizationGroupsByToken(string securityToken, int millisecondsTimeOut);

Description

Retrieves all the WEBfactory 2010 users that have the same authorization groups using the security token

Parameters

  • securityToken (string) - the security token returned by the Login() method

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

A list of UserDTO objects, each containing:

  • UserName (string) - the name of the user

  • IsDomainUser (bool) - the flag that states true if the user is an Active Directory user; false if the user is a WEBfactory 2010 user

GetAllUserDetailsWithSameAuthorizationGroups(string sessionId, string clientId, string userName, bool isDomainUser, int millisecondsTimeOut)

This method follows the WEBfactory 2010 Security Protocol.

Syntax

GetAllUserDetailsWithSameAuthorizationGroups(string sessionId, string clientId, string userName, bool isDomainUser, int millisecondsTimeOut);

Description

Retrieves all the WEBfactory 2010 user details for all users that have the same authorization groups

Parameters

  • sessionId (string) - the unique ID of the session, returned by the connect() method

  • clientId (string) - the user defined unique ID of the client from which the web service is called

  • userName (string) - the name of the WEBfactory 2010 defined user in context of which the method is called

  • isDomainUser (bool) - true if the WEBfactory 2010 defined user is an Active Directory user

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

A list of UserDetailsDTO objects, each containing:

  • UserName (string) - the name of the user

  • IsDomainUser (bool) - the flag that states true if the user is an Active Directory user; false if the user is a WEBfactory 2010 user

  • AuthorizationGroups (IEnumerable<AuthorizationGroupDTO>) - a list of authorization group data transfer objects, each containing:

    • CheckAccessGroups (bool) - if true, the user will be granted the authorization group permissions only if the conditions specified in the access authorizations are met

    • Version (long) -

    • AccessGroupIDs (IEnumerable<Guid>) - the list of unique IDs of the access groups included in the authorization group

    • AlarmGroupIDs (IEnumerable<Guid>) - the list of unique IDs of the alarm groups included in the authorization group

    • AlarmTypeIDs (IEnumerable<Guid>) - the list of unique IDs of the alarm types included in the authorization group

    • LocationIDs (IEnumerable<Guid>) - the list of unique IDs of the scheduler locations included in the authorization group

    • ProjectAuthorizationIDs (IEnumerable<Guid>) - the list of unique IDs of the project authorizations included in the authorization group

    • SystemAuthorizationIDs (IEnumerable<Guid>) - the list of unique IDs of the system authorizations included in the authorization group

    • WriteGroupIDs (IEnumerable<Guid>) - the list of unique IDs of the write groups included in the authorization group

GetAllUserDetailsWithSameAuthorizationGroupsByToken(string securityToken, int millisecondsTimeOut)

Syntax

GetAllUserDetailsWithSameAuthorizationGroupsByToken(string securityToken, int millisecondsTimeOut);

Description

Retrieves all the WEBfactory 2010 user details for all users that have the same authorization groups, using the security token

Parameters

  • securityToken (string) - the security token returned by the Login() method

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

A list of UserDetailsDTO objects, each containing:

  • UserName (string) - the name of the user

  • IsDomainUser (bool) - the flag that states true if the user is an Active Directory user; false if the user is a WEBfactory 2010 user

  • AuthorizationGroups (IEnumerable<AuthorizationGroupDTO>) - a list of authorization group data transfer objects, each containing:

    • CheckAccessGroups (bool) - if true, the user will be granted the authorization group permissions only if the conditions specified in the access authorizations are met

    • Version (long) -

    • AccessGroupIDs (IEnumerable<Guid>) - the list of unique IDs of the access groups included in the authorization group

    • AlarmGroupIDs (IEnumerable<Guid>) - the list of unique IDs of the alarm groups included in the authorization group

    • AlarmTypeIDs (IEnumerable<Guid>) - the list of unique IDs of the alarm types included in the authorization group

    • LocationIDs (IEnumerable<Guid>) - the list of unique IDs of the scheduler locations included in the authorization group

    • ProjectAuthorizationIDs (IEnumerable<Guid>) - the list of unique IDs of the project authorizations included in the authorization group

    • SystemAuthorizationIDs (IEnumerable<Guid>) - the list of unique IDs of the system authorizations included in the authorization group

    • WriteGroupIDs (IEnumerable<Guid>) - the list of unique IDs of the write groups included in the authorization group

InsertUser(string sessionId, string clientId, string userName, bool isDomainUser, UserDTO model, int millisecondsTimeOut)

This method follows the WEBfactory 2010 Security Protocol.

Syntax

InsertUser(string sessionId, string clientId, string userName, bool isDomainUser, UserDTO model, int millisecondsTimeOut);

Description

Adds a new user based on the provided model

Parameters

  • sessionId (string) - the unique ID of the session, returned by the connect() method

  • clientId (string) - the user defined unique ID of the client from which the web service is called

  • userName (string) - the name of the WEBfactory 2010 defined user in context of which the method is called

  • isDomainUser (bool) - true if the WEBfactory 2010 defined user is an Active Directory user

  • model (UserDTO) - the data transfer object representing the model of the user. It should contain:

    • UserName (string) - the name of the user

    • IsDomainUser (bool) - the flag that states true if the user is an Active Directory user; false if the user is a WEBfactory 2010 user

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

The status of the operation: true for success or false for error

InsertUserByToken(string securityToken, UserDTO model, int millisecondsTimeOut)

Syntax

InsertUserByToken(string securityToken, UserDTO model, int millisecondsTimeOut);

Description

Adds a new user based on the provided model and security token

Parameters

  • securityToken (string) - the security token returned by the Login() method

  • model (UserDTO) - the data transfer object representing the model of the user. It should contain:

    • UserName (string) - the name of the user

    • IsDomainUser (bool) - the flag that states true if the user is an Active Directory user; false if the user is a WEBfactory 2010 user

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

The status of the operation: true for success or false for error

UpdateUser(string sessionId, string clientId, string userName, bool isDomainUser, UserDTO model, int millisecondsTimeOut)

This method follows the WEBfactory 2010 Security Protocol.

Syntax

UpdateUser(string sessionId, string clientId, string userName, bool isDomainUser, UserDTO model, int millisecondsTimeOut);

Description

Updates an existing user based on the provided model

Parameters

  • sessionId (string) - the unique ID of the session, returned by the connect() method

  • clientId (string) - the user defined unique ID of the client from which the web service is called

  • userName (string) - the name of the WEBfactory 2010 defined user in context of which the method is called

  • isDomainUser (bool) - true if the WEBfactory 2010 defined user is an Active Directory user

  • model (UserDTO) - the data transfer object representing the model of the user. It should contain:

    • UserName (string) - the name of the user

    • IsDomainUser (bool) - the flag that states true if the user is an Active Directory user; false if the user is a WEBfactory 2010 user

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

The status of the operation: true for success or false for error

UpdateUserByToken(string securityToken, UserDTO model, int millisecondsTimeOut)

Syntax

UpdateUserByToken(string securityToken, UserDTO model, int millisecondsTimeOut);

Description

Updates an existing user based on the provided model and security token

Parameters

  • securityToken (string) - the security token returned by the Login() method

  • model (UserDTO) - the data transfer object representing the model of the user. It should contain:

    • UserName (string) - the name of the user

    • IsDomainUser (bool) - the flag that states true if the user is an Active Directory user; false if the user is a WEBfactory 2010 user

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

The status of the operation: true for success or false for error

DeleteUser(string sessionId, string clientId, string userName, bool isDomainUser, Guid id, int millisecondsTimeOut)

This method follows the WEBfactory 2010 Security Protocol.

Syntax

DeleteUser(string sessionId, string clientId, string userName, bool isDomainUser, Guid id, int millisecondsTimeOut);

Description

Deletes an existing user based on the provided ID

Parameters

  • sessionId (string) - the unique ID of the session, returned by the connect() method

  • clientId (string) - the user defined unique ID of the client from which the web service is called

  • userName (string) - the name of the WEBfactory 2010 defined user in context of which the method is called

  • isDomainUser (bool) - true if the WEBfactory 2010 defined user is an Active Directory user

  • id (guid) - the unique ID of the user for which the operation is applied

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

The status of the operation: true for success or false for error

DeleteUserByToken(string securityToken, Guid id, int millisecondsTimeOut)

Syntax

DeleteUserByToken(string securityToken, Guid id, int millisecondsTimeOut);

Description

Deletes an existing user based on the provided ID and security token

Parameters

  • securityToken (string) - the security token returned by the Login() method

  • id (guid) - the unique ID of the user for which the operation is applied

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

The status of the operation: true for success or false for error

ChangeUserPassword(string sessionId, string clientId, string userName, bool isDomainUser, Guid affectedUserId, string newPassword, int millisecondsTimeOut)

This method follows the WEBfactory 2010 Security Protocol.

Syntax

ChangeUserPassword(string sessionId, string clientId, string userName, bool isDomainUser, Guid affectedUserId, string newPassword, int millisecondsTimeOut);

Description

Changes the password of an existing user based on the provided ID

Parameters

  • sessionId (string) - the unique ID of the session, returned by the connect() method

  • clientId (string) - the user defined unique ID of the client from which the web service is called

  • userName (string) - the name of the WEBfactory 2010 defined user in context of which the method is called

  • isDomainUser (bool) - true if the WEBfactory 2010 defined user is an Active Directory user

  • affectedUserId (guid) - the unique ID of the user for which the operation is applied

  • newPassword (string) - the new password

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

The status of the operation: true for success or false for error

ChangeUserPasswordByToken(string securityToken, Guid affectedUserId, string newPassword, int millisecondsTimeOut)

Syntax

ChangeUserPasswordByToken(string securityToken, Guid affectedUserId, string newPassword, int millisecondsTimeOut);

Description

hanges the password of an existing user based on the provided ID and security token

Parameters

  • securityToken (string) - the security token returned by the Login() method

  • affectedUserId (guid) - the unique ID of the user for which the operation is applied

  • newPassword (string) - the new password

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

The status of the operation: true for success or false for error

ChangeCurrentUserPassword(string sessionId, string clientId, string userName, bool isDomainUser, string currentPassword, string newPassword, int millisecondsTimeOut)

This method follows the WEBfactory 2010 Security Protocol.

Syntax

ChangeCurrentUserPassword(string sessionId, string clientId, string userName, bool isDomainUser, string currentPassword, string newPassword, int millisecondsTimeOut);

Description

Changes the password of the currently logged in user based on the provided parameters

Parameters

  • sessionId (string) - the unique ID of the session, returned by the connect() method

  • clientId (string) - the user defined unique ID of the client from which the web service is called

  • userName (string) - the name of the WEBfactory 2010 defined user in context of which the method is called

  • isDomainUser (bool) - true if the WEBfactory 2010 defined user is an Active Directory user

  • currentPassword (guid) - the old password that will be changed

  • newPassword (string) - the new password

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

The status of the operation: true for success or false for error

ChangeCurrentUserPasswordByToken(string securityToken, string currentPassword, string newPassword, int millisecondsTimeOut)

Syntax

ChangeCurrentUserPasswordByToken(string securityToken, string currentPassword, string newPassword, int millisecondsTimeOut);

Description

Changes the password of the currently logged in user based on the provided ID and security token

Parameters

  • securityToken (string) - the security token returned by the Login() method

  • currentPassword (guid) - the old password that will be changed

  • newPassword (string) - the new password

  • millisecondsTimeOut (int) - the amount of time, in milliseconds, in which the authentication process is verified. If this time period is exceeded or the login failed, a fault exception will be generated.

Return Value

The status of the operation: true for success or false for error