List project service accounts
GEThttps:/api.openai.com/v1/organization/projects/{project_id}/service_accounts
Returns a list of service accounts in the project.
Path parameters
project_id
string
Required
The ID of the project.
Query parameters
limit
integer
Defaults: 20
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.after
string
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.
Response
A list of ProjectServiceAccount objects.
Example request
1 curl https://api.openai.com/v1/organization/projects/proj_abc/service_accounts?after=custom_id&limit=20 \2 -H "Authorization: Bearer $OPENAI_ADMIN_KEY" \3 -H "Content-Type: application/json"
Example response
1 {2 "object": "list",3 "data": [4 {5 "object": "organization.project.service_account",6 "id": "svc_acct_abc",7 "name": "Service Account",8 "role": "owner",9 "created_at": 171147153310 }11 ],12 "first_id": "svc_acct_abc",13 "last_id": "svc_acct_xyz",14 "has_more": false15 }
Built with