<div class=“col-lg-12” ng-controller=“LocationCtl”>
<h1 class="page-header">API Guide</h1> <div ng-controller="BucketListCtl"> <p>Select Bucket: <select ng-options="b.name for b in buckets" ng-model="sbucket"></select> <p>To save a single log to logman bucket, make <strong>POST</strong> request to url:</p> <code>{{protocol}}//{{host}}/api/write?key={{ (sbucket)? sbucket.write_token : 'bucket_write_key' }}</code> </div> <br> <p>With data in JSON format:</p>
<pre > <span style='color:#806030; '>{</span>
log_type<span style='color:#806030; '>:</span> <span style='color:#c00000; '>1</span><span style='color:#806030; '>,</span> <span style='color:#c34e00; '>//type of log: 1-error, 2-success, 3-warning,4-info</span> message<span style='color:#806030; '>:</span> <span style='color:#e60000; '>'Err...'</span><span style='color:#806030; '>,</span> <span style='color:#c34e00; '>//log message</span> <span style='color:#c34e00; '>//Optional parameters</span> data<span style='color:#806030; '>:</span> <span style='color:#806030; '>{</span> <span style='color:#c34e00; '>//aditional data</span> innerException<span style='color:#806030; '>:</span> <span style='color:#806030; '>{</span>message<span style='color:#806030; '>:</span><span style='color:#e60000; '>'...'</span><span style='color:#806030; '>}</span> <span style='color:#806030; '>}</span><span style='color:#806030; '>,</span> datetime<span style='color:#806030; '>:</span> <span style='color:#e60000; '>'1-1-2013 10:00'</span><span style='color:#806030; '>,</span> <span style='color:#c34e00; '>//time when error occurred on server</span> data_type<span style='color:#806030; '>:</span> <span style='color:#e60000; '>'.net exception'</span><span style='color:#806030; '>,</span> <span style='color:#c34e00; '>//not used for now, but indicates 'data' field format</span> sources<span style='color:#806030; '>:</span> <span style='color:#806030; '>[</span><span style='color:#806030; '>{</span> <span style='color:#c34e00; '>//Name and IP of machine that generated an error, </span> name<span style='color:#806030; '>:</span> <span style='color:#e60000; '>'my server'</span><span style='color:#806030; '>,</span> <span style='color:#c34e00; '>//if logman Proxy is used, it will append his hostname and ip</span> ip_address<span style='color:#806030; '>:</span> <span style='color:#e60000; '>'234.124.156.123'</span> <span style='color:#806030; '>}</span><span style='color:#806030; '>]</span>
<span style='color:#806030; '>}</span> </pre>
</div>
<!–
{
log_type: 1, //type of log: 1-error, 2-success, 3-warning,4-info message: 'Err...', //log message //Optional parameters data: { //aditional data innerException: {message:'...'} }, datetime: '1-1-2013 10:00', //time when error occurred - if it's blank, current time is set data_type: '.net exception', //not used for now, but indicates 'data' field format sources: [{ //Name and IP of machine that generated an error, if logman Proxy is used, it will append his hostname and ip name: 'my server', ip_address: '234.124.156.123' }]
}
–>