Cisco Crosswork Cloud APIs

Crosswork Cloud application programming interfaces (APIs) are intended for advanced users aiming to integrate their network and operational applications with Crosswork Cloud functions. This document provides a list of available APIs and descriptions.

API access

You must have Admin privileges to view and use Crosswork Cloud APIs.

API help and documentation

To view API call definitions and documentation, you must be logged into Crosswork Cloud and either choose Help and Support icon > APIs or go to https://crosswork.cisco.com/apiDoc/CiscoCrossworkCloudAPI.

Navigate within the documentation to view more information on parameters, usage samples, and schemas that you can copy.



Network Insights APIs

These tables list available Network Insights APIs and their descriptions:

ASNs

Method type

Resource path

Description

GET

/api/v1/asns

Returns configuration data on all monitored ASNs.

POST

/api/v1/asns

Subscribes to one or more ASNs.

GET

/api/v1/asns/{asn}

Return a target ASN.

PUT

/api/v1/asns/{asn}

Update the configuration of a single ASN. All needed fields have to be specified / re-specified.

DELETE

/api/v1/asns/{asn}

Stop monitoring an ASN.

GET

/api/v1/asns/{asn}/bgp-updates

Returns BGP updates data for an ASN.

Alarms

Method type

Resource path

Description

GET

/api/v1/alarms

Get alarms. By default, only Network Insights alarms are returned. Use the category query parameter to return historical alarm data. Alarms can be retrieved using one or more alarm ids or one or more alarm types or policy types but not combinations of these values. An alarm state may also be specified and/or a time window for the alarms.

PUT

/api/v1/alarms

Update the snooze settings for one or more alarms. When the chosen action is to snooze, the snoozeType query parameter can specify whether to snooze the alarm either Once (until cleared), Indefinitely, or Until a specified interval (with the options of an hour, a day, week, or month). The Unsnooze action removes any snooze settings on the alarm(s)

GET

/api/v1/alarms/{alarmId}/bgp-updates

Get relevant bgp updates by alarm Id.

BGP

Method type

Resource path

Description

GET

/api/v1/asns/{asn}/bgp-updates

Returns BGP updates data for an ASN.

GET

/api/v1/prefixes/{prefix}/bgp-updates

Returns BGP updates data for a prefix.

Policies

Method type

Resource path

Description

GET

/api/v1/policies

Returns all policies.

POST

/api/v1/policies

Add one or more policies. Each policy needs at least one rule to be defined.

GET

/api/v1/policies/{policyId}

Returns a target policy.

PUT

/api/v1/policies/{policyId}

Update a single policy.

DELETE

/api/v1/policies/{policyId}

Delete a specific policy.

GET

/api/v1/policies/{policyId}/alarms

Return all alarms for a policy.

GET

/api/v1/policies/{policyId}/asns

Returns all asns linked to a policy.

PUT

/api/v1/policies/{policyId}/asns

Update and link one or more asns to a single policy.

PATCH

/api/v1/policies/{policyId}/asns

Link or unlink asns and a single policy.

GET

/api/v1/policies/{policyId}/peers

Returns all peers linked to a policy.

PUT

/api/v1/policies/{policyId}/peers

Update and link one or more peers to a single policy.

GET

/api/v1/policies/{policyId}/prefixes

Returns all prefixes linked to a policy.

PUT

/api/v1/policies/{policyId}/prefixes

Update and link one or more prefixes to a single policy.

PATCH

/api/v1/policies/{policyId}/prefixes

Link or unlink prefixes and a single policy.

GET

/api/v1/policies/{policyId}/rules

Get all the alarm rules configured for a single policy.

POST

/api/v1/policies/{policyId}/rules

Add a new rule to an existing policy. Only one instance of an alarm rule type is permitted per policy and that rule is identified by the rule type.

PUT

/api/v1/policies/{policyId}/rules/{ruleType}

Update an existing alarm rule on a policy. The rule to be updated is identified by its alarm rule type.

DELETE

/api/v1/policies/{policyId}/rules/{ruleType}

Delete an existing alarm rule on a policy. The rule to be updated is identified by its alarm rule type.

Prefixes

Method type

Resource path

Description

GET

/api/v1/prefixes

Return a list of all subscribed prefixes.

POST

/api/v1/prefixes

Subscribe to one or more prefixes.

PUT

/api/v1/prefixes

Update multiple prefixes. This API should be used for bulk updates.

DELETE

/api/v1/prefixes

Unsubscribe multiple prefixes in a single call. This should be used for bulk unsubscribes.

GET

/api/v1/prefixes/{prefix}

Return a target prefix.

PUT

/api/v1/prefixes/{prefix}

Update a single prefix. Use this API to add a description, add tags, or associate a policyId with a prefix.

DELETE

/api/v1/prefixes/{prefix}

Unsubscribe a single prefix.

GET

/api/v1/prefixes/{prefix}/bgp-updates

Returns BGP updates data for a prefix.

ROVs

Method type

Resource path

Description

GET

/api/v1/rovs/unknown/asns/{asn}

Get ROVs with unknown status for an ASN.

When an ROV has an unknown status, it means the router could not confirm the route’s authenticity because no associated Route Origin Authorization (ROA) was found.

GET

/api/v1/rovs/non-compliant/roa-asns/{roa_asn}

Get non-compliant ROVs for a ROA ASN.

When an ROV has a non-compliant status, it means the router could not validate the route because it does not comply with any existing Route Origin Authorization (ROA).

GET

/api/v1/rovs/non-compliant/asns/{asn}

Get non-compliant ROVs for an ASN.

GET

/api/v1/rovs/non-compliant/prefixes/{prefix}

Get non-compliant ROVs for a prefix.

Trust Insights APIs

These tables list available Trust Insights APIs and their descriptions:

Alarms

Method type

Resource path

Description

GET

/api/v1/alarms

Get Trust alarms. Add featureType=FEATURE_TYPE_CCTI to get Trust alarms. Use the category query parameter to return historical alarm data. Alarms can be retrieved using one or more alarm ids or one or more alarm types or policy types but not combinations of these values. An alarm state may also be specified and/or a time window for the alarms.

PUT

/api/v1/alarms

Update the snooze settings for one or more alarms. When the chosen action is to snooze, the snoozeType query parameter can specify whether to snooze the alarm either Once (until cleared), Indefinitely, or Until a specified interval (with the options of an hour, a day, week, or month). The Unsnooze action removes any snooze settings on the alarm(s)

Credentials

Method type

Resource path

Description

GET

/api/v1/credentials

Get all device credentials.

POST

/api/v1/credentials

Add one or more new sets of credentials.

GET

/api/v1/credentials/{credentialId}

Return a target credential.

PUT

/api/v1/credentials/{credentialId}

Update an existing credential.

DELETE

/api/v1/credentials/{credentialId}

Delete a credential.

PATCH

/api/v1/credentials/{credentialId}/devices

Link or unlink devices and a single credential.

GET

/api/v1/credentials/{credentialId}/devices

Get devices linked to a credential.

PUT

/api/v1/credentials/{credentialId}/devices

Link one or more devices to a credential.

DELETE

/api/v1/credentials/{credentialId}/devices/{deviceId}

Unlink a single device from a credential.

Data Gateways

Method type

Resource path

Description

GET

/api/v1/gateways/

Get all data gateways.

POST

/api/v1/gateways/

Add new data gateways. Adding gateways is achieved in two unique ways. Follow usage examples.

GET

/api/v1/gateways/{gatewayId}

Get a specific data gateway.

PUT

/api/v1/gateways/{gatewayId}

Update an existing gateway.

DELETE

/api/v1/gateways/{gatewayId}

Delete a data gateway.

PATCH

/api/v1/gateways/{gatewayId}/devices/

Link or unlink devices and a single credential.

GET

/api/v1/gateways/{gatewayId}/devices/

Get devices linked to a credential.

PUT

/api/v1/gateways/{gatewayId}/devices/

Link one or more devices to a credential.

DELETE

/api/v1/gateways/{gatewayId}/devices/{deviceId}

Unlink a single device from a credential.

Devices

Method type

Resource path

Description

GET

/api/v1/devices

Get a list of all configured devices.

POST

/api/v1/devices

Add new devices.

GET

/api/v1/devices/{deviceId}

Get a specific device.

PUT

/api/v1/devices/{deviceId}

Update an existing device.

DELETE

/api/v1/devices/{deviceId}

Delete an existing device.

PUT

/api/v1/devices/{deviceId}/policies

Link a policy to a device

DELETE

/api/v1/devices/{deviceId}/policies/{policyId}

Unlink a policy from a device

Enrollment Tokens

Method type

Resource path

Description

GET

/api/v1/enrollment-tokens

Get a list of all configured enrollment tokens.

POST

/api/v1/enrollment-tokens

Add an enrollment token.

DELETE

/api/v1/enrollment-tokens

Delete an enrollment token. Deleting the token will also delete the associated pending enrollments. To delete the token and associated enrollments set revokePendingEnrollments to true

GET

/api/v1/enrollment-tokens/{tokenId}

Get a specific enrollment token.

GET

/api/v1/enrollment-tokens/{tokenId}/enrollments

Get pending enrollments for a specific enrollment token

Policies

Method type

Resource path

Description

GET

/api/v1/policies

Returns all policies.

POST

/api/v1/policies

Add one or more policies. Each policy needs at least one rule to be defined.

GET

/api/v1/policies/{policyId}

Returns a target policy.

PUT

/api/v1/policies/{policyId}

Update a single policy.

DELETE

/api/v1/policies/{policyId}

Delete a specific policy.

GET

/api/v1/policies/{policyId}/devices

Returns all devices of a policy. Monitored or linked devices are shown. Ignored devices are not part of the response

PUT

/api/v1/policies/{policyId}/devices

Link devices to a specific policy.

PATCH

/api/v1/policies/{policyId}/devices

Link or unlink devices from a specified policy.

DELETE

/api/v1/policies/{policyId}/devices/{deviceId}

Unlink a single device from a specified policy.

GET

/api/v1/policies/{policyId}/gateways

Only returns default gateway policy information. Monitored or linked gateways are shown. Ignored gateways are not part of the response

PUT

/api/v1/policies/{policyId}/gateways

Link gateways to a specific policy.

PATCH

/api/v1/policies/{policyId}/gateways

Link or unlink gateways from a specified policy.

DELETE

/api/v1/policies/{policyId}/gateways/{gatewayId}

Unlink a single gateway from a specified policy.

GET

/api/v1/policies/{policyId}/rules

Get all the alarm rules configured for a single policy.

POST

/api/v1/policies/{policyId}/rules

Add a new rule to an existing policy. Only one instance of an alarm rule type is permitted per policy and that rule is identified by the rule type.

PUT

/api/v1/policies/{policyId}/rules/{ruleType}

Update an existing alarm rule on a policy. The rule to be updated is identified by its alarm rule type.

DELETE

/api/v1/policies/{policyId}/rules/{ruleType}

Delete an existing alarm rule on a policy. The rule to be updated is identified by its alarm rule type.

Traffic Analysis APIs

These tables list available Traffic Analysis APIs and their descriptions:

Alarms

Method type

Resource path

Description

GET

/api/v1/alarms

Get all Traffic Analysis alarms. Alarms can be retrieved using one or more alarm IDs or one or more alarm types, but cannot be retrieved using a combination of these values. An alarm status can be retrieved for a specific or duration of time for the alarms.

PUT

/api/v1/alarms

You can update the snooze settings for one or more alarms. You can specify whether to snooze the alarm either once (until cleared), indefinitely, or until a specified interval (hour, a day, week, or month). The Unsnooze action removes any snooze settings on the alarm(s)
Traffic

Method type

Resource path

Description

GET

/api/v1/devices/statistics/totals

Get SNMP counter traffic by device

GET

/api/v1/devices/{deviceId}/interfaces/statistics/totals

Get SNMP counter traffic by interface for a specified device

GET

/api/v1/devices/{deviceId}/interfaces/{interface}/statistics/totals

Get SNMP counter traffic for a specified interface

GET

/api/v1/devices/{deviceId}/statistics/totals

Get SNMP counter traffic for a specified device

GET

/api/v1/traffic/devices/{deviceId}/interfaces/{interface}/asns

Get Netflow traffic by asn for a specified interface

GET

/api/v1/traffic/devices/{deviceId}/interfaces/{interface}/asns/{asn}

Get Netflow traffic for a specified ASN on a specified interface

GET

/api/v1/traffic/devices/{deviceId}/interfaces/{interface}/asns/{asn}/prefixes

Get Netflow traffic by prefix for a specified asn on a specified interface

GET

/api/v1/traffic/devices/{deviceId}/interfaces/{interface}/asns/{asn}/prefixes/{prefix}

Get Netflow traffic for a specified prefix for a specified asn on a specified interface

GET

/api/v1/traffic/devices/{deviceId}/interfaces/{interface}/prefixes

Get netflow traffic by prefix for a specified interface

GET

/api/v1/traffic/devices/{deviceId}/interfaces/{interface}/prefixes/{prefix}

Get Netflow traffic for a specified prefix on a specified interface

GET

/api/v1/traffic/devices/{deviceId}/interfaces/{interface}/prefixes

Get Netflow traffic by prefix for a specified interface

GET

/api/v1/traffic/devices/{deviceId}/interfaces/{interface}/prefixes/{prefix}

Get Netflow traffic for a specified prefix on a specified interface

GET

/api/v1/traffic/prefixes

Get Netflow traffic by prefix

GET

/api/v1/traffic/prefixes/{prefix}

Get Netflow traffic for a specified prefix

GET

/api/v1/traffic/prefixes/{prefix}/devices

Get Netflow traffic for a specified prefix by device

GET

/api/v1/traffic/prefixes/{prefix}/devices/{deviceId}

Get Netflow traffic for a specified prefix by device

GET

/api/v1/traffic/prefixes/{prefix}/devices/{deviceId}/interfaces

Get Netflow traffic for a specified prefix and device by interface

GET

/api/v1/traffic/prefixes/{prefix}/devices/{deviceId}/interfaces/{interface}

Get Netflow traffic for a specified prefix and device and interface