Help Center/ Organizations/ API Reference/ APIs/ Managing Accounts/ Querying Account Creation Requests in Specified State
Updated on 2024-11-05 GMT+08:00

Querying Account Creation Requests in Specified State

Function

This API is used to query the account creation requests in the specified state for an organization. This API can be called only from the organization's management account or a delegated administrator account.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

URI

GET https://{endpoint}/v1/organizations/create-account-status

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

states

No

Array of strings

List of one or more states that you want to include in the response. If this parameter is not present, all requests are included in the response.

limit

No

Integer

Maximum number of results on a page.

marker

No

String

Pagination marker.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Security-Token

No

String

Security token (session token) of your temporary security credentials. If a temporary security credential is used, this header is required.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

create_account_statuses

Array of CreateAccountStatusDto objects

List of objects with details about the requests.

page_info

PageInfoDto object

Pagination information.

Table 4 CreateAccountStatusDto

Parameter

Type

Description

account_id

String

Unique ID of the newly created account if any.

account_name

String

Account name.

completed_at

String

Date and time when the account was created and the request was completed.

created_at

String

Date and time when the CreateAccount request was made.

id

String

Unique ID of a request. You can get this value from the response to the initial CreateAccount request.

state

String

Status of the asynchronous request for creating an account.

failure_reason

String

Reason for a request failure.

Table 5 PageInfoDto

Parameter

Type

Description

next_marker

String

Marker for the next set of results. If present, more output is available than is included in the current response. Use this value in the marker request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the next_marker response element comes back as null.

current_count

Integer

Number of items returned on the current page.

Example Requests

Querying account creation requests in the specified state

GET https://{endpoint}/v1/organizations/create-account-status

Example Responses

Status code: 200

Successful

{
  "create_account_statuses" : [ {
    "account_id" : "0a6d25d23900d45c0faac010e0fb4de0",
    "account_name" : "paas_iam_573331",
    "completed_at" : "2022-08-24T06:41:15Z",
    "created_at" : "2022-08-24T06:41:15Z",
    "id" : "h-awjp43m7bz3b8jgy5v61jrfwakt3og8w",
    "state" : "in_progress",
    "failure_reason" : "string"
  } ],
  "page_info" : {
    "next_marker" : "ou-taowxgy4xbme6m4x3c2iijbxw7yj8fcw",
    "current_count" : 100
  }
}

Status Codes

Status Code

Description

200

Successful

Error Codes

See Error Codes.