# Managing Assets In order to view or stream data, metrics, and events from an asset, you must first attach it to a stream. The following assets are supported: * **Ports** - stream bandwidth usage, errors and dropped packet metrics, up/down events, and lifecycle events. * **Connections** - stream bandwidth usage, dropped packet metrics, up/down events, and lifecycle events. * **Fabric Cloud Routers** - stream BGP state events, route quota usage events, and lifecycle events. * **Network Edge Virtual Devices** - stream Access Control List, device attribute, reboot, and Device Link Group events. * **Network Edge Virtual Devices Interfaces** - stream virtual device interface metrics. * **Metros** - stream metro latency metrics. * **Projects** - To view all of your project's events, including state change events and lifecycle events for assets in your project, attach a project to your stream. To get more information on Projects, see [Managing Projects](https://docs.equinix.com/iam/resources/projects-manage.md). * **Organizations** - To view organization events, including life cycle events for projects and identity and access management events such as role assignments, attach an organization to your stream. For more information on organizations, see [Managing Organizations](https://docs.equinix.com/iam/resources/organizations-manage.md). * **Company Profiles** - stream profile attribute, tag, and lifecycle events. For more information, see the [Metrics](https://docs.equinix.com/observability/streaming-data/metrics.md) and [Events](https://docs.equinix.com/observability/streaming-data/events.md) pages. ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * To attach assets (Port, Connections, etc) onto a stream, the user needs to have at least the `Viewer` Role on that asset. * To attach projects to a stream for lifecycle provisioning events, the user needs to have the `Project Admin` role. * To attach organizations to a stream for role assignment, user login, and resource management events, the user needs to have the `Org Admin` role. To attach organizations to a stream for role assignment, the user needs to have the `Org Admin` role. * If you are using the API, submit your user credentials, Client ID, and Client Secret for OAuth2 authentication. Refer to [API Authentication](https://docs.equinix.com/equinix-api/api-authentication.md) for more information on how to authenticate your requests to the Equinix API. ## Attaching Assets in the Portal[​](#attaching-assets-in-the-portal "Direct link to Attaching Assets in the Portal") 1. Log in to the [Customer Portal](https://portal.equinix.com/fabric) > *Fabric Dashboard*. 2. From the *Observability* menu, select **Data Streams**. ![Observability Drop-down Menu Screenshot](https://docs.equinix.com/assets/images/observability-drop-down-7b9fce28b7a44d07b365263f69b94cc2.png) 3. Click the *Stream Name* you want to add resources to. 4. From the *Actions* drop-down menu, select **Add Resources**. ![Actions Drop-down Menu Screenshot](https://docs.equinix.com/assets/images/add-resources-drop-down-4447251058015b68590d6695f02cf989.png) 5. Use the *File Directory* menu to filter the available resource types. 6. Select the specific resource or resources to add to the Stream. Added resources send event data and if you want to also send metrics, toggle *Enable Metrics*. Once you have selected your desired resources, click **Review**. ![Add Resources Dialog Screenshot](https://docs.equinix.com/assets/images/add-resources-filtered-1c7007d21e2f2b83039b81076a663f66.png) 7. Review the list of assets to attach to the stream. ![Add Resources Review Screenshot](https://docs.equinix.com/assets/images/add-resources-review-3b71db1df6103e93aa8ab301b1e9b65c.png) 8. Click **Submit**. ## Attaching Assets in the API[​](#attaching-assets-in-the-api "Direct link to Attaching Assets in the API") To attach a port to a stream, send a `PUT` request to the [`/fabric/v4/streams/{streamId}/{asset}/{assetId}`](https://docs.equinix.com/api-catalog/fabricv4/streams/updatestreamassetbyuuid.md) endpoint. Refer to the examples below to attach an asset to a stream for the supported assets. ### Ports[​](#ports "Direct link to Ports") Sample cURL Request: ``` curl -X 'PUT' 'https://api.equinix.com/fabric/v4/streams//ports/' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "metricsEnabled": true }' ``` Sample Response: ``` { "href": "https://api.equinix.com/fabric/v4/streams/241372e9-79c9-4ef8-b77a-8b8176c2098b4/ports/dee885d7-a845-4873-8774-f83012e7a", "uuid": "dee885d7-a845-4873-8774-f83012e7a", "type": "XF_PORT", "metricsEnabled": true, "attachmentStatus": "ATTACHING" } ``` ### Connections[​](#connections "Direct link to Connections") Sample cURL Request: ``` curl -X 'PUT' 'https://api.equinix.com/fabric/v4/streams//connections/' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "metricsEnabled": true }' ``` Sample Response: ``` { "href": "https://api.equinix.com/fabric/v4/streams/241372e9-79c9-4ef8-b77a-8b8176c2098b4/connections/dee885d7-a845-4873-8774-f83012e7a", "uuid": "dee885d7-a845-4873-8774-f83012e7a", "type": "IP_VC", "metricsEnabled": true, "attachmentStatus": "ATTACHING" } ``` ### Fabric Cloud Routers[​](#fabric-cloud-routers "Direct link to Fabric Cloud Routers") Sample cURL Request: ``` curl -X 'PUT' 'https://api.equinix.com/fabric/v4/streams//routers/' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "metricsEnabled": false }' ``` Sample Response: ``` { "href": "https://api.equinix.com/fabric/v4/streams/241372e9-79c9-4ef8-b77a-8b8176c2098b4/routers/dee885d7-a845-4873-8774-f83012e7a", "uuid": "dee885d7-a845-4873-8774-f83012e7a", "type": "XF_ROUTER", "metricsEnabled": false, "attachmentStatus": "ATTACHED" } ``` ### Network Edge Virtual Devices[​](#network-edge-virtual-devices "Direct link to Network Edge Virtual Devices") Sample cURL Request: ``` curl -X 'PUT' 'https://api.equinix.com/fabric/v4/streams//devices/' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "metricsEnabled": false }' ``` Sample Response: ``` { "href": "https://api.equinix.com/fabric/v4/streams/41372e9-79c9-4ef8-b77a-8b8176c2098b4/devices/e78f71ef-d82d-4fab-947b-7c95d153e362", "uuid": "e78f71ef-d82d-4fab-947b-7c95d153e362", "type": "VD", "metricsEnabled": false, "attachmentStatus": "ATTACHED" } ``` ### Network Edge Device Interfaces[​](#network-edge-device-interfaces "Direct link to Network Edge Device Interfaces") Sample cURL Request: ``` curl -X 'PUT' 'https://api.equinix.com/fabric/v4/streams//devices/' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "metricsEnabled": true, "interfaces": [ { "id": 3 }, { "id": 4 } ] }' ``` ### Metros[​](#metros "Direct link to Metros") Sample cURL Request: ``` curl -X 'PUT' 'https://api.equinix.com/fabric/v4/streams//metros/' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "metricsEnabled": true }' ``` Sample Response: ``` { "href": "https://api.equinix.com/fabric/v4/streams/241372e9-79c9-4ef8-b77a-8b8176c2098b4/metros/SV", "uuid": "SV", "type": "XF_METRO", "metricsEnabled": true, "attachmentStatus": "ATTACHED" } ``` ### Projects[​](#projects "Direct link to Projects") Sample cURL Request: ``` curl -X 'PUT' 'https://api.equinix.com/fabric/v4/streams//projects/' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "includes": ["*"], "metricsEnabled": true }' ``` Sample Response: ``` { "href": "https://api.equinix.com/fabric/v4/streams/241372e9-79c9-4ef8-b77a-8b8176c2098b4/projects/dee885d7-a845-4873-8774-f83012e7a", "uuid": "dee885d7-a845-4873-8774-f83012e7a", "type": "PROJECT", "metricsEnabled": true , "attachmentStatus": "ATTACHED" } ``` ### Organizations[​](#organizations "Direct link to Organizations") Sample cURL Request: ``` curl -X 'PUT' 'https://api.equinix.com/fabric/v4/streams//organizations/' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "includes": ["*"], "metricsEnabled": true }' ``` Sample Response: ``` { "href": "https://api.equinix.com/fabric/v4/streams/241372e9-79c9-4ef8-b77a-8b8176c2098b4/organizations/dee885d7-a845-4873-8774-f83012e7a", "uuid": "dee885d7-a845-4873-8774-f83012e7a", "type": "ORGANIZATION", "metricsEnabled": true, "attachmentStatus": "ATTACHED" } ``` ### Company Profiles[​](#company-profiles "Direct link to Company Profiles") Sample cURL Request: ``` curl -X 'PUT' 'https://api.equinix.com/fabric/v4/streams//companyProfiles/' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "metricsEnabled": false }' ``` Sample Response: ``` { "href": "https://api.equinix.com/fabric/v4/streams/41372e9-79c9-4ef8-b77a-8b8176c2098b4/companyProfiles/12345918-3333-2222-1111-12345ae12345", "uuid": "12345918-3333-2222-1111-12345ae12345", "type": "COMPANY_PROFILE", "metricsEnabled": false, "attachmentStatus": "ATTACHED" } ``` ## Viewing Attached Assets[​](#viewing-attached-assets "Direct link to Viewing Attached Assets") * Portal * API To view the list of resources that you have added to a stream, select its stream from your *Data Streams Inventory*. From the *Stream Details* page, click **Resources** to view the *Resource List*. ![Resources List Screenshot](https://docs.equinix.com/assets/images/resources-list-4604ca7cfb18187524ace384ef389df8.png) To get an asset's attachment details and status, send a `GET` request to the [`fabric/v4/streams/{streamId}/{asset}/{assetId}`](https://docs.equinix.com/api-catalog/fabricv4/streams/getstreamassetbyuuid.md) endpoint. Sample cURL Request: ``` curl -X 'GET' 'https://api.equinix.com/fabric/v4/streams/657400f8-d360-11e9-bb65-2a2ae2dbcce5/ports/757400f8-d360-11e9-bb65-2a2ae2dbcce6' \ -H 'accept: application/json' \ -H 'Authorization: Bearer ' ``` Sample Response: ``` {       "href": "https://api.equinix.com/fabric/v4/streams/241372e9-79c9-4ef8-b77a-8b8176c2098b4/ports/dee885d7-a845-4873-8774-f83012e7a",       "uuid": "dee885d7-a845-4873-8774-f83012e7a",       "metricsEnabled": true,       "attachmentStatus": "ATTACHED" } ``` ## Deleting an Asset Attachment[​](#deleting-an-asset-attachment "Direct link to Deleting an Asset Attachment") * Portal * API To delete a resource from a stream, select the stream from your *Data Streams Inventory*. From the *Stream Details* page, click **Resources** to view the *Resource List*. From the resource's options menu, click **Delete Resource**. ![Deleting a Resource Screenshot](https://docs.equinix.com/assets/images/delete-resource-5fa5a104fe9ef5d32e5884076830f0cc.png) To delete an asset attachment, send a `DELETE` request to the [`fabric/v4/streams/{streamId}/{asset}/{assetId}`](https://docs.equinix.com/api-catalog/fabricv4/streams/deletestreamassetbyuuid.md) endpoint. Sample cURL Request: ``` curl -X 'DELETE' 'https://api.equinix.com/fabric/v4/streams/657400f8-d360-11e9-bb65-2a2ae2dbcce5/ports/757400f8-d360-11e9-bb65-2a2ae2dbcce6' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' ``` Sample Response: ``` {       "href": "https://api.equinix.com/fabric/v4/stream/241372e9-79c9-4ef8-b77a-8b8176c2098b4/ports/dee885d7-a845-4873-8774-f83012e7a",       "uuid": "dee885d7-a845-4873-8774-f83012e7a",       "metricsEnabled": true,       "attachmentStatus": "DETACHING" } ```