This is to document the requirements for the Asset Service (to be used from the Add Path javascript)

Service requirements for the EOU 1 Add Path

  • Create a new resource (asset)
    • Type of new resource should probably be specified in the call
    • Optionally, a page to inherit metadata values can be specified
    • POST to .../assets
      • Arguments type (list), parent (full page name), (Would be nice to put the destination space here)
      • Returns link to the new page of form .../assets/Space.Page (or error)
  • Add asset content (various types) to a resource
    • Attach a file
      • This will probably be done via xwiki's standard attachment mechanism
    • Create a web link
      • POST to .../assets/Space.Page/externals
        • Arguments url
        • Returns link to the ExternalAsset of the form .../assets/Space.Page/externals/0 (or error)
    • Link to a VIDITalk video
      • POST to .../assets/Space.Page/viditalks
        • Arguments vid_id (value returned by viditalk to identify the video)
        • Returns link to the VIDITalkAsset of the form .../assets/Space.Page/viditalks/0 (or error)
    • Create a (Text) content block
      • POST to .../assets/Space.Page/textassets
        • Arguments content
        • Returns link to the SubAsset of the form .../assets/Space.Page/textassets/0 (or error)
    • Add a link to another resource (collections only)
      • POST to .../assets/Space.Page/subassets
        • Arguments page (full page name of subasset), order
        • Returns link to the SubAsset of the form .../assets/Space.Page/subassets/0 (or error)
  • Update metadata on a resource
    • GET from .../assets/Space.Page/metadata
      • Arguments NONE
      • Returns metadata values of the form {"name": value, ...} (or error)
    • PUT to .../assets/Space.Page/metadata
      • Arguments array similar to what the GET form returns
      • Returns link to the metadata of the form .../assets/Space.Page/metadata (or error)
  • "Publish" the resource from the temporary location
    • POST to .../assets/Space.Page/published
      • Arguments space (space to put the page in -- this probably should be moved to information when the resource is created and not passed here)
      • Returns link to the asset of the form .../assets/NewSpace.Page (or error)
  • Get lists of existing resource collections (for a user and for groups a user belongs to)
    • GET from .../users/XWiki.username/collections
      • Arguments NONE
      • Returns list of assets of the form [{collectionPage: "Space.Page", collectionType: "collection", displayTitle: "title", description: "description", children: [{assetpage: "Space2.Page2", order: 0}, ...]}, ...] (or error)
    • GET from .../users/XWiki.username/groups
      • Arguments NONE
      • Returns list of groups of the form [{groupSpace: "Group_Name", displayTitle: "title", description: "description"}, ...] (or error)
    • GET from .../groups/Group_name/collections
      • Arguments NONE
      • Returns list of assets of the form [{collectionPage: "Space.Page", collectionType: "collection", displayTitle: "title", description: "description", children: [{assetpage: "Space2.Page2", order: 0}, ...]}, ...] (or error)
    • GET from .../assets/Collection.name/subassets
      • Arguments NONE
      • Returns list of assets of the form [{assetpage: "Space.Page", order: 0}, ...] (or error)
    
This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 12.10.5-node1 - Documentation