The Assets REST Api allows to access the Assets using REST/JSON.

URLs

  • Asset Creation or Copy: http://host:port/xwiki/curriki/assets
  • Asset Information: http://host:port/xwiki/curriki/assets/{assetName}
  • Metadata Information: http://host:port/xwiki/curriki/assets/{assetName}/metadata
  • List of subassets: http://host:port/xwiki/curriki/assets/{assetName}/subassets
  • SubAsset Information: http://host:port/xwiki/curriki/assets/{assetName}/subassets/{subassetId}
  • External Asset Information: http://host:port/xwiki/curriki/assets/{assetName}/externals/{externalId}
  • External Asset Publishing: http://host:port/xwiki/curriki/assets/{assetName}/externals
  • Viditalk Asset Information: http://host:port/xwiki/curriki/assets/{assetName}/viditalks/{viditalkId}
  • Viditalk Asset Publishing: http://host:port/xwiki/curriki/assets/{assetName}/viditalks
  • Text Asset Information: http://host:port/xwiki/curriki/assets/{assetName}/textassets/{textId}
  • Text Asset Publishing: http://host:port/xwiki/curriki/assets/{assetName}/textassets
  • Publish Action: http://host:port/xwiki/curriki/assets/{assetName}/published
  • Nominate Action: http://host:port/xwiki/curriki/assets/{assetName}/nominate and http://host:port/xwiki/curriki/assets/{assetName}/unnominate
  • Partner Action: http://host:port/xwiki/curriki/assets/{assetName}/partner
  • AssetManager Actions: http://host:port/xwiki/curriki/assets/{assetName}/assetManager

Asset Information

URL: http://host:port/xwiki/curriki/assets/{assetName}
Method: GET

Action Performed

Retrieve main asset information for an asset

Sample Results

{
"assetPage":"Coll_Group_SankoreSenegal.DrapeauduSenegal",
"description":"Drapeau du Sénégal",
"title":"Drapeau du Sénégal",
"creator":"XWiki.Admin",
"creatorName":"XWikiGuest",
"fullAssetType":"org.curriki.xwiki.plugin.asset.attachment.ImageAsset",
"assetType":"Image"
}

Reference

 Property  Field Type  Definition  XWiki Class correspondence  Sample 
 assetPage  Page  XWiki Page containing the asset  doc.fullName  Coll_Group_SankoreSenegal.DrapeauduSenegal
 description  Free text field  Description of the asset  CurrikiCode.AssetClass description  Drapeau du Sénégal
 title  Limited text field (255 chars max)  Title of the asset  doc.title  Drapeau du Sénégal
 creator  User Page  Creator of the Asset   doc.creator  XWiki.Admin
 creatorName  Free Text field   Displayable name of the Creator of the Asset  none (obtained from user page and doc.creator field)  Administrator
 assetType  List Field  Asset Type Name  doc.category  Image
 fullAssetType  List Field  Asset Type (java class)  none (obtain from presence of specific Asset Class) and from assetType field  org.curriki.xwiki.plugin.asset.attachment.ImageAsset

Asset Metadata Information

URL: http://host:port/xwiki/curriki/{assetName}/metadata
Method: GET and PUT

Action Performed

Retrieve or update metadata information for an asset

Sample Results


{
"instructional_component":["collection_atlas"],
"educational_level": ["secondary_16-17","secondary_17-18"],
"category":"image",
"keywords":["sri.keywords.empty_msg"],
"description":"Drapeau du Sénégal",
"rights":"public",
"language":"eng",
"hidden_from_search":0,
"fw_items":["FW_masterFramework.Health_Education","FW_masterFramework.WebHome"],
"rightsHolder":"Administrator",
"licenseType":"Licences.CurrikiLicense",
"title":"Drapeau du Sénégal",
"creator":"XWiki.Admin",
"creatorName":"XWikiGuest",
"assetpage":"Coll_Group_SankoreSenegal.DrapeauduSenegal",
"rightsList":{"delete":false,"edit":false,"view":true},
"subcategory":"gif",
"fullAssetType":"org.curriki.xwiki.plugin.asset.attachment.ImageAsset",
"assetType":"Image",
"revision":"3.1",
"fcdate": {"date":8,"day":0,"hours":17,"minutes":14,"month":7,"nanos":0,"seconds":0,"time":1281312840000,"timezoneOffset":420,"year":110},
"fcnotes":"",
"fcreviewer":"XWiki.FileChecker2",
"fcstatus":"1"
}

Reference

 Property  Field Type  Definition  XWiki Class correspondence  Sample 
 assetpage  Page  XWiki Page containing the asset  doc.fullName  Coll_Group_SankoreSenegal.DrapeauduSenegal
 category  List  Category of the Asset  CurrikiCode.AssetClass category  image
 subcategory  List  Sub Category of the Asset  CurrikiCode.AssetClass subcategory  gif
 description  Free text field  Description of the asset  CurrikiCode.AssetClass description  Drapeau du Sénégal
 title  Limited text field (255 chars max)  Title of the asset  doc.title  Drapeau du Sénégal
 language  List  Language of the Asset  CurrikiCode.AssetClass language  eng
 creator  User Page  Creator of the Asset   doc.creator  XWiki.Admin
 creatorName  Free Text field   Displayable name of the Creator of the Asset  none (obtained from user page and doc.creator field)  Administrator
 assetType  List Field  Asset Type Name  doc.category  Image
 fullAssetType  List Field  Asset Type (java class)  none (obtain from presence of specific Asset Class) and from assetType field  org.curriki.xwiki.plugin.asset.attachment.ImageAsset
 hidden_from_search  true/false  Hidden from search results  CurrikiCode.AssetClass hidden_from_searhc  0
 keywords  Free list  List of keywords  CurrikiCode.AssetClass keywords  [ "keyword1" , "keyword2" ]
 fw_items  List  List of Framework values  CurrikiCode.AssetClass fw_items  ["FW_masterFramework.Health_Education","FW_masterFramework.WebHome"]
 educational_level  List  List of education level values  CurrikiCode.AssetClass educational_level  ["secondary_16-17","secondary_17-18"]
 instructional_component  List  List of instructional component values  CurrikiCode.AssetClass instructional_component  ["collection_atlas"]
 revision  Number  Version of the asset  doc.version  3.1
 rights  List  Rights to apply to the asset  CurrikiCode.AssetClass rights  public
 rightsList  Map of true/false values  Detailed rights to apply to the asset  CurrikiCode.AssetClass rights  {"delete":false,"edit":false,"view":true}
 licenseType  List  License of the Asset  CurrikiCode.AssetLicenceClass licenseType  Licences.CurrikiLicense
 rightsHolder  Limited Text field  Rights holder  CurrikiCode.AssetLicenceClass licenseType   Administrator
 fcdate (optional)  map  File Check Date   {"date":8,"day":0,"hours":17,"minutes":14,"month":7,"nanos":0,"seconds":0,"time":1281312840000,"timezoneOffset":420,"year":110}
 fcnotes (optional)  limited text field  File Check Notes   "notes"
 fcreviewer (optional)  User Page  File Check reviewer   XWiki.FileChecker2
 fcstatus (optional)  Number  File Check status   0

SubAsset Information

URL: http://host:port/xwiki/curriki/{assetName}/subassets
Method: GET, PUT and POST

Action Performed

  • Retrieve subassets information for a folder or collection (GET)
  • Add a new subasset (POST)
  • Reordering subassets (PUT)

Sample Results

 

[
{"revision":"2.1",
"displayTitle":"Sankoré.org",
"category":"external",
"order":0,
"assetType":"External",
"levels":["secondary_16-17","secondary_17-18"],
"ict":["collection_atlas"],
"subcategory":"url",
"description":"Site Web Sankoré",
"rights":{"delete":false,"edit":false,"view":true},
"assetpage":"Coll_Group_SankoreSenegal.Sankoreorg",
"fwItems":["FW_masterFramework.Health_Education","FW_masterFramework.WebHome"]
}
,
{"revision":"3.1",
"displayTitle":"Sigles Nationaux",
"category":"collection",
"order":1,
"assetType":"FolderComposite",
"levels":["secondary_16-17","secondary_17-18"],
"ict":["collection_atlas"],
"subcategory":"folder",
"description":"Sigles Nationaux",
"rights":{"delete":false,"edit":false,"view":true},
"assetpage":"Coll_Group_SankoreSenegal.SiglesNationaux",
"fwItems":["FW_masterFramework.Health_Education","FW_masterFramework.WebHome"]
}
,
{"revision":"2.1",
"displayTitle":"This is a test",
"category":"external","order":2,
"assetType":"External",
"levels":["secondarytech_technical_school","secondarytech_technical_college"],
"ict":["collection_atlas"],
"subcategory":"url",
"description":"test test",
"rights":{"delete":false,"edit":false,"view":true},
"assetpage":"Coll_Admin.Thisisatest",
"fwItems":["FW_masterFramework.Arts_and_Culture","FW_masterFramework.WebHome"]
}
]

Reference

List of Asset objects with the "order" additional value

 Property  Field Type  Definition  XWiki Class correspondence  Sample 
 assetpage  Page  XWiki Page containing the asset  doc.fullName  Coll_Group_SankoreSenegal.DrapeauduSenegal
 order  Number  Order in which to display the subassets  XWiki.SubAssetClass order  1
 category  List  Category of the Asset  CurrikiCode.AssetClass category  image
 subcategory  List  Sub Category of the Asset  CurrikiCode.AssetClass subcategory  gif
 description  Free text field  Description of the asset  CurrikiCode.AssetClass description  Drapeau du Sénégal
 displayTitle  Limited text field (255 chars max)  Title of the asset  doc.title  Drapeau du Sénégal
 assetType  List Field  Asset Type Name  doc.category  Image
 fwItems  List  List of Framework values  CurrikiCode.AssetClass fw_items  ["FW_masterFramework.Health_Education","FW_masterFramework.WebHome"]
 levels  List  List of education level values  CurrikiCode.AssetClass educational_level  ["secondary_16-17","secondary_17-18"]
 ict  List  List of instructional component values  CurrikiCode.AssetClassinstructional_component  ["collection_atlas"]
 revision  Number  Version of the asset  doc.version  3.1
 rights  List  Rights to apply to the asset  CurrikiCode.AssetClass rights  public

POST parameters

 Property  Field Type  Definition  XWiki Class correspondence  Sample 
 page  Page Name  Page to add as a subasset  CurrikiCode.SubAssetClass assetPage  Coll_Admin.WebHome
 collectionType  List  Type of collection (folder/collection  CurrikiCode.CompositeAssetClass type  folder
 order  Number

PUT parameters

 Property  Field Type  Definition  XWiki Class correspondence  Sample 
 original
 previousRevision
 logMessage
 wanted

SubAsset Information Details

URL: http://host:port/xwiki/curriki/{assetName}/subassets/{number}
Method: GET

Action Performed

Retrieve subasset information for a folder or collection

Sample Results

 

{
"link":
{
"revision":"2.1","displayTitle":"Sankoré.org","category":"external","order":0,
"assetType":"External","levels":["secondary_16-17","secondary_17-18"],
"ict":["collection_atlas"],"subcategory":"url","description":"Site Web Sankoré",
"rights":{"delete":false,"edit":false,"view":true},
"assetpage":"Coll_Group_SankoreSenegal.Sankoreorg",
"fwItems":["FW_masterFramework.Health_Education","FW_masterFramework.WebHome"]
}
}

Reference

Asset objects with the "order" additional value

 Property  Field Type  Definition  XWiki Class correspondence  Sample 
 assetpage  Page  XWiki Page containing the asset  doc.fullName  Coll_Group_SankoreSenegal.DrapeauduSenegal
 order  Number  Order in which to display the subassets  XWiki.SubAssetClass order  1
 category  List  Category of the Asset  CurrikiCode.AssetClass category  image
 subcategory  List  Sub Category of the Asset  CurrikiCode.AssetClass subcategory  gif
 description  Free text field  Description of the asset  CurrikiCode.AssetClass description  Drapeau du Sénégal
 displayTitle  Limited text field (255 chars max)  Title of the asset  doc.title  Drapeau du Sénégal
 assetType  List Field  Asset Type Name  doc.category  Image
 fwItems  List  List of Framework values  CurrikiCode.AssetClass fw_items  ["FW_masterFramework.Health_Education","FW_masterFramework.WebHome"]
 levels  List  List of education level values  CurrikiCode.AssetClass educational_level  ["secondary_16-17","secondary_17-18"]
 ict  List  List of instructional component values  CurrikiCode.AssetClassinstructional_component  ["collection_atlas"]
 revision  Number  Version of the asset  doc.version  3.1
 rights  List  Rights to apply to the asset  CurrikiCode.AssetClass rights  public

Externals Information

URL: http://host:port/xwiki/curriki/{assetName}/externals/0
Method: GET

Action Performed

Retrieve external asset data for an external asset (URL)

Sample Results

 

{
"link":"http://www.xwiki.org",
"linktext":""
}

Reference

 Property  Field Type  Definition  XWiki Class correspondence  Sample 
 link  limited text field  URL of a link  CurrikiCode.ExternalAssetClass link  http://www.xwiki.org
 linktext  limited text field  Description of a link  CurrikiCode.ExternalAssetClass  linktext  XWiki.org WebSite

External Asset Publishing

URL: http://host:port/xwiki/curriki/{assetName}/externals
Method: POST

Action Performed

Add the external asset information to the asset

Reference

 Property  Field Type  Definition  XWiki Class correspondence  Sample 
 link  limited text field  URL of a link  CurrikiCode.ExternalAssetClass link  http://www.xwiki.org
 linktext  limited text field  Description of a link  CurrikiCode.ExternalAssetClass  linktext  XWiki.org WebSite

Video Information

URL: http://host:port/xwiki/curriki/{assetName}/viditalks/0
Method: GET

Action Performed

Retrieve video information for a video asset (only for curriki.org video platform)

Sample Results

 

{"video_id":"BDWqwcTtZa0"}

Reference

 Property  Field Type  Definition  XWiki Class correspondence  Sample 
 video_id  Limited text field  Video ID  CurrikiCode.VideoAssetClass id  BDWqwcTtZa0

Notes

Curriki.org used to support "viditalk" for handling videos which is a service that was phased out. Curriki.org now supports publishing and the video ID represents an internal video ID from a video server handled by Curriki.org. In Curriki 2.x video URLs from youtube published as external assets (urls) automatically get a video player.

Video Publishing

URL: http://host:port/xwiki/curriki/{assetName}/viditalks
Method: POST

Action Performed

Add video information to an asset

Reference

 Property  Field Type  Definition  XWiki Class correspondence  Sample 
 video_id  Limited text field  Video ID  CurrikiCode.VideoAssetClass id  BDWqwcTtZa0

Text Asset Information

URL: http://host:port/xwiki/curriki/{assetName}/textassets/0
Method: GET

Action Performed

Retrieve asset Text information for a Text Asset

Sample Results

 

{"text":"Ceci est un test\\\\","syntax":"xwiki/2.0"}

Reference

 Property  Field Type  Definition  XWiki Class correspondence  Sample 
 text  Free text field  Text of text asset  doc.content  Ceci est un test

 
 syntax  List  Syntax of text asset  CurrikiCode.TextAssetClass syntax  xwiki/2.0 or html/1.0

Text Asset Publishing

URL: http://host:port/xwiki/curriki/{assetName}/textassets
Method: POST

Action Performed

Add asset Text information to an asset

Reference

 Property  Field Type  Definition  XWiki Class correspondence  Sample 
 text  Free text field  Text of text asset  doc.content  Ceci est un test

 
 syntax  List  Syntax of text asset  CurrikiCode.TextAssetClass syntax  xwiki/2.0 or html/1.0

Published

URL: http://host:port/xwiki/curriki/{assetName}/published
Method: GET and PUT

Action Performed

Final publishing step of an asset

Sample Results

 

{ "published" : true }

Reference

 Property  Field Type  Definition  XWiki Class correspondence  Sample 

Creating or Copying an Asset

URL: http://host:port/xwiki/curriki/assets
Method: POST

Action Performed

Creating or Copying an Asset

Reference

 Property  Field Type  Definition  XWiki Class correspondence  Sample 
 parent  Page Name  Which collection to add the asset to  none  Coll_Admin.WebHome
 copyOf  Page Name  Which asset to copy  none   Coll_Admin.Asset
 publishSpace  Space Name  Space to publish to none   AssetTemp

Partner

URL: http://host:port/xwiki/curriki/assets/{assetName}/partner
Method: PUT

Action Performed

Make an asset a Partner Resources

Reference

 Property  Field Type  Definition  XWiki Class correspondence  Sample 

Nominate

URL: http://host:port/xwiki/curriki/assets/{assetName}/nominate
Method: PUT

Action Performed

Nominate a resource

Reference

 Property  Field Type  Definition  XWiki Class correspondence  Sample 
 comments  Free text field  Comment to add to the nomination  XWiki.XWikiComments comment  

Unnominate

URL: http://host:port/xwiki/curriki/assets/{assetName}/nominate
Method: PUT

Action Performed

Unnominate a resource

Reference

 Property  Field Type  Definition  XWiki Class correspondence  Sample 

AssetManager

URL: http://host:port/xwiki/curriki/assets/{assetName}/assetManager
Method: PUT

Action Performed

Set or unset asterix review value (this is used to make a review following a nomination).

Reference

 Property  Field Type  Definition  XWiki Class correspondence  Sample 
 action  setAsterixReview/removeAsterixReview  action to perform  none  
 asterixReviewValue  Number  Value of the review result  CRS.CurrikiReviewStatusClass status  100
Tags:
Created by Ludovic Dubost on 2011/05/24 14:33
    
This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 8.4.4-node2 - Documentation