{"_id":"54f0a1826c663623001da071","__v":4,"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"},"editedParams":true,"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"},"editedParams2":true,"project":"54ee20635f63b321008be947","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-02-27T16:55:30.293Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"language":"text","code":""}]},"method":"post","auth":"required","params":[{"_id":"54f0a3b99502520d00d78dbf","ref":"","in":"path","required":false,"desc":"ID of the recommender subgraph from which to generate recommendations.","default":"","type":"string","name":"subgraph"},{"_id":"54f0b63bc3b80e1900b1eabc","ref":"","in":"body","required":false,"desc":"Array of source entities to be created","default":"","type":"array_mixed","name":"entities"}],"url":"/subgraphs/:subgraph/data/sources/"},"isReference":false,"order":2,"body":"Request body:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"entities\\\": [\\n        {\\n            \\\"id\\\": \\\"john:::at:::doe.com\\\",\\n            \\\"properties\\\": [\\n                {\\n                    \\\"key\\\": \\\"name\\\",\\n                    \\\"value\\\": \\\"John Doe\\\"\\n                }\\n            ]\\n        }\\n    ]\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Request body\"\n    }\n  ]\n}\n[/block]","excerpt":"Insert source entities into the subgraph. If entities exist, they will be updated. For bulk data loading, use the CSV endpoint.","slug":"create-source","type":"endpoint","title":"Create source(s)"}

postCreate source(s)

Insert source entities into the subgraph. If entities exist, they will be updated. For bulk data loading, use the CSV endpoint.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

subgraph:
string
ID of the recommender subgraph from which to generate recommendations.

Body Params

entities:
array of mixed
Array of source entities to be created

Documentation

Request body: [block:code] { "codes": [ { "code": "{\n \"entities\": [\n {\n \"id\": \"john@doe.com\",\n \"properties\": [\n {\n \"key\": \"name\",\n \"value\": \"John Doe\"\n }\n ]\n }\n ]\n}", "language": "json", "name": "Request body" } ] } [/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 }}