Help needed with adding objects via Knowledge Exchange REST API
I was wondering if anyone had had any success with adding objects using the REST API?
I've got most of the retrieval methods working (obtaining model images via REST is very useful but it would be nice to be able to request an image size) including retrieving repository and notebook summary information from where I get the notebook and repository GUIDs.
I am doing a HTTP PUT to 'http:///rs/notebooks//objects/put'
I am adding the following header: 'Authentication: KENative username;password' (P.S. Anyone know why they used a completely non-standard HTTP header rather than basic authentication?).
I am setting the content type to 'application/vnd.metastorm.cif+xml;version=1.0;' and the encoding to 'charset=UTF-8'.
I am sending the following XML:
<?xml version="1.0" encoding="UTF-8"?>
repositoryGuid="">
On some notebooks it works when I insert one project, but not when I insert two at the same time. On other notebooks it won't let me even do one. The only error I get is a 'CIFException' in the keserver log with no accompanying detail.
Any ideas?
Comments
-
Hi Alan,
I'm quite impressed with your experiments (no doc available on REST just yet).
I'm going to pass this message to PV API experts for follow up.
Out of curiosity, how did you get model images via REST ?
Many thanks,
Thierry.0 -
Obtaining images through REST is really simple and really powerful - it has now become our primary method of publishing images on web pages (it just requires a very small web script to create the REST query). Images (in PNG format) can be obtained from the following URL:
http:///KEServer/rs/notebooks//objects/
The downside is that you need to know the Notebook GUID and Model ID. What I've done is write a script that iterates through the repositories and notebooks and tells me all the GUIDs, modelIDs and model names for all the models in my entire KES.
This requires drilling down through the following URLs and parsing the resulting XML:
http:///KEServer/rs/repositories/
http:///KEServer/rs/repositories//notebooks
http:///KEServer/rs/notebooks//summary?view=model
Other URLs I've found are:
http:///KEServer/rs/notebooks//status
http:///KEServer/rs/notebooks//manifest/
http:///KEServer/rs/notebooks//objects/fetch?id=
http:///KEServer/rs/notebooks//objects/fetch?type=
http:///KEServer/rs//info/runtime
http:///KEServer/rs/scheduler
http:///KEServer/rs/scheduler/tasks
http:///KEServer/rs/scheduler/tasks/
http:///KEServer/rs/users
http:///KEServer/rs/users/active
http:///KEServer/rs/users/
http:///KEServer/rs/groups
http:///KEServer/rs/groups/
Don't forget that all REST queries need the weird authentication HTTP header. Also all GUIDs in URLs should have the hyphens stripped out even if they're returned in the XML blob of a previous REST call as a http href.
I'm still very interested in getting the object PUT to work. We want to be able to programmatically add objects directly into a KES notebook so any assistance would be useful.
0 -
Hi Alan,
Sorry for the long delay. I've got an answer from development which unfortunately is not positive.
They are saying we only support GETs for the time being and have an issue with PUTs which we're in the process of addressing.
So you can only update KE notebooks via Web Services at this point in time.
Thanks,
Regards,
Thierry.
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 155 General Questions
- 149 Thrust Services
- 57 Developer Hackathon
- 37 Thrust Studio
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 33 eDOCS
- 190 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 10 XM Fax
- Follow Categories