Hello Teppo,
here is the correct GQL to 1) retrieve a list of available Custom Attributes of type HARProvider, and 2) align an attribute to a service
Get a list of extended attributes for services
query serviceDetailsGetAllCustomAttributes(
$first: Int
$after: String
$search: CustomAttributeSearch
$isGlobalManagerRequest: Boolean
$globalManagerStackSearch: GlobalManagerStackSearch
) {
customAttributes(
search: $search
first: $first
after: $after
isGlobalManagerRequest: $isGlobalManagerRequest
globalManagerStackSearch: $globalManagerStackSearch
) {
edges {
node {
id
label
type
alignmentType
name
}
}
pageInfo {
hasNextPage
}
}
}
Query Variables
{
"first": 30,
"search": {
"and": [
{
"alignmentType": {
"eq": "extended"
}
},
{
"entity": {
"eq": "harProvider"
}
},
{
"label": {
"contains": ""
}
}
]
},
"isGlobalManagerRequest": false,
"globalManagerStackSearch": {}
}
Align an attribute to a service
mutation serviceDetailsAlignCustomAttributes(
$serviceId: ID!
$bulkAttributes: [CustomAttributeIdValueInput!]
) {
alignCustomAttributes(
attributes: $bulkAttributes
entity: $serviceId
type: harProvider
) {
...serviceDetailCustomAttribute
}
}
fragment serviceDetailCustomAttribute on AlignedCustomAttribute {
... on CustomIntAttribute {
id
label
intval: value
type
alignmentType
}
... on CustomStringAttribute {
id
label
value
type
alignmentType
}
}
Query Variables
{
"serviceId": "u8o37motye647x35i5u8w14v",
"bulkAttributes": [
{
"id": "BDS_20_Extended_20_String",
"value": "BDS CS 1"
}
]
}