Use the updateSiteGeneralDetails mutation API to update the following settings in the General section for a site in the Cato Management Application (Network > Sites > {site name} > Site Configuration > General)
This account ID isn't shown in the Cato Management Application, instead it is the number in the URL for the Cato Management Application. For example, the account ID is 26 for the following URL: https://cc.catonetworks.com/#!/26/topology.
Enter this ID in the accountId
argument for the site creation API, for example:
site(accountId: 26) { addSocketSite(input: $addSocketSite) { siteId } }
The site ID isn't shown in the Cato Management Application, you can locate the site ID:
-
Using the entityLookup API query (see Cato API - EntityLookup), use the
type
with the value siteYou can also use the
search
parameter with the value as the name of the site, and the query returns the site ID -
Number in the URL for the Cato Management Application, when you selected a site (Network > Sites > {site name}). For example, the site ID is 12345 for the following URL: https://cc.catonetworks.com/#/26/sites/12345/networkAnalytics
These are the arguments for updating the following General settings for a site using the Cato configuration API. The arguments are mandatory unless marked as optional:
-
name - Name of the site
-
siteType - Type of site in your organization, for example Cloud Data Center
-
description - (optional) Description of the site
-
siteLocation - Data about the physical location of the site
The siteType
is an enum argument that defines the type of site which determines which icon is used for the site in the Monitoring > Topology screen in the Cato Management Application.
The siteLocation
arguments define the following physical details for the site. The countryCode
is relevant to the number of site licenses that are available for a specific Region in your account.
You can use the entityLookup API query to retrieve values for these arguments, see Cato API - EntityLookup.
mutation updateSiteGeneralDetails ($accountId: ID!, $siteID: ID!, $input: UpdateSiteGeneralDetailsInput!) { site(accountId: $accountId) { updateSiteGeneralDetails (siteId: $siteID, input: $input) { siteId } } }
GraphQL Variables
{ "accountId": "", "siteID": "", "input": { "name": "MySite", "description": "My first DC using the API", "siteType": "DATACENTER", "siteLocation": { "countryCode": "FR", "timezone": "Europe/Paris" } } }
Related Resources
0 comments
Please sign in to leave a comment.