Skip to content

get container

GET
/api/v1/container/{container_id}

Controller:

github.com/raghavyuva/nixopus-api/internal/features/container/controller.(*ContainerController).GetContainer

Middlewares:

  • github.com/go-fuego/fuego.defaultLogger.middleware
  • github.com/raghavyuva/nixopus-api/internal/routes.(*Router).SetupRoutes.(*Router).setupAuthentication.func2
  • github.com/raghavyuva/nixopus-api/internal/routes.(*Router).applyMiddleware.func1
  • github.com/raghavyuva/nixopus-api/internal/routes.(*Router).applyMiddleware.func2
  • github.com/raghavyuva/nixopus-api/internal/routes.(*Router).applyMiddleware.func3

Parameters

Header Parameters

Accept
Typestring

Path Parameters

container_id*
Typestring
Required

Responses

OK
JSON
{
"data": {
"command": "string",
"created": "string",
"host_config": {
"cpu_shares": 0,
"memory": 0,
"memory_swap": 0
},
"id": "string",
"image": "string",
"ip_address": "string",
"labels": {
},
"mounts": [
{
"destination": "string",
"mode": "string",
"source": "string",
"type": "string"
}
],
"name": "string",
"networks": [
{
"aliases": [
"string"
],
"gateway": "string",
"ip_address": "string",
"mac_address": "string",
"name": "string"
}
],
"ports": [
{
"private_port": 0,
"public_port": 0,
"type": "string"
}
],
"state": "string",
"status": "string"
},
"message": "string",
"status": "string"
}

Samples

cURL
curl -X GET http://localhost/api/v1/container/{container_id}
JavaScript
fetch("http://localhost/api/v1/container/{container_id}")
  .then(response => response.json())
  .then(data => console.log(data));
PHP
file_get_contents("http://localhost/api/v1/container/{container_id}");
Python
import requests
response = requests.get("http://localhost/api/v1/container/{container_id}")
print(response.json())
Powered by VitePress OpenAPI

Made with love
Released under the Functional Source License (FSL)