ルーティングテーブルの管理
前提条件
Authenticate - OAuth2認証のためのユーザー認証情報、クライアントID、クライアントシークレットを送信します。OAuth APIを呼び出して認証情報を検証および認証する方法については、API Authenticationを参照してください。
ルーティングテーブルの更新
Fabric Cloud Router のルーティングテーブルの更新をトリガーするには、/fabric/v4/routers/{uid}/actions エンドポイントに POST リクエストを送信します。
POST /fabric/v4/routers/{uuid}/actions | |
|---|---|
| Method | POST |
| URL or Endpoint | /fabric/v4/routers/{uuid}/actions |
| Headers | Authorization, Content-Type |
| Path Parameters | uuid |
| Query Parameters | Not applicable |
| Body Parameters | type |
サンプル curl リクエスト:
curl -X
POST 'https://api.equinix.com/fabric/v4/routers/{router_uuid}/actions'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'
-d '{
"type": "ROUTE_TABLE_ENTRY_UPDATE"
}'
ボディパラメータ:
-
type(required) string - The routing table management action. To update your routing tables, useROUTE_TABLE_ENTRY_UPDATE. To see all the prefixes learned via BGP, useRECEIVED_ROUTE_ENTRY_UPDATE. To See the prefixes that FCR is sending via BGP, useADVERTISED_ROUTE_ENTRY_UPDATE. -
connection(optional) object - An object that contains auuidfield to specify a connection. Only required forRECEIVED_ROUTE_ENTRY_UPDATEandADVERTISED_ROUTE_ENTRY_UPDATEtypes.
パラメータの完全な情報と例については、API リファレンス を参照してください。
回答例
{
"type": "ROUTE_TABLE_ENTRY_UPDATE",
"uuid": "37c10edc-ba2e-4240-a850-8a48f9c47d00",
"state": "PENDING",
"changeLog": {
"createdDateTime": "2021-07-15T19:30:29.526Z",
"updatedDateTime": "2021-08-15T19:30:29.526Z"
}
}
ルーティングテーブル管理リクエストの取得
ルーティングテーブル管理リクエストの一覧を取得するには、/fabric/v4/routers/{uid}/actions エンドポイントに GET リクエストを送信します。state` クエリパラメータを使用して、リクエストの状態によってレスポンスをフィルタリングします。
GET /fabric/v4/routers/{uuid}/actions | |
|---|---|
| Method | GET |
| URL or Endpoint | /fabric/v4/routers/{uuid}/actions |
| Headers | Authorization |
| Path Parameters | uuid |
| Query Parameters | state |
| Body Parameters | Not applicable |
この API は、ルーティングテーブル管理アクションリクエストを取得します。
サンプルcurlリクエスト
curl -X
GET 'https://api.equinix.com/fabric/v4/routers/{router_uuid}/actions?state=<state>'
-H 'authorization: Bearer <token>'
クエリパラメータ:
state(optional) string - Action execution status. Applicable values:PENDING,SUCCEEDED, orFAILED.
回答例
{
"type": "ROUTE_TABLE_ENTRY_UPDATE",
"uuid": "37c10edc-ba2e-4240-a850-8a48f9c47d00",
"state": "PENDING",
"changeLog": {
"createdDateTime": "2021-07-15T19:30:29.526Z",
"updatedDateTime": "2021-08-15T19:30:29.526Z"
}
}
検索ルーティングテーブル 管理リクエスト
ルーティングテーブル管理リクエストを検索するには、/fabric/v4/routers/{routerId}/actions/search エンドポイントに POST リクエストを送信し、リクエスト本文で検索条件を指定します。
POST /fabric/v4/routers/{routerId}/actions/search | |
|---|---|
| Method | POST |
| URL or Endpoint | /fabric/v4/routers/{routerId}/actions/search |
| Headers | Authorization, Content-Type |
| Path Parameters | routerId |
| Query Parameters | Not applicable |
| Body Parameters | filter, pagination, sort |
サンプル curl リクエスト:
curl -X POST 'http: //api.equinix.com/fabric/v4/routers/{router_uuid}/actions/search'
-H 'content-type: application/json'
-H 'authorization: Bearer <token>'
-d '{
"filter": {
"and": [
{
"property": "/type",
"operator": "IN",
"values": [
"ROUTE_TABLE_ENTRY_UPDATE",
"RECEIVED_ROUTE_ENTRY_UPDATE"
]
},
{
"property": "/state",
"operator": "=",
"values": [
"SUCCEEDED"
]
},
{
"property": "/connection/uuid",
"operator": "IN",
"values": [
"3066ab1d-af87-49d7-8a14-c9bdb57ac809"
]
}
]
},
"pagination": {
"offset": 0,
"limit": 1
},
"sort": [
{
"property": "/changeLog/createdDateTime",
"direction": "DESC"
}
]
}'
注目すべきボディパラメータ:
-
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.
-
paginationobject - Optional object containing search results pagination settings withoffsetinteger andlimitinteger fields. -
sortobject - Optional object that defines your search result sorting settings withdirectionstring andpropertystring fields.
検索可能なプロパティ、ページネーションの制限、およびソート可能なプロパティの完全なリストについては、API リファレンス を参照してください。
回答例
{
"pagination": {
"offset": 0,
"limit": 1,
"total": 2,
"prev": null,
"next": null
},
"data": [
{
"href": "https://api.equinix.com//fabric/v4/routers/a1c6b7fd-aead-410a-96b4-b1dfa1071700/actions/1e9414f1-763e-4c0a-86c6-0bc8336048d9",
"uuid": "1e9414f1-763e-4c0a-86c6-0bc8336048d9",
"type": "RECEIVED_ROUTE_ENTRY_UPDATE",
"state": "SUCCEEDED",
"connection": {
"uuid": "3066ab1d-af87-49d7-8a14-c9bdb57ac809"
},
"operation": {
"bgpIpv4RoutesCount": 6,
"bgpIpv6RoutesCount": 6
},
"changeLog": {
"createdDateTime": "2024-01-01T01:00:00.000Z",
"updatedDateTime": "2024-01-01T01:01:00.000Z"
}
}
]
}