cli/resources/containers/methods/retrieve/index.md +0 −115 deleted
File Deleted View Diff
1## Retrieve container
2
3`$ openai containers retrieve`
4
5**get** `/containers/{container_id}`
6
7Retrieve Container
8
9### Parameters
10
11- `--container-id: string`
12
13### Returns
14
15- `ContainerGetResponse: object { id, created_at, name, 6 more }`
16
17 - `id: string`
18
19 Unique identifier for the container.
20
21 - `created_at: number`
22
23 Unix timestamp (in seconds) when the container was created.
24
25 - `name: string`
26
27 Name of the container.
28
29 - `object: string`
30
31 The type of this object.
32
33 - `status: string`
34
35 Status of the container (e.g., active, deleted).
36
37 - `expires_after: optional object { anchor, minutes }`
38
39 The container will expire after this time period.
40 The anchor is the reference point for the expiration.
41 The minutes is the number of minutes after the anchor before the container expires.
42
43 - `anchor: optional "last_active_at"`
44
45 The reference point for the expiration.
46
47 - `"last_active_at"`
48
49 - `minutes: optional number`
50
51 The number of minutes after the anchor before the container expires.
52
53 - `last_active_at: optional number`
54
55 Unix timestamp (in seconds) when the container was last active.
56
57 - `memory_limit: optional "1g" or "4g" or "16g" or "64g"`
58
59 The memory limit configured for the container.
60
61 - `"1g"`
62
63 - `"4g"`
64
65 - `"16g"`
66
67 - `"64g"`
68
69 - `network_policy: optional object { type, allowed_domains }`
70
71 Network access policy for the container.
72
73 - `type: "allowlist" or "disabled"`
74
75 The network policy mode.
76
77 - `"allowlist"`
78
79 - `"disabled"`
80
81 - `allowed_domains: optional array of string`
82
83 Allowed outbound domains when `type` is `allowlist`.
84
85### Example
86
87```cli
88openai containers retrieve \
89 --api-key 'My API Key' \
90 --container-id container_id
91```
92
93#### Response
94
95```json
96{
97 "id": "id",
98 "created_at": 0,
99 "name": "name",
100 "object": "object",
101 "status": "status",
102 "expires_after": {
103 "anchor": "last_active_at",
104 "minutes": 0
105 },
106 "last_active_at": 0,
107 "memory_limit": "1g",
108 "network_policy": {
109 "type": "allowlist",
110 "allowed_domains": [
111 "string"
112 ]
113 }
114}
115```