List projects
admin.organization.projects.list(ProjectListParams**kwargs) -> SyncConversationCursorPage[Project]
GET/organization/projects
Returns a list of projects.
Parameters
after: Optional[str]
A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
List projects
import os
from openai import OpenAI
client = OpenAI(
admin_api_key=os.environ.get("OPENAI_ADMIN_KEY"), # This is the default and can be omitted
)
page = client.admin.organization.projects.list()
page = page.data[0]
print(page.id){
"object": "list",
"data": [
{
"id": "proj_abc",
"object": "organization.project",
"name": "Project example",
"created_at": 1711471533,
"archived_at": null,
"status": "active"
}
],
"first_id": "proj-abc",
"last_id": "proj-xyz",
"has_more": false
}
Returns Examples
{
"object": "list",
"data": [
{
"id": "proj_abc",
"object": "organization.project",
"name": "Project example",
"created_at": 1711471533,
"archived_at": null,
"status": "active"
}
],
"first_id": "proj-abc",
"last_id": "proj-xyz",
"has_more": false
}