TheJumpCloud / jcapi-python

21 stars 20 forks source link

Attributes not returned by graph_system_associations_list #51

Open pwillie opened 3 years ago

pwillie commented 3 years ago

When listing system associations attributes are not returned.

https://github.com/TheJumpCloud/jcapi-python/blob/master/jcapiv2/docs/GraphApi.md#graph_system_associations_list

Steps to reproduce is to follow example in documentation.

Curl returns attributes:

curl -X GET https://console.jumpcloud.com/api/v2/systems/{System_ID}/associations?targets=user -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'x-api-key: {API_KEY}'

SDK returns objects without attributes:

from __future__ import print_function
import jcapiv2
from jcapiv2.rest import ApiException
from pprint import pprint

configuration = jcapiv2.Configuration()
configuration.api_key['x-api-key'] = '{API_KEY}'

api_instance = jcapiv2.GraphApi(jcapiv2.ApiClient(configuration))
system_id = '{System_ID}'  # str | ObjectID of the System.
content_type = 'application/json'  # str |  (default to application/json)
accept = 'application/json'  # str |  (default to application/json)
targets = ['user']  # list[str] |

try:
    # List the associations of a System
    api_response = api_instance.graph_system_associations_list(
        system_id, content_type, accept, targets)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GraphApi->graph_system_associations_list: %s\n" % e)