1. Docs
  2. Pulumi Cloud
  3. Pulumi Cloud REST API
  4. Resources Under Management

Resources Under Management

    Resources Under Management (RUM) provides information about the cloud resources managed by Pulumi across your organization. The RUM API allows you to track resource counts over time with various time aggregations.

    RUM Operations

    The API provides endpoints for the following operations:

    • Getting resource count summaries with different time granularities

    Get Resource Count Summary

    Get a summary of resource counts over time with different aggregation options.

    GET /orgs/{organization}/resources/summary
    

    Parameters

    ParameterTypeInDescription
    granularitystringqueryHow usage should be aggregated. Accepted values are: hourly, daily, weekly, monthly, or yearly.
    lookbackDaysstringqueryOne of lookbackDays or lookbackStart is required, not both. Returns usage for a period of lookbackDays x 24 hours, starting from now.
    lookbackStartunix timestampqueryOne of lookbackDays or lookbackStart is required, not both. Returns usage starting from the given timestamp.

    Note: lookbackDays returns usage in 24-hour increments starting from the current time. This will truncate usage for the first day. To get complete usage for the first day, use lookbackStart to specify the start time.

    Example (hourly)

    Note: If specifying granularity=hourly, the maximum lookbackDays you can set is 2.

    curl \
      -h "accept: application/vnd.pulumi+8" \
      -h "authorization: token $PULUMI_ACCESS_TOKEN" \
      --compressed \
      https://api.pulumi.com/api/orgs/{organization}/resources/summary?granularity=hourly&lookbackDays=1
    

    Default response (hourly)

    Status: 200 OK
    
    {
      "summary": [
        {
          "year": 2022,
          "month": 8,
          "day": 31,
          "hour": 20,
          "resources": 27378
        },
        "..."
      ]
    }
    

    Example (daily)

    curl \
      -H "Accept: application/vnd.pulumi+8" \
      -H "Authorization: token $PULUMI_ACCESS_TOKEN" \
      --compressed \
      https://api.pulumi.com/api/orgs/{organization}/resources/summary?granularity=daily&lookbackDays=2
    

    Default response (daily)

    Status: 200 OK
    
    {
      "summary": [
        {
          "year": 2022,
          "month": 8,
          "day": 30,
          "resources": 27379
        },
        "..."
      ]
    }
    

    Example (weekly)

    curl \
      -h "accept: application/vnd.pulumi+8" \
      -h "authorization: token $PULUMI_ACCESS_TOKEN" \
      --compressed \
      https://api.pulumi.com/api/orgs/{organization}/resources/summary?granularity=weekly&lookbackDays=28
    

    Default response (weekly)

    Status: 200 OK
    
    {
      "summary": [
        {
          "year": 2022,
          "weekNumber": 31,
          "resources": 26432
        },
        "..."
      ]
    }
    

    Example (monthly)

    curl \
      -h "accept: application/vnd.pulumi+8" \
      -h "authorization: token $PULUMI_ACCESS_TOKEN" \
      --compressed \
      https://api.pulumi.com/api/orgs/{organization}/resources/summary?granularity=monthly&lookbackDays=90
    

    Default response (monthly)

    Status: 200 OK
    
    {
      "summary": [
        {
          "year": 2022,
          "month": 6,
          "resources": 24520
        },
        "..."
      ]
    }
    

    Example (yearly)

    curl \
      -h "accept: application/vnd.pulumi+8" \
      -h "authorization: token $PULUMI_ACCESS_TOKEN" \
      --compressed \
      https://api.pulumi.com/api/orgs/{organization}/resources/summary?granularity=yearly&lookbackDays=730
    

    Default response (yearly)

    Status: 200 OK
    
    {
      "summary": [
        {
          "year": 2022,
          "resources": 24380
        },
        "..."
      ]
    }