Das geht nicht per admin-cli.php sondern nur per REST API:
Dazu musst Du allerdings erst mal die URL bzw. ID des zugehörigen Kontaktes eines Benutzerkontos heraus finden:
RalfsMac:epl-23.1 ralf$ curl -i 'https://boulder.egroupware.org/egroupware/groupdav.php/addressbook-accounts/?filters\[account_id\]=5' -H 'Accept: application/pretty+json' --user ralf
HTTP/1.1 200 OK
Server: nginx/1.26.2
Date: Sat, 17 Aug 2024 08:41:57 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
X-Dav-Powered-By: EGroupware 23.1.008 CalDAV/CardDAV/GroupDAV server
X-Content-Type-Options: nosniff
{
"responses": {
"/addressbook-accounts/46": {
"@type": "Card",
"uid": "addressbook-46-8623c4830472a8ede9f9f8b30d435ea4",
"prodId": "EGroupware Addressbook 23.1.008",
"created": "2006-06-15T15:42:07Z",
"updated": "2023-06-05T15:08:13Z",
"kind": "individual",
"name": [
{
"@type": "NameComponent",
"type": "personal",
"value": "Ralf"
},
{
"@type": "NameComponent",
"type": "surname",
"value": "Becker"
}
],
"fullName": "Ralf Becker",
"organizations": {
"org": {
"@type": "Organization",
"name": "EGroupware GmbH",
"units": { "org_unit": "IT-Abteilung" }
}
},
"titles": {
"title": {
"@type": "Title",
"title": "Geschäftsführer",
"organization": "org"
},
"role": {
"@type": "Title",
"title": "Occupation",
"organization": "org"
}
},
"emails": {
"work": {
"@type": "EmailAddress",
"email": "ralf@boulder.egroupware.org",
"contexts": { "work": true },
"pref": 1
},
"private": {
"@type": "EmailAddress",
"email": "ralf@digitalrock.de",
"contexts": { "private": true }
}
},
"phones": {
"tel_work": {
"@type": "Phone",
"phone": "+49 | 631 | 31657-16",
"features": { "voice": true },
"contexts": { "work": true }
},
....
Dh. für meinen Benutzer mit der ID #5 ist das die (relative) URL /addressbook-accounts/46
bzw. Kontakt-ID #46.
Damit kann ich dann alle Felder des Kontakts ändern z.B. die primäre/geschäftliche Telefonnummer:
RalfsMac:epl-23.1 ralf$ cat <<EOF | curl -i 'https://boulder.egroupware.org/egroupware/groupdav.php/addressbook-accounts/46' -X PATCH -d @- -H "Content-Type: application/json" -H "Prefer: return=representation" -H "Accept: application/pretty+json" --user ralf
{
"phones/tel_work/phone": "+49 123 4567890",
"emails/home/email": "ralf@digitalrock.de"
}
EOF
HTTP/1.1 200 OK
Server: nginx/1.26.2
Date: Sat, 17 Aug 2024 08:53:06 GMT
Content-Type: application/jscontact+json;type=card;charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
X-Dav-Powered-By: EGroupware 23.1.008 CalDAV/CardDAV/GroupDAV server
Content-Encoding: identity
ETag: "46:188"
X-WebDAV-Status: 200 Ok
X-Content-Type-Options: nosniff
{
"@type": "Card",
"uid": "addressbook-46-8623c4830472a8ede9f9f8b30d435ea4",
"prodId": "EGroupware Addressbook 23.1.008",
"created": "2006-06-15T15:42:07Z",
"updated": "2024-08-17T08:53:06Z",
"kind": "individual",
"name": [
{
"@type": "NameComponent",
"type": "personal",
"value": "Ralf"
},
{
"@type": "NameComponent",
"type": "surname",
"value": "Becker"
}
],
"fullName": "Ralf Becker",
"organizations": {
"org": {
"@type": "Organization",
"name": "EGroupware GmbH",
"units": { "org_unit": "IT-Abteilung" }
}
},
"titles": {
"title": {
"@type": "Title",
"title": "Geschäftsführer",
"organization": "org"
},
"role": {
"@type": "Title",
"title": "Occupation",
"organization": "org"
}
},
"emails": {
"work": {
"@type": "EmailAddress",
"email": "ralf@boulder.egroupware.org",
"contexts": { "work": true },
"pref": 1
},
"private": {
"@type": "EmailAddress",
"email": "ralf@digitalrock.de",
"contexts": { "private": true }
}
},
"phones": {
"tel_work": {
"@type": "Phone",
"phone": "+49 123 4567890",
"features": { "voice": true },
"contexts": { "work": true }
},
....
Ich benutze -H "Prefer: return=representation" -H "Accept: application/pretty+json"
um von der REST API direkt den geänderten Kontakt zurück zu bekommen um zu sehen ob meine Änderung funktioniert hat.
Leider gibt es aktuell noch keine Möglichkeit Benutzer direkt per REST API anzulegen einschl. aller Kontaktdaten. Ist auf meiner Liste und braucht nur jemanden der das beauftragt
Ralf