Stability Level | Preview |
API Stability |
Preview
|
The alertFieldValues() GraphQL query will return a list of all actions, labels and packages used in an alert. This query field is a preview and subject to changes.
Syntax
Below is the syntax for the alertFieldValues() query field:
alertFieldValues(
input: AlertFieldValuesInput!
): AlertFieldValues!
For the input, there's only one required parameter. It has a special datatype, which is described the next section. The return datatype, alertFieldValues is described in the Results Datatypes section. Below is an example using this query field:
query {
alertFieldValues(input:{viewName: "testeroo"} )
{actionNames, labels}
}
{
"data": {
"alertFieldValues": {
"actionNames": [
"email-admin"
],
"labels": [
"late"
]
}
}
}
Notice that for the AlertFieldValuesInput input, it requires putting the parameter viewName and the name of the repository in curly-brackets. For alertFieldValues, a simple list of fields requested is all that's needed.
Given Datatype
For AlertFieldValuesInput, there is only one parameter. It's described in this table:
Table: AlertFieldValuesInput
Parameter | Type | Required | Default | Stability | Description |
---|---|---|---|---|---|
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column. | |||||
Table last updated: Sep 17, 2024 | |||||
viewName | RepoOrViewName | yes | Preview | The name of view for the alerts. RepoOrViewName is a scalar. |
Returned Datatype
For alertFieldValues, there are a few parameters. They're listed here along with descriptions of each:
Table: AlertFieldValues
Parameter | Type | Required | Default | Stability | Description |
---|---|---|---|---|---|
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column. | |||||
Table last updated: Sep 23, 2024 | |||||
actionNames | [string] | yes | Preview | List of names of actions attached to alerts. Sorted lexicographically by action names. | |
labels | [string] | yes | Preview | List of labels attached to alerts. Sorted lexicographically by label names. | |
unversionedPackageSpecifiers | [string] | yes | Preview | A list of packages for installed alerts as non-versioned qualified package specifiers scope/packageName -- sorted lexicographically. |