Skip to main content
REST API reference
A newer release of this product is available.

Manage netgroup cache settings

Retrieve and manage netgroup cache settings to optimize name service queries within your ONTAP environment. Use these endpoints to access current settings and modify cache configurations as needed for specific storage virtual machines (SVMs).

Overview

This API is used to retrieve and manage netgroups cache settings.

Examples

Retrieving a netgroup cache setting


The following example shows how to use the cache netgroup settings GET endpoint to retrieve netgroup cache settings.

# The API:
GET /api/name-services/cache/netgroup/settings

# The call:
curl -X GET "https://<mgmt-ip>/api/name-services/cache/netgroup/settings?fields=*" -H "accept: application/hal+json"

# The response:
{
"records": [
  {
    "svm": {
      "uuid": "8a1a8730-2036-11ec-8457-005056bbcfdb",
      "name": "vs43"
    },
    "enabled": true,
    "negative_cache_enabled_byhost": true,
    "ttl_byhost": "P1D",
    "negative_ttl_byhost": "PT30M",
    "ttl_for_members": "PT30M"
  },
  {
    "svm": {
      "uuid": "dc458b2f-2035-11ec-bfe2-005056bb6bef",
      "name": "vs34"
    },
    "enabled": true,
    "negative_cache_enabled_byhost": true,
    "ttl_byhost": "PT2H",
    "negative_ttl_byhost": "PT30M",
    "ttl_for_members": "PT30M"
  }
],
"num_records": 2
}

Retrieving a netgroup cache setting for a given SVM


The following example shows how to use the cache netgroup settings GET endpoint to retrieve netgroup cache settings for a given SVM.

# The API:
GET /api/name-services/cache/netgroup/settings/{svm.uuid}

# The call:
curl -X GET "https://<mgmt-ip>/api/name-services/cache/netgroup/settings/dc458b2f-2035-11ec-bfe2-005056bb6bef" -H "accept: application/hal+json"

# The response:
{
"svm": {
  "uuid": "dc458b2f-2035-11ec-bfe2-005056bb6bef",
  "name": "vs34"
},
"enabled": true,
"negative_cache_enabled_byhost": true,
"ttl_byhost": "P1D",
"negative_ttl_byhost": "PT30M",
"ttl_for_members": "PT30M"
}

Updating a netgroup cache setting


The following example shows how to use the cache netgroup settings PATCH endpoint to update netgroup cache settings.

# The API:
PATCH /api/name-services/cache/netgroup/settings/{svm.uuid}

# The call:
curl -X PATCH "https://<mgmt-ip>/api/name-services/cache/netgroup/settings/02c9e252-41be-11e9-81d5-00a0986138f9" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"ttl_byhost\": \"PT2H\", \"negative_ttl_byhost\": \"PT2M\" }"