{"_id":"54f0a1b96c663623001da075","project":"54ee20635f63b321008be947","user":"54ee203467e09c230091e70c","version":{"_id":"54ee20645f63b321008be94a","project":"54ee20635f63b321008be947","__v":5,"createdAt":"2015-02-25T19:20:04.054Z","releaseDate":"2015-02-25T19:20:04.054Z","categories":["54ee20645f63b321008be94b","54f097ed7d40be370012d4f1","54f097f39502520d00d78da3","54f097fcf68da9350094ec6e","54f22e183fcd560d00003ed8"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"__v":2,"category":{"_id":"54f097fcf68da9350094ec6e","pages":["54f099589502520d00d78da6","54f0a1826c663623001da071","54f0a1a56c663623001da073","54f0a1b96c663623001da075","54f0a1d77d40be370012d500","54f0a1e96c663623001da077","54f0a20c9502520d00d78dbb","54f209253d28920d0095acba"],"version":"54ee20645f63b321008be94a","__v":8,"project":"54ee20635f63b321008be947","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-02-27T16:14:52.485Z","from_sync":false,"order":1,"slug":"api-docs","title":"API Docs"},"editedParams2":true,"editedParams":true,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-02-27T16:56:25.574Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"post","results":{"codes":[]},"auth":"required","params":[{"_id":"54f22afd3d28920d0095accc","ref":"","in":"body","required":true,"desc":"ID of the recommender subgraph from which to generate recommendations.","default":"","type":"string","name":"sugraph"},{"_id":"54f22afd3d28920d0095accb","ref":"","in":"body","required":true,"desc":"Array of relationship objects to be created","default":"","type":"array_mixed","name":"entities"}],"url":"/subgraphs/:subgraph/data/relationships/"},"isReference":false,"order":4,"body":"Request body:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"entities\\\": [\\n        {\\n            \\\"weight\\\": 4.0,\\n            \\\"source\\\": \\\"john:::at:::doe.com\\\",\\n            \\\"target\\\": \\\"tt0398286\\\"\\n        }\\n    ]\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"Create relationships between sources and targets in the subgraph. The relationship, source, and target types are already defined in the subgraph. For bulk data loading, use the streaming JSON endpoint.","slug":"create-relationships","type":"endpoint","title":"Create relationship(s)"}

postCreate relationship(s)

Create relationships between sources and targets in the subgraph. The relationship, source, and target types are already defined in the subgraph. For bulk data loading, use the streaming JSON endpoint.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

sugraph:
required
string
ID of the recommender subgraph from which to generate recommendations.
entities:
required
array of mixed
Array of relationship objects to be created

Documentation

Request body: [block:code] { "codes": [ { "code": "{\n \"entities\": [\n {\n \"weight\": 4.0,\n \"source\": \"john@doe.com\",\n \"target\": \"tt0398286\"\n }\n ]\n}", "language": "json" } ] } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}