Fabric APIs
52 TopicsFabric APIv4, Connection to azure, Technical background vlanSTag in zSide
Hello, I'd like to configure a redundant connection to Azure using dot1q encapsulation. The documentation for migration from v3 to v4 states that we need to include "linkProtocol": { "type": "QINQ", "vlanSTag": 2002 }, in the zSide definition. That was not necessary in the v3 API. I'm not sure what the technical background for that value is. Specifically: Can we always use the same VLAN ID in connections to different Azure environments when using unique VLAN IDs on the aSide? Any help is appreciated.247Views1like2Commentsupdating bandwidth for connection
I'm attempting to change the bandwidth using python requests based on thishttps://developer.equinix.com/catalog/fabricv4#operation/updateConnectionByUuid authorization is solid, used same headers for many other without issue. url = f"https://api.equinix.com/fabric/v4/connections/{cid}" headers["content-type"] = 'application/json-patch+json' response = requests.patch( url, headers=headers, timeout=5, data=[ { "op": "replace", "path": "/bandwidth", "value": bw } ] if run as above I get this error Traceback (most recent call last): File "/Users/gregcox/Projects/app/main.py", line 238, in <module> pp(update_bandwidth(vcs[0], 200)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/gregcox/Projects/app/main.py", line 208, in update_bandwidth response = requests.patch( ^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/requests/api.py", line 145, in patch return request("patch", url, data=data, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 575, in request prep = self.prepare_request(req) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 486, in prepare_request p.prepare( File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 371, in prepare self.prepare_body(data, files, json) File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 559, in prepare_body body = self._encode_params(data) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 121, in _encode_params for k, vs in to_key_val_list(data): ^^^^^ ValueError: too many values to unpack (expected 2) If I run the same as above, but change data to be a dict instead of a list I get this error [{'correlationId': '-api', 'details': 'Please refer the contracts for correct fields', 'errorCode': 'EQ-3142558', 'errorMessage': 'Json syntax error, please check request body'}]2.2KViews0likes2Commentsdelta sandbox<>prod apis
Hi, We noticed that some APIs aren't available in the sandbox but only in production of the Equinix API. Do we have a way to test this? These APIs seem to be available in the playground-zone These works on Prod but not sandbox: list userports list metros list buyer/connections For example: curl -X GET "$url/ecx/v3/l2/common/metros" -H "accept: application/json" -H "Authorization: Bearer $token" {"fault":{"faultstring":"Invalid API call as no apiproduct match found","detail":{"errorcode":"keymanagement.service.InvalidAPICallAsNoApiProductMatchFound"}}}% curl -X GET "$url/ecx/v3/port/userport" -H "accept: application/json" -H "Authorization: Bearer $token" {"fault":{"faultstring":"Invalid API call as no apiproduct match found","detail":{"errorcode":"keymanagement.service.InvalidAPICallAsNoApiProductMatchFound"}}}% curl -X GET "$url/ecx/v3/l2/buyer/connections" -H "accept: application/json" -H "Authorization: Bearer $token" {"fault":{"faultstring":"Invalid API call as no apiproduct match found","detail":{"errorcode":"keymanagement.service.InvalidAPICallAsNoApiProductMatchFound"}}}%1.4KViews0likes0CommentsFilter "portName" on connection list not working
Hello, for theendpoint GET https://api.equinix.com/ecx/v3/l2/seller/connections I use it with the profileId filter and I get back many results.I go from page to page to list the connection I have on one specific port. I would like to reduce those calls using the filter portName.However the result is always empty : { "isFirstPage": true, "isLastPage": true, "totalCount": 0, "pageSize": 20, "content": [], "pageNumber": 0 } Have anyone succeeded in getting this to work ? Best regards,5KViews0likes7Comments[sandbox] create l2connections
Hello ! I'm trying to create l2 connection on sandbox but i have some error $ curl -X POST -H "Content-Type: application/json" "https://sandboxapi.equinix.com/ecx/v3/l2/connections" -H "Authorization: Bearer xxxxxx" -d '{ "primaryName": "test_port_crea_1", "primaryPortUUID": "a9d0254e-d856-4a53-b105-7178fede119f", "primaryVlanSTag": 601, "profileUUID": "1bef8e6b-ea90-4757-bb25-c24f9d64387c", "authorizationKey": 444111000222, "speed": 200, "speedUnit": "MB", "notifications": [ "sandboxuser@example-company.com" ], "purchaseOrderNumber": "312456323", "sellerRegion": "us-east-1", "sellerMetroCode": "SV", "namedTag": "Private" }' Returns [{"errorCode":"IC-LAYER2-400","errorMessage":"Required field","moreInfo":"","errorMessageKey":"IC-LAYER2.IC-LAYER2-400","property":"additionalInfo_custBGPAssn"}] I couldn't find documentation about this field on documentation - https://developer.equinix.com/content/api/buyerv3-recommended?view=product-catalog#/Layer%202%20Connections/createConnectionUsingPOST Could you held me ? Best regards Louis1.3KViews0likes0CommentsJSON Syntax Error
Hi everyone, I'm trying to create an Azure Express Route connection and when I try to send my POST request body: { "primaryName": "TestName-PRI", "primaryPortUUID": "abcdefghijklmonopqrustuvwxyz", "primaryVlanSTag": 511, "profileUUID": "abcdefghijklmonopqrustuvwxyz", "authorizationKey": "abcdefghijklmonopqrustuvwxyz", "speed": 100, "speedUnit": "MB", "notifications": "abcdefghijklmonopqrustuvwxyz", "sellerRegion": "ADAD", "sellerMetroCode": "xx", "secondaryName": "TestName-SEC", "secondaryPortUUID": "abcdefghijklmonopqrustuvwxyz", "secondaryVlanSTag": 511, "namedTag": "Microsoft", "primaryZSideVlanCTag": "###", "secondaryZSideVlanCTag": "###" } Obviously I will not post content with real data from my company so I filled it in with dummy data. I keep getting back the following error: [ { "errorCode": "IC-LAYER2-401", "errorMessage": "Json syntax error,Please check request body", "moreInfo": "Please refer the contracts for correct fields", "property": "" } ] Am I missing something in the request body?1.9KViews0likes1CommentError with error format on serviceTokens
Hello I have error with "Error message" of the API. Endpoint: https://api.equinix.com/fabric/v4/serviceTokens/{serviceTokenId} $ curl --request GET --url "https://api.equinix.com/fabric/v4/serviceTokens/e72498f3-xxxx-xxxx-xxxx-87df25f05e5a" --header 'authorization: Bearer xxxx' > Result OK I change only one char to get an unknown service token : $ curl --request GET --url "https://api.equinix.com/fabric/v4/serviceTokens/e72498f3-xxxx-xxxx-xxxx-87df25f05e5b" --header 'authorization: Bearer xxxx' Warning: Binary output can mess up your terminal. Use "--output -" to tell Warning: curl to output it to your terminal anyway, or consider "--output Warning: " to save to a file. The answer is not a readable json. This does not occur with every error. For example the ports endpoints work without error. I try a very simple call which work : $ curl --request GET --url "https://api.equinix.com/fabric/v4/ports/24ce23cd-c42e-4746-8cdd-94cc363a0b3c" --header 'authorization: Bearer xxxxx' > Result OK I change only one letter in the port uuid: $ curl --request GET --url "https://api.equinix.com/fabric/v4/ports/24ce23cd-c42e-4746-8cdd-94cc363a0b3d" --header 'authorization: Bearer xxxxx' {"errorCode":"ERR-PRT-000-00","errorMessage":"System is unable to process the request at this time due to some internal error. Please contact support@equinix.com for more info","moreInfo":"","property":"ERROR"} On this endpoint i have a readable json as expected. On serviceTokens i tried to add many headers - Accept: application/json - Content-Type: application/json But i dont find a solution. The curl i tried are the same as the documentation : - https://developer.equinix.com/catalog/fabricv4#operation/getServiceTokenByUUID Could you check why i have this bad error message ? Best regards2.9KViews0likes3CommentsAPI mismatch introduced on 12 February 2022
Hi, We noticed that on 12 February you introduced a breaking change on the API which is undocumented. When doing https://developer.equinix.com/catalog/buyerv3 the response does no longer contain "isLastPage" but contains "last" which is not documented. { "first": "TRUE", "last": "FALSE", "number": 0, "numberOfElements": 20, "size": 20, "sort": [ { "ascending": "FALSE", "descending": "TRUE", "direction": "DESC", "ignoreCase": "FALSE", "nullHandling": "NATIVE", "property": "created_date" } ], "totalElements": 8051, "totalPages": 403 } Can we have an explanation on this and get it back aligned with the documentation?Solved3.4KViews0likes4CommentsSandbox GET L2 Service Profile
Hello, I'm playing around with the Sandbox APIs and stumbled upon this problem. When trying to get a list a services I get this error message: Request GEThttps://sandboxapi.equinix.com/ecx/v3/l2/serviceprofiles/services Result { "fault": { "faultstring": "Invalid API call as no apiproduct match found", "detail": { "errorcode": "keymanagement.service.InvalidAPICallAsNoApiProductMatchFound" } } } In the long run I'd like to implement the Sandbox APIs in our production environment to serve as a kind-of dry-run feature. That means if we start a dry-run of our processes they will point to the Sandbox environment instead of the production APIs. Is it wise to do that or is the data for the Sandbox APIs changing often? I've read somewhere that the Sandbox environment is updated every couple of months. Thanks1.3KViews0likes0Comments