• Home
  • Consultancy
  • Contact
  • The Export Interface

    August 24th, 2009 by Marcus Povey

    One of the more hidden features of Elgg is the Export interface.

    In a nutshell this interface provides an export view for Entities, Metadata, Annotations and relationships which can provide a convenient way of accessing data objects in a machine readable form.

    Endpoints

    The export url is constructed in different ways for entities, relationships and metadata.

    All endpoints begin with:

    http://yoursite.com/export/[VIEW]/

    Where [VIEW] is the format you want the data exported in – e.g. json, opendd, php or default.

    Entities
    To export a GUID simply add it to the end:

    http://yoursite.com/export/[VIEW]/[GUID]/

    Annotations & Metadata

    Metadata and annotation can be exported by providing the type (‘annotation’ or ‘metadata’) and the appropriate ID.

    http://yoursite.com/export/[VIEW]/[GUID]/[annotation|metadata]/[annotation_id|metadata_id]/

    Relationships
    Follows the same format as above, but with [GUID] being the first guid in the relationship – in essence the entity to which the relationship “belongs”.

    http://yoursite.com/export/[VIEW]/[GUID]/relationship/[relationship_id]/

    Security

    Some items of data (for example user passwords) are restricted from this export view. Exactly what is output by an output view is governed by $object->getExportableValues(); which returns a list of exportable fields in the entity.

    In addition, access permissions on the object are respected – meaning that if you can’t see an item in Elgg, you will not be able to see it in the export view either.

    Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
    • Digg
    • del.icio.us
    • StumbleUpon
    • Reddit
    • Facebook
    • TwitThis
    • LinkedIn
    • NewsVine
    • Slashdot
    • Technorati
    • Google Bookmarks
    • email

    Related posts (automatically generated)

    One Response to “The Export Interface”

    1. Sdesocio says:

      Im new to elgg but is there a way to export all users at one time? conversely is there a way to import users?

    Leave a Reply

    Additional comments powered by BackType

    All content is © Copyright Marcus Povey 2008-2010 and released under a Creative Commons licence unless otherwise stated.

    Creative Commons License