Skip to main content

Gestion des routeurs Fabric Cloud

Conditions préalables

Authentification: soumettez vos identifiants utilisateur, votre identifiant client et votre clé secrète pour l’authentification OAuth2. Consultez la documentation relative à l’authentification API (Authentification API) pour savoir comment appeler l’API OAuth afin de valider et d’authentifier vos identifiants.

Rechercher et récupérer des routeurs Fabric Cloud

Cette requête API récupère les instances de routeur Fabric Cloud correspondant aux critères de recherche fournis. Envoyez une requête POST au point de terminaison /fabric/v4/routers/search en spécifiant vos critères dans le corps de la requête.

POST /fabric/v4/routers/search
MethodPOST
URL or Endpoint/fabric/v4/routers/search
HeadersAuthorization, Content-Type
Path ParametersNot applicable
Query ParametersNot applicable
Body Parametersfilter, pagination, sort

Exemple de demande de boucle:

curl -X POST 'http: //api.equinix.com/fabric/v4/routers/search'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'
-d '{
    "filter": {
        "and": [
            {
                "property": "/name",
                "operator": "LIKE",
                "values": [
                    "%Test%"
                ]
            },
            {
                "property": "/state",
                "operator": "=",
                "values": [
                    "PROVISIONED"
                ]
            },
            {
                "property": "/project/projectId",
                "operator": "=",
                "values": [
                    "995072000433550"
                ]
            },
            {
                "property": "/location/metroCode",
                "operator": "=",
                "values": [
                    "SV"
                ]
            }
        ]
    },
    "pagination": {
        "offset": 0,
        "limit": 20
    },
    "sort": [
        {
            "direction": "DESC",
            "property": "/changeLog/createdDateTime"
        }
    ]
}'

Paramètres corporels notables:

  • filter (required) object - The object that defines your search conditions.

  • and (required) array[object] - An array object that serves as the logical operator applied on the search objects in the array. You can search on:

    • property (required) string - Search field parameter. Note that the property value determines the list of applicable operators and values. Applicable values: "/name", "/uuid", "/state", "/location/metroCode", "/location/metroName", "/package/code" and an all-category search "\*".
    • operator (required) string - Search field parameter operator. Applicable values: "=", "!=", ">", ">=", "<", "<=", BETWEEN, LIKE, IN, "NOT BETWEEN", "NOT LIKE", "NOT IN".
    • value (required) array[string] - Search field parameter value.
  • pagination object - Optional object containing search results pagination settings with offset integer and limit integer fields.

  • sort object - Optional object that defines your search result sorting settings with direction string and property string fields.

Pour une liste complète des propriétés consultables, des limites de pagination et des propriétés triables, consultez la référence API.

Exemple de réponse:

{
    "pagination": {
        "offset": 0,
        "limit": 20,
        "total": 1,
        "next": "/search?offset=4&limit=2",
        "previous": "/search?offset=0&limit=2"
    },
    "data": [
        {
            "href": "https://api.equinix.com/fabric/v4/routers/201b7346-a9eb-42fe-ae7a-08148c71928d",
            "uuid": "201b7346-a9eb-42fe-ae7a-08148c71928d",
            "state": "PROVISIONED",
            "type": "XF_ROUTER",
            "name": "My-Fabric-Cloud-Router",
            "location": {
                "metroCode": "HH"
            },
            "package": {
                "code": "LAB"
            },
            "order": {
                "purchaseOrderNumber": "1-129105284100"
            },
            "project": {
                "projectId": "12345"
            },
            "notifications": [
                {
                    "type": "ALL",
                    "emails": [
                        "abc@abc.com"
                    ]
                }
            ],
            "account": {
                "accountNumber": 123
            },
            "bgpIpv4RoutesCount": 0,
            "bgpIpv6RoutesCount": 0,
            "connectionsCount": 0,
            "changeLog": {
                "createdBy": "abc@xyz.com",
                "createdByFullName": "abc",
                "createdByEmail": "abc@xyz.com",
                "createdDateTime": "2021-09-24T06:59:46Z"
            }
        }
    ]
}

Obtenir un routeur cloud Fabric spécifié

Cette requête API récupère les détails d'un routeur Fabric Cloud spécifié, envoyez une requête GET au point de terminaison /fabric/v4/routers/{uuid} avec l'uuid dans le chemin de la requête.

GET /fabric/v4/routers/{uuid}
MethodGET
URL or Endpoint/fabric/v4/routers/{uuid}
HeadersAuthorization, Content-Type
Path Parametersuuid
Query ParametersNot applicable
Body ParametersNot applicable

Exemple de demande de boucle:

curl -X
GET 'https://api.equinix.com/fabric/v4/routers/{router_uuid}'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'

Exemple de réponse:

{
    "href": "https://api.equinix.com/fabric/v4/routers/201b7346-a9eb-42fe-ae7a-08148c71928d",
    "uuid": "201b7346-a9eb-42fe-ae7a-08148c71928d",
    "state": "PROVISIONED",
    "type": "XF_ROUTER",
    "name": "My-Fabric-Cloud-Router",
    "location": {
        "metroCode": "HH"
    },
    "package": {
        "code": "LAB"
    },
    "order": {
        "purchaseOrderNumber": "1-129105284100"
    },
    "project": {
        "projectId": "12345"
    },
    "notifications": [
        {
            "type": "ALL",
            "emails": [
                "abc@abc.com"
            ]
        }
    ],
    "account": {
        "accountNumber": 123
    },
    "bgpIpv4RoutesCount": 0,
    "bgpIpv6RoutesCount": 0,
    "distinctIpv4PrefixesCount": 4,
    "distinctIpv6PrefixesCount": 4,
    "connectionsCount": 0,
    "changeLog": {
        "createdBy": "abc@xyz.com",
        "createdByFullName": "abc",
        "createdByEmail": "abc@xyz.com",
        "createdDateTime": "2021-09-24T06:59:46Z"
    }
}

Mise à jour d'un routeur Fabric Cloud

Pour mettre à jour un routeur Fabric Cloud, envoyez une requête PATCH au point de terminaison /fabric/v4/routers/{routerId} en indiquant les paramètres à mettre à jour dans le corps de la requête. Vous pouvez modifier le nom ou le package.

PATCH /fabric/v4/routers/{uuid}
MethodPATCH
URL or Endpoint/fabric/v4/routers/{uuid}
HeadersAuthorization, Content-Type
Path Parametersuuid
Query ParametersNot applicable
Body Parametersop, path, value

Exemple de demande de boucle:

curl -X
PATCH 'https: //api.equinix.com/fabric/v4/routers/{router_uuid}'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'
-d '[
    {
        "op": "replace",
        "path": "/name",
        "value": "Cloud-Router-2"
    }
]'

Paramètres corporels notables:

  • op (required) string - Update request type. Applicable values: replace, add, or remove.
  • path (required) string - Parameter path of the value you are updating. Applicable values: "/name" or "/package/code".
  • value (required) string - The new parameter value.

Pour une liste complète des champs pouvant être mis à jour et de leurs valeurs, consultez la référence API.

Supprimer le routeur Fabric Cloud

Pour supprimer un routeur Fabric Cloud, envoyez une requête DELETE au point de terminaison /fabric/v4/routers/{uuid}. Spécifiez le routeur à supprimer par son uuid dans le chemin.

DELETE /fabric/v4/routers/{uuid}
MethodDELETE
URL or Endpoint/fabric/v4/routers/{uuid}
HeadersAuthorization, Content-Type
Path Parametersuuid
Query ParametersNot applicable
Body ParametersNot applicable

Exemple de demande de boucle:

curl -X
DELETE 'https://api.equinix.com/fabric/v4/routers/{router_uuid}'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'
Cette page vous a-t-elle été utile ?