Getting Document ID as a return value

5 views
Skip to first unread message

natha...@ilsle.net

unread,
Dec 20, 2012, 11:30:37 AM12/20/12
to learning-regis...@googlegroups.com
Hi,

I'm working with Jerome and others on the Pathways project. When publishing a new resource to the Learning Registry, is it possible to get the generated document ID as a return value? If so, what's the best way to do it?

Thanks.

Jim Klo

unread,
Dec 20, 2012, 3:36:40 PM12/20/12
to <learning-registry-collaborate@googlegroups.com>
It should do that in the response object that is returned when publishing.

- Jim

Jim Klo
Senior Software Engineer
Center for Software Engineering
SRI International
t. @nsomnac

On Dec 20, 2012, at 8:30 AM, <natha...@ilsle.net>
 wrote:

Hi,

I'm working with Jerome and others on the Pathways project. When publishing a new resource to the Learning Registry, is it possible to get the generated document ID as a return value? If so, what's the best way to do it?

Thanks.

--
You received this message because you are subscribed to the Google
Groups "Learning Registry: Collaborate" group.
 
To post: learning-regis...@googlegroups.com
To unsubscribe:learning-registry-collabo...@googlegroups.com
 
For more options, visit this group at
http://groups.google.com/group/learning-registry-collaborate?hl=en?hl=en

Grata, Walt

unread,
Dec 20, 2012, 3:40:24 PM12/20/12
to learning-regis...@googlegroups.com
The results from posting to publish should contain the doc_ID
Sample output from publishing from sandbox.
{"document_results": [{"doc_ID": "95dbf93e3ccc458999bcf2e266da65cc", "OK": true}], "OK": true}'


--
You received this message because you are subscribed to the Google
Groups "Learning Registry: Collaborate" group.
 
To post: learning-regis...@googlegroups.com

Steve Midgley

unread,
Dec 20, 2012, 4:08:51 PM12/20/12
to <learning-registry-collaborate@googlegroups.com>
Just as a point of clarity, right now we believe there is a bug in LR where you cannot specify your own document IDs, but have to accept the document IDs that are generated by the node. We are proposing to switch to a URN based document ID that could be submitted by the publisher (aka you) and honored by the node. For now the info Jim and Walt provided is accurate but we hope that soon you can specify your own URN ID and the node will just respond with that ID when publishing is successful.

Steve



--

Jim Klo

unread,
Dec 20, 2012, 4:31:07 PM12/20/12
to <learning-registry-collaborate@googlegroups.com>
FWIW… I don't know that we will ever 'enforce' urns… we are only recommending them for the sake of being relatively trivial for submitters to generate and track published documents using native-to-the-submitter ID's and turning them into a global unique id.

We may update node generated id's to manufacture them as urns - just to double down on the unique id guarantee.  So instead of something like this returned as a generated doc_ID:
"65EE079A359C42AF957D6CC1E64DA660"

You might get something like this instead:
"urn:node01.public.learningregistry.net:id:65EE079A359C42AF957D6CC1E64DA660:rev:1"

The nifty thing about this is a data service could be built to lookup by id partials… so if you didn't know the rev portion… you could find all things starting with "urn:node01.public.learningregistry.net:id:65EE079A359C42AF957D6CC1E64DA660:rev:"
as well as discover all ids for a urn:domain "urn:node01.public.learningregistry.net:".

Food for thought about what is coming.

- Jim

Jim Klo
Senior Software Engineer
Center for Software Engineering
SRI International
t. @nsomnac

On Dec 20, 2012, at 1:08 PM, Steve Midgley <steve....@mixrun.com>
 wrote:

To unsubscribe:learning-registry-collabo...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages