Problem with API call method

curl -k -H “X-Auth-Token: e_Rtq7LB-xxxxxxx”
-H “X-User-Id: xxxxxx”
-H “Content-type:application/json”
https://chat.xxxx.com.br/api/v1/settings/LDAP_Sync_Now
-d ‘{ “value”: “method”, “execute”: true}’

i got the error
{“success”:false,“error”:“Method ‘method’ not found [404]”,“errorType”:404}

@lucassmacedo did you try the docs about this endpoint? You only have pass this “method” property if you want execute an action in the backend, but to be able to do this, you should provide a valid method name(Meteor method) and the setting you are updating the value MUST be an action.

Ok… so how a call Ldap Sync ?? Im lost

Got it! Powershell:

$Headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$Headers.Add("X-Auth-Token", $connect_token)
$Headers.Add("X-User-ID", $connect_id)

$body = @{
    value = "method"
    execute = "$true"
}
$body = $body | ConvertTo-Json -Depth 2 
Invoke-RestMethod -Headers $Headers "$connect_url/api/v1/settings/LDAP_Sync_Now" -Method Post -Body $body -ContentType 'application/json'