Home
Wikis administrative commands
The following tables define the administrative commands that you can use when working with Wikis. Each table describes the commands for a specific service.
Command Description WikisMemberService.syncAllMemberExtIds() Synchronize user and group information in the Wikis database with the user directory. For each user or group, this service queries the user directory server by login name (or names) to retrieve updated information, such as...
- directory ID
- display name
- e-mail address
Wikis automatically synchronizes the database with the directory periodically by directory ID, so running this command is not necessary unless you want to synchronize at a particular time.
Synchronization time varies depending on the number of people in the Wikis database. On average, it takes eight minutes to update 500 users. For large databases, run this process overnight.
This command does not take any parameters.
WikisMemberService.syncMemberExtIdByEmail(string emailAddr) Synchronize one member's information in the Wikis database with the user directory. The command is essentially the same as syncAllMemberExtIds(), but applied to a single member, and the user directory server is queried by the specified e-mail address. Any out-of-sync information is updated. Wikis automatically synchronizes the database with the directory periodically by directory ID, so running this command is not necessary unless you want to synchronize using an e-mail address, or you want to synchronize at a particular time rather than waiting for the periodic automatic synchronization.
Parameters:
- emailAddr
- The member's e-mail address as a string.
Example:
WikisMemberService.syncMemberExtIdByEmail("jdoe@company.com")
WikisMemberService.syncMemberExtIdByLogin(string loginName) Synchronize one member's information in the Wikis database with the user directory. The command is essentially the same as syncAllMemberExtIds(), but applied to a single member. Any out-of-sync information is updated. Wikis automatically synchronizes the database with the directory periodically by directory ID, so running this command is not necessary unless you want to synchronize using a login name, or you want to synchronize at a particular time rather than waiting for the periodic automatic synchronization.
Parameters:
- loginName
- The member's login name as a string.
Example:
WikisMemberService.syncMemberExtIdByLogin("John Smith")
WikisMemberService.syncBatchMemberExtIdsByEmail(string emailFile) Synchronize user information in the Wikis database with the user directory. The users are specified by e-mail address in a text file. The file is specified in the parameter. The file must contain a list with one valid e-mail address per line. Create the file and save it in a that is local to the server where you are running the wsadmin processor.
This command is essentially the same as syncAllMemberExtIds() but applied to a list of members, and the user directory server is queried by e-mail addresses. Any out-of-sync information is updated.
Wikis automatically synchronizes the database with the periodically by ID, so running this command is not necessary unless you want to synchronize using a login name, or you want to synchronize at a particular time rather than waiting for the periodic automatic synchronization.
Parameters:
- emailFile
- The full path to the text file, as a string.
Example:
WikisMemberService.syncBatchMemberExtIdsByEmail(".../dirA/dirB/emailFile.txt")
WikisMemberService.syncBatchMemberExtIdsByLogin(string loginFile) Synchronize user information in the Wikis database with the user directory. The users are specified by login ID, in a text file. The file is specified in the parameter. The file must contain a list with one valid login ID per line. You must create the file and save it in a that is local to the server where you are running the wsadmin processor.
This command is essentially the same as syncAllMemberExtIds() but applied to a list of members, and the user directory server is queried by login IDs. Any out-of-sync information is updated.
Wikis automatically synchronizes the database with the directory periodically by directory ID, so running this command is not necessary unless you want to synchronize using a login name, or you want to synchronize at a particular time rather than waiting for the periodic automatic synchronization.
Parameters:
- loginFile
- The full path to the text file, as a string.
Example:
WikisMemberService.syncBatchMemberExtIdsByLogin("/opt/Wikis/update.txt")
WikisMemberService.getById(string id) Return information about a user specified by an ID. The command only searches the Wikis database, so it only returns users who have logged in at least once. Parameters:
- id
- The user ID in UUID format: 00000000-0000-0000-0000-000000000000.
The following information is returned:
id The user ID in name The user's name in the database as of the date in directoryLastUpdate. The user's e-mail address. isOrphan Returns true if the user is in the database, but not the directory createDate The date the user was added to the database. lastVisit The date of the user's last log in. directoryLastUpdate The last time the user's data was synchronized from the directory directoryGroupLastUpdate The last time this user's group membership was synchronized from the directory communityLastUpdate The last time this user's Community membership was synchronized. WikisMemberService.getByExtId(string externalId) Return information about a user specified by an external directory ID. The command only searches the Wikis database, so it only returns users who have logged in at least once. Parameters:
- externalId
- A string value matching the user's external directory ID. This can be any parameter in the user directory. that you have configured as the directory ID.
The following user information is returned:
id The user ID in UUID format: 00000000-0000-0000-0000-000000000000 name The user's name in the database as of the date in directoryLastUpdate. The user's e-mail address. isOrphan Returns true if the user is in the database, but not the directory createDate The date the user was added to the database. lastVisit The date of the user's last log in. directoryLastUpdate The last time the user's data was synchronized from the directory directoryGroupLastUpdate The last time this user's group membership was synchronized from the directory communityLastUpdate The last time this user's Community membership was synchronized. WikisMemberService.getByEmail(string email) Returns information about a user specified by an e-mail address. The command only searches the Wikis database, so it only returns users who have logged in at least once. Parameters:
- The e-mail address for the user.
The following user information is returned:
id The user ID in UUID format: 00000000-0000-0000-0000-000000000000 name The user's name in the database as of the date in directoryLastUpdate. The user's e-mail address. isOrphan Returns true if the user is in the database, but not the directory createDate The date the user was added to the database. lastVisit The date of the user's last log in. directoryLastUpdate The last time the user's data was synchronized from the directory directoryGroupLastUpdate The last time this user's group membership was synchronized from the directory communityLastUpdate The last time this user's Community membership was synchronized.
WikisLibraryService administrative commands
Command Description WikisLibraryService.getById(string libraryId) Return information about a single library specified by an ID. A library is the pages, attachments, and other data that make up a wiki. It includes all wiki page versions, but does not include meta-data such as comments. It includes all wiki page versions, but does not include meta-data such as comments. Parameters:
- libraryId
- The library ID in UUID format: 00000000-0000-0000-0000-000000000000.
The following information is returned:
- id: The library ID in UUID format
- ownerUserId: The user ID of the library owner in UUID format
- type: The type of library, for example, Wikis Library.
- label: A string of characters used to identify the library in a URL.
- title: The library's title.
- summary: A summary of library information.
- size: The total size of the library binary data.
- percentUsed: The percentage of the maximum allowable size used, according to the library's policy. Zero if not applicable.
- maximumSize: The maximum size (in bytes) the library's policy allows. Zero for unlimited.
- policyId: The ID of the policy that sets a maximum limit (in bytes) on the library's size, in UUID format
- lastUpdate: The last time a significant user-driven update occurred to the meta-data.
- createDate: The library's creation date.
- externalInstanceId: The widget ID if the library is owned by a community.
- externalContainerId: The community ID if the library is owned by a community.
WikisLibraryService.delete(string libraryId) Deletes the library specified by the library ID, including all associated content. A library is the pages, attachments, and other data that make up a wiki. It includes all wiki page versions, but does not include meta-data such as comments. It includes all wiki page versions, but does not include meta-data such as comments.
Parameters:
- libraryID
- The library ID in UUID format: 00000000-0000-0000-0000-000000000000.
WikisLibraryService.deleteBatch(string filePath) Deletes libraries specified in a text file. The file must contain a list with a single library ID per line in UUID format Create the file and save it in a directory local to the server where you are running the wsadmin processor. A library is the pages, attachments, and other data that make up a wiki. It includes all wiki page versions, but does not include meta-data such as comments. It includes all wiki page versions, but does not include meta-data such as comments.
Parameters:
- filePath
- The full path to the text file, as a string.
WikisLibraryService.assignPolicy(string libraryId, string policyId) Assigns a policy to a library. A library is the pages, attachments, and other data that make up a wiki. It includes all wiki page versions, but does not include meta-data such as comments. It includes all wiki page versions, but does not include meta-data such as comments. A policy sets a maximum size for a wiki. Parameters:
- libraryId
- The library ID in the UUID format
- policyId
- The policy ID in UUID format
No message is printed if the task succeeds.
WikisLibraryService.assignPolicyBatch(string filePath) Assigns policies to libraries as specified in a text file. The file must contain a list of library-policy ID pairs, one pair per line, values separated by a comma. For example: libraryId, policyId. Extra whitespace is ignored. You must create this text file and save it in a directory local to the server where you are running the wsadmin processor. A library is the pages, attachments, and other data that make up a wiki. It includes all wiki page versions, but does not include meta-data such as comments. It includes all wiki page versions, but does not include meta-data such as comments.
Parameters:
- filePath
- The full path to the text file, as a string.
WikisLibraryService.browseWiki(string sortOption, string sortAscending, int pageNumber, int itemsPerPage) Returns a list of all wikis, with information about each wiki. The list includes wikis owned by communities, and wikis whose owners were removed from the user directory. Parameters:
- sortOption
- A string value that specifies how to sort the list. The default value is title, but you can use lastUpdate, size, createDate, or quotaPercentage.
- sortAscending
- A string value that specifies whether to sort the list in ascending alphabetical order. This depends on the sortOption value. If sortOption is title, then this value is true; if sortOption any other value, then this value is false.
- pageNumber
- The maximum number of pages to display. The default value is 1.
- itemsPerPage
- The maximum number of wikis to list per page. The default value is 20.
The following information is returned:
- id: The library ID in UUID format
- ownerUserId: The user ID of the library owner in UUID format
- type: The type of library, for example, Wikis Library.
- label: A string of characters used to identify the library in a URL.
- title: The library's title.
- summary: A summary of library information.
- size: The total size of the library binary data.
- percentUsed: The percentage of the maximum allowable size used, according to the library's policy. Zero if not applicable.
- maximumSize: The maximum size (in bytes) the library's policy allows. Zero for unlimited.
- policyId: The ID of the policy that sets a maximum limit (in bytes) on the library's size, in UUID format
- lastUpdate: The last time a significant user-driven update occurred to the meta-data.
- createDate: The library's creation date.
- externalInstanceId: The widget ID if the library is owned by a community.
- externalContainerId: The community ID if the library is owned by a community.
WikisLibraryService.getWikiCount Returns the total number of wikis. WikisLibraryService.exportSyncedResourceInfo (string fullpathForOutput, string type) Returns a report of all of the communities that the Wikis feature has interacted with. After a system crash you can compare the report to the latest metadata in the Communities database to help synchronize and update any missing data. See the topic Comparing remote application data with the Communities database for more information. Note that in clusters, when you run the command from the deployment manager the path and file are created on the server running Wikis. In clusters where multiple nodes are running Wikis, you are asked choose a server to connect to and run the command on, and then the path and file are created on that server.
Parameters:
- fullPathforOutput
- The full path location where you want the report, and the report filename, as a string in quotes. The report is an XML file. For example:
"c:/temp/community_output.xml"
The path can only contain forward slashes, for example:
/
- type
- This is always the string value, "community" (including quotes). An error is returned if this is anything except "community".
WikisDataIntegrityService administrative commands
Command Description WikisDataIntegrityService.checkFiles(string extraFileDirectory) Checks the integrity of the binary files in the file system extra files against the meta-data in the database, and prints results to log files in a specified The database is used as the primary source, as during a back up the file system is assumed to have extra data, if there is any. The task logs a message for every extra file found, or every missing file. Missing files are errors that must be resolved (by finding the files or restoring a backup) before the application can start in a consistent state.
Parameters:
- extraFileDirectory
A directory path as a string. This is the location where you want to store files not found in the database. If the directory does not exist, the command creates it. If the directory cannot be created, or read or written to, an error is returned.
This information might be useful before restoring database and file system images, to see how closely they match in a test environment. For more information see the topic Checking Wikis data integrity.
WikisPrintService administrative commands
Command Description WikisPrintService.saveToFile(string object, string filePath, string append) Prints information returned by other commands to a file. Parameters:
- object
A command with parameters that returns a Map or List<Map> java object. You can use any of the following commands:
- WikisMemberService.getById (returns a Map)
- WikisMemberService.getByExtId (returns a Map)
- WikisMemberService.getByEmail (returns a Map)
- WikisLibraryService.getById (returns a Map)
- WikisLibraryService.browseWiki (returns a List<Map>)
- WikisPolicyService.getById (returns a Map)
- WikisPolicyService.browse (returns a List<Map>>)
- WikisMetricsService.browse (returns a List<Map>)
- filePath
- A path to a file in which to save the object data. The data is saved in comma-separated value (.csv) format.
- append
- string whose default value is
"true"Change to
"false"to have the command overwrite the existing file instead of appending the data in the existing file.
Example:
WikisPrintService.saveToFile(WikisLibraryService.browseWiki("title","true",1,20), "/opt/wsadmin/LibraryMap.txt")
WikisTaskService administrative commands
Command Description WikisTaskService.pause(string taskId) Pauses a task. In release 2.5 this can only operate on the task that deletes files. That task must be paused during database and file system backup, and then resumed. Parameters:
- taskId
- The ID of the file deletion task. The ID for that task is:
com.ibm.quickr.share.platform.task.file.delete
Example:
WikisTaskService.pause("com.ibm.quickr.share.platform.task.file.delete")
A warning is displayed if the task is already paused. For more information on running this task during data backup, see the topic Backing up data.
WikisTaskService.resume(string taskId) Resumes a task. In release 2.5 this can only operate on the task that deletes files. That task must be paused during database and file system backup, and then resumed. Parameters:
- taskId
- The ID of the file deletion task. The ID for that task is:
com.ibm.quickr.share.platform.task.file.delete
Example:
WikisTaskService.resume("com.ibm.quickr.share.platform.task.file.delete")
A warning is displayed if the task is already active. For more information on running this task during data backup, see the topic Backing up data.
WikisTaskService.execute(string taskId, string executeSynchronously) Executes a task. Property settings in the wikis-config.xml configuration properties file specify whether tasks are enabled to run automatically, and how often. This command allows you to run tasks manually, for example if you disabled a task but want to run it occasionally.
Parameters:
- taskId
- The ID of the task. For example, this ID runs the task that synchronizes users between the Wikis database and the user directory:
com.ibm.quickr.share.platform.task.directory.user.synch
These are the Wikis IDs:
- com.ibm.quickr.share.platform.task.directory.user.synch: Synchronizes user information in the Wikis database with the Lotus Connections user
- com.ibm.quickr.share.platform.task.directory.group.synch: Synchronizes group names in the Wikis database with the Lotus Connections user
- com.ibm.quickr.share.platform.task.file.delete: Deletes files marked as pending deletion and older than the number of minutes specified in the file.softDelete.minimumPendingTimeInMins configuration property.
- com.ibm.quickr.share.platform.task.search.clearDeletionHistory: Removes deleted file records older than the number of days specified in the search.seedlist.maximumIncrementalQuerySpanInDays configuration property.
- com.ibm.quickr.share.platform.task.statistics.collection: Collects server metrics, which are frequency data that are recorded about the current database state.
- com.ibm.quickr.share.platform.task.tagging.updateFrequency: Finds the most frequently used tags in public wikis and updates the public wikis tag cloud.
See the topic Wikis configuration properties for information on the configuration properties related to these tasks.
- executeSynchronously
- Takes the string values true or false. Specifying this value is not required; the default is false. If this value is false, then the task executes asynchronously, meaning if the taskId is valid the command returns immediately and the execution continues in the background. If this value is true, it the command does not return until the task completes.
This example executes the task the deletes files:
WikisTaskService.execute("com.ibm.quickr.share.platform.task.file.delete")
A warning is displayed if the task is already active.
WikisPolicyService administrative commands
Command Description WikisPolicyService.add(string title, long maximumSize) Creates a policy with a specified title and maximum size. Policies set a maximum size limit on libraries. A library is the pages, attachments, and other data that make up a wiki. It includes all wiki page versions, but does not include meta-data such as comments. It includes all wiki page versions, but does not include meta-data such as comments.
Parameters:
- title
- The policy title. A required value.
- maximumSize
- The maximum size allowed, in bytes. Must be zero or greater. A value of zero means the size is unlimited.
When a policy is created, an ID is created for it and returned to you. The ID is in UUID format: 00000000-0000-0000-0000-000000000000. You must provide policy IDs as parameters when running other WikisPolicyService commands.
Policies can be applied to libraries using the WikisLibraryService.assignPolicy or WikisLibraryService.assignPolicyBatch commands.
WikisPolicyService.edit(string policyId, string title, long maximumSize) Edits the title and maximum size of a policy with a specified ID. If the ID is for a default policy, the title is not modified. Policies set a maximum size limit on libraries. A library is the pages, attachments, and other data that make up a wiki. It includes all wiki page versions, but does not include meta-data such as comments. It includes all wiki page versions, but does not include meta-data such as comments. Parameters:
- policyID
- The policy ID in UUID format: 00000000-0000-0000-0000-000000000000.
- title
- The policy title. A required value.
- maximumSize
- The maximum size allowed, in bytes. Must be zero or greater. A value of zero means the size is unlimited.
WikisPolicyService.getById(string id) Returns information for a single policy specified by an ID. Policies set a maximum size limit on libraries. A library is the pages, attachments, and other data that make up a wiki. It includes all wiki page versions, but does not include meta-data such as comments. It includes all wiki page versions, but does not include meta-data such as comments.
Parameters:
- id
- The policy ID in UUID format: 00000000-0000-0000-0000-000000000000.
The following information is returned:
- id: the ID
- title: the policy title
- maximumSize: the maximum size (in bytes) the library can be, or 0 for unlimited
WikisPolicyService.browse(string sortOption, string sortAscending, int pageNumber, int itemsPerPage) Returns a list of policies with ID, title, and maximum size information, as described for the WikisPolicyService.getById(id) command. Policies set a maximum size limit on libraries. A library is the pages, attachments, and other data that make up a wiki. It includes all wiki page versions, but does not include meta-data such as comments.
Parameters:
- sortOption
- A string value that specifies how to sort the list. The default value is title, but you can also use maximumSize.
- sortAscending
- A string value that specifies whether the list sorts in ascending alphabetical order. This depends on sortOption. If sortOption is title, then this value is true; if sortOption any other value, then this value is false.
- pageNumber
- The number of the page to return. For example, if the itemsPerPage value is 40, and pageNumber value is 2, the command returns items 41 to 80 (page 2) instead of 1 to 40 (page 1).
- itemsPerPage
- The maximum number of policies to list per page. The default value is 20.
WikisPolicyService.getCount Returns the number of policies. Policies set a maximum size limit on libraries. A library is the pages, attachments, and other data that make up a wiki. It includes all wiki page versions, but does not include meta-data such as comments. WikisPolicyService.editDefault(long maximumSize) Sets the maximum size, in bytes, for the personal wiki library default policy. Personal wikis are owned by a person. Parameters:
- maximumSize
- A number representing the maximum size allowed, in bytes, for wikis that the default policy is assigned to.
WikisPolicyService.editCommunityDefault(long maximumSize) Sets the maximum size, in bytes, for the community wiki library default policy. Community wikis are owned by a community. Parameters:
- maximumSize
- A number representing the maximum size allowed, in bytes, for wikis that the default policy is assigned to.
WikisMetricsService administrative commands
Command Description WikisMetricsService.browse(string startDate, string endDate, string filePathWithFilterKeys) Returns metrics about wikis stored in the database. The same metrics are provided for each day in a specified period. Parameters:
- startDate
- The start date for the period, in YYYY-MM-DD format.
- endDate
- The end date for the period, in YYYY-MM-DD format.
- filePathWithFilterKeys
- The full path to a text file in which each line contains a statistical key. If you specify a file, only metrics listed in the file are returned. If you do not specify a file, all data is returned.
See the topic Wikis metrics for metrics and their descriptions.
If you do not specify dates, then the command uses the first available day with data for startDate, and the last available day with data for endDate.
WikisMetricsService.saveToFile(string filePath, string startDate, string endDate, string filePathWithFilterKeys, string append) Returns metrics about wikis stored in the database, and then stores them in a directory local file. The same metrics are provided for each day in a specified period. Parameters:
- filePath
- Path to a file in which to store the metrics. metrics are stored in comma-separated value (CSV) format.
- startDate
- The start date for the period, in YYYY-MM-DD format.
- endDate
- The end date for the period, in YYYY-MM-DD format.
- filePathWithFilterKeys
- The full path to a text file in which each line contains a key. If you specify a file, only metrics mapped to keys listed in the file are returned. If you do not specify a file, all data is returned.
- append
- string whose default value is
"true"Change to
"false"to have the command overwrite the existing file instead of appending the data in the existing file.
See the topic Wikis metrics for metrics and their descriptions.
If you do not specify dates, then the command uses the first available day with data for startDate, and the last available day with data for endDate.
WikisMetricsService.getAvailableRange Returns a string array where the first element is the first day data is available and the second element is the last day that data is available for wiki libraries. Typically, the current day's data is not available until 12:01 A.M. the following day. If metrics collection was disabled or did not occur because of some issue, there may be gaps in data available.
WikisListService administrative commands
Command Description WikisListService.filterBystring(List listOfMaps, string filterKey, string regexstringCriteria) Returns items from a specified list that have a specified key matching a specified regular expression. Use this command to filter List<Map> java objects that are returned by any of the browse commands, such as WikisLibraryService.browseWiki. A map is a list of key/value pairs, for example the WikisLibraryService.browseWiki command returns a list of libraries. Each library in the list is a map with a set of keys, and each key is paired with a value. Every library has the same set of keys, but unique values. Values contain information about the library, such as its title and creation date.
Parameters:
- listOfMaps
- A list of maps, for example the result of
WikisLibraryService.browseWiki(<parameters>)- filterKey
- A key in each map in the list, whose value is compared against the filter criteria.
- regexstringCriteria
- A regular expression represented as a string to match against the filterKey value. For example, "[0-9]+" to match only >= 1 numbers in a row.
The command returns maps from the listOfMaps whose filterKey is the regexstringCriteria value.
WikisListService.filterByDate(List listOfMaps, string filterKey, expression) Returns items from a specified list that have a specified key with a specified date. Use this command to filter List<Map> java objects that are returned by any of the browse commands, such as WikisLibraryService.browseWiki. A map is a list of key/value pairs, for example the WikisLibraryService.browseWiki command returns a list of libraries. Each library is a map with a set of keys, and each key is paired with a value. Every library has the same set of keys, but unique values. Values contain information about the library, such as its title and creation date.
Parameters:
- listOfMaps
- A list of maps, for example the result of
WikisLibraryService.browseWiki(<parameters>)- filterKey
- A key in each map in the list, whose value is compared against the filter criteria.
- expression
- A string of the form <operator> <date> where <date> is in yyyy-MM-dd format and <operator> is one of the following: > >= == <= <
The command returns maps from the listOfMaps value whose filterKey value is the expression value. For example, a filterKey value of creatDate and an expression of <= 2009-01-01 filters the map to only include items created before January 1, 2009.
WikisListService.filterByNumber(List listOfMaps, string filterKey, expression) Returns items from a specified list that have a specified key with a specified number. Use this command to filter List<Map> java objects that are returned by any of the browse commands, such as WikisLibraryService.browseWiki. A map is a list of key/value pairs, for example the WikisLibraryService.browseWiki command returns a list of libraries. Each library is a map with a set of keys, and each key is paired with a value. Every library has the same set of keys, but unique values. Values contain information about the library, such as its title and creation date.
Parameters:
- listOfMaps
- A list of maps, for example the result of
WikisLibraryService.browseWiki(<parameters>)- filterKey
- A key in each map in the list, whose value is compared against the filter criteria.
- expression
- A string of the form <operator> <int> where <int> is an integer and <operator> is one of the following: > >= == <= <
The command returns maps from the listOfMaps value whose filterKey value is the expression value. For example, a filterKey value of percentUsed and an expression value of ==20 filters the map to only include items whose filterKey value is 20.
Related tasks
Run administrative commands
Edit administrative commands
Comparing remote application data with the Communities database
Checking Wikis data integrity
Backing up Wikis data
Wikis metrics
Wikis configuration properties