Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    Manipulating categories via GRAPI

    Scripting
    2
    4
    541
    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.
    • rdd2
      rdd2 last edited by

      I am trying to create calendar entries via GRAPI and assign them a category. If I create the entry with

              payload = {
                  "subject": subject,
                  "start": {
                      "dateTime": startDatetime.isoformat(),
                      "timeZone": "CET"
                  },
                  "end": {
                      "dateTime": endDatetime.isoformat(),
                      "timeZone": "CET"
                  },
                  "location":{
                      "displayName": location
                  },
                  "categories": [
                      'CategoryName'    
                  ]
              }
      

      no category is assigned, even though an identically named category exists and is selectable in the webapp. If I assign the category to an existing event via the webapp, and then pull the event out of GRAPI, the JSON looks like this:

      {'@odata.etag': 'W/"IAptvLHWS1Wr2wmJEHAVY9kBAAA="',
                  'attendees': [],
                  'body': {'content': '', 'contentType': 'html'},
                  'bodyPreview': None,
                  'categories': [], # <--- NO CATEGORIES
                  'changeKey': 'IAptvLHWS1Wr2wmJEHAVY9kBAAA=',
                  'createdDateTime': '2020-02-07T14:35:35Z',
                  'end': {'dateTime': '2020-02-07T12:20:00', 'timeZone': 'UTC'},
                  'hasAttachments': False,
                  'iCalUId': None,
                  'id': 'ADAAAAAAAH2IZEfocUQFl4vY4E_EMtcBAAAABQAAAJNdYRan5EOuhIgy8oZqUm0AAAAA',
                  'importance': 'normal',
                  'isAllDay': None,
                  'isOrganizer': True,
                  'isReminderOn': False,
                  'lastModifiedDateTime': '2020-02-07T14:35:35Z',
                  'location': {'displayName': '3.11', 'locationType': 'default'},
                  'onlineMeetingUrl': '',
                  'organizer': {'emailAddress': {'address': a@b.com',
                                                 'name': 'a.b'}},
                  'recurrence': None,
                  'reminderMinutesBeforeStart': None,
                  'responseRequested': False,
                  'responseStatus': {'response': 'None',
                                     'time': '0001-01-01T00:00:00Z'},
                  'sensitivity': 'Normal',
                  'seriesMasterId': None,
                  'showAs': 'Unknown',
                  'start': {'dateTime': '2020-02-07T11:35:00', 'timeZone': 'UTC'},
                  'subject': 'SUBJECT',
                  'type': 'singleInstance'}]}
      

      The categories endpoint as defined by Graph is 404 and the COMPAT.md of GRAPI makes no mention of categories.

      Am I missing something fundamental or is this not implemented? I’m grateful for any pointers.

      rdd2

      1 Reply Last reply Reply Quote 0
      • longsleep
        longsleep Kopano last edited by

        Hi,

        setting categories is currently not supported via GRAPI. GRAPI responses return categories if they are set by other means.

        Can you share some details of your use case to help us getting an understanding how GRAPI users want to use categories.

        Thank you and best regards
        Simon

        1 Reply Last reply Reply Quote 0
        • rdd2
          rdd2 last edited by

          Hi Simon,
          thanks for your answer. GRAPI seems not the way to go. I am building a tool to programmatically import a large number of events. Going to try the python-kopano route. Categories are working fine there.

          Are there any plans to implement setting categories via GRAPI?
          Best regards
          Thomas

          longsleep 1 Reply Last reply Reply Quote 0
          • longsleep
            longsleep Kopano @rdd2 last edited by

            @rdd2 said in Manipulating categories via GRAPI:

            Are there any plans to implement setting categories via GRAPI?

            Yes - we add features to GRAPI as we need them for our apps or for customer projects.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post