difys docs

difys docs

  • Quick Start
  • Github

›Web API

Introduction

  • Quick Start
  • Installation
  • Configuration
  • Motivation
  • Our Partners
  • The Core
  • Plugins
  • Scripts

Scripting

  • Scripting API

Usage

  • Usage guide
  • Examples and tutorials

Web API

  • Introduction
  • Routes
  • Examples

FAQ

  • Frequently asked questions

Other

    Protocol

    • Socket messages
    • Game socket

Routes


Fetches informations about Difys

URL /difys-info
Method GET
Authentication true

Example data

{ "name": "difys", "version": "1.0.0" }

Returns plugins config from the array of plugins name

URL /plugins/config
Method POST
Authentication true

Example payload

["Map", "Shop", "Character"]

Example data

{
    "Map": { ... },
    "Shop": { ... },
    "Character": { ... }
}

Updates plugins config from the config object list

URL /plugins/config
Method PUT
Authentication true

Example payload

{
    "Map": { ... },
    "Shop": { ... },
    "Character": { ... },

    ...
}

Example data

empty

Returns Difys configs

URL /config
Method POST
Authentication true

Example payload

["accounts", "general", "defaults"]

Example data

{
    "accounts": { ... },
    "general": { ... },
    "defaults": { ... },
}

Updates Difys configs

URL /config
Method PUT
Authentication true

Example payload

{
    "accounts": { ... },
    "general": { ... },
    "defaults": { ... },

    ...
}

Example data

empty

Returns an array of base64 strings

URL /worldmaps
Method POST
Authentication true

Example payload

{
    "mapId": 8384747,
    "zoom": 1,
    "chunks": [1,2,3, ...]
}

Example data

[
    "data:image/jpg;base64,R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ/z595kzAP/s7P+goOXMv8+fhw ...",

    ...
]

Returns an authentication token

URL /login
Method POST
Authentication false

Example payload

{
    "username": "admin",
    "password": "admin"
}

Example data

8AveGvFwXpWlwcrrr74JIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiaWF0IjoxNTg5NTkzNjQ3LCJleHAiOjE1ODk1OTcyNDd9.5voDJyIEfvS791OiI1ZWJmNDYyMTZGciOijMGRkZDQ1ZDhkOWZlZTQiLCJ1ceyJhbrOXJ2VybmFtZSI6ImFkbWluIiwi31xHd1

Creates an admin account

URL /signup
Method POST
Authentication true

Example payload

{
    "username": "user1",
    "password": "123456" // Please don't use this password =)
}

Example data

empty

Updates the password of a user

URL /change-password
Method POST
Authentication true

Example payload

{
    "username": "admin",
    "password": "uL1Drjy8s@JeNQSht$!v$*O6Z" // We recommend using a strong password like this one
}

Example data

empty
← IntroductionExamples →
difys docs
Docs
Quick startThe CorePluginsScripting
Community
DiscordCadernis
More
GitHubStar
Copyright © 2020 Difys team