Skip to content

Retrieve a database account in a resource group project

Request

OPA roles:
  • resource_admin
  • security_admin
  • delegated_resource_admin
  • delegated_security_admin

Retrieves detailed information about a database account in a resource group project including:

  • Account and connection information
  • Rotation history (password changes, success/failure counts)
  • Checkout status and history
  • Next scheduled rotation time
  • Resource group and project assignment
Security
bearerAuth
Path
team_namestringrequired

The name of your team

resource_group_idstringrequired

The UUID of a resource group

project_idstringrequired

The UUID of a project

database_account_idstring, (regex)(UUID)^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-...read-onlyrequired

The UUID of the database account

Example:a747a818-a4c4-4446-8a87-704216495a08
curl -i -X GET \
  'https://{org_name}.pam.okta.com/v1/teams/{team_name}/resource_groups/{resource_group_id}/projects/{project_id}/database_accounts/a747a818-a4c4-4446-8a87-704216495a08' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

OK

Bodyapplication/json
account_namestringread-onlyrequired

The name of the database account

container_databasestringread-only

The authentication database the account belongs to. Present only for MongoDB integrations.

created_atstring, (date-time)read-onlyrequired

A UTC timestamp indicating when the database account was discovered

idstring, (regex)(UUID)^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-...read-onlyrequired

The UUID of the database account

Example:"a747a818-a4c4-4446-8a87-704216495a08"
projectobject(NamedObject)required

A reference to an object that has its ID, name and type

resource_groupobject(NamedObject)required

A reference to an object that has its ID, name and type

service_namestringread-only

The Oracle service name the account authenticates against. Present only for Oracle integrations.

updated_atstring, (date-time)read-onlyrequired

A UTC timestamp indicating when the database account was last updated

last_password_change_error_metadatastring

The error message metadata reported during the most recent failure to change the account password

last_password_change_error_report_timestampstring, (date-time)

A timestamp indicating when the remote system last reported a failure to change to the account password

last_password_change_error_system_timestampstring, (date-time)

A timestamp reported from the remote system indicating when the remote system last failed to change the account password

last_password_change_error_typestring

The type of error message reported during the most recent failure to change the account password

last_password_change_success_report_timestampstring, (date-time)

A timestamp indicating when OPA last reported a change to the account password

last_password_change_system_timestampstring, (date-time)

A timestamp reported from the remote system indicating when the remote system last changed the account password

password_change_error_countinteger, (int32)

The number of times an account's password change resulted in failure

password_change_error_count_since_last_successinteger, (int32)

The number of times an account's password change failed after the last successful attempt

password_change_success_countinteger, (int32)

The number of times an account's password was successfully changed

database_connectionobject(NamedObject)

A reference to an object that has its ID, name and type

hoststringread-only

The hostname of the database server

portinteger, [ 1 .. 65535 ]read-only

The port number of the database server

brought_under_management_atstring, (date-time)read-only

A UTC timestamp that indicates when the database account was discovered and managed

account_status_detailstring(ServiceAccountStatusDetail)read-only

Describes the detailed status of a service account

Enum ValueDescription
PENDING

The account is being created

CREATION_FAILED

The account can't be created

STAGED

The account is in the Okta Privileged Access resource assignment area

ROTATING

The account is assigned to a project in Okta Privileged Access. Credentials are currently being synced using Okta Lifecycle Management.

ROTATED

The account is assigned to a project in Okta Privileged Access. Password rotations are fulfilled by Okta Lifecycle Management.

ROTATION_FAILED

The account is assigned to a project in Okta Privileged Access. An error occurred while using Okta Lifecycle Management to rotate the password.

VAULTED

The account is assigned to a project in Okta Privileged Access. A manually managed password is assigned to the account.

MISSING_PASSWORD

The account is assigned to a project in Okta Privileged Access. A password isn't assigned to the account.

UNMANAGED

The account is assigned to a project in Okta Privileged Access. Initial password sync hasn't been attempted.

ROTATION_PENDING

The account is assigned to a project in Okta Privileged Access. A password rotation has been requested but has not yet started.

AVAILABLE

The account is assigned to a project in Okta Privileged Access. An admin has stored the password that is already in use on the account, so the account is ready for use without a rotation.

Example:"STAGED"
resource_statusstring(ResourceLeaseStatus)read-only

The database account's exclusive checkout status

Enum ValueDescription

Unknown lease status.

none

No active lease exists for this resource. The resource is available.

checked_out

The resource is currently checked out by a user.

in_progress_checkin

A check-in operation is in progress

checkin_complete

The check-in has completed successfully. The resource is available.

checkin_failed

The check-in operation failed.

last_checked_out_bystringread-only

The username of the user who last accessed the database account through exclusive checkout

checkout_expiry_atstring, (date-time)read-only

A UTC timestamp that indicates when a user's exclusive access to the database account expires

next_scheduled_password_rotationstring, (date-time)read-only

A UTC timestamp that indicates when the next password rotation is scheduled

next_scheduled_password_rotation_reasonstringread-only

A description that indicates why the next password rotation is scheduled

instance_namestringread-only

The named SQL Server instance. Present for MSSQL connections that use a named instance instead of a port.

Response
{ "id": "d070d14b-d7f7-4779-bd1a-a37549718d3b", "account_name": "admin_user", "resource_group": { "id": "e181e25c-e8f8-4880-ae2b-b48650829e4c", "name": "Production Databases" }, "project": { "id": "f292f36d-f9f9-4991-af3c-c59761930f5d", "name": "Engineering" }, "created_at": "2024-01-15T10:30:00Z", "updated_at": "2024-01-15T10:30:00Z", "database_connection": { "id": "a747a818-a4c4-4446-8a87-704216495a08", "name": "Production PostgreSQL" }, "host": "db.example.com", "port": 5432, "brought_under_management_at": "2024-01-01T00:00:00Z", "account_status_detail": "ROTATED", "resource_status": "checked_out", "last_checked_out_by": "user@example.com", "checkout_expiry_at": "2024-01-15T12:00:00Z", "next_scheduled_password_rotation": "2024-01-22T10:30:00Z", "next_scheduled_password_rotation_reason": "periodic_rotation" }