List or Select Accounts

Returns list or selected accounts

Required Roles

Service Administrator

REST Resource

GET /HyperionPlanning/rest/sm/v1/applications/{application}/models/{model}/accounts

Request

Parameters:

Table 3-688 Parameters

Name Description Type Required Default
application The name of the application Path Yes None
model The name of the model.      
q Optional JSON selection object. When q is supplied, accounts is required and must be a non-empty JSON array of non-blank account IDs. Malformed query JSON or an invalid query value type returns HTTP 400. A missing or empty accounts array, or a blank selected account ID, returns HTTP 422. An unknown selected account ID returns HTTP 404. Query No None
fields

Comma-separated list of account field names to include in the response. Supported values: id, name, accountType, dataType, valueStorageType, aggregationType, scale, userDefinedAccount, and hasCustomDimensions. Tokens are trimmed, lowercased, and de-duplicated. Default behavior differs by endpoint: the account collection always returns id and name, while an individual account returns all supported properties when fields is omitted. Links are included in the same response body, independently of field selection.

Query No None
offset The zero-based index from which records are returned. If the response omits offset, the paging helper uses 0. Default: 0; Minimum: 0 Query No 0
limit

The number of items to return. Must be a positive integer. Values above 200 are accepted; the effective page size is capped at 200. Default: 100; Minimum: 1

Query No 100

Example URL:

https://<BASE-URL>/HyperionPlanning/rest/sm/v1/applications/Sample/models/M1/accounts

Response

Supported Media Types: application/json

Table 3-689 Parameters

Name Description
count Count reported for the returned collection.
links The links related to the resource or result.
offset The zero-based index from which the records are returned.
limit The page size for the returned records.
hasMore True or False, if there are more pages of records

Sample Response

{
  "items": [
    {
      "id": "v0100",
      "name": "Weighted Average Exchange Rate",
      "links": [
        {
          "href": "https://<BASE-URL>/HyperionPlanning/rest/sm/v1/applications/Sample/models/M1/accounts/v0100",
          "action": "GET",
          "rel": "canonical",
          "data": null
        }
      ]
    }
  ],
  "count": 1,
  "offset": 0,
  "limit": 1,
  "hasMore": true,
  "links": [
    {
      "href": "https://<BASE-URL>/HyperionPlanning/rest/sm/v1/applications/Sample/models/M1/accounts",
      "action": "GET",
      "rel": "canonical",
      "data": null
    },
    {
      "href": "https://<BASE-URL>/HyperionPlanning/rest/sm/v1/applications/Sample/models/M1/accounts?limit=1",
      "action": "GET",
      "rel": "self",
      "data": null
    },
    {
      "href": "https://<BASE-URL>/HyperionPlanning/rest/sm/v1/applications/Sample/models/M1/accounts?offset=1&limit=1",
      "action": "GET",
      "rel": "next",
      "data": null
    }
  ]
}

Table 3-690 Status Codes

Code Description
400 Invalid paging parameter or request.
401 Authentication is required.
403 The authenticated caller is not authorized.
404 Application or requested sub-resource was not found.
500 Unexpected server error.

Sample cURL Command

curl -X GET -u '<USERNAME>:<PASSWORD>' 'https://<BASE-URL>/HyperionPlanning/rest/sm/v1/applications/Sample/rollups'