API - The request content was invalid and could not be deserialized: 'Could not find member (column name) on object of type 'ResourceDefinition'. Path

Maxime CARMONA 60 Reputation points
2023-12-19T12:55:28.4233333+00:00

Hi,

I am trying to send a JSON that contains data to ingest them in a Alert table.
The response is:


    "error": {
        "code": "InvalidRequestContent",
        "message": "The request content was invalid and could not be deserialized: 'Could not find member 'Alert' on object of type 'ResourceDefinition'. Path 'Alert', line 1, position 11.'."
    }
}

I am not sure if i am using the good URL
https://management.azure.com/subscriptions/

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,658 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AnuragSingh-MSFT 21,551 Reputation points Moderator
    2023-12-20T06:11:11.46+00:00

    Maxime CARMONA, thank you for posting this question.

    Based on my understanding, you are trying to send data to "Alert" table in Log Analytics workspace. Reference for this table - Alert table: Log Analytics Workspace. As I understand, you are using log ingestion API for it as mentioned here - Tutorial: Send data to Azure Monitor using Logs ingestion API (Resource Manager templates) - please correct me if I'm wrong.

    In this scenario, the sending data to Alert table will not work. Note that the log ingestion API is only applicable for custom tables created and not the default tables available with LA workspace. Note the step 3 mentioned here.

    Furthermore, the data in alert table is ingested either by log alerts rules created on logs of this workspace OR SCOM alerts collected through Alert Management solution.

    A different way to make it work would be -

    1. Create custom table as mentioned above and use API to send data to this table.
    2. Create log based alert rule using query against this new custom table.
    3. Once the alert gets fired based on the entry in custom table, a new row gets added to alert table.

    Hope this helps.

    If the answer did not help, please add more context/follow-up question for it, and we will help you out. Else, if the answer helped, please click Accept answer so that it can help others in the community looking for help on similar topics.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.