RESTful Endpoints - Nexa Documentation

RESTful Endpoints

Info API Endpoint

Endpoint dasar: /api/Info

GET /api/Info

Mendapatkan informasi sistem.

Contoh Response:

{
    "status": "success",
    "data": {
        "server_info": {
            "php_version": "8.x.x",
            "server_software": "Apache/2.4.x",
            "uptime": 123456,
            "memory": {
                "current": 2097152,
                "peak": 3145728,
                "limit": "128M"
            }
        }
    }
}

POST /api/Info

Membuat informasi baru.

Body Request:

{
    "name": "test",
    "type": "info"
}

Response:

{
    "status": "success",
    "code": 201,
    "message": "Info berhasil dibuat",
    "data": {
        "name": "test",
        "type": "info"
    }
}

PUT /api/Info

Memperbarui informasi yang ada.

Body Request:

{
    "id": "123",
    "name": "updated"
}

Response:

{
    "status": "success",
    "message": "Info berhasil diperbarui",
    "data": {
        "id": "123",
        "name": "updated"
    }
}

DELETE /api/Info

Menghapus informasi.

Parameter Request:

  • id: ID informasi yang akan dihapus

Response:

{
    "status": "success",
    "message": "Info berhasil dihapus",
    "data": {
        "id": "123"
    }
}