Community
    • Categories
    • Recent
    • Popular
    • Users
    • Search
    • Register
    • Login

    API Abfrage - Primary contact - no title

    Scheduled Pinned Locked Moved Entwicklung
    2 Posts 2 Posters 129 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C Offline
      cherif
      last edited by

      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
      Cherif

      Request:

      {    
      	
          "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
                },
      ...
      
      1 Reply Last reply Reply Quote 0
      • P.BluhmP Offline
        P.Bluhm i-doit Kenner
        last edited by P.Bluhm

        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
        fc6b4012-577c-4251-ad23-9f5abb7fb138-grafik.png

        Ergebnis:

        {
        	"id": 1,
        	"jsonrpc": "2.0",
        	"result": [
        		{
        			"Title": "srv-erp",
        			"Contact": "Pattrick Bluhm",
        			"Primary": "Yes"
        		},
        		{
        			"Title": "srv-dc1",
        			"Contact": "Heike Müller",
        			"Primary": "Yes"
        		}
        	]
        }
        
        1 Reply Last reply Reply Quote 0
        • First post
          Last post