Metrics Receiver
curl --request POST \
--url https://receiver.metrics-man.com/ \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"application_id": 123,
"timestamp": 123,
"creator": "<string>",
"metric_id": "<string>",
"tags": {}
}
'import requests
url = "https://receiver.metrics-man.com/"
payload = {
"application_id": 123,
"timestamp": 123,
"creator": "<string>",
"metric_id": "<string>",
"tags": {}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
application_id: 123,
timestamp: 123,
creator: '<string>',
metric_id: '<string>',
tags: {}
})
};
fetch('https://receiver.metrics-man.com/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://receiver.metrics-man.com/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'application_id' => 123,
'timestamp' => 123,
'creator' => '<string>',
'metric_id' => '<string>',
'tags' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://receiver.metrics-man.com/"
payload := strings.NewReader("{\n \"application_id\": 123,\n \"timestamp\": 123,\n \"creator\": \"<string>\",\n \"metric_id\": \"<string>\",\n \"tags\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://receiver.metrics-man.com/")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"application_id\": 123,\n \"timestamp\": 123,\n \"creator\": \"<string>\",\n \"metric_id\": \"<string>\",\n \"tags\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://receiver.metrics-man.com/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"application_id\": 123,\n \"timestamp\": 123,\n \"creator\": \"<string>\",\n \"metric_id\": \"<string>\",\n \"tags\": {}\n}"
response = http.request(request)
puts response.read_bodysubmitted
something went wrong
Receiver API
Metrics Receiver
Send your application’s metrics to this endpoint.
POST
/
Metrics Receiver
curl --request POST \
--url https://receiver.metrics-man.com/ \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"application_id": 123,
"timestamp": 123,
"creator": "<string>",
"metric_id": "<string>",
"tags": {}
}
'import requests
url = "https://receiver.metrics-man.com/"
payload = {
"application_id": 123,
"timestamp": 123,
"creator": "<string>",
"metric_id": "<string>",
"tags": {}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
application_id: 123,
timestamp: 123,
creator: '<string>',
metric_id: '<string>',
tags: {}
})
};
fetch('https://receiver.metrics-man.com/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://receiver.metrics-man.com/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'application_id' => 123,
'timestamp' => 123,
'creator' => '<string>',
'metric_id' => '<string>',
'tags' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://receiver.metrics-man.com/"
payload := strings.NewReader("{\n \"application_id\": 123,\n \"timestamp\": 123,\n \"creator\": \"<string>\",\n \"metric_id\": \"<string>\",\n \"tags\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://receiver.metrics-man.com/")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"application_id\": 123,\n \"timestamp\": 123,\n \"creator\": \"<string>\",\n \"metric_id\": \"<string>\",\n \"tags\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://receiver.metrics-man.com/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"application_id\": 123,\n \"timestamp\": 123,\n \"creator\": \"<string>\",\n \"metric_id\": \"<string>\",\n \"tags\": {}\n}"
response = http.request(request)
puts response.read_bodysubmitted
something went wrong
Body
string
required
API access key generated for you application.
number
required
The unique ID of your application.
number
Unix timestamp of creation of your metric. You can specify the granularity from seconds to nanoseconds. Just make sure it is as realtime as possible. If not specified, it will be auto filled.
string
required
Name/ID of client/person who creating this metrics.
string
required
The unique ID of your metric. You can pre-register this from console for easy querying.
object
Key-value pair of string tags to assign to this metric.
Response
Response will be a plain string stating the status of request. Response Status Codes and their probable meanings.- 201
- 400
- 401
- 403
- 500
Response: submitted
Status: Your metric has been successfully recorded.
Status: Your metric has been successfully recorded.
Response: error reading request body
Status: The request you send is of invalid format. Please cross check the data types and structure once.
Status: The request you send is of invalid format. Please cross check the data types and structure once.
Response: missing header ‘Authorization’
Status: Your request did not contain the requried header and hence has been discarded.Response: unknown token
Status: The access key you send in header was not registered with us.
Status: Your request did not contain the requried header and hence has been discarded.Response: unknown token
Status: The access key you send in header was not registered with us.
Response: unknown token
Status: Most likely the token you sent was not registered for your application, or, it simply does not exist.
Status: Most likely the token you sent was not registered for your application, or, it simply does not exist.
Response: something went wrong
Status: Something went wrong from our side internally and we were not able to register your metric.
Status: Something went wrong from our side internally and we were not able to register your metric.
submitted
something went wrong

