This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

SolarWinds PerfStack API

Since this is undocumented at the moment, I decided to start digging around.

API Endpoint

/api2/perfstack

swservername/.../perfstack

Query Paramaters
  • count
  • resolution
  • startTime
  • endTime
  • details
  • relations
PerfStack Query Paramaters
  • offset
  • length
  • orderBy
  • sort
  • displayName
  • status
  • type
  • user
  • updateLastAccessed

MetaData

Endpoint: metadata/

States

Endpoint: metadata/states

Lists All States

swservername/.../states

Lists a single state by ID

metadata/states/{statusIds}

Example: swservername/.../1

Types

Endpoint: metadata/types

List all Types

swservername/.../types

List specific Type

metadata/types/{entityTypeCdl}

Entities

Endpoint:  entities/

Query Parameters

  • Length
  • Offset
Get Entity Info

Endpoint: entities/{entityIdsCdl}

Filters

  • entityId

Query Parameters – Used to Get Metrics

  • Count
  • Resolution
  • StartDate
  • EndDate

Examples:

Gets entity information for a single node based on entityID

swservername/.../

Get Metrics for entityID, returns first measurement for each metric

swservername/.../

Get Available Metrics For Entity

Endpoint:  entities/{entityIdsCdl}/metrics

Filters

  • entityId

Query Parameters – Used to Get Metrics

  • Count
  • Resolution
  • StartDate
  • EndDate

Examples:

Gets all metric types for a specific entity

swservername/.../metrics

Get Metrics for entityID, returns first measurement for each metric

swservername/.../

Get Relationships for Entity

Endpoint: entities/{entityIdsCdl}/relationships

Example: swservername/.../relationships

States

Endpoint: entities/states

List all states

swservername/.../states

List state by ID

Endpoint:  /states/{statusIds}

Example: swservername/.../states/2

Types

Endpoint:  entities/types

List all Types

swservername/.../types

List by TypeID

Endpoint:  entities/types/{entityTypeCdl}

Metrics

Endpoint: metrics/

Filters

  • entityId
  • metricId

Query Parameters

  • Count
  • Resolution
  • StartDate
  • EndDate
Get Measurement For Entity

Endpoint: metrics/{id}

Get Groups For Entity

Endpoint: metrics/{entityId}/groups

Get Measurement For Group

Endpoint: metrics/{entityId}/groups/{groupId}

  • Really great stuff man.   Impressive.

    I'm trying to use your New-SWSession function and I keep getting the error of:

    ERROR: New-SWSession : Exception setting "Name": "The 'Name'='Orion_IsSessionExp=' part of the cookie is invalid."

    Looking at the code for it I think there is an error in it.  You create a new Cookie object, then you set the Name property of that Cookie object to "Id", but then in the very next line you set the same Name property of that Cookie Object to "/"…  Then, in the next line you once again change the Name of the Cookie object to the results of a replace on "ASP.NET_SessionId=" from the Session.Headers object with ''.  I'm trying to figure out what you were tying to do when you set that Cookie Name three times in a row.

    Here's the section of code I'm referring to (Sorry I can't format it.  The Advanced Editor isn't available on replies for this kind of post for some reason…):

    #Create a cookie in the Session Variable with the current SessionID

                    $Cookie = New-Object System.Net.Cookie

                    $Cookie.Name = "Id"

                    $Cookie.Name = "/"

                    #Best way I could figure out how to get the current SessionID from the Session; #Regex skills needed emoticons_happy.png

                    $Cookie.Name = $Session.Headers.'Set-Cookie'.Split(';')[0].Replace('ASP.NET_SessionId=','')

                    $Cookie.Domain = $ServerName