Skip to main content

Notifications

Power Automate - Using Connectors
Unanswered

"Consumes" content types not respected when fetching dynamic values

(0) ShareShare
ReportReport
Posted on by

By design our endpoints would return a 415 error if a GET request comes with the content type "application/json" - no matter what values I put to consumes or leave it empty the GET request to fetch dynamic values always defaults to "application/json" as its content type...

 

Operation definitions:

 

"/project/v1/hubs": {
"x-summary": "Hubs",
"x-description": "Hub related operations",
"get": {
"operationId": "get_hubs",
"description": "Returns a collection of accessible hubs for this member.\nA Hub represents an A360 Team/Personal hub or a BIM 360 account.\n",
"produces": [
"application/vnd.api+json"
],
"parameters": [
{
"$ref": "#/parameters/query_filter_id"
},
{
"$ref": "#/parameters/query_filter_extensionType"
}
],
"responses": {
"200": {
"$ref": "#/responses/hubs"
},
"403": {
"$ref": "#/responses/forbidden"
}
},
"security": [
{
"oauth2_access_code": [
"data:read"
]
}
],

"/project/v1/hubs/{hub_id}/projects": {
"x-summary": "Projects",
"x-description": "Project related operations",
"get": {
"operationId": "get_hub_projects",
"description": "Returns a collection of projects for a given `hub_id`.\nA project represents an A360 project or a BIM 360 project which is set up under an A360 hub or BIM 360 account, respectively.\nWithin a hub or an account, multiple projects can be created to be used.\n",
"consumes": [
"application/vnd.api+json"
],
"produces": [
"application/vnd.api+json"
],
"parameters": [
{
"$ref": "#/parameters/get_hubs"
},
{
"$ref": "#/parameters/query_filter_id"
},
{
"$ref": "#/parameters/query_filter_extensionType"
}
],
"responses": {
"200": {
"$ref": "#/responses/projects"
},
"401": {
"$ref": "#/responses/unauthorized"
},
"403": {
"$ref": "#/responses/forbidden"
},
"404": {
"$ref": "#/responses/not_found"
}
},
"security": [
{
"oauth2_access_code": [
"data:read"
]
}
],
"x-ads_command_line_example": "curl -X GET -H \"Authorization: Bearer kEnG562yz5bhE9igXf2YTcZ2bu0z\" \"https://developer.api.autodesk.com/project/v1/hubs/a.1256/projects\"",
"tags": [
"Projects"
]
}
},

 

Parameter definition:

 

"get_hub_projects": {"name":"project_id",
"type": "string",
"in": "path",
"description": "Select project",
"required": true,
"x-ms-summary": "Select List",
"x-ms-dynamic-values": {
"operationId": "get_hub_projects",
"value-path": "items[project_id]",
"value-title": "items[project_id]"
}},

"/project/v1/hubs/{hub_id}/projects": {
"x-summary": "Projects",
"x-description": "Project related operations",
"get": {
"operationId": "get_hub_projects",
"description": "Returns a collection of projects for a given `hub_id`.\nA project represents an A360 project or a BIM 360 project which is set up under an A360 hub or BIM 360 account, respectively.\nWithin a hub or an account, multiple projects can be created to be used.\n",
"consumes": [
"application/vnd.api+json"
],
"produces": [
"application/vnd.api+json"
],
"parameters": [
{
"$ref": "#/parameters/get_hubs"
},
{
"$ref": "#/parameters/query_filter_id"
},
{
"$ref": "#/parameters/query_filter_extensionType"
}
],
"responses": {
"200": {
"$ref": "#/responses/projects"
},
"401": {
"$ref": "#/responses/unauthorized"
},
"403": {
"$ref": "#/responses/forbidden"
},
"404": {
"$ref": "#/responses/not_found"
}
},
"security": [
{
"oauth2_access_code": [
"data:read"
]
}
],
"x-ads_command_line_example": "curl -X GET -H \"Authorization: Bearer kEnG562yz5bhE9igXf2YTcZ2bu0z\" \"https://developer.api.autodesk.com/project/v1/hubs/a.1256/projects\"",
"tags": [
"Projects"
]
}
},

 

Console errors when creating Flows - note the content type is incorrectly set to "application/json":

GET https://msmanaged-na.azure-apim.net/apim/sb2333.5f4b4f36a5654cdd5e.5ff71ea55df846f959/shared-sb2333.5f4b4f-2be38018-df3c-4a9d-b26d-6ef9edb139be/project/v1/hubs/b.a4f95080-84fe-4281-8d0a-bd8c885695e0/projects 415

Untitled 2.png

 

UI:

Untitled.png

 

Any ideas?

 

 

 

  • Re: "Consumes" content types not respected when fetching dynamic values

    'Can anyone pls take a look @Brad_Groux ? We need to address this urgently so we can go forward with building a connector for Autodesk Forge. 

  • Re: "Consumes" content types not respected when fetching dynamic values

    Bump... any ideas? We need to sort this out ASAP to go forward with integrating the Autodesk Forge services with Flow! Thanks!

  • Re: "Consumes" content types not respected when fetching dynamic values

    Can confirm our endpoints work when testing the connector:

    Untitled 7.png

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard

Featured topics