Create a log
To create a log, you must post a log payload, but before that, you need to pass your account′s API Key and API Secret. These can be found under the "Developers" tab of your account settings page.
URL
https://client.logoom.io/api/data/create
NPM
https://www.npmjs.com/package/logoom
Parameters
sourceKey REQUIRED
The sourceKey is a required field that should contain the source of the log that you wish to insert.
category REQUIRED
The category field is mandatory and is an enumerated type with possible values of Critical, Emergency, Error, Warning, Notice, Info, and Debug.
group REQUIRED
The group field is required and the character limit is 20.
message optional
The message field is optional and the character limit is 2056.
metadata optional
The metadata field is optional and the character limit is 256.
- cURL
- Node.js
- PHP
- C#
POST/createLog![Landscape picture](/_next/image?url=%2Fassets%2Fshare.png&w=32&q=75)
![Landscape picture](/_next/image?url=%2Fassets%2Fshare.png&w=32&q=75)
curl -X POST \
https://client.logoom.io/api/data/create \
-H 'Content-Type: application/json' \
-H 'apikey: your-api-key' \
-H 'apisecret: your-api-secret' \
-d '{
"group": "your group value",
"message": "your message",
"metadata": "your metadata",
"category": "category options",
"sourceKey": "your source key"
}'
https://client.logoom.io/api/data/create \
-H 'Content-Type: application/json' \
-H 'apikey: your-api-key' \
-H 'apisecret: your-api-secret' \
-d '{
"group": "your group value",
"message": "your message",
"metadata": "your metadata",
"category": "category options",
"sourceKey": "your source key"
}'
Response
{ "success": true, "message": "The log has been successfully created", "statusCode": 201, "data": { "logId": "logID" } }