-
Notifications
You must be signed in to change notification settings - Fork 0
API REST
La URL tiene la estructura: http://{HOST}:{PORT}/api/v1/juice-shop
La URL de forma predeterminada se encuentra en: http://ctf.uady:8080/api/v1/juice-shop
O también se puede acceder por medio de la IP predeterminada: 172.16.200.11:8080/api/v1/juice-shop
El HOST donde corre la API REST de forma predeterminada es: 172.16.200.11. Con el PORT predeterminado: 8080.
Una petición GET obtiene el estado (status) de todos los contenedores dentro del rango de puertos disponible para la OWASP Juice Shop.
curl http://ctf.uady:8080/api/v1/juice-shop/La respuesta tiene el siguiente formato:
{
"status": string,
"message": string,
"data": {
"containers": [
{
"success": bool,
"message": string,
"error": string | null,
"data": {
"container": string,
"status": string,
"port": number
},
"timestamp": string
}
]
}
}Nota: Dentro del atributo containers dentro de data estará la lista con todos los contenedores.
Nota: Cuando no haya un error se recibirá null.
Una petición POST permite iniciar un contenedor de la OWASP Juice Shop si el puerto esta disponible.
curl -X POST http://ctf.uady:8080/api/v1/juice-shop/La respuesta tiene el siguiente formato:
{
"status": string,
"message": string,
"data": {
"container": string,
"status": string,
"port": number
}
}POST recibirá como respuesta dentro de data la información del contenedor iniciado, si no se puede iniciar se recibirá un data vacío.