List Time Periods

Returns a paged time-period collection.

When fields is omitted, empty, or contains only commas/whitespace, each item contains id and name plus links. Nonblank field tokens are trimmed, case-insensitive, and de-duplicated; id and name are always returned with any supported requested properties. Null properties are omitted. Unlike this collection, the individual-period endpoint returns all supported period properties when fields is omitted.

Required Roles

Service Administrator

REST Resource

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

Request

Parameters:

Table 3-770 Parameters

Name Description Type Required Default
application Strategic Modeling application name. Path Yes None
model Strategic Modeling model name. Path Yes None
fields Comma-separated list of period field names to include in the response. Supported values: id, name, periodType, year, durationDays, isHidden, isHistory, isInput, and isLeaf. For the period collection, omitting fields or supplying an empty or comma or whitespace-only value returns id and name; supported requested properties are added to those fields. For an individual period, omitting fields returns all supported properties; supplying an empty or comma or whitespace-only value returns no period properties. Tokens are trimmed, lowercased, and de-duplicated. Links are returned independently of field selection, and null properties are omitted. 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/periods

Response

Supported Media Types: application/json

Table 3-771 Parameters

Name Description
items Collection of information about the returned resources.
items[].id Identifier of the returned resource.
items[].name Name of the returned resource.
items[].links Links related to the resource or result.
items[].links[].href Link to the API call.
items[].links[].action HTTP call type.
items[].links[].rel Relationship type for the link.
items[].links[].data Additional link data, if supplied.
count Count reported for the returned collection; confirm whether this is a page count or total count.
offset The zero-based index from which the records are returned.
limit The page size for the returned records.
hasMore True or false, indicating whether more pages of records are available.
links Links related to the resource or result.
links[].href Link to the API call.
links[].action HTTP call type.
links[].rel Relationship type for the link.
links[].data Additional link data, if supplied.

Sample Response

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

Table 3-772 Status Codes

Code Description
400 Invalid request, malformed query JSON, invalid parameter, or service validation failure.
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/models/M1/periods'