anchor.diff:  	%% @doc
   %% Function: delete_data_points_with_stream_id/2
   %% Purpose: Used to delete all data-points with the given id as parent
  -%% Returns: {ok} or {error,Reason} 
  +%% Returns: {ok} or {error,Reason}
   %% FIX: This function relies on direct contact with elastic search at localhost:9200
   %% @end
   -spec delete_data_points_with_stream_id(Id::string(), Type::string() | binary()) -> term().
  
positive.code: %% Returns: {[{Mediatype, Handler}], ReqData, State}
  %% @end
  -spec content_types_provided(ReqData::term(),State::term()) -> {list(), term(), term()}.
  
  content_types_provided(ReqData, State) ->
  	{[{"application/json", get_stream}], ReqData, State}.
  
  
negative.code: %% successful and false otherwise.
  %% @end
  -spec put_stream(ReqData::term(),State::term()) -> {boolean(), term(), term()}.
  put_stream(ReqData, State) ->
  	case openidc:authenticate_request(ReqData) of
          {error, Msg} -> {{halt, 403}, wrq:set_resp_body(Msg, ReqData), State};
          {ok, Token} ->
  			case api_help:is_rank(ReqData) of
  				false ->
  					StreamId = proplists:get_value('stream', wrq:path_info(ReqData)),
  					{Stream,_,_} = api_help:json_handler(ReqData,State),
  					case {api_help:do_any_field_exist(Stream,?RESTRICTED_STREAMS_UPDATE),api_help:do_only_fields_exist(Stream,?ACCEPTED_STREAMS_FIELDS)} of
  						{true,_} ->
  							ResFields1 = lists:foldl(fun(X, Acc) -> X ++ ", " ++ Acc end, "", ?RESTRICTED_STREAMS_UPDATE),
  							ResFields2 = string:sub_string(ResFields1, 1, length(ResFields1)-2),
  							{{halt,409}, wrq:set_resp_body("{\"error\":\"Error caused by restricted field in document, these fields are restricted : " ++ ResFields2 ++"\"}", ReqData), State};
  