ONTAP Rest API Discussions

PATCH /protocols/cifs/services/{svm.uuid} not working

chris_tsys
900 Views

Hi,

 

i´m runnon on NetApp Release 9.13.1

 

my cifs server is in workgoup mode and down:

 

 

 

cifs show -vserver fcivsbc0036020

Vserver: fcivsbc0036020
CIFS Server NetBIOS Name: FCIVSBC0036020
NetBIOS Domain/Workgroup Name: BLUBB
Fully Qualified Domain Name: -
Organizational Unit: -
Default Site Used by LIFs Without Site Membership: -
Workgroup Name: BLUBB
Authentication Style: workgroup
CIFS Server Administrative Status: down
CIFS Server Description:
List of NetBIOS Aliases: -

 

 


if i want to join to domain (if computer account exist in AD, you need to do cifs modify - so PATCH)

 

 

 

curl -X PATCH "https://<ip>/api/protocols/cifs/services/5806fc7e-5932-11ee-a25a-d039ea3cdef6?return_timeout=120" -H "accept: application/json" -H "authorization: Basic xxx" -H "Content-Type: application/json" -d "{\"ad_domain\":{\"user\":\"Administrator\",\"password\":\"xxx\",\"organizational_unit\":\"CN=Computers,DC=tn01,DC=local\",\"fqdn\":\"TN01.local\"},\"name\":\"FCIVSBC0036020\"}"

 

the body in bette readable way:

{
  'ad_domain' => {
                   'fqdn' => 'TN01.local',
                   'organizational_unit' => 'CN=Computers,DC=tn01,DC=local',
                   'password' => 'xxx',
                   'user' => 'Administrator'
                 },
  'name' => 'FCIVSBC0036020'
}

 

i´m getting immediately this error: (usually cifs modify/create takes some seconds)

 

 

{
  "error": {
    "message": "entry doesn't exist",
    "code": "4",
    "target": "svm.uuid"
  },
  "job": {
    "uuid": "9739bf9d-6e5c-11ee-a25a-d039ea3cdef6",
    "_links": {
      "self": {
        "href": "/api/cluster/jobs/9739bf9d-6e5c-11ee-a25a-d039ea3cdef6"
      }
    }
  }
}

 

 

what am i doing wrong? can someone help?

1 REPLY 1

Twesha
611 Views

Hi, can you do a get on /api/svm/svms/{uuid} with the svm uuid you passed in to the /api/protocols/cifs/services endpoint? The error you are getting shows that there is no svm with that uuid. So, doing a get on /svm/svms/{uuid} will confirm whether or not that svm exists. 

Public