Forum Discussion
gregorycox-cv
2 years agoLevel 1
updating bandwidth for connection
I'm attempting to change the bandwidth using python requests
based on this https://developer.equinix.com/catalog/fabricv4#operation/updateConnectionByUuid authorization is solid, used same headers...
vaibhav
2 years agoEquinix Employee
Issue: Payload was added as Form data in request
Solution: We need to submit JSON payload to the API call. Below is a working example.
import requests
cid = e7ea19ba-5d53-476d-a041-43a3004c6683
bw= 50
url = f"https://api.equinix.com/fabric/v4/connections/{cid}"
headers = {}
headers["content-type"] = 'application/json-patch+json'
data=[
{
"op": "replace",
"path": "/bandwidth",
"value": bw
}
]
response = requests.patch(
url,
headers=headers,
timeout=5,
json=data
)
Related Content
- 3 years ago
- 4 years ago
Recent Discussions
Featured Places
Discussions
Engage with industry experts, share insights, ask questions, and grow your network.Ideas
We're listening! Submit your ideas to shape the future of Equinix!Groups
Ready to collaborate? Join a Group or upcoming beta program.What's New
Stay ahead with the latest from Equinix. Discover new product announcements, insightful tutorials, and practical use cases.Events
Your Guide to Upcoming Events - Online, Hybrid, and In-Person!