Help Center> Organizations> API Reference> API> Managing Accounts> Querying Account Creation Requests in Specified State
Updated on 2024-03-15 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.

URI

GET /v1/organizations/create-account-status

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

states

No

Array

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.

Array Length: 0 - 3

limit

No

Integer

Maximum number of results on a page.

Minimum: 1

Maximum: 2000

Default: 200

marker

No

String

Pagination marker.

Minimum: 4

Maximum: 400

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.

Minimum: 1

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.

Maximum: 36

account_name

String

Account name.

Maximum: 64

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.

Maximum: 36

state

String

Status of the asynchronous request for creating an account.

Minimum: 1

Maximum: 64

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.

Minimum: 1

Maximum: 2000

Example Requests

Querying account creation requests in the specified state

GET https://{hostname}/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.