You can now return an item or board’s URL by querying the url field. This field is available on both boards and items objects in API versions 2024-04 and later.
I’m running into issues returning the URL value:
When I query with
{
“query”: “query { items (ids: [6983085934]) {parent_item{id} id name url }}”
}
in Postman, the URL value is returned as an element
When I query passing this body in Powershell
$body = @"
{ "query": "query { items (ids: [$childTickets]) {parent_item{id} id name url}}"
}
"@
$childResponse = Invoke-RestMethod ‘https://api.monday.com/v2’ -Method ‘POST’ -Headers $headers -Body $body
I get
{
“errors”: [
{
“message”: “Field \u0027url\u0027 doesn\u0027t exist on type \u0027Item\u0027”,
“locations”: [
{
“line”: 1,
“column”: 82
}
],
“path”: [
“query”,
“items”,
“url”
],
“extensions”: {
“code”: “undefinedField”,
“typeName”: “Item”,
“fieldName”: “url”
}
}
],
“account_id”: XXXXXXXX
}
No. Not the version number in the URL. The version number set in the options eg “2024-04”.
Also, try using the API playground first rather than jumping straight in with some powershell. In the API playground, you can swap the API versions and see whether you can get the same error for a particular version.
@mcdemon I agree with David - this error makes me think you’re using an older version. Check out our versioning guide here for more info, and let us know if you have other questions!