+

Search Tips   |   Advanced Search

Files library information

Use FilesLibraryService commands to see information about libraries, such as its owner, type, and size. A library is a set of files owned by a person or community and stored in the database.

  1. Start the Files Jython script interpreter

      ./wsadmin -lang Jython
      execfile("filesAdmin.py")

  2. Return information about libraries:

    FilesLibraryService.getById(string libraryId)

    Returns information about a single library specified by an id. A library is a set of files owned by a person or community. It includes all versions of the files, but does not include metadata such as comments.

    Parameters:

    libraryId

    Library id in UUID format:

      00000000-0000-0000-0000-000000000000

    The following information is returned:

    id Library id in UUID format:

      00000000-0000-0000-0000-000000000000

    ownerUserId The user id of the library owner in UUID format:

      00000000-0000-0000-0000-000000000000

    type The type of library, for example, personal, community, or system.
    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

      00000000-0000-0000-0000-000000000000

    lastUpdate The last time a significant user-driven update occurred to the metadata.
    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.
    themeName The theme the community owner has selected in communities. Returned for community libraries only.
    orphan The value is true if the library owner is no longer active. Returned for personal libraries only.

    For example:

      FilesLibraryService.getById("2d93497d-065a-4022ae25-a4b52598d11a")

    FilesLibraryService.getByExternalContainerId(string community_id)

    Return information about the community libraries available in the named Community.

    Parameters:

    community_id

    The community id in UUID format:

      00000000-0000-0000-0000-000000000000

    For example:

      FilesLibraryService.getByExternalContainerId("003456bc-078d-e990-0450-x12345678900")

    FilesLibraryService.getPersonalByOwnerId(string ownerUserId)

    Return information about the personal library of a specified owner. A personal library is a set of files owned by one person.

    Parameters:

    ownerId

    The user ID of the library owner, in Universally Unique Identifier (UUID) format:

      00000000-0000-0000-0000-000000000000

    We can use FilesMemberService commands to find owner IDs. The following information is returned:

    id Library id in UUID format:

      00000000-0000-0000-0000-000000000000

    ownerUserId The user ID of the library owner in UUID format:

      00000000-0000-0000-0000-000000000000

    type The type of library, for example, personal, community, or system.
    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

      00000000-0000-0000-0000-000000000000

    lastUpdate The last time a significant user-driven update occurred to the metadata.
    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.
    orphan The value is true if the library owner is no longer active. Returned for personal libraries only.

    For example:

      FilesLibraryService.getPersonalByOwnerId("2d93497d-065a-4022ae25-a4b52598d11a")

    FilesLibraryService.browsePersonal(string sortOption, string sortAscending, int pageNumber, int itemsPerPage)

    Return a list of personal libraries, with information about each library. A personal library is a set of files owned by one person. The list includes libraries whose owners were removed from the user directory. All parameters have default values.

    Parameters:

    sortOption

    A string value that specifies how to sort the list. Default is title, but we can use lastUpdate, size, createDate, or quotaPercentage.

    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 display. For example, if we specify in the itemsPerPage parameter that each page will have 50 items, page 1 will contain items 1-50.

    itemsPerPage

    The maximum number of libraries to list per page. Default is 20. The following information is returned:

    id Library id in UUID format:

      00000000-0000-0000-0000-000000000000

    ownerUserId The user id of the library owner in UUID format:

      00000000-0000-0000-0000-000000000000

    type The type of library, for example, personal, community, or system.
    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:

      00000000-0000-0000-0000-000000000000

    lastUpdate The last time a significant user-driven update occurred to the metadata.
    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.
    orphan The value is true if the library owner is no longer active. Returned for personal libraries only.

    For example:

      FilesLibraryService.browsePersonal("title", "true", 1, 25)

    FilesLibraryService.browseCommunity(string sortOption, string sortAscending, int pageNumber, int itemsPerPage)

    Return a list of community libraries, with information about each library. A community library is a set of files owned by a community.

    Parameters:

    sortOption

    A string value that specifies how to sort the list. Default is title, but we can use lastUpdate, size, createDate, or quotaPercentage.

    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 display. For example, if we specify in the itemsPerPage parameter that each page will have 50 items, page 1 will contain items 1-50.

    itemsPerPage

    The maximum number of libraries to list per page. Default is 20. The following information is returned:

    id Library id in UUID format:

      00000000-0000-0000-0000-000000000000

    ownerUserId The user id of the library owner in UUID format:

      00000000-0000-0000-0000-000000000000

    type The type of library, for example, personal, community, or system.
    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

      00000000-0000-0000-0000-000000000000

    lastUpdate The last time a significant user-driven update occurred to the metadata.
    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.
    themeName The theme the community owner has selected in communities. Returned for community libraries only.

    For example:

      FilesLibraryService.browseCommunity("title", "true", 1, 20)

    FilesLibraryService.browsePersonalOrphan(string sortOption, string sortAscending, int pageNumber, int itemsPerPage)

    Return a list of personal libraries whose owners were removed from the user directory. A personal library is a set of files owned by one person.

    Parameters:

    sortOption

    A string value that specifies how to sort the list. Default is title, but we can use lastUpdate, size, createDate, or quotaPercentage.

    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 display. For example, if we specify in the itemsPerPage parameter that each page will have 50 items, page 1 will contain items 1-50.

    itemsPerPage

    The maximum number of libraries to list per page. Default is 20. The following information is returned:

    id Library id in UUID format:

      00000000-0000-0000-0000-000000000000

    ownerUserId The user id of the library owner in UUID format:

      00000000-0000-0000-0000-000000000000

    type The type of library, for example, personal, community, or system.
    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:

      00000000-0000-0000-0000-000000000000

    lastUpdate The last time a significant user-driven update occurred to the metadata.
    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.
    orphan The value is true if the library owner is no longer active. Returned for personal libraries only.

    For example:

      FilesLibraryService.browsePersonalOrphan("title", "true", 1, 20)

    FilesLibraryService.getPersonalCount()

    Return the total number of personal libraries.

    FilesLibraryService.getCommunityCount()

    Return the total number of Community libraries.

    FilesLibraryService.getPersonalOrphanCount()

    Return the total number of personal libraries whose owners were removed from the user directory.

    FilesLibraryService.exportSyncedResourceInfo(string fullpathForOutput, string type)

    Return a report of all of the communities the Files application has interacted with. After a system crash we can compare the report to the latest metadata in the Communities database to help synchronize and update any missing data. In clusters, when we run the command from the deployment manager the path and file are created on the server running Files. In clusters where multiple nodes are running Files, we 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. Use forward slashes ("/") in the path, regardless of the operating system.

    type

    This is always the string value, "community" (including quotes). An error is returned if this is anything except "community".

    For example:


Parent topic:
Administer Files


Related:
Start the wsadmin client
Compare remote application data with the Communities database