Skip to content

Instantly share code, notes, and snippets.

@okram
Last active December 11, 2015 16:58
Show Gist options
  • Save okram/4630935 to your computer and use it in GitHub Desktop.
Save okram/4630935 to your computer and use it in GitHub Desktop.
Core:
http://localhost:8182/graphs/egosystem/core/addEntity
{
entity: {uuid:'1234',name:'marko',type:'person'},
identities : [
{service:'twitter',handle:'@twarko',uri:'http://twitter.com/twarko'},
{service:'lanl', handle:209893, uri:'http://people.lanl.gov/209893'}
]
}
* uuid property required
* uri property required
* service property required
---------------------------------------
Twitter:
http://localhost:8182/graphs/egosystem/twitter/addFollows
{
sourceIdentity: {uri:'http://marko'},
targetIdentities: [{uri:'http://herbert'},{uri:'http://harish',name:'Harish', edgeProperties: { time:1234 }}],
inOrOut: 'out'
}
* out = marko follows these guys.
* in = marko is followed by these guys.
---------------------------------------
MS Academic:
http://localhost:8182/graphs/egosystem/msacademic/addArticle
{
uri:'http://mypaper',
title:'My Paper',
citations:455,
keywords:[{uri:'keyword:blah',keyword:'blah'},{uri:'keyword:bam'}],
edgeProperties: { time:1234 },
authors: [
{uri:'http://marko',name:'Marko A. Rodriguez'}
]
}
* article uri required
* keywords uri required
* authors uri is required
---------------------------------------
Affiliation:
http://localhost:8182/graphs/egosystem/affiliations/addAffiliations
{
sourceIdentity: {uri:'urn:uuid:marko/affiliation'},
targetIdentities: [{uri:'urn:uuid:lanl/affiliation',
edgeProperties: {time:1234, title:'PostDoc', label:'workedFor'},
keywords: [ {uri:'keyword:researcher', keyword:'research' } ]}]
}
* sourceIdentity uri is required
* targetIdentities uri is required
* edgeProperties will go on BOTH marko-->blankNode and blankNode-->lanl edges.
* keywords will dangle off of blankNode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment