Forum Discussion

API_User's avatar
API_User
Equinix Employee
3 years ago

Error when setting up multiple connections

I sent a request to setup a primary and secondary connection with the body containing data structured like the following:

{
    "data": [
        {
            "type": "EVPL_VC"
        },
        {
            "type": "EVPL_VC"
        }
    ]
}


When sending this I get the following error response which is obviously not correct:

[
    {
        "errorCode": "EQ-3142501",
        "errorMessage": "Invalid argument value passed",
        "details": "Invalid request type",
        "correlationId": "null-0000-103911409258-api",
        "additionalInfo": [
            {
                "property": "/type",
                "reason": "Allowed values: EVPL_VC, EPL_VC, IP_VC, ACCESS_EPL_VC"
            }
        ]
    }
]

The type field in both cases is set to a valid value, EVPL_VC.
If I just create a single connection with either of the entries of the data array the connections setup properly.

  • API_User's avatar
    API_User
    Equinix Employee
    Thank you for reaching out.
    We tried to replicate the issue in our lower environment and was not reproducible. Could you please share the Request Payload, so we can do further debugging on this issue?

    Regards,
    Fabric Development Team
  • API_User's avatar
    API_User
    Equinix Employee

    Here is the structure of the request body with dummy values used:

    {
        "data": [
            {
                "name": "abc-p",
                "type": "EVPL_VC",
                "order": {
                    "purchaseOrderNumber": "1234"
                },
                "bandwidth": 1000,
                "redundancy": {
                    "group": "12345676-abcd-ef12-3456-7890abcdef10",
                    "priority": "PRIMARY"
                },
                "aSide": {
                    "accessPoint": {
                        "type": "COLO",
                        "port": {
                            "uuid": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
                        },
                        "linkProtocol": {
                            "type": "DOT1Q",
                            "vlanTag": 3456
                        }
                    }
                },
                "zSide": {
                    "accessPoint": {
                        "type": "SP",
                        "profile": {
                            "uuid": "11111111-2222-3333-4444-555555555555"
                        },
                        "location": {
                            "metroCode": "SV"
                        },
                        "linkProtocol": {
                            "type": "QINQ",
                            "vlanCTag": 3456
                        },
                        "authenticationKey": "11111111-aaaa-bbbb-cccc-222222222222",
                        "peeringType": "PRIVATE"
                    }
                },
                "notifications": [
                    {
                        "type": "ALL",
                        "emails": [
                            "foo@bar.com"
                        ]
                    }
                ]
            },
            {
                "name": "abc-s",
                "type": "EVPL_VC",
                "order": {
                    "purchaseOrderNumber": "1234"
                },
                "bandwidth": 1000,
                "redundancy": {
                    "group": "12345676-abcd-ef12-3456-7890abcdef10",
                    "priority": "SECONDARY"
                },
                "aSide": {
                    "accessPoint": {
                        "type": "COLO",
                        "port": {
                            "uuid": "abcdefff-1111-aaaa-2222-fedcbaabcdef"
                        },
                        "linkProtocol": {
                            "type": "DOT1Q",
                            "vlanTag": 3456
                        }
                    }
                },
                "zSide": {
                    "accessPoint": {
                        "type": "SP",
                        "profile": {
                            "uuid": "12345678-0123-5678-9012-345678901234"
                        },
                        "location": {
                            "metroCode": "SV"
                        },
                        "linkProtocol": {
                            "type": "QINQ",
                            "vlanCTag": 3456
                        },
                        "authenticationKey": "beefbeef-beef-beef-beef-beefbeefbeef",
                        "peeringType": "PRIVATE"
                    }
                },
                "notifications": [
                    {
                        "type": "ALL",
                        "emails": [
                            "foo@bar.com"
                        ]
                    }
                ]
            }
        ]
    }
  • API_User's avatar
    API_User
    Equinix Employee
    I believe I was using the wrong API but the error message should have indicated such. I sent the request to the https://api.equinix.com/fabric/v4/connections API instead of the https://api.equinix.com/fabric/v4/connections/bulk API.
    Given the "data" property in the request and the fact that the https://api.equinix.com/fabric/v4/connections API does not support that property I would expect this to be flagged rather than the actual error that was presented for the "/type" property.
  • API_User's avatar
    API_User
    Equinix Employee
    Thank you for your feedback.
    We will review the logic and prioritize the changes for API response.

    Regards,
    Fabric Development Team