Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
{
        public String report_id;
    	public List<ReportDataPojo> report;
}

ReportDataPojo
{
	public int index;    
public String data;
    public String note;
    public Date created_date;
	public String event_id;
	public String event_title;
	public String item_id;
	public String item_type; //should be "summary","analysis","feed", to determine how exporter draws these items, will default to just rendering whatever is there if item is analysis/other or null
	public String item_title; //field for UM to use for displaying headers in report
	public int event_index;
	public List<ReportDataItemPojo> data;
}

ReportDataItemPojo
{
	public String type; //e.g. duration/title/url/piechart/etc
    public String text;
    public String img;    
}
NSIGHT DATA ITEM EXAMPLES
Code Block
//Feed item data:
{
...
"item_type":"feed",
"report_item_title":"", //n/a we don't show a header
"data":[
{"type":"title", "text":"Obama gives speech"},
{"type":"url","text":"http://www.cnn.com/article1"},
{"type":"description","text":"Obama gave a speech today in India, blah blha blha"},
{"type":"pub_date","text":"June 9th, 2014"}
]
}

//Analysis item data:
{
...
"item_type":"analysis",
"report_item_title":"Entity Type Sentiment (Mar 31 2014 - Mar 31 2014)",
"data":[
{"type":"EntSentFreqRelGraph", "text":"if theres a title or something", "img":"base64/img:asdf2343234sdfdsf"}
]
}

//Summary item data:
{
...
"item_type":"summary",
"report_item_title":"Fox News & Politics - Thematic Relations",
"data":[
{"type":"pub_date","text":"June 9th, 2014"},
{"type":"description","text":"Obama gave a speech today in India, blah blha blha"},
{"type":"duration", "text":"8 days", "img":"base64/img:asdf2343234sdfdsf"},
{"type":"documents", "text":"23", "img":"base64/img:asdf2343234sdfdsf"},
{"type":"location", "text":"Columbus, OH", "img":"base64/img:asdf2343234sdfdsf"},
{"type":"sentiment", "text":"2.67", "img":"base64/img:asdf2343234sdfdsf"}
]
}



 

Example
Code Block
curl -b cookies.txt -X GET "http://localhost:8185/report" > response.txt
curl -b cookies.txt -X GET "http://localhost:8185/report/5331abfdb8e06221ba4a3b8a" > response.txt
curl -b cookies.txt -X POST -d '{"report":[{"index":0,"data":"88343","note":"nothing to see here", "created_date":"May 1, 2014 01:39:49 PM UTC"},{"index":1,"data":"asfd","note":"nothing to see here"}]}' "http://localhost:8185/report" > response.txt
curl -b cookies.txt -X PUT -d '{"report":[{"index":0,"data":"88343","note":"nothing to see here", "created_date":"May 1, 2014 01:39:49 PM UTC"},{"index":1,"data":"asfd","note":"nothing to see here", "event_id":"12345"}]}' "http://localhost:8185/report" > response.txt
curl -b cookies.txt -X DELETE "http://localhost:8185/report" > response.txt

...