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

    API Abfrage - Primary contact - no title

    Scheduled Pinned Locked Moved Entwicklung
    2 Posts 2 Posters 2.0k 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.
    • cherifC 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"
        		}
        	]
        }
        

        Das perfekte Team: i-doit, JDISC und Zammad

        1 Reply Last reply Reply Quote 0

        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
        • First post
          Last post