List agent environments
EnvironmentListPage beta().agents().environments().list(EnvironmentListParamsparams = EnvironmentListParams.none() , RequestOptionsrequestOptions = RequestOptions.none() )
GET
/agents/environmentsLists OpenAI-hosted environments owned by the authenticated principal. Requires access to the prewarming beta.
List agent environments
package com.openai.example;
import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.beta.agents.environments.EnvironmentListPage;
import com.openai.models.beta.agents.environments.EnvironmentListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
OpenAIClient client = OpenAIOkHttpClient.fromEnv();
EnvironmentListPage page = client.beta().agents().environments().list();
}
}200 — Example
{
"data": [
{
"id": "id",
"files": [
{
"id": "id",
"file_id": "file_id",
"path": "path",
"size_bytes": 0,
"type": "file_id"
}
],
"object": "agent.environment",
"plugins": [
{
"description": "description",
"name": "name",
"type": "inline"
}
],
"skills": [
{
"description": "description",
"name": "name",
"skill_id": "skill_id",
"type": "skill_reference",
"version": "version"
}
],
"status": "pending",
"type": "openai_hosted"
}
],
"first_id": "first_id",
"has_more": true,
"last_id": "last_id",
"object": "list"
}Returns Examples
200 — Example
{
"data": [
{
"id": "id",
"files": [
{
"id": "id",
"file_id": "file_id",
"path": "path",
"size_bytes": 0,
"type": "file_id"
}
],
"object": "agent.environment",
"plugins": [
{
"description": "description",
"name": "name",
"type": "inline"
}
],
"skills": [
{
"description": "description",
"name": "name",
"skill_id": "skill_id",
"type": "skill_reference",
"version": "version"
}
],
"status": "pending",
"type": "openai_hosted"
}
],
"first_id": "first_id",
"has_more": true,
"last_id": "last_id",
"object": "list"
}