Search + K

Command Palette

Search for a command to run...

Sign In

Return All Organization Service Accounts

GET /api/atlas/v2/orgs/{orgId}/serviceAccounts
Copy endpoint
https://cloud.mongodb.com

Returns all Service Accounts for the specified Organization.

Parameters

path Path Parameters

Name Type
orgId required

Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.

string

query Query Parameters

Name Type
itemsPerPage

Number of items that the response returns per page.

number
pageNum

Number of the page that displays the current set of the total objects that the response returns.

number
pretty

Flag that indicates whether the response body should be in the prettyprint format.

boolean
envelope

Flag that indicates whether Application wraps the response in an envelope JSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body.

boolean

Responses

200 application/vnd.atlas.2024-08-05+json

OK

interface PaginatedOrgServiceAccounts {
links?: readonly Link
interface Link {
href?: string;
rel?: string;
}
[]
;
results?: readonly OrgServiceAccount

Organization Service Account that Atlas created for the organization.

interface OrgServiceAccount {
clientId?: `mdb_sa_id_${string}`;
createdAt?: string;
description?: string;
name?: string;
roles?: ("ORG_MEMBER" | "ORG_READ_ONLY" | "ORG_BILLING_ADMIN" | "ORG_BILLING_READ_ONLY" | "ORG_STREAM_PROCESSING_ADMIN" | "ORG_GROUP_CREATOR" | "ORG_OWNER")[];
secrets?: ServiceAccountSecret[];
}
[]
;
totalCount?: number;
}

Client Errors

401 application/json

Unauthorized.

interface ApiError {
badRequestDetail?: BadRequestDetail

Bad request detail.

interface BadRequestDetail {
fields?: FieldViolation[];
}
;
detail?: string;
error: number;
errorCode: string;
parameters?: readonly {}[];
reason?: string;
}
403 application/json

Forbidden.

interface ApiError {
badRequestDetail?: BadRequestDetail

Bad request detail.

interface BadRequestDetail {
fields?: FieldViolation[];
}
;
detail?: string;
error: number;
errorCode: string;
parameters?: readonly {}[];
reason?: string;
}
404 application/json

Not Found.

interface ApiError {
badRequestDetail?: BadRequestDetail

Bad request detail.

interface BadRequestDetail {
fields?: FieldViolation[];
}
;
detail?: string;
error: number;
errorCode: string;
parameters?: readonly {}[];
reason?: string;
}

Server Errors

500 application/json

Internal Server Error.

interface ApiError {
badRequestDetail?: BadRequestDetail

Bad request detail.

interface BadRequestDetail {
fields?: FieldViolation[];
}
;
detail?: string;
error: number;
errorCode: string;
parameters?: readonly {}[];
reason?: string;
}