Skip to content
This repository has been archived by the owner on Jun 18, 2023. It is now read-only.

Latest commit

 

History

History
62 lines (55 loc) · 1.35 KB

Configuration.md

File metadata and controls

62 lines (55 loc) · 1.35 KB

API configuration

Basic configuration file example:

{
  "Endpoint": "http://*:28017",
  "LogToFile": false,
  "LogLevel": "Error"
}
  • Endpoint - public url for Api listener
  • LogToFile - if set true then logs will be stored in folder \server\oxide\logs\RustApi
  • Users - list of users, who can use your Api
  • LogLevel - to filter log messages and do not spam to console and file

Log level

You can specify next levels:

  • Disable - Disable (no logs)
  • Error - Errors only (configured by default)
  • Warning - Warnings and previous
  • Information - Info and previous
  • Debug - Debug and previous (all logs)

Users configuration

[
  {
    "Name": "admin",
    "Secret": "secret1",
    "Permissions": [
      "admin"
    ]
  },
  {
    "Name": "user1",
    "Secret": "secret2",
    "Permissions": [
      "command1"
    ]
  },
  {
    "Name": "76561198051734570",
    "Secret": "06e62911cf8140f4b2c45bda5d9a14d4",
    "Permissions": [
      "player",
      "tester"
    ]
  }
]

Here is just an array of users.

  • Name - user title (required)
  • Secret - used to build authentication token (required)
  • Permissions - list of assigned permissions (required)

Predefined permissions

  • admin - grant full access to Api
  • hooks - can run any hooks on server
  • player - steam authorized users (name will be steam ID)