When adding values to the API and after previewing, I'm receiving an unsupported query error


When I attempt to use the aforementioned API, I get an error stating that the query response code 400 is not supported.
Query: “mutation add_file($file: File!) {add_file_to_column (item_id: 12345678, column_id:‘files_mkmk51z5’ file: $file) {id}}” i have passed this in body
error: {
“status_code”: 400,
“error_message”: “Unsupported query”,
“errors”: [
{
“message”: “Unsupported query”,
“extensions”: {
“status_code”: 400
}
}
]
}

I want to use an API to upload a file to Monday.com Board, but I’m having trouble with the above. I’ve tried several fixes.

@Sagar_Prakash_Choudhari

First try the same in postman…and then you can copy curl from there and import here…that way its better for troubleshooting as well

Cheers

Hi @Sagar_Prakash_Choudhari

Try importing these curls in your HTTP request besides the configure button there is import button. These will auto add the values just modify the token & respective values.

image

cURL Examples for API v2 :slight_smile: - monday Apps & Developers / Announcements - monday Community Forum

Hope this helps :slight_smile:

When I import Postman, the query does not get imported, and even after adding the query, it continues to throw an internal server error error. However, the same runs smoothly in Postman.

Can you share the correct query to pass it to the http request activity for column updation

@Sagar_Prakash_Choudhari

Can you show the query…also $file and all are variables? in postman? if so we need to convert them as well

cheers

“query:mutation { create_item (board_id: 1622487816, group_id:‘emailed_items’, item_name: ‘Test from Curl’) { id } }”
Currently i’m using this query. to create item with column values and when i’m trying to create it’s throwing error. I am passing it in body in http request activity
{
“errors”: [
{
“message”: “Invalid GraphQL request”,
“extensions”: {
“details”: “failed to deserialize the request body into JSON: EOF while parsing a value at line 1 column 0”,
“code”: “INVALID_GRAPHQL_REQUEST”
}
}
],
“account_id”: 5901652
}

@Sagar_Prakash_Choudhari

Can you show a screenshot

Also instead of preview run the activity in debug and check…in locals l panel you can check how each parameter looks

Cheers