Failing to PUT a contact-point on Grafana 9.2.5

Hi,
I am fetching a contact point via api/v1/provisioning/contact-points?orgId=16, I am then updating the url to a new slack address, then PUT to api/v1/provisioning/contact-points/JCbTGrTVz?orgId=16 which gives back:

{'message': "Error 1051: Unknown table 'T'", 'traceID': ''}

The payload I am send is:

{
    "uid": "JCbTGrTVz",
    "name": "Slack Michael",
    "type": "slack",
    "settings": {
        "url": "https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX"
    },
    "disableResolveMessage": true
}

The headers I am sending are:

    'Content-Type': 'application/json',
    'accept': 'application/json'

Any ideas?

Just to add to this, I attempted to create a contact using a small piece of Python, getting the same error.

Script

    payload = {
        'disableResolveMessage': False,
        'name': 'test_api',
        'type': 'slack',
        'uid': 'Foo',
        'settings': {
            'url': slack_url
        }
    }
    result = s.post(f'{baseurl}/api/v1/provisioning/contact-points',
                  json=payload, headers=headers, params={'orgId': 16})
    print(result.text)

“{“message”:“Error 1051: Unknown table ‘T’”,“traceID”:”“}”

Switched logging level to DEBUG, the only noteworthy message is:

logger=sqlstore.transactions t=2023-03-15T10:51:28.635646856Z level=debug msg=“skip committing the transaction because it belongs to a session created in the outer scope”

Hi @michaelsawczuk

you are right. there is no way to update the contact point even though you are providing the contact point’s uid. I reproduced this behaviour. Note: the grafana server logs don’t give any additional info about the 404

could you open a new issue in our repo and reference this post?

thank you!

1 Like

Thanks @antonio , raised Unable to update contact point - Error 1051 thrown · Issue #65172 · grafana/grafana · GitHub

1 Like