Skip to content
Konstantinos N. Vavliakis edited this page Aug 6, 2013 · 3 revisions

RESTful protocol for Edges of a Consumer social network.

CSN edges can only be created via the create graph commands. Once they are created they cannot be updated or deleted (except if their graph is deleted).

READ CSN Edges

GET /api/csnedges?graph_id={graph_id}&filter={filter}&limit={limit}&skip={skip}&count={count} |  index

example:

curl -k -i 'https://localhost:8443/cassandra/api/csnedges?graph_id=51d13998e4b0ebea2a3e81f6&limit=200&skip=100&filter=\{weight:\{$gt:1000\}\}'

Valid query parameters: @QueryParam("graph_id") String graph_id,

@QueryParam("filter") String filters,

@QueryParam("limit") int limit,

@QueryParam("skip") int skip,

@QueryParam("count") boolean count,

filter should be a JSON object, e.g. &filter={weight:{$gt:1000}}

Retrieves the edges of a csn graph.

READ CSN Edge

GET /api/csnedges/{csnedges_id} | show

Fetches the properties of the Edge.

example:

curl -k -i --header Content-type:application/json 'https://localhost:8443/cassandra/api/csnedges/51d1399be4b0ebea2a3e822b'

Consumes: Route

Produces: JSON

{
  "success": true,
  "message": "CSN edges retrieved successfully",
  "size": 1,
  "data": [
    {
      "_id": "51e42dbae4b0826b7fc71a11",
      "type": "PersonType",
      "graph_id": "51e42dbae4b0826b7fc71a0d",
      "node_id1": "51e42dbae4b0826b7fc71a2f",
      "node_id2": "51e42dbae4b0826b7fc71a30"
      "inst_id1": "51e42dbae4b0826b7fc71a0f",
      "inst_id2": "51e42dbae4b0826b7fc71a10"
    }
  ]
}
Clone this wiki locally