anchor.diff:  							UserUpdate = lib_json:set_attrs([{"script",list_to_binary("ctx._source.triggers += newelement")},
   															 {"params","{}"},{"params.newelement","{}"},
   															 {"params.newelement.function",list_to_binary(Function)}, {"params.newelement.input",Input},
  -															 {"params.newelement.streams",Streams},{"params.newelement.streams",VirtualStreams},
  +															 {"params.newelement.streams",Streams},{"params.newelement.vstreams",VirtualStreams},
   															 {"params.newelement.output_type",list_to_binary("uri")},{"params.newelement.output_id",list_to_binary(URI)}]),
   							case api_help:update_doc(?INDEX, "user", User, UserUpdate) of
   								{error, {UPCode, UPBody}} -> 
  
positive.code: allowed_methods(ReqData, State) ->
  	case api_help:parse_path(wrq:path(ReqData)) of
  	    [{"users", _UserID},{"streams",_StreamId},{"triggers"}] ->
  		{['GET'], ReqData, State};
  	    [{"users", _UserID},{"triggers",_Action}] ->
  		{['POST'], ReqData, State};
  
negative.code: 		    ErrorString = api_help:generate_error(Body, Code),
  		    {{halt, Code} = wrq:set_resp_body(ErrorString, ReqData), State};
  		{ok, JsonStruct} ->
  		    TriggerList = lib_json:get_field(JsonStruct, "_source.triggers"),	
  		    case {proplists:get_value('streamid', wrq:path_info(ReqData)),proplists:get_value('vstreamid', wrq:path_info(ReqData))} of
  				{undefined,undefined} ->			    
  					{lib_json:set_attr(triggers, TriggerList),ReqData, State};
  