MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

Base URL

http://api.bandito.test

Authenticating requests

This API is not authenticated.

Endpoints

Update Server

Example request:
curl --request PUT \
    "http://api.bandito.net/v1/servers/edit/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.bandito.net/v1/servers/edit/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Request      

PUT v1/servers/edit/{server_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

server_id   integer   

The ID of the server. Example: 1

Delete Server

Example request:
curl --request DELETE \
    "http://api.bandito.net/v1/servers/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.bandito.net/v1/servers/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE v1/servers/{server_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

server_id   integer   

The ID of the server. Example: 1

Get User

Example request:
curl --request GET \
    --get "http://api.bandito.net/v1/user/ipsam" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.bandito.net/v1/user/ipsam"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "id": "1",
    "name": "Bandito User",
    "email": "superuser@bandito.net",
    "username": "superuser",
    "password": "superuser",
    "email_verified_at": null,
    "created_at": "2021-11-26T17:17:11.000000Z",
    "updated_at": "2021-11-26T17:17:11.000000Z"
}
 

Request      

GET v1/user/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the user. Example: ipsam

Get User

Example request:
curl --request PUT \
    "http://api.bandito.net/v1/user/edit/voluptatem" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.bandito.net/v1/user/edit/voluptatem"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "PUT",
    headers,
}).then(response => response.json());

Example response (200):


{
    "id": "1",
    "name": "Bandito User",
    "email": "superuser@bandito.net",
    "email_verified_at": null,
    "created_at": "2021-11-26T17:17:11.000000Z",
    "updated_at": "2021-11-26T17:17:11.000000Z"
}
 

Request      

PUT v1/user/edit/{id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the edit. Example: voluptatem

Get Users

Example request:
curl --request GET \
    --get "http://api.bandito.net/v1/users" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.bandito.net/v1/users"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


[
    {
        "id": "1",
        "name": "Bandito User",
        "email": "superuser@bandito.net",
        "email_verified_at": null,
        "created_at": "2021-11-26T17:17:11.000000Z",
        "updated_at": "2021-11-26T17:17:11.000000Z"
    },
    {
        "id": "2",
        "name": "Bandito User 2",
        "email": "superuser2@bandito.net",
        "email_verified_at": null,
        "created_at": "2021-11-26T17:17:11.000000Z",
        "updated_at": "2021-11-26T17:17:11.000000Z"
    }
]
 

Request      

GET v1/users

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Create User

Example request:
curl --request POST \
    "http://api.bandito.net/v1/register" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"firstname\": \"lmvnhep\",
    \"lastname\": \"qskqnpygrvnor\",
    \"email\": \"jamil.baumbach@example.com\"
}"
const url = new URL(
    "http://api.bandito.net/v1/register"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "firstname": "lmvnhep",
    "lastname": "qskqnpygrvnor",
    "email": "jamil.baumbach@example.com"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST v1/register

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

firstname   string   

Must not be greater than 255 characters. Example: lmvnhep

lastname   string   

Must not be greater than 255 characters. Example: qskqnpygrvnor

email   string   

Must be a valid email address. Must not be greater than 255 characters. Example: jamil.baumbach@example.com

Login User

Example request:
curl --request POST \
    "http://api.bandito.net/v1/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"testuser@example.com\",
    \"password\": \"secret\"
}"
const url = new URL(
    "http://api.bandito.net/v1/login"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "testuser@example.com",
    "password": "secret"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
 "access_token": "eyJ0eXA...",
 "token_type": "Bearer",
}
 

Request      

POST v1/login

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

email   string   

The email of the user. Example: testuser@example.com

password   string   

The password of the user. Example: secret

Health Check

Check if the API is up and running

Example request:
curl --request GET \
    --get "http://api.bandito.net/v1/healthcheck" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.bandito.net/v1/healthcheck"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "status": "ok"
}
 

Request      

GET v1/healthcheck

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

GET v1/account

Example request:
curl --request GET \
    --get "http://api.bandito.net/v1/account" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.bandito.net/v1/account"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
 

{
    "message": "Unauthenticated."
}
 

Request      

GET v1/account

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

POST v1/account

Example request:
curl --request POST \
    "http://api.bandito.net/v1/account" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"source\": \"sit\",
    \"productId\": \"sunt\",
    \"transactionId\": \"in\",
    \"verificationData\": \"esse\"
}"
const url = new URL(
    "http://api.bandito.net/v1/account"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "source": "sit",
    "productId": "sunt",
    "transactionId": "in",
    "verificationData": "esse"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST v1/account

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

source   string   

Example: sit

productId   string   

Example: sunt

transactionId   string   

Example: in

verificationData   string   

Example: esse

Get User

Example request:
curl --request GET \
    --get "http://api.bandito.net/v1/user" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.bandito.net/v1/user"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "id": "1",
    "name": "Bandito User",
    "email": "superuser@bandito.net",
    "username": "superuser",
    "password": "superuser",
    "email_verified_at": null,
    "created_at": "2021-11-26T17:17:11.000000Z",
    "updated_at": "2021-11-26T17:17:11.000000Z"
}
 

Request      

GET v1/user

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Get Servers

Example request:
curl --request GET \
    --get "http://api.bandito.net/v1/servers" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.bandito.net/v1/servers"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


[
    {
        "id": 3,
        "country": 226,
        "ipv4_address": "107.178.48.44",
        "ipv6_address": "NULL",
        "created_at": "2021-11-26T18:18:19.000000Z",
        "updated_at": "2021-11-26T18:18:19.000000Z",
        "state": null,
        "active": 1,
        "city": "Miami"
    },
    {
        "id": 4,
        "country": 226,
        "ipv4_address": "107.178.48.44",
        "ipv6_address": "NULL",
        "created_at": "2021-11-26T18:18:59.000000Z",
        "updated_at": "2021-11-26T18:18:59.000000Z",
        "state": 12,
        "active": 1,
        "city": "Miami"
    }
]
 

Request      

GET v1/servers

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Get Countries

Example request:
curl --request GET \
    --get "http://api.bandito.net/v1/countries" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.bandito.net/v1/countries"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


[
  {
  "id": 1,
  "iso": "AF",
  "name": "AFGHANISTAN",
  "nicename": "Afghanistan",
  "iso3": "AFG",
  "numcode": 4,
  "phonecode": 93
  },
  {
  "id": 2,
  "iso": "AL",
  "name": "ALBANIA",
  "nicename": "Albania",
  "iso3": "ALB",
  "numcode": 8,
  "phonecode": 355
  },
  {
  "id": 3,
  "iso": "DZ",
  "name": "ALGERIA",
  "nicename": "Algeria",
  "iso3": "DZA",
  "numcode": 12,
  "phonecode": 213
  },
]
 

Request      

GET v1/countries

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Get Country

Example request:
curl --request GET \
    --get "http://api.bandito.net/v1/countries/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.bandito.net/v1/countries/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "id": 1,
    "iso": "AF",
    "name": "AFGHANISTAN",
    "nicename": "Afghanistan",
    "iso3": "AFG",
    "numcode": 4,
    "phonecode": 93
}
 

Request      

GET v1/countries/{country_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

country_id   integer   

The ID of the country. Example: 1

Get U.S. State or Territory

Example request:
curl --request GET \
    --get "http://api.bandito.net/v1/states/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.bandito.net/v1/states/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "id": 12,
    "iso_3166_2": "FL",
    "name": "Florida",
    "country_code": "US"
}
 

Request      

GET v1/states/{state_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

state_id   integer   

The ID of the state. Example: 1

Get U.S. States and Territories

Example request:
curl --request GET \
    --get "http://api.bandito.net/v1/states" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.bandito.net/v1/states"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


[
 {
 "id": 1,
 "iso_3166_2": "AL",
 "name": "Alabama",
 "country_code": "US"
 },
 {
 "id": 2,
 "iso_3166_2": "AK",
 "name": "Alaska",
 "country_code": "US"
 },
 {
 "id": 3,
 "iso_3166_2": "AS",
 "name": "American Samoa",
 "country_code": "US"
 },
]
 

Request      

GET v1/states

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

Get Servers by Country

Example request:
curl --request GET \
    --get "http://api.bandito.net/v1/servers/country/quas" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.bandito.net/v1/servers/country/quas"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
 "id": 3,
 "country": 226,
 "ipv4_address": "107.178.48.44",
 "ipv6_address": "NULL",
 "created_at": "2021-11-26T18:18:19.000000Z",
 "updated_at": "2021-11-26T18:18:19.000000Z",
 "state": null,
 "active": 1,
 "city": "Miami"
 },
 

Request      

GET v1/servers/country/{iso}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

iso   string  optional  

Example: quas

Get Servers by U.S. State

Example request:
curl --request GET \
    --get "http://api.bandito.net/v1/servers/state/tempore" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.bandito.net/v1/servers/state/tempore"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
 "id": 3,
 "country": 226,
 "ipv4_address": "107.178.48.44",
 "ipv6_address": "NULL",
 "created_at": "2021-11-26T18:18:19.000000Z",
 "updated_at": "2021-11-26T18:18:19.000000Z",
 "state": null,
 "active": 1,
 "city": "Miami"
 },
 

Request      

GET v1/servers/state/{iso}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

iso   string  optional  

Example: tempore

Get Server

Example request:
curl --request GET \
    --get "http://api.bandito.net/v1/servers/1" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.bandito.net/v1/servers/1"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
 "id": 3,
 "country": 226,
 "ipv4_address": "107.178.48.44",
 "ipv6_address": "NULL",
 "created_at": "2021-11-26T18:18:19.000000Z",
 "updated_at": "2021-11-26T18:18:19.000000Z",
 "state": null,
 "active": 1,
 "city": "Miami",
 },
 

Request      

GET v1/servers/{server_id}

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

server_id   integer   

The ID of the server. Example: 1

Store Server

Example request:
curl --request POST \
    "http://api.bandito.net/v1/servers" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "http://api.bandito.net/v1/servers"
);

const headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST v1/servers

Headers

Content-Type      

Example: application/json

Accept      

Example: application/json