SignalFx Developers Guide

Developer Home

Product Docs

SignalFx

Charts API

API for creating, retrieving, updating, and deleting charts.

Some Charts API property names differ from the option label in the web UI. These differences are noted for each property name.

Retrieve Charts Using Query

Gets one or more charts based on selection criteria

Gets one or more charts based on the selection criteria specified in the query parameters.

query Parameters
limit
integer >= 1
Default: 50

Maximum number of charts to return. The default is 50, and SignalFx uses this value if you specify an invalid value.

name
string

A search pattern for the value of the name property of a chart. You can use any UTF-8 character in the string, and SignalFx matches the pattern to any part of the name property. For example, name=per matches the following chart names

  • dropped per day
  • 95th percentile
  • personal disk usage

The following conditions cause SignalFx to match any value of the name property:

  • String of length 0
  • Omitting the name parameter from the query
offset
integer >= 0
Default: 0

Position in the results at which SignalFx should start returning charts.

SignalFx puts all the results into a 0-indexed array, sorted in a manner appropriate for the specified query parameters. The offset tells SignalFx the array index at which it should start returning results.

If you specify an offset that's greater than the length of the results array, SignalFx doesn't return any values.

tags
string

A search pattern for values in the tags array property of a chart. You can use any UTF-8 character in the string, and SignalFx matches the pattern to any part of the tags property.

To specify more than one tag to search for, add additional tag query parameters to the URI. SignalFx combines multiple tag queries with an implicit OR.

For example, suppose you want to retrieve the first 25 charts that have following properties:

  • name matches "myChart"
  • tags=cpu, tags=prod, tags=customer-facing

The following curl statement retrieves the charts:

curl -i
  --header "Content-Type: application/json"
  --header "X-SF-TOKEN: <AUTHENTICATION_TOKEN>" \
  --request GET \
  https://api.<REALM>.signalfx.com/v2/chart?limit=25&name=myChart&offset=0&tags=cpu&tags=prod
header Parameters
X-SF-Token
required
string

Authentication token

Responses

Response Schema: application/json
count
integer (Number of charts that match the query)

The number of charts that match the specified query. This value may be different from the number of charts in the results array property. The limit query parameter controls the number of charts that the request actually returns, and the offset query parameter determines the position at which the request starts returning parameters. These two factors can affect the actual number of returned charts.

Array of objects (Charts returned by the request)

An array of charts returned by the request. The charts match the search criteria specified in the query parameters of the request.

Response samples

Content type
application/json
{
  • "count": 0,
  • "results":
    [
    ]
}

Create Single Chart

Creates a new chart

Creates a new chart. After you create the chart, add it to a dashboard using either the Create Dashboard or Update Dashboard API. You can then view and modify the chart from that dashboard. The chart also appears in the chart catalog for your organization.

For more information, see Working with Charts.

header Parameters
Content-Type
required
string

Format of the request body. Always "application/json".

X-SF-Token
required
string

Authentication token

Request Body schema: application/json

Chart specifications, in the form of a JSON object

object (Custom properties)

User-defined JSON object containing metadata

description
string (Chart description)

Extended text description of the chart. This text appears in the Chart description text box at the top of the New Chart screen in the web UI.

name
string (Chart name (displayed))

Short chart name. In the web UI, you enter the chart name in the Untitled Chart text box at the top of the New Chart screen.

object (Chart options)
packageSpecifications
string (SignalFlow internal field)
Default: ""

For SignalFx internal use only.

programText
string (Chart SignalFlow program)

SignalFlow program that provides the chart data. If you use more than one line of SignalFlow, separate the lines with semicolons (";") or newline characters ("\n"). See Charts and SignalFlow.

tags
Array of strings (Chart tags) <= 50 items

An array that contains tag values. You can use tags to search for or filter charts. One use is to tag charts that are in production with the value prod.

NOTE: You can't have more than 50 tags per chart.

Responses

Response Schema: application/json
created
integer <int64> (Chart creation time)

The time the chart was created, in Unix time. This value is always set by the system.

creator
string (Chart Creator ID)

SignalFx user ID of the user that initially created the chart

object (Custom properties)

User-defined JSON object containing metadata

description
string (Chart description)

Extended text description of the chart. This text appears in the Chart description text box at the top of the New Chart screen in the web UI.

id
string (Chart ID)

System-defined identifier for the chart

lastUpdated
integer <int64> (Chart last updated time)

The last time the chart was updated, in Unix time. This value is always set by the system.

lastUpdatedBy
string (Chart last updated ID)

The SignalFx user ID of the last person who updated the chart. If the last update was done by the system, the value is the string literal "AAAAAAAAAA".

name
string (Chart name (displayed))

Short chart name. In the web UI, you enter the chart name in the Untitled Chart text box at the top of the New Chart screen.

object (Chart options)
packageSpecifications
string (SignalFlow internal field)
Default: ""

For SignalFx internal use only.

programText
string (Chart SignalFlow program)

SignalFlow program that provides the chart data. If you use more than one line of SignalFlow, separate the lines with semicolons (";") or newline characters ("\n"). See Charts and SignalFlow.

tags
Array of strings (Chart tags) <= 50 items

An array that contains tag values. You can use tags to search for or filter charts. One use is to tag charts that are in production with the value prod.

NOTE: You can't have more than 50 tags per chart.

Request samples

Content type
application/json
{
  • "customProperties": { },
  • "description": "string",
  • "name": "string",
  • "options":
    {
    },
  • "packageSpecifications": "",
  • "programText": "string",
  • "tags":
    [
    ]
}

Response samples

Content type
application/json