Developer Forum Equinix Fabric™ APIs Can't edit a circuit's bandwidthClosed
 The Developer Forum is shutting down. Please join the Equinix Community to participate in new discussions.
DP
API User
Friday, November 11, 2022 - 17:20

Hi,

I have a circuit and I'm trying to change the bandwidth using

PATCH /fabric/v4/connections/{id}

body (json): 

{

   "op": "replace",

   "path": "/bandwidth",

   "value": 900

}


But I keep getting this error code and there seems to be no way around it.

[

    {

        "errorCode": "EQ-3142506",

        "errorMessage": "Invalid request",

        "details": "Media type is not supported",

        "correlationId": "X-X-X-api"

    }

]

 

Would appreciate the help.

 

Thanks

RA
API User
Friday, November 11, 2022 - 22:52

Please update the content type in the patch request header:

-H 'Content-Type: application/json-patch+json'

I hope this helps!

DP
API User
Friday, November 11, 2022 - 23:38

Thank you friend been stuck on that for ages.

 

Unfortunately, running into another issue now

 

[

    {

        "errorCode": "EQ-3142558",

        "errorMessage": "Json syntax error, please check request body",

        "details": "Please refer the contracts for correct fields",

        "correlationId": "{}-api"

    }

]

DP
API User
Friday, November 11, 2022 - 23:48

Solved.


I needed to wrap the JSON body in a list like so:

[

{

   "op": "replace",
   "path": "/bandwidth",
"value": 900

}

]