API Abfrage - Primary contact - no title
-
Hallo,
via API versuche ich eine Sever-Liste mit Namen und Primär Kontakt zu bekommen. Lieder bekomme ich nur ID (also connection_id) ohne Name/Title bei primary_contact zurück.
Gibt es noch eine Möglichkeit den Primären Kontaktnamen raus zu kriegen?
Viele Grüße
CherifRequest:
{ "method": "cmdb.objects.read", "params": { "apikey": "xxx", "filter": { "type": [59], "status": "C__RECORD_STATUS__NORMAL" }, "categories":["C__CATG__GLOBAL","C__CATG__CONTACT"], "language": "en" }, "id": 1, "version": "2.0" }Response:
... }, "primary_contact": "20054", "contact_object": { "title": "Max Ali", "id": "37", "connection_id": "20054", "type": "C__OBJTYPE__PERSON", "type_title": "Persons", "sysid": "SYSID_100007" }, "primary": { "value": "1", "title": "Yes" }, "role": { "id": "5", "title": "Contact partner", "const": "C__CONTACT_TYPE__CONTACT", "title_lang": "LC__CMDB__CONTACT__ROLE__CONTACT" }, "contact_list": "20054", "contact_list_with_roles": "20054", "description": null }, ... -
Moin
Erstelle dir doch einfach einen Bericht in i-doit über den Report Manager und lese den aus.
{ "version": "2.0", "method": "cmdb.reports.read", "params": { "language": "en", "apikey": "meinkey", "id": "112" <---- report id }, "id": 1 }Report konfigurieren

Ergebnis:
{ "id": 1, "jsonrpc": "2.0", "result": [ { "Title": "srv-erp", "Contact": "Pattrick Bluhm", "Primary": "Yes" }, { "Title": "srv-dc1", "Contact": "Heike Müller", "Primary": "Yes" } ] }
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login