Fivemerr
  • Fivemerr
    • πŸ€“Welcome to Fivemerr
  • API
    • βœ…Setup
    • πŸ–ΌοΈImages
    • πŸ”ŠAudio
    • πŸŽ₯Video
    • ℹ️Logs
  • Features
    • πŸ”„DB Backups
    • πŸ”‰Media
    • πŸ“­API Tokens
    • πŸ’»Servers
    • πŸͺ’Logs
    • πŸ•ΈοΈWebhooks
  • Script Integrations
    • πŸ“Έscreenshot-basic
    • 🀳ShareX
    • ℹ️Logs
      • ℹ️fm-logs
      • ℹ️ox_logs
      • ℹ️qb-logs
    • πŸ“ΆPhone Scripts
      • πŸ“³QBCore Phone
      • πŸ“³LB Phone
      • πŸ“³Road Phone
      • πŸ“³NPWD
      • πŸ“³JP Phone
      • πŸ“³nPhone
      • πŸ“΄okokPhone
      • πŸ“³GKS Phone
      • πŸ“³YSeries Phone
      • πŸ“΅QS Phone
    • πŸ¦₯Project Sloth
      • πŸ¦₯ps-mdt
      • πŸ¦₯ps-adminmenu
      • πŸ¦₯ps-camera
    • πŸ’ͺPower Scripts
      • πŸ’ͺpower_dashcams
    • πŸ“ΉSpy Scripts
      • πŸ“Ήspy-bodycam
Powered by GitBook
On this page
  • API Endpoint
  • Authorization
  • Body
  • Example
  • Example with Node.js (with Axios)
  1. API

Logs

To create a log using the Logs API, send a POST request to the API endpoint.

PreviousVideoNextDB Backups

Last updated 10 months ago

API Endpoint

URL:

Authorization

You can access the API using one of the following methods:

  • Include the Authorization header with your API key.

  • Include the apiKey as a query parameter in the URL.

Body

The request body should be a JSON object containing the following keys:

  • level (required): A string. Recommended values include:

    • info

    • warn

    • error

    • fatal

    • debug

  • message (required): A string.

  • resource (optional): A string.

  • metadata (optional): A JSON object of any shape.

Example

{
    "level": "fatal",
    "message": "Something went wrong in the server",
    "resource": "core",
    "metadata": {
        "server": "Primary",
        "team": "unknown"
    }
}

Example with Node.js (with Axios)

const axios = require('axios');

const data = {
    "level": "fatal",
    "message": "Something went wrong in the server",
    "resource": "core", // optional
    "metadata": { // optional
        "server": "Primary",
        "team": "unknown"
    }
}

const config = {
  method: 'post',
  url: 'https://api.fivemerr.com/v1/logs',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': 'β€’β€’β€’β€’β€’β€’'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(response.data);
})
.catch((error) => {
  console.log(error);
});
ℹ️
https://api.fivemerr.com/v1/logs