NAME

OpenAPI::Client::OpenAI::Path::organization-projects-project_id-service_accounts - Documentation for the /organization/projects/{project_id}/service_accounts path.

OPERATIONS

GET /organization/projects/{project_id}/service_accounts

list-project-service-accounts

$client->list_project_service_accounts({
    body => { ... },
});

Returns a list of service accounts in the project.

Path/query parameters

  • project_id (in path, required, string) - The ID of the project.

  • limit (in query, optional, integer) - A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.

    Default: 20

  • after (in query, optional, 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.

Responses

200 - Project service accounts listed successfully.

Content-Type: application/json

Example:

{
   "data" : [
      "{\n    \"object\": \"organization.project.service_account\",\n    \"id\": \"svc_acct_abc\",\n    \"name\": \"Service Account\",\n    \"role\": \"owner\",\n    \"created_at\": 1711471533\n}\n"
   ],
   "first_id" : "string",
   "has_more" : false,
   "last_id" : "string",
   "object" : "list"
}

400 - Error response when project is archived.

Content-Type: application/json

Example:

{
   "error" : {
      "code" : "string",
      "message" : "string",
      "param" : "string",
      "type" : "string"
   }
}

POST /organization/projects/{project_id}/service_accounts

create-project-service-account

$client->create_project_service_account({
    body => { ... },
});

Creates a new service account in the project. This also returns an unredacted API key for the service account.

Path/query parameters

  • project_id (in path, required, string) - The ID of the project.

Responses

200 - Project service account created successfully.

Content-Type: application/json

Example:

{
   "api_key" : {
      "created_at" : 0,
      "id" : "string",
      "name" : "string",
      "object" : "organization.project.service_account.api_key",
      "value" : "string"
   },
   "created_at" : 0,
   "id" : "string",
   "name" : "string",
   "object" : "organization.project.service_account",
   "role" : "member"
}

400 - Error response when project is archived.

Content-Type: application/json

Example:

{
   "error" : {
      "code" : "string",
      "message" : "string",
      "param" : "string",
      "type" : "string"
   }
}

SCHEMAS

Error

Properties:

  • code (anyOf, required)

  • message (string, required)

  • param (anyOf, required)

  • type (string, required)

ErrorResponse

Properties:

  • error (Error, required)

    See "Error" below for shape.

ProjectServiceAccount

Properties:

  • created_at (integer, required) - The Unix timestamp (in seconds) of when the service account was created

  • id (string, required) - The identifier, which can be referenced in API endpoints

  • name (string, required) - The name of the service account

  • object (string, required) - The object type, which is always organization.project.service_account

    Allowed values: organization.project.service_account

  • role (string, required) - owner or member

    Allowed values: owner, member

ProjectServiceAccountCreateRequest

Properties:

  • name (string, required) - The name of the service account being created.

ProjectServiceAccountCreateResponse

Properties:

  • api_key (anyOf, required)

  • created_at (integer, required)

  • id (string, required)

  • name (string, required)

  • object (string, required)

    Allowed values: organization.project.service_account

  • role (string, required) - Service accounts can only have one role of type member

    Allowed values: member

ProjectServiceAccountListResponse

Properties:

  • data (array of ProjectServiceAccount, required)

  • first_id (anyOf)

  • has_more (boolean, required)

  • last_id (anyOf)

  • object (string, required)

    Allowed values: list

SEE ALSO

OpenAPI::Client::OpenAI::Path

COPYRIGHT AND LICENSE

Copyright (C) 2023-2026 by Nelson Ferraz

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.0 or, at your option, any later version of Perl 5 you may have available.