From 69199376daec5cbde4a676a0db14413519df8d07 Mon Sep 17 00:00:00 2001 From: Renaud Amar Date: Fri, 16 Mar 2018 10:59:12 -0600 Subject: [PATCH 1/6] Use swagger-codegen 2.3.1 No changes for Go, apart from a copy of the yaml which is really helpful to track down changes. --- CONTRIBUTING.md | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 96c2459..9cc38dc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,7 +3,7 @@ This repository relies on the following docker file in order to run swagger-codegen inside a docker container: https://hub.docker.com/r/jimschubert/swagger-codegen-cli/ -We're currently using the version 2.3.0 of swagger-codegen. +We're currently using the version 2.3.1 of swagger-codegen. ### Generating the API Client diff --git a/docker-compose.yml b/docker-compose.yml index 0299be3..8b71bcf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '2' services: swagger-codegen: - image: jimschubert/swagger-codegen-cli:latest + image: jimschubert/swagger-codegen-cli:2.3.1 volumes: - ./input:/swagger-api/yaml # volume for input yaml files - ./output:/swagger-api/out # volume for generated files From 202e6c9d4b9f4540c185327cd7e4a4bcf3671b59 Mon Sep 17 00:00:00 2001 From: Renaud Amar Date: Wed, 21 Mar 2018 15:17:46 -0600 Subject: [PATCH 2/6] Small change to CONTRIBUTING instructions --- CONTRIBUTING.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9cc38dc..d98c25d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,11 +14,15 @@ The API v2 json/yaml spec can be found using the StopLight export link on our do To generate the API v2 client, run the command below (assuming your API v2 yaml file is `input/index2.yaml`): ``` -$ docker-compose run --rm swagger-codegen generate -i /swagger-api/yaml/index2.yaml -l go -c /config/config_v2.json -o /swagger-api/out/v2 +docker-compose run --rm swagger-codegen generate -i /swagger-api/yaml/index2.yaml -l go -c /config/config_v2.json -o /swagger-api/out/v2 ``` This will generate the API v2 client files under `output/v2` -Once you are satisfied with the generated API client, you can replace the existing files under the `v2` folder with your generated files. +Once you are satisfied with the generated API client, you can replace the existing files under the `v2` folder with your generated files: +``` +rm -rf v2 +mv output/v2 . +``` There currently is a bug with swagger-codegen where it generates redundant enums for certain structures (namely GraphType and GroupType). Make sure to run the following commands in order to remove the enums declarations: From 70abfc66d617590e727615ac6726f52052f83732 Mon Sep 17 00:00:00 2001 From: Renaud Amar Date: Wed, 21 Mar 2018 15:30:01 -0600 Subject: [PATCH 3/6] Regenerate API v2 with latest published yaml Main changes: - lots of docs changes - workday endpoints - enable following missing traversal endpoints: api/v2/systems/{systemID}/commands api/v2/systemgroups/{systemgroup_ID}/commands api/v2/users/{user_ID}/systemgroups api/v2/systems/{system_ID}/usergroups - misc cleanups --- v2/.swagger-codegen/VERSION | 2 +- v2/README.md | 238 +- v2/active_directory_api.go | 203 +- v2/active_directory_input.go | 7 +- v2/active_directory_output.go | 7 +- v2/api/swagger.yaml | 10896 ++++++++++++++++ v2/api_client.go | 32 +- v2/api_response.go | 7 +- v2/applications_api.go | 108 +- v2/auth_info.go | 19 + ...workday_report_result.go => auth_input.go} | 13 +- ...e_response_200.go => auth_input_object.go} | 11 +- v2/authinput_basic.go | 17 + v2/authinput_oauth.go | 15 + v2/bulk_job_requests_api.go | 206 + v2/commands_api.go | 108 +- v2/configuration.go | 36 +- v2/directories_api.go | 51 +- v2/directory.go | 7 +- v2/docs/ActiveDirectoryApi.md | 38 +- v2/docs/ApplicationsApi.md | 24 +- v2/docs/AuthInfo.md | 12 + v2/docs/{Body.md => AuthInput.md} | 7 +- ...kdayReportResult.md => AuthInputObject.md} | 5 +- v2/docs/AuthinputBasic.md | 11 + ...InlineResponse200.md => AuthinputOauth.md} | 4 +- v2/docs/BulkJobRequestsApi.md | 82 + v2/docs/CommandsApi.md | 24 +- v2/docs/DirectoriesApi.md | 8 +- v2/docs/GSuiteApi.md | 24 +- v2/docs/GraphApi.md | 634 +- v2/docs/GroupsApi.md | 10 +- v2/docs/JobDetails.md | 13 + v2/docs/{WorkdaysOauth.md => JobId.md} | 4 +- v2/docs/JobWorkresult.md | 12 + v2/docs/LDAPServersApi.md | 38 +- v2/docs/Office365Api.md | 24 +- v2/docs/PoliciesApi.md | 116 +- v2/docs/PolicytemplatesApi.md | 14 +- v2/docs/RADIUSServersApi.md | 32 +- v2/docs/SambaDomainInput.md | 2 +- v2/docs/SambaDomainOutput.md | 2 +- v2/docs/SambaDomainsApi.md | 38 +- v2/docs/SystemGraphManagementReq.md | 13 + v2/docs/SystemGraphManagementReqAttributes.md | 10 + .../SystemGraphManagementReqAttributesSudo.md | 11 + v2/docs/SystemGroupAssociationsApi.md | 267 + v2/docs/SystemGroupMembersMembershipApi.md | 185 + v2/docs/SystemGroupsApi.md | 84 +- v2/docs/SystemsApi.md | 126 +- v2/docs/UserGraphManagementReq.md | 13 + v2/docs/UserGroupAssociationsApi.md | 482 + v2/docs/UserGroupMembersMembershipApi.md | 183 + .../{UserGroupData.md => UserGroupPost.md} | 4 +- ...tributes.md => UserGroupPostAttributes.md} | 4 +- ... => UserGroupPostAttributesPosixGroups.md} | 2 +- v2/docs/UserGroupPut.md | 11 + v2/docs/UserGroupPutAttributes.md | 10 + v2/docs/UserGroupsApi.md | 118 +- v2/docs/UsersApi.md | 115 +- v2/docs/WorkdayFields.md | 11 + .../{WorkdayApi.md => WorkdayImportApi.md} | 200 +- v2/docs/WorkdayInput.md | 2 +- v2/docs/WorkdayOutput.md | 9 +- v2/docs/WorkdayWorker.md | 14 + v2/docs/Workdayimportresult.md | 11 + v2/docs/WorkdayimportresultResult.md | 10 + v2/docs/WorkdayoutputAuth.md | 11 + v2/g_suite_api.go | 108 +- v2/git_push.sh | 2 +- v2/graph_api.go | 2372 ++-- v2/graph_connection.go | 7 +- v2/graph_management_req.go | 7 +- v2/graph_object.go | 7 +- v2/graph_object_with_paths.go | 7 +- v2/graph_type.go | 7 +- v2/group.go | 7 +- v2/group_type.go | 7 +- v2/groups_api.go | 60 +- v2/job_details.go | 21 + v2/{workdays_oauth.go => job_id.go} | 11 +- v2/job_workresult.go | 19 + v2/ldap_server_input.go | 7 +- v2/ldap_server_output.go | 7 +- v2/ldap_servers_api.go | 184 +- v2/model_error.go | 7 +- v2/oauth_code_input.go | 7 +- v2/office365_api.go | 108 +- v2/policies_api.go | 497 +- v2/policy.go | 7 +- v2/policy_request.go | 7 +- v2/policy_request_template.go | 7 +- v2/policy_result.go | 7 +- v2/policy_template.go | 7 +- v2/policy_template_config_field.go | 7 +- v2/policy_template_with_details.go | 7 +- v2/policy_value.go | 7 +- v2/policy_with_details.go | 7 +- v2/policytemplates_api.go | 85 +- v2/radius_servers_api.go | 112 +- v2/samba_domain_input.go | 9 +- v2/samba_domain_output.go | 9 +- v2/samba_domains_api.go | 166 +- v2/system_graph_management_req.go | 23 + v2/system_graph_management_req_attributes.go | 16 + ...em_graph_management_req_attributes_sudo.go | 17 + v2/system_group.go | 7 +- v2/system_group_associations_api.go | 592 + v2/system_group_data.go | 7 +- v2/system_group_graph_management_req.go | 7 +- v2/system_group_members_membership_api.go | 428 + v2/system_group_members_req.go | 7 +- v2/system_groups_api.go | 422 +- v2/systems_api.go | 357 +- v2/user_graph_management_req.go | 23 + v2/user_group.go | 7 +- v2/user_group_associations_api.go | 1072 ++ v2/user_group_graph_management_req.go | 7 +- v2/user_group_members_membership_api.go | 414 + v2/user_group_members_req.go | 7 +- v2/{user_group_data.go => user_group_post.go} | 11 +- ...butes.go => user_group_post_attributes.go} | 11 +- ...ser_group_post_attributes_posix_groups.go} | 9 +- v2/{body.go => user_group_put.go} | 16 +- v2/user_group_put_attributes.go | 16 + v2/user_groups_api.go | 576 +- v2/users_api.go | 376 +- v2/workday_fields.go | 17 + v2/{workday_api.go => workday_import_api.go} | 568 +- v2/workday_input.go | 9 +- v2/workday_output.go | 17 +- v2/workday_report_row.go | 7 +- v2/workday_request.go | 7 +- v2/workday_worker.go | 23 + v2/workdayimportresult.go | 17 + v2/workdayimportresult_result.go | 15 + v2/workdayoutput_auth.go | 17 + 137 files changed, 20470 insertions(+), 3625 deletions(-) create mode 100644 v2/api/swagger.yaml create mode 100644 v2/auth_info.go rename v2/{workday_report_result.go => auth_input.go} (60%) rename v2/{inline_response_200.go => auth_input_object.go} (65%) create mode 100644 v2/authinput_basic.go create mode 100644 v2/authinput_oauth.go create mode 100644 v2/bulk_job_requests_api.go create mode 100644 v2/docs/AuthInfo.md rename v2/docs/{Body.md => AuthInput.md} (59%) rename v2/docs/{WorkdayReportResult.md => AuthInputObject.md} (61%) create mode 100644 v2/docs/AuthinputBasic.md rename v2/docs/{InlineResponse200.md => AuthinputOauth.md} (77%) create mode 100644 v2/docs/BulkJobRequestsApi.md create mode 100644 v2/docs/JobDetails.md rename v2/docs/{WorkdaysOauth.md => JobId.md} (80%) create mode 100644 v2/docs/JobWorkresult.md create mode 100644 v2/docs/SystemGraphManagementReq.md create mode 100644 v2/docs/SystemGraphManagementReqAttributes.md create mode 100644 v2/docs/SystemGraphManagementReqAttributesSudo.md create mode 100644 v2/docs/SystemGroupAssociationsApi.md create mode 100644 v2/docs/SystemGroupMembersMembershipApi.md create mode 100644 v2/docs/UserGraphManagementReq.md create mode 100644 v2/docs/UserGroupAssociationsApi.md create mode 100644 v2/docs/UserGroupMembersMembershipApi.md rename v2/docs/{UserGroupData.md => UserGroupPost.md} (83%) rename v2/docs/{UserGroupDataAttributes.md => UserGroupPostAttributes.md} (69%) rename v2/docs/{UserGroupDataAttributesPosixGroups.md => UserGroupPostAttributesPosixGroups.md} (91%) create mode 100644 v2/docs/UserGroupPut.md create mode 100644 v2/docs/UserGroupPutAttributes.md create mode 100644 v2/docs/WorkdayFields.md rename v2/docs/{WorkdayApi.md => WorkdayImportApi.md} (52%) create mode 100644 v2/docs/WorkdayWorker.md create mode 100644 v2/docs/Workdayimportresult.md create mode 100644 v2/docs/WorkdayimportresultResult.md create mode 100644 v2/docs/WorkdayoutputAuth.md create mode 100644 v2/job_details.go rename v2/{workdays_oauth.go => job_id.go} (67%) create mode 100644 v2/job_workresult.go create mode 100644 v2/system_graph_management_req.go create mode 100644 v2/system_graph_management_req_attributes.go create mode 100644 v2/system_graph_management_req_attributes_sudo.go create mode 100644 v2/system_group_associations_api.go create mode 100644 v2/system_group_members_membership_api.go create mode 100644 v2/user_graph_management_req.go create mode 100644 v2/user_group_associations_api.go create mode 100644 v2/user_group_members_membership_api.go rename v2/{user_group_data.go => user_group_post.go} (67%) rename v2/{user_group_data_attributes.go => user_group_post_attributes.go} (68%) rename v2/{user_group_data_attributes_posix_groups.go => user_group_post_attributes_posix_groups.go} (72%) rename v2/{body.go => user_group_put.go} (61%) create mode 100644 v2/user_group_put_attributes.go create mode 100644 v2/workday_fields.go rename v2/{workday_api.go => workday_import_api.go} (50%) create mode 100644 v2/workday_worker.go create mode 100644 v2/workdayimportresult.go create mode 100644 v2/workdayimportresult_result.go create mode 100644 v2/workdayoutput_auth.go diff --git a/v2/.swagger-codegen/VERSION b/v2/.swagger-codegen/VERSION index f9f7450..a625450 100644 --- a/v2/.swagger-codegen/VERSION +++ b/v2/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +2.3.1 \ No newline at end of file diff --git a/v2/README.md b/v2/README.md index 87e494a..2236882 100644 --- a/v2/README.md +++ b/v2/README.md @@ -27,51 +27,53 @@ Class | Method | HTTP request | Description *ActiveDirectoryApi* | [**ActivedirectoriesPost**](docs/ActiveDirectoryApi.md#activedirectoriespost) | **Post** /activedirectories | Create a new Active Directory *ActiveDirectoryApi* | [**GraphActiveDirectoryAssociationsList**](docs/ActiveDirectoryApi.md#graphactivedirectoryassociationslist) | **Get** /activedirectories/{activedirectory_id}/associations | List the associations of an Active Directory instance *ActiveDirectoryApi* | [**GraphActiveDirectoryAssociationsPost**](docs/ActiveDirectoryApi.md#graphactivedirectoryassociationspost) | **Post** /activedirectories/{activedirectory_id}/associations | Manage the associations of an Active Directory instance -*ActiveDirectoryApi* | [**GraphActiveDirectoryTraverseUserGroup**](docs/ActiveDirectoryApi.md#graphactivedirectorytraverseusergroup) | **Get** /activedirectories/{activedirectory_id}/usergroups | List the User Groups associated with an Active Directory instance +*ActiveDirectoryApi* | [**GraphActiveDirectoryTraverseUserGroup**](docs/ActiveDirectoryApi.md#graphactivedirectorytraverseusergroup) | **Get** /activedirectories/{activedirectory_id}/usergroups | List the User Groups bound to an Active Directory instance *ApplicationsApi* | [**GraphApplicationAssociationsList**](docs/ApplicationsApi.md#graphapplicationassociationslist) | **Get** /applications/{application_id}/associations | List the associations of an Application *ApplicationsApi* | [**GraphApplicationAssociationsPost**](docs/ApplicationsApi.md#graphapplicationassociationspost) | **Post** /applications/{application_id}/associations | Manage the associations of an Application -*ApplicationsApi* | [**GraphApplicationTraverseUser**](docs/ApplicationsApi.md#graphapplicationtraverseuser) | **Get** /applications/{application_id}/users | List the Users associated with an Application -*ApplicationsApi* | [**GraphApplicationTraverseUserGroup**](docs/ApplicationsApi.md#graphapplicationtraverseusergroup) | **Get** /applications/{application_id}/usergroups | List the User Groups associated with an Application +*ApplicationsApi* | [**GraphApplicationTraverseUser**](docs/ApplicationsApi.md#graphapplicationtraverseuser) | **Get** /applications/{application_id}/users | List the Users bound to an Application +*ApplicationsApi* | [**GraphApplicationTraverseUserGroup**](docs/ApplicationsApi.md#graphapplicationtraverseusergroup) | **Get** /applications/{application_id}/usergroups | List the User Groups bound to an Application +*BulkJobRequestsApi* | [**JobGet**](docs/BulkJobRequestsApi.md#jobget) | **Get** /jobs/{id} | Get Job +*BulkJobRequestsApi* | [**JobResults**](docs/BulkJobRequestsApi.md#jobresults) | **Get** /jobs/{id}/results | List Job Results *CommandsApi* | [**GraphCommandAssociationsList**](docs/CommandsApi.md#graphcommandassociationslist) | **Get** /commands/{command_id}/associations | List the associations of a Command *CommandsApi* | [**GraphCommandAssociationsPost**](docs/CommandsApi.md#graphcommandassociationspost) | **Post** /commands/{command_id}/associations | Manage the associations of a Command -*CommandsApi* | [**GraphCommandTraverseSystem**](docs/CommandsApi.md#graphcommandtraversesystem) | **Get** /commands/{command_id}/systems | List the Systems associated with a Command -*CommandsApi* | [**GraphCommandTraverseSystemGroup**](docs/CommandsApi.md#graphcommandtraversesystemgroup) | **Get** /commands/{command_id}/systemgroups | List the System Groups associated with a Command +*CommandsApi* | [**GraphCommandTraverseSystem**](docs/CommandsApi.md#graphcommandtraversesystem) | **Get** /commands/{command_id}/systems | List the Systems bound to a Command +*CommandsApi* | [**GraphCommandTraverseSystemGroup**](docs/CommandsApi.md#graphcommandtraversesystemgroup) | **Get** /commands/{command_id}/systemgroups | List the System Groups bound to a Command *DirectoriesApi* | [**DirectoriesList**](docs/DirectoriesApi.md#directorieslist) | **Get** /directories | List All Directories *GSuiteApi* | [**GraphGSuiteAssociationsList**](docs/GSuiteApi.md#graphgsuiteassociationslist) | **Get** /gsuites/{gsuite_id}/associations | List the associations of a G Suite instance *GSuiteApi* | [**GraphGSuiteAssociationsPost**](docs/GSuiteApi.md#graphgsuiteassociationspost) | **Post** /gsuites/{gsuite_id}/associations | Manage the associations of a G Suite instance -*GSuiteApi* | [**GraphGSuiteTraverseUser**](docs/GSuiteApi.md#graphgsuitetraverseuser) | **Get** /gsuites/{gsuite_id}/users | List the Users associated with a G Suite instance -*GSuiteApi* | [**GraphGSuiteTraverseUserGroup**](docs/GSuiteApi.md#graphgsuitetraverseusergroup) | **Get** /gsuites/{gsuite_id}/usergroups | List the User Groups associated with a G Suite instance +*GSuiteApi* | [**GraphGSuiteTraverseUser**](docs/GSuiteApi.md#graphgsuitetraverseuser) | **Get** /gsuites/{gsuite_id}/users | List the Users bound to a G Suite instance +*GSuiteApi* | [**GraphGSuiteTraverseUserGroup**](docs/GSuiteApi.md#graphgsuitetraverseusergroup) | **Get** /gsuites/{gsuite_id}/usergroups | List the User Groups bound to a G Suite instance *GraphApi* | [**GraphActiveDirectoryAssociationsList**](docs/GraphApi.md#graphactivedirectoryassociationslist) | **Get** /activedirectories/{activedirectory_id}/associations | List the associations of an Active Directory instance *GraphApi* | [**GraphActiveDirectoryAssociationsPost**](docs/GraphApi.md#graphactivedirectoryassociationspost) | **Post** /activedirectories/{activedirectory_id}/associations | Manage the associations of an Active Directory instance -*GraphApi* | [**GraphActiveDirectoryTraverseUserGroup**](docs/GraphApi.md#graphactivedirectorytraverseusergroup) | **Get** /activedirectories/{activedirectory_id}/usergroups | List the User Groups associated with an Active Directory instance +*GraphApi* | [**GraphActiveDirectoryTraverseUserGroup**](docs/GraphApi.md#graphactivedirectorytraverseusergroup) | **Get** /activedirectories/{activedirectory_id}/usergroups | List the User Groups bound to an Active Directory instance *GraphApi* | [**GraphApplicationAssociationsList**](docs/GraphApi.md#graphapplicationassociationslist) | **Get** /applications/{application_id}/associations | List the associations of an Application *GraphApi* | [**GraphApplicationAssociationsPost**](docs/GraphApi.md#graphapplicationassociationspost) | **Post** /applications/{application_id}/associations | Manage the associations of an Application -*GraphApi* | [**GraphApplicationTraverseUser**](docs/GraphApi.md#graphapplicationtraverseuser) | **Get** /applications/{application_id}/users | List the Users associated with an Application -*GraphApi* | [**GraphApplicationTraverseUserGroup**](docs/GraphApi.md#graphapplicationtraverseusergroup) | **Get** /applications/{application_id}/usergroups | List the User Groups associated with an Application +*GraphApi* | [**GraphApplicationTraverseUser**](docs/GraphApi.md#graphapplicationtraverseuser) | **Get** /applications/{application_id}/users | List the Users bound to an Application +*GraphApi* | [**GraphApplicationTraverseUserGroup**](docs/GraphApi.md#graphapplicationtraverseusergroup) | **Get** /applications/{application_id}/usergroups | List the User Groups bound to an Application *GraphApi* | [**GraphCommandAssociationsList**](docs/GraphApi.md#graphcommandassociationslist) | **Get** /commands/{command_id}/associations | List the associations of a Command *GraphApi* | [**GraphCommandAssociationsPost**](docs/GraphApi.md#graphcommandassociationspost) | **Post** /commands/{command_id}/associations | Manage the associations of a Command -*GraphApi* | [**GraphCommandTraverseSystem**](docs/GraphApi.md#graphcommandtraversesystem) | **Get** /commands/{command_id}/systems | List the Systems associated with a Command -*GraphApi* | [**GraphCommandTraverseSystemGroup**](docs/GraphApi.md#graphcommandtraversesystemgroup) | **Get** /commands/{command_id}/systemgroups | List the System Groups associated with a Command +*GraphApi* | [**GraphCommandTraverseSystem**](docs/GraphApi.md#graphcommandtraversesystem) | **Get** /commands/{command_id}/systems | List the Systems bound to a Command +*GraphApi* | [**GraphCommandTraverseSystemGroup**](docs/GraphApi.md#graphcommandtraversesystemgroup) | **Get** /commands/{command_id}/systemgroups | List the System Groups bound to a Command *GraphApi* | [**GraphGSuiteAssociationsList**](docs/GraphApi.md#graphgsuiteassociationslist) | **Get** /gsuites/{gsuite_id}/associations | List the associations of a G Suite instance *GraphApi* | [**GraphGSuiteAssociationsPost**](docs/GraphApi.md#graphgsuiteassociationspost) | **Post** /gsuites/{gsuite_id}/associations | Manage the associations of a G Suite instance -*GraphApi* | [**GraphGSuiteTraverseUser**](docs/GraphApi.md#graphgsuitetraverseuser) | **Get** /gsuites/{gsuite_id}/users | List the Users associated with a G Suite instance -*GraphApi* | [**GraphGSuiteTraverseUserGroup**](docs/GraphApi.md#graphgsuitetraverseusergroup) | **Get** /gsuites/{gsuite_id}/usergroups | List the User Groups associated with a G Suite instance +*GraphApi* | [**GraphGSuiteTraverseUser**](docs/GraphApi.md#graphgsuitetraverseuser) | **Get** /gsuites/{gsuite_id}/users | List the Users bound to a G Suite instance +*GraphApi* | [**GraphGSuiteTraverseUserGroup**](docs/GraphApi.md#graphgsuitetraverseusergroup) | **Get** /gsuites/{gsuite_id}/usergroups | List the User Groups bound to a G Suite instance *GraphApi* | [**GraphLdapServerAssociationsList**](docs/GraphApi.md#graphldapserverassociationslist) | **Get** /ldapservers/{ldapserver_id}/associations | List the associations of a LDAP Server *GraphApi* | [**GraphLdapServerAssociationsPost**](docs/GraphApi.md#graphldapserverassociationspost) | **Post** /ldapservers/{ldapserver_id}/associations | Manage the associations of a LDAP Server -*GraphApi* | [**GraphLdapServerTraverseUser**](docs/GraphApi.md#graphldapservertraverseuser) | **Get** /ldapservers/{ldapserver_id}/users | List the Users associated with a LDAP Server -*GraphApi* | [**GraphLdapServerTraverseUserGroup**](docs/GraphApi.md#graphldapservertraverseusergroup) | **Get** /ldapservers/{ldapserver_id}/usergroups | List the User Groups associated with a LDAP Server +*GraphApi* | [**GraphLdapServerTraverseUser**](docs/GraphApi.md#graphldapservertraverseuser) | **Get** /ldapservers/{ldapserver_id}/users | List the Users bound to a LDAP Server +*GraphApi* | [**GraphLdapServerTraverseUserGroup**](docs/GraphApi.md#graphldapservertraverseusergroup) | **Get** /ldapservers/{ldapserver_id}/usergroups | List the User Groups bound to a LDAP Server *GraphApi* | [**GraphOffice365AssociationsList**](docs/GraphApi.md#graphoffice365associationslist) | **Get** /office365s/{office365_id}/associations | List the associations of an Office 365 instance *GraphApi* | [**GraphOffice365AssociationsPost**](docs/GraphApi.md#graphoffice365associationspost) | **Post** /office365s/{office365_id}/associations | Manage the associations of an Office 365 instance -*GraphApi* | [**GraphOffice365TraverseUser**](docs/GraphApi.md#graphoffice365traverseuser) | **Get** /office365s/{office365_id}/users | List the Users associated with an Office 365 instance -*GraphApi* | [**GraphOffice365TraverseUserGroup**](docs/GraphApi.md#graphoffice365traverseusergroup) | **Get** /office365s/{office365_id}/usergroups | List the User Groups associated with an Office 365 instance +*GraphApi* | [**GraphOffice365TraverseUser**](docs/GraphApi.md#graphoffice365traverseuser) | **Get** /office365s/{office365_id}/users | List the Users bound to an Office 365 instance +*GraphApi* | [**GraphOffice365TraverseUserGroup**](docs/GraphApi.md#graphoffice365traverseusergroup) | **Get** /office365s/{office365_id}/usergroups | List the User Groups bound to an Office 365 instance *GraphApi* | [**GraphPolicyAssociationsList**](docs/GraphApi.md#graphpolicyassociationslist) | **Get** /policies/{policy_id}/associations | List the associations of a Policy *GraphApi* | [**GraphPolicyAssociationsPost**](docs/GraphApi.md#graphpolicyassociationspost) | **Post** /policies/{policy_id}/associations | Manage the associations of a Policy -*GraphApi* | [**GraphPolicyTraverseSystem**](docs/GraphApi.md#graphpolicytraversesystem) | **Get** /policies/{policy_id}/systems | List the Systems associated with a Policy -*GraphApi* | [**GraphPolicyTraverseSystemGroup**](docs/GraphApi.md#graphpolicytraversesystemgroup) | **Get** /policies/{policy_id}/systemgroups | List the System Groups associated with a Policy -*GraphApi* | [**GraphRadiusServerAssociationsList**](docs/GraphApi.md#graphradiusserverassociationslist) | **Get** /radiusservers/{radiusserver_id}/associations | List the associations of a Radius Server -*GraphApi* | [**GraphRadiusServerAssociationsPost**](docs/GraphApi.md#graphradiusserverassociationspost) | **Post** /radiusservers/{radiusserver_id}/associations | Manage the associations of a Radius Server -*GraphApi* | [**GraphRadiusServerTraverseUser**](docs/GraphApi.md#graphradiusservertraverseuser) | **Get** /radiusservers/{radiusserver_id}/users | List the Users associated with a Radius Server -*GraphApi* | [**GraphRadiusServerTraverseUserGroup**](docs/GraphApi.md#graphradiusservertraverseusergroup) | **Get** /radiusservers/{radiusserver_id}/usergroups | List the User Groups associated with a Radius Server +*GraphApi* | [**GraphPolicyTraverseSystem**](docs/GraphApi.md#graphpolicytraversesystem) | **Get** /policies/{policy_id}/systems | List the Systems bound to a Policy +*GraphApi* | [**GraphPolicyTraverseSystemGroup**](docs/GraphApi.md#graphpolicytraversesystemgroup) | **Get** /policies/{policy_id}/systemgroups | List the System Groups bound to a Policy +*GraphApi* | [**GraphRadiusServerAssociationsList**](docs/GraphApi.md#graphradiusserverassociationslist) | **Get** /radiusservers/{radiusserver_id}/associations | List the associations of a RADIUS Server +*GraphApi* | [**GraphRadiusServerAssociationsPost**](docs/GraphApi.md#graphradiusserverassociationspost) | **Post** /radiusservers/{radiusserver_id}/associations | Manage the associations of a RADIUS Server +*GraphApi* | [**GraphRadiusServerTraverseUser**](docs/GraphApi.md#graphradiusservertraverseuser) | **Get** /radiusservers/{radiusserver_id}/users | List the Users bound to a RADIUS Server +*GraphApi* | [**GraphRadiusServerTraverseUserGroup**](docs/GraphApi.md#graphradiusservertraverseusergroup) | **Get** /radiusservers/{radiusserver_id}/usergroups | List the User Groups bound to a RADIUS Server *GraphApi* | [**GraphSystemAssociationsList**](docs/GraphApi.md#graphsystemassociationslist) | **Get** /systems/{system_id}/associations | List the associations of a System *GraphApi* | [**GraphSystemAssociationsPost**](docs/GraphApi.md#graphsystemassociationspost) | **Post** /systems/{system_id}/associations | Manage associations of a System *GraphApi* | [**GraphSystemGroupAssociationsList**](docs/GraphApi.md#graphsystemgroupassociationslist) | **Get** /systemgroups/{group_id}/associations | List the associations of a System Group @@ -80,12 +82,15 @@ Class | Method | HTTP request | Description *GraphApi* | [**GraphSystemGroupMembersList**](docs/GraphApi.md#graphsystemgroupmemberslist) | **Get** /systemgroups/{group_id}/members | List the members of a System Group *GraphApi* | [**GraphSystemGroupMembersPost**](docs/GraphApi.md#graphsystemgroupmemberspost) | **Post** /systemgroups/{group_id}/members | Manage the members of a System Group *GraphApi* | [**GraphSystemGroupMembership**](docs/GraphApi.md#graphsystemgroupmembership) | **Get** /systemgroups/{group_id}/membership | List the System Group's membership -*GraphApi* | [**GraphSystemGroupTraversePolicy**](docs/GraphApi.md#graphsystemgrouptraversepolicy) | **Get** /systemgroups/{group_id}/policies | List the Policies associated with a System Group -*GraphApi* | [**GraphSystemGroupTraverseUser**](docs/GraphApi.md#graphsystemgrouptraverseuser) | **Get** /systemgroups/{group_id}/users | List the Users associated with a System Group -*GraphApi* | [**GraphSystemGroupTraverseUserGroup**](docs/GraphApi.md#graphsystemgrouptraverseusergroup) | **Get** /systemgroups/{group_id}/usergroups | List the User Groups associated with a System Group +*GraphApi* | [**GraphSystemGroupTraverseCommand**](docs/GraphApi.md#graphsystemgrouptraversecommand) | **Get** /systemgroups/{group_id}/commands | List the Commands bound to a System Group +*GraphApi* | [**GraphSystemGroupTraversePolicy**](docs/GraphApi.md#graphsystemgrouptraversepolicy) | **Get** /systemgroups/{group_id}/policies | List the Policies bound to a System Group +*GraphApi* | [**GraphSystemGroupTraverseUser**](docs/GraphApi.md#graphsystemgrouptraverseuser) | **Get** /systemgroups/{group_id}/users | List the Users bound to a System Group +*GraphApi* | [**GraphSystemGroupTraverseUserGroup**](docs/GraphApi.md#graphsystemgrouptraverseusergroup) | **Get** /systemgroups/{group_id}/usergroups | List the User Groups bound to a System Group *GraphApi* | [**GraphSystemMemberOf**](docs/GraphApi.md#graphsystemmemberof) | **Get** /systems/{system_id}/memberof | List the parent Groups of a System -*GraphApi* | [**GraphSystemTraversePolicy**](docs/GraphApi.md#graphsystemtraversepolicy) | **Get** /systems/{system_id}/policies | List the Policies associated with a System -*GraphApi* | [**GraphSystemTraverseUser**](docs/GraphApi.md#graphsystemtraverseuser) | **Get** /systems/{system_id}/users | List the Users associated with a System +*GraphApi* | [**GraphSystemTraverseCommand**](docs/GraphApi.md#graphsystemtraversecommand) | **Get** /systems/{system_id}/commands | List the Commands bound to a System +*GraphApi* | [**GraphSystemTraversePolicy**](docs/GraphApi.md#graphsystemtraversepolicy) | **Get** /systems/{system_id}/policies | List the Policies bound to a System +*GraphApi* | [**GraphSystemTraverseUser**](docs/GraphApi.md#graphsystemtraverseuser) | **Get** /systems/{system_id}/users | List the Users bound to a System +*GraphApi* | [**GraphSystemTraverseUserGroup**](docs/GraphApi.md#graphsystemtraverseusergroup) | **Get** /systems/{system_id}/usergroups | List the User Groups bound to a System *GraphApi* | [**GraphUserAssociationsList**](docs/GraphApi.md#graphuserassociationslist) | **Get** /users/{user_id}/associations | List the associations of a User *GraphApi* | [**GraphUserAssociationsPost**](docs/GraphApi.md#graphuserassociationspost) | **Post** /users/{user_id}/associations | Manage the associations of a User *GraphApi* | [**GraphUserGroupAssociationsList**](docs/GraphApi.md#graphusergroupassociationslist) | **Get** /usergroups/{group_id}/associations | List the associations of a User Group. @@ -94,68 +99,79 @@ Class | Method | HTTP request | Description *GraphApi* | [**GraphUserGroupMembersList**](docs/GraphApi.md#graphusergroupmemberslist) | **Get** /usergroups/{group_id}/members | List the members of a User Group *GraphApi* | [**GraphUserGroupMembersPost**](docs/GraphApi.md#graphusergroupmemberspost) | **Post** /usergroups/{group_id}/members | Manage the members of a User Group *GraphApi* | [**GraphUserGroupMembership**](docs/GraphApi.md#graphusergroupmembership) | **Get** /usergroups/{group_id}/membership | List the User Group's membership -*GraphApi* | [**GraphUserGroupTraverseActiveDirectory**](docs/GraphApi.md#graphusergrouptraverseactivedirectory) | **Get** /usergroups/{group_id}/activedirectories | List the Active Directories associated with a User Group -*GraphApi* | [**GraphUserGroupTraverseApplication**](docs/GraphApi.md#graphusergrouptraverseapplication) | **Get** /usergroups/{group_id}/applications | List the Applications associated with a User Group -*GraphApi* | [**GraphUserGroupTraverseDirectory**](docs/GraphApi.md#graphusergrouptraversedirectory) | **Get** /usergroups/{group_id}/directories | List the Directories associated with a User Group -*GraphApi* | [**GraphUserGroupTraverseGSuite**](docs/GraphApi.md#graphusergrouptraversegsuite) | **Get** /usergroups/{group_id}/gsuites | List the G Suite instances associated with a User Group -*GraphApi* | [**GraphUserGroupTraverseLdapServer**](docs/GraphApi.md#graphusergrouptraverseldapserver) | **Get** /usergroups/{group_id}/ldapservers | List the LDAP Servers associated with a User Group -*GraphApi* | [**GraphUserGroupTraverseOffice365**](docs/GraphApi.md#graphusergrouptraverseoffice365) | **Get** /usergroups/{group_id}/office365s | List the Office 365 instances associated with a User Group -*GraphApi* | [**GraphUserGroupTraverseRadiusServer**](docs/GraphApi.md#graphusergrouptraverseradiusserver) | **Get** /usergroups/{group_id}/radiusservers | List the RADIUS Servers associated with a User Group -*GraphApi* | [**GraphUserGroupTraverseSystem**](docs/GraphApi.md#graphusergrouptraversesystem) | **Get** /usergroups/{group_id}/systems | List the Systems associated with a User Group -*GraphApi* | [**GraphUserGroupTraverseSystemGroup**](docs/GraphApi.md#graphusergrouptraversesystemgroup) | **Get** /usergroups/{group_id}/systemgroups | List the System Groups associated with User Groups +*GraphApi* | [**GraphUserGroupTraverseActiveDirectory**](docs/GraphApi.md#graphusergrouptraverseactivedirectory) | **Get** /usergroups/{group_id}/activedirectories | List the Active Directories bound to a User Group +*GraphApi* | [**GraphUserGroupTraverseApplication**](docs/GraphApi.md#graphusergrouptraverseapplication) | **Get** /usergroups/{group_id}/applications | List the Applications bound to a User Group +*GraphApi* | [**GraphUserGroupTraverseDirectory**](docs/GraphApi.md#graphusergrouptraversedirectory) | **Get** /usergroups/{group_id}/directories | List the Directories bound to a User Group +*GraphApi* | [**GraphUserGroupTraverseGSuite**](docs/GraphApi.md#graphusergrouptraversegsuite) | **Get** /usergroups/{group_id}/gsuites | List the G Suite instances bound to a User Group +*GraphApi* | [**GraphUserGroupTraverseLdapServer**](docs/GraphApi.md#graphusergrouptraverseldapserver) | **Get** /usergroups/{group_id}/ldapservers | List the LDAP Servers bound to a User Group +*GraphApi* | [**GraphUserGroupTraverseOffice365**](docs/GraphApi.md#graphusergrouptraverseoffice365) | **Get** /usergroups/{group_id}/office365s | List the Office 365 instances bound to a User Group +*GraphApi* | [**GraphUserGroupTraverseRadiusServer**](docs/GraphApi.md#graphusergrouptraverseradiusserver) | **Get** /usergroups/{group_id}/radiusservers | List the RADIUS Servers bound to a User Group +*GraphApi* | [**GraphUserGroupTraverseSystem**](docs/GraphApi.md#graphusergrouptraversesystem) | **Get** /usergroups/{group_id}/systems | List the Systems bound to a User Group +*GraphApi* | [**GraphUserGroupTraverseSystemGroup**](docs/GraphApi.md#graphusergrouptraversesystemgroup) | **Get** /usergroups/{group_id}/systemgroups | List the System Groups bound to User Groups *GraphApi* | [**GraphUserMemberOf**](docs/GraphApi.md#graphusermemberof) | **Get** /users/{user_id}/memberof | List the parent Groups of a User -*GraphApi* | [**GraphUserTraverseApplication**](docs/GraphApi.md#graphusertraverseapplication) | **Get** /users/{user_id}/applications | List the Applications associated with a User -*GraphApi* | [**GraphUserTraverseDirectory**](docs/GraphApi.md#graphusertraversedirectory) | **Get** /users/{user_id}/directories | List the Directories associated with a User -*GraphApi* | [**GraphUserTraverseGSuite**](docs/GraphApi.md#graphusertraversegsuite) | **Get** /users/{user_id}/gsuites | List the G Suite instances associated with a User -*GraphApi* | [**GraphUserTraverseLdapServer**](docs/GraphApi.md#graphusertraverseldapserver) | **Get** /users/{user_id}/ldapservers | List the LDAP servers associated with a User -*GraphApi* | [**GraphUserTraverseOffice365**](docs/GraphApi.md#graphusertraverseoffice365) | **Get** /users/{user_id}/office365s | List the Office 365 instances associated with User -*GraphApi* | [**GraphUserTraverseRadiusServer**](docs/GraphApi.md#graphusertraverseradiusserver) | **Get** /users/{user_id}/radiusservers | List the RADIUS Servers associated with a User -*GraphApi* | [**GraphUserTraverseSystem**](docs/GraphApi.md#graphusertraversesystem) | **Get** /users/{user_id}/systems | List the Systems associated with a User +*GraphApi* | [**GraphUserTraverseApplication**](docs/GraphApi.md#graphusertraverseapplication) | **Get** /users/{user_id}/applications | List the Applications bound to a User +*GraphApi* | [**GraphUserTraverseDirectory**](docs/GraphApi.md#graphusertraversedirectory) | **Get** /users/{user_id}/directories | List the Directories bound to a User +*GraphApi* | [**GraphUserTraverseGSuite**](docs/GraphApi.md#graphusertraversegsuite) | **Get** /users/{user_id}/gsuites | List the G Suite instances bound to a User +*GraphApi* | [**GraphUserTraverseLdapServer**](docs/GraphApi.md#graphusertraverseldapserver) | **Get** /users/{user_id}/ldapservers | List the LDAP servers bound to a User +*GraphApi* | [**GraphUserTraverseOffice365**](docs/GraphApi.md#graphusertraverseoffice365) | **Get** /users/{user_id}/office365s | List the Office 365 instances bound to a User +*GraphApi* | [**GraphUserTraverseRadiusServer**](docs/GraphApi.md#graphusertraverseradiusserver) | **Get** /users/{user_id}/radiusservers | List the RADIUS Servers bound to a User +*GraphApi* | [**GraphUserTraverseSystem**](docs/GraphApi.md#graphusertraversesystem) | **Get** /users/{user_id}/systems | List the Systems bound to a User +*GraphApi* | [**GraphUserTraverseSystemGroup**](docs/GraphApi.md#graphusertraversesystemgroup) | **Get** /users/{user_id}/systemgroups | List the System Groups bound to a User *GroupsApi* | [**GroupsList**](docs/GroupsApi.md#groupslist) | **Get** /groups | List All Groups *LDAPServersApi* | [**GraphLdapServerAssociationsList**](docs/LDAPServersApi.md#graphldapserverassociationslist) | **Get** /ldapservers/{ldapserver_id}/associations | List the associations of a LDAP Server *LDAPServersApi* | [**GraphLdapServerAssociationsPost**](docs/LDAPServersApi.md#graphldapserverassociationspost) | **Post** /ldapservers/{ldapserver_id}/associations | Manage the associations of a LDAP Server -*LDAPServersApi* | [**GraphLdapServerTraverseUser**](docs/LDAPServersApi.md#graphldapservertraverseuser) | **Get** /ldapservers/{ldapserver_id}/users | List the Users associated with a LDAP Server -*LDAPServersApi* | [**GraphLdapServerTraverseUserGroup**](docs/LDAPServersApi.md#graphldapservertraverseusergroup) | **Get** /ldapservers/{ldapserver_id}/usergroups | List the User Groups associated with a LDAP Server +*LDAPServersApi* | [**GraphLdapServerTraverseUser**](docs/LDAPServersApi.md#graphldapservertraverseuser) | **Get** /ldapservers/{ldapserver_id}/users | List the Users bound to a LDAP Server +*LDAPServersApi* | [**GraphLdapServerTraverseUserGroup**](docs/LDAPServersApi.md#graphldapservertraverseusergroup) | **Get** /ldapservers/{ldapserver_id}/usergroups | List the User Groups bound to a LDAP Server *LDAPServersApi* | [**LdapserversGet**](docs/LDAPServersApi.md#ldapserversget) | **Get** /ldapservers/{id} | Get LDAP Server *LDAPServersApi* | [**LdapserversList**](docs/LDAPServersApi.md#ldapserverslist) | **Get** /ldapservers | List LDAP Servers *Office365Api* | [**GraphOffice365AssociationsList**](docs/Office365Api.md#graphoffice365associationslist) | **Get** /office365s/{office365_id}/associations | List the associations of an Office 365 instance *Office365Api* | [**GraphOffice365AssociationsPost**](docs/Office365Api.md#graphoffice365associationspost) | **Post** /office365s/{office365_id}/associations | Manage the associations of an Office 365 instance -*Office365Api* | [**GraphOffice365TraverseUser**](docs/Office365Api.md#graphoffice365traverseuser) | **Get** /office365s/{office365_id}/users | List the Users associated with an Office 365 instance -*Office365Api* | [**GraphOffice365TraverseUserGroup**](docs/Office365Api.md#graphoffice365traverseusergroup) | **Get** /office365s/{office365_id}/usergroups | List the User Groups associated with an Office 365 instance +*Office365Api* | [**GraphOffice365TraverseUser**](docs/Office365Api.md#graphoffice365traverseuser) | **Get** /office365s/{office365_id}/users | List the Users bound to an Office 365 instance +*Office365Api* | [**GraphOffice365TraverseUserGroup**](docs/Office365Api.md#graphoffice365traverseusergroup) | **Get** /office365s/{office365_id}/usergroups | List the User Groups bound to an Office 365 instance *PoliciesApi* | [**GraphPolicyAssociationsList**](docs/PoliciesApi.md#graphpolicyassociationslist) | **Get** /policies/{policy_id}/associations | List the associations of a Policy *PoliciesApi* | [**GraphPolicyAssociationsPost**](docs/PoliciesApi.md#graphpolicyassociationspost) | **Post** /policies/{policy_id}/associations | Manage the associations of a Policy -*PoliciesApi* | [**GraphPolicyTraverseSystem**](docs/PoliciesApi.md#graphpolicytraversesystem) | **Get** /policies/{policy_id}/systems | List the Systems associated with a Policy -*PoliciesApi* | [**GraphPolicyTraverseSystemGroup**](docs/PoliciesApi.md#graphpolicytraversesystemgroup) | **Get** /policies/{policy_id}/systemgroups | List the System Groups associated with a Policy +*PoliciesApi* | [**GraphPolicyTraverseSystem**](docs/PoliciesApi.md#graphpolicytraversesystem) | **Get** /policies/{policy_id}/systems | List the Systems bound to a Policy +*PoliciesApi* | [**GraphPolicyTraverseSystemGroup**](docs/PoliciesApi.md#graphpolicytraversesystemgroup) | **Get** /policies/{policy_id}/systemgroups | List the System Groups bound to a Policy *PoliciesApi* | [**PoliciesDelete**](docs/PoliciesApi.md#policiesdelete) | **Delete** /policies/{id} | Deletes a Policy *PoliciesApi* | [**PoliciesGet**](docs/PoliciesApi.md#policiesget) | **Get** /policies/{id} | Gets a specific Policy. *PoliciesApi* | [**PoliciesList**](docs/PoliciesApi.md#policieslist) | **Get** /policies | Lists all the Policies *PoliciesApi* | [**PoliciesPost**](docs/PoliciesApi.md#policiespost) | **Post** /policies | Create a new Policy *PoliciesApi* | [**PoliciesPut**](docs/PoliciesApi.md#policiesput) | **Put** /policies/{id} | Update an existing Policy *PoliciesApi* | [**PolicyresultsGet**](docs/PoliciesApi.md#policyresultsget) | **Get** /policyresults/{id} | Get a specific Policy Result. -*PoliciesApi* | [**PolicyresultsList**](docs/PoliciesApi.md#policyresultslist) | **Get** /policyresults | Lists all the policy results for an organization. -*PoliciesApi* | [**PolicyresultsList_0**](docs/PoliciesApi.md#policyresultslist_0) | **Get** /policies/{policy_id}/policyresults | Lists all the policy results of a given policy. +*PoliciesApi* | [**PolicyresultsList**](docs/PoliciesApi.md#policyresultslist) | **Get** /policies/{policy_id}/policyresults | Lists all the policy results of a given policy. +*PoliciesApi* | [**PolicyresultsList_0**](docs/PoliciesApi.md#policyresultslist_0) | **Get** /policyresults | Lists all the policy results for an organization. *PoliciesApi* | [**PolicytemplatesGet**](docs/PoliciesApi.md#policytemplatesget) | **Get** /policytemplates/{id} | Get a specific Policy Template *PoliciesApi* | [**PolicytemplatesList**](docs/PoliciesApi.md#policytemplateslist) | **Get** /policytemplates | Lists all of the Policy Templates *PolicytemplatesApi* | [**PolicytemplatesGet**](docs/PolicytemplatesApi.md#policytemplatesget) | **Get** /policytemplates/{id} | Get a specific Policy Template *PolicytemplatesApi* | [**PolicytemplatesList**](docs/PolicytemplatesApi.md#policytemplateslist) | **Get** /policytemplates | Lists all of the Policy Templates -*RADIUSServersApi* | [**GraphRadiusServerAssociationsList**](docs/RADIUSServersApi.md#graphradiusserverassociationslist) | **Get** /radiusservers/{radiusserver_id}/associations | List the associations of a Radius Server -*RADIUSServersApi* | [**GraphRadiusServerAssociationsPost**](docs/RADIUSServersApi.md#graphradiusserverassociationspost) | **Post** /radiusservers/{radiusserver_id}/associations | Manage the associations of a Radius Server -*RADIUSServersApi* | [**GraphRadiusServerTraverseUser**](docs/RADIUSServersApi.md#graphradiusservertraverseuser) | **Get** /radiusservers/{radiusserver_id}/users | List the Users associated with a Radius Server -*RADIUSServersApi* | [**GraphRadiusServerTraverseUserGroup**](docs/RADIUSServersApi.md#graphradiusservertraverseusergroup) | **Get** /radiusservers/{radiusserver_id}/usergroups | List the User Groups associated with a Radius Server +*RADIUSServersApi* | [**GraphRadiusServerAssociationsList**](docs/RADIUSServersApi.md#graphradiusserverassociationslist) | **Get** /radiusservers/{radiusserver_id}/associations | List the associations of a RADIUS Server +*RADIUSServersApi* | [**GraphRadiusServerAssociationsPost**](docs/RADIUSServersApi.md#graphradiusserverassociationspost) | **Post** /radiusservers/{radiusserver_id}/associations | Manage the associations of a RADIUS Server +*RADIUSServersApi* | [**GraphRadiusServerTraverseUser**](docs/RADIUSServersApi.md#graphradiusservertraverseuser) | **Get** /radiusservers/{radiusserver_id}/users | List the Users bound to a RADIUS Server +*RADIUSServersApi* | [**GraphRadiusServerTraverseUserGroup**](docs/RADIUSServersApi.md#graphradiusservertraverseusergroup) | **Get** /radiusservers/{radiusserver_id}/usergroups | List the User Groups bound to a RADIUS Server *SambaDomainsApi* | [**LdapserversSambaDomainsDelete**](docs/SambaDomainsApi.md#ldapserverssambadomainsdelete) | **Delete** /ldapservers/{ldapserver_id}/sambadomains/{id} | Delete Samba Domain *SambaDomainsApi* | [**LdapserversSambaDomainsGet**](docs/SambaDomainsApi.md#ldapserverssambadomainsget) | **Get** /ldapservers/{ldapserver_id}/sambadomains/{id} | Get Samba Domain *SambaDomainsApi* | [**LdapserversSambaDomainsList**](docs/SambaDomainsApi.md#ldapserverssambadomainslist) | **Get** /ldapservers/{ldapserver_id}/sambadomains | List Samba Domains *SambaDomainsApi* | [**LdapserversSambaDomainsPost**](docs/SambaDomainsApi.md#ldapserverssambadomainspost) | **Post** /ldapservers/{ldapserver_id}/sambadomains | Create Samba Domain *SambaDomainsApi* | [**LdapserversSambaDomainsPut**](docs/SambaDomainsApi.md#ldapserverssambadomainsput) | **Put** /ldapservers/{ldapserver_id}/sambadomains/{id} | Update Samba Domain +*SystemGroupAssociationsApi* | [**GraphSystemGroupAssociationsList**](docs/SystemGroupAssociationsApi.md#graphsystemgroupassociationslist) | **Get** /systemgroups/{group_id}/associations | List the associations of a System Group +*SystemGroupAssociationsApi* | [**GraphSystemGroupAssociationsPost**](docs/SystemGroupAssociationsApi.md#graphsystemgroupassociationspost) | **Post** /systemgroups/{group_id}/associations | Manage the associations of a System Group +*SystemGroupAssociationsApi* | [**GraphSystemGroupTraverseCommand**](docs/SystemGroupAssociationsApi.md#graphsystemgrouptraversecommand) | **Get** /systemgroups/{group_id}/commands | List the Commands bound to a System Group +*SystemGroupAssociationsApi* | [**GraphSystemGroupTraversePolicy**](docs/SystemGroupAssociationsApi.md#graphsystemgrouptraversepolicy) | **Get** /systemgroups/{group_id}/policies | List the Policies bound to a System Group +*SystemGroupAssociationsApi* | [**GraphSystemGroupTraverseUser**](docs/SystemGroupAssociationsApi.md#graphsystemgrouptraverseuser) | **Get** /systemgroups/{group_id}/users | List the Users bound to a System Group +*SystemGroupAssociationsApi* | [**GraphSystemGroupTraverseUserGroup**](docs/SystemGroupAssociationsApi.md#graphsystemgrouptraverseusergroup) | **Get** /systemgroups/{group_id}/usergroups | List the User Groups bound to a System Group +*SystemGroupMembersMembershipApi* | [**GraphSystemGroupMemberOf**](docs/SystemGroupMembersMembershipApi.md#graphsystemgroupmemberof) | **Get** /systemgroups/{group_id}/memberof | List the System Group's parents +*SystemGroupMembersMembershipApi* | [**GraphSystemGroupMembersList**](docs/SystemGroupMembersMembershipApi.md#graphsystemgroupmemberslist) | **Get** /systemgroups/{group_id}/members | List the members of a System Group +*SystemGroupMembersMembershipApi* | [**GraphSystemGroupMembersPost**](docs/SystemGroupMembersMembershipApi.md#graphsystemgroupmemberspost) | **Post** /systemgroups/{group_id}/members | Manage the members of a System Group +*SystemGroupMembersMembershipApi* | [**GraphSystemGroupMembership**](docs/SystemGroupMembersMembershipApi.md#graphsystemgroupmembership) | **Get** /systemgroups/{group_id}/membership | List the System Group's membership *SystemGroupsApi* | [**GraphSystemGroupAssociationsList**](docs/SystemGroupsApi.md#graphsystemgroupassociationslist) | **Get** /systemgroups/{group_id}/associations | List the associations of a System Group *SystemGroupsApi* | [**GraphSystemGroupAssociationsPost**](docs/SystemGroupsApi.md#graphsystemgroupassociationspost) | **Post** /systemgroups/{group_id}/associations | Manage the associations of a System Group *SystemGroupsApi* | [**GraphSystemGroupMemberOf**](docs/SystemGroupsApi.md#graphsystemgroupmemberof) | **Get** /systemgroups/{group_id}/memberof | List the System Group's parents *SystemGroupsApi* | [**GraphSystemGroupMembersList**](docs/SystemGroupsApi.md#graphsystemgroupmemberslist) | **Get** /systemgroups/{group_id}/members | List the members of a System Group *SystemGroupsApi* | [**GraphSystemGroupMembersPost**](docs/SystemGroupsApi.md#graphsystemgroupmemberspost) | **Post** /systemgroups/{group_id}/members | Manage the members of a System Group *SystemGroupsApi* | [**GraphSystemGroupMembership**](docs/SystemGroupsApi.md#graphsystemgroupmembership) | **Get** /systemgroups/{group_id}/membership | List the System Group's membership -*SystemGroupsApi* | [**GraphSystemGroupTraversePolicy**](docs/SystemGroupsApi.md#graphsystemgrouptraversepolicy) | **Get** /systemgroups/{group_id}/policies | List the Policies associated with a System Group -*SystemGroupsApi* | [**GraphSystemGroupTraverseUser**](docs/SystemGroupsApi.md#graphsystemgrouptraverseuser) | **Get** /systemgroups/{group_id}/users | List the Users associated with a System Group -*SystemGroupsApi* | [**GraphSystemGroupTraverseUserGroup**](docs/SystemGroupsApi.md#graphsystemgrouptraverseusergroup) | **Get** /systemgroups/{group_id}/usergroups | List the User Groups associated with a System Group +*SystemGroupsApi* | [**GraphSystemGroupTraversePolicy**](docs/SystemGroupsApi.md#graphsystemgrouptraversepolicy) | **Get** /systemgroups/{group_id}/policies | List the Policies bound to a System Group +*SystemGroupsApi* | [**GraphSystemGroupTraverseUser**](docs/SystemGroupsApi.md#graphsystemgrouptraverseuser) | **Get** /systemgroups/{group_id}/users | List the Users bound to a System Group +*SystemGroupsApi* | [**GraphSystemGroupTraverseUserGroup**](docs/SystemGroupsApi.md#graphsystemgrouptraverseusergroup) | **Get** /systemgroups/{group_id}/usergroups | List the User Groups bound to a System Group *SystemGroupsApi* | [**GroupsSystemDelete**](docs/SystemGroupsApi.md#groupssystemdelete) | **Delete** /systemgroups/{id} | Delete a System Group *SystemGroupsApi* | [**GroupsSystemGet**](docs/SystemGroupsApi.md#groupssystemget) | **Get** /systemgroups/{id} | View an individual System Group details *SystemGroupsApi* | [**GroupsSystemList**](docs/SystemGroupsApi.md#groupssystemlist) | **Get** /systemgroups | List all System Groups @@ -165,23 +181,40 @@ Class | Method | HTTP request | Description *SystemsApi* | [**GraphSystemAssociationsList**](docs/SystemsApi.md#graphsystemassociationslist) | **Get** /systems/{system_id}/associations | List the associations of a System *SystemsApi* | [**GraphSystemAssociationsPost**](docs/SystemsApi.md#graphsystemassociationspost) | **Post** /systems/{system_id}/associations | Manage associations of a System *SystemsApi* | [**GraphSystemMemberOf**](docs/SystemsApi.md#graphsystemmemberof) | **Get** /systems/{system_id}/memberof | List the parent Groups of a System -*SystemsApi* | [**GraphSystemTraversePolicy**](docs/SystemsApi.md#graphsystemtraversepolicy) | **Get** /systems/{system_id}/policies | List the Policies associated with a System -*SystemsApi* | [**GraphSystemTraverseUser**](docs/SystemsApi.md#graphsystemtraverseuser) | **Get** /systems/{system_id}/users | List the Users associated with a System +*SystemsApi* | [**GraphSystemTraverseCommand**](docs/SystemsApi.md#graphsystemtraversecommand) | **Get** /systems/{system_id}/commands | List the Commands bound to a System +*SystemsApi* | [**GraphSystemTraversePolicy**](docs/SystemsApi.md#graphsystemtraversepolicy) | **Get** /systems/{system_id}/policies | List the Policies bound to a System +*SystemsApi* | [**GraphSystemTraverseUser**](docs/SystemsApi.md#graphsystemtraverseuser) | **Get** /systems/{system_id}/users | List the Users bound to a System +*SystemsApi* | [**GraphSystemTraverseUserGroup**](docs/SystemsApi.md#graphsystemtraverseusergroup) | **Get** /systems/{system_id}/usergroups | List the User Groups bound to a System +*UserGroupAssociationsApi* | [**GraphUserGroupAssociationsList**](docs/UserGroupAssociationsApi.md#graphusergroupassociationslist) | **Get** /usergroups/{group_id}/associations | List the associations of a User Group. +*UserGroupAssociationsApi* | [**GraphUserGroupAssociationsPost**](docs/UserGroupAssociationsApi.md#graphusergroupassociationspost) | **Post** /usergroups/{group_id}/associations | Manage the associations of a User Group +*UserGroupAssociationsApi* | [**GraphUserGroupTraverseActiveDirectory**](docs/UserGroupAssociationsApi.md#graphusergrouptraverseactivedirectory) | **Get** /usergroups/{group_id}/activedirectories | List the Active Directories bound to a User Group +*UserGroupAssociationsApi* | [**GraphUserGroupTraverseApplication**](docs/UserGroupAssociationsApi.md#graphusergrouptraverseapplication) | **Get** /usergroups/{group_id}/applications | List the Applications bound to a User Group +*UserGroupAssociationsApi* | [**GraphUserGroupTraverseDirectory**](docs/UserGroupAssociationsApi.md#graphusergrouptraversedirectory) | **Get** /usergroups/{group_id}/directories | List the Directories bound to a User Group +*UserGroupAssociationsApi* | [**GraphUserGroupTraverseGSuite**](docs/UserGroupAssociationsApi.md#graphusergrouptraversegsuite) | **Get** /usergroups/{group_id}/gsuites | List the G Suite instances bound to a User Group +*UserGroupAssociationsApi* | [**GraphUserGroupTraverseLdapServer**](docs/UserGroupAssociationsApi.md#graphusergrouptraverseldapserver) | **Get** /usergroups/{group_id}/ldapservers | List the LDAP Servers bound to a User Group +*UserGroupAssociationsApi* | [**GraphUserGroupTraverseOffice365**](docs/UserGroupAssociationsApi.md#graphusergrouptraverseoffice365) | **Get** /usergroups/{group_id}/office365s | List the Office 365 instances bound to a User Group +*UserGroupAssociationsApi* | [**GraphUserGroupTraverseRadiusServer**](docs/UserGroupAssociationsApi.md#graphusergrouptraverseradiusserver) | **Get** /usergroups/{group_id}/radiusservers | List the RADIUS Servers bound to a User Group +*UserGroupAssociationsApi* | [**GraphUserGroupTraverseSystem**](docs/UserGroupAssociationsApi.md#graphusergrouptraversesystem) | **Get** /usergroups/{group_id}/systems | List the Systems bound to a User Group +*UserGroupAssociationsApi* | [**GraphUserGroupTraverseSystemGroup**](docs/UserGroupAssociationsApi.md#graphusergrouptraversesystemgroup) | **Get** /usergroups/{group_id}/systemgroups | List the System Groups bound to User Groups +*UserGroupMembersMembershipApi* | [**GraphUserGroupMemberOf**](docs/UserGroupMembersMembershipApi.md#graphusergroupmemberof) | **Get** /usergroups/{group_id}/memberof | List the User Group's parents +*UserGroupMembersMembershipApi* | [**GraphUserGroupMembersList**](docs/UserGroupMembersMembershipApi.md#graphusergroupmemberslist) | **Get** /usergroups/{group_id}/members | List the members of a User Group +*UserGroupMembersMembershipApi* | [**GraphUserGroupMembersPost**](docs/UserGroupMembersMembershipApi.md#graphusergroupmemberspost) | **Post** /usergroups/{group_id}/members | Manage the members of a User Group +*UserGroupMembersMembershipApi* | [**GraphUserGroupMembership**](docs/UserGroupMembersMembershipApi.md#graphusergroupmembership) | **Get** /usergroups/{group_id}/membership | List the User Group's membership *UserGroupsApi* | [**GraphUserGroupAssociationsList**](docs/UserGroupsApi.md#graphusergroupassociationslist) | **Get** /usergroups/{group_id}/associations | List the associations of a User Group. *UserGroupsApi* | [**GraphUserGroupAssociationsPost**](docs/UserGroupsApi.md#graphusergroupassociationspost) | **Post** /usergroups/{group_id}/associations | Manage the associations of a User Group *UserGroupsApi* | [**GraphUserGroupMemberOf**](docs/UserGroupsApi.md#graphusergroupmemberof) | **Get** /usergroups/{group_id}/memberof | List the User Group's parents *UserGroupsApi* | [**GraphUserGroupMembersList**](docs/UserGroupsApi.md#graphusergroupmemberslist) | **Get** /usergroups/{group_id}/members | List the members of a User Group *UserGroupsApi* | [**GraphUserGroupMembersPost**](docs/UserGroupsApi.md#graphusergroupmemberspost) | **Post** /usergroups/{group_id}/members | Manage the members of a User Group *UserGroupsApi* | [**GraphUserGroupMembership**](docs/UserGroupsApi.md#graphusergroupmembership) | **Get** /usergroups/{group_id}/membership | List the User Group's membership -*UserGroupsApi* | [**GraphUserGroupTraverseActiveDirectory**](docs/UserGroupsApi.md#graphusergrouptraverseactivedirectory) | **Get** /usergroups/{group_id}/activedirectories | List the Active Directories associated with a User Group -*UserGroupsApi* | [**GraphUserGroupTraverseApplication**](docs/UserGroupsApi.md#graphusergrouptraverseapplication) | **Get** /usergroups/{group_id}/applications | List the Applications associated with a User Group -*UserGroupsApi* | [**GraphUserGroupTraverseDirectory**](docs/UserGroupsApi.md#graphusergrouptraversedirectory) | **Get** /usergroups/{group_id}/directories | List the Directories associated with a User Group -*UserGroupsApi* | [**GraphUserGroupTraverseGSuite**](docs/UserGroupsApi.md#graphusergrouptraversegsuite) | **Get** /usergroups/{group_id}/gsuites | List the G Suite instances associated with a User Group -*UserGroupsApi* | [**GraphUserGroupTraverseLdapServer**](docs/UserGroupsApi.md#graphusergrouptraverseldapserver) | **Get** /usergroups/{group_id}/ldapservers | List the LDAP Servers associated with a User Group -*UserGroupsApi* | [**GraphUserGroupTraverseOffice365**](docs/UserGroupsApi.md#graphusergrouptraverseoffice365) | **Get** /usergroups/{group_id}/office365s | List the Office 365 instances associated with a User Group -*UserGroupsApi* | [**GraphUserGroupTraverseRadiusServer**](docs/UserGroupsApi.md#graphusergrouptraverseradiusserver) | **Get** /usergroups/{group_id}/radiusservers | List the RADIUS Servers associated with a User Group -*UserGroupsApi* | [**GraphUserGroupTraverseSystem**](docs/UserGroupsApi.md#graphusergrouptraversesystem) | **Get** /usergroups/{group_id}/systems | List the Systems associated with a User Group -*UserGroupsApi* | [**GraphUserGroupTraverseSystemGroup**](docs/UserGroupsApi.md#graphusergrouptraversesystemgroup) | **Get** /usergroups/{group_id}/systemgroups | List the System Groups associated with User Groups +*UserGroupsApi* | [**GraphUserGroupTraverseActiveDirectory**](docs/UserGroupsApi.md#graphusergrouptraverseactivedirectory) | **Get** /usergroups/{group_id}/activedirectories | List the Active Directories bound to a User Group +*UserGroupsApi* | [**GraphUserGroupTraverseApplication**](docs/UserGroupsApi.md#graphusergrouptraverseapplication) | **Get** /usergroups/{group_id}/applications | List the Applications bound to a User Group +*UserGroupsApi* | [**GraphUserGroupTraverseDirectory**](docs/UserGroupsApi.md#graphusergrouptraversedirectory) | **Get** /usergroups/{group_id}/directories | List the Directories bound to a User Group +*UserGroupsApi* | [**GraphUserGroupTraverseGSuite**](docs/UserGroupsApi.md#graphusergrouptraversegsuite) | **Get** /usergroups/{group_id}/gsuites | List the G Suite instances bound to a User Group +*UserGroupsApi* | [**GraphUserGroupTraverseLdapServer**](docs/UserGroupsApi.md#graphusergrouptraverseldapserver) | **Get** /usergroups/{group_id}/ldapservers | List the LDAP Servers bound to a User Group +*UserGroupsApi* | [**GraphUserGroupTraverseOffice365**](docs/UserGroupsApi.md#graphusergrouptraverseoffice365) | **Get** /usergroups/{group_id}/office365s | List the Office 365 instances bound to a User Group +*UserGroupsApi* | [**GraphUserGroupTraverseRadiusServer**](docs/UserGroupsApi.md#graphusergrouptraverseradiusserver) | **Get** /usergroups/{group_id}/radiusservers | List the RADIUS Servers bound to a User Group +*UserGroupsApi* | [**GraphUserGroupTraverseSystem**](docs/UserGroupsApi.md#graphusergrouptraversesystem) | **Get** /usergroups/{group_id}/systems | List the Systems bound to a User Group +*UserGroupsApi* | [**GraphUserGroupTraverseSystemGroup**](docs/UserGroupsApi.md#graphusergrouptraversesystemgroup) | **Get** /usergroups/{group_id}/systemgroups | List the System Groups bound to User Groups *UserGroupsApi* | [**GroupsUserDelete**](docs/UserGroupsApi.md#groupsuserdelete) | **Delete** /usergroups/{id} | Delete a User Group *UserGroupsApi* | [**GroupsUserGet**](docs/UserGroupsApi.md#groupsuserget) | **Get** /usergroups/{id} | View an indvidual User Group details *UserGroupsApi* | [**GroupsUserList**](docs/UserGroupsApi.md#groupsuserlist) | **Get** /usergroups | List all User Groups @@ -191,26 +224,34 @@ Class | Method | HTTP request | Description *UsersApi* | [**GraphUserAssociationsList**](docs/UsersApi.md#graphuserassociationslist) | **Get** /users/{user_id}/associations | List the associations of a User *UsersApi* | [**GraphUserAssociationsPost**](docs/UsersApi.md#graphuserassociationspost) | **Post** /users/{user_id}/associations | Manage the associations of a User *UsersApi* | [**GraphUserMemberOf**](docs/UsersApi.md#graphusermemberof) | **Get** /users/{user_id}/memberof | List the parent Groups of a User -*UsersApi* | [**GraphUserTraverseApplication**](docs/UsersApi.md#graphusertraverseapplication) | **Get** /users/{user_id}/applications | List the Applications associated with a User -*UsersApi* | [**GraphUserTraverseDirectory**](docs/UsersApi.md#graphusertraversedirectory) | **Get** /users/{user_id}/directories | List the Directories associated with a User -*UsersApi* | [**GraphUserTraverseGSuite**](docs/UsersApi.md#graphusertraversegsuite) | **Get** /users/{user_id}/gsuites | List the G Suite instances associated with a User -*UsersApi* | [**GraphUserTraverseLdapServer**](docs/UsersApi.md#graphusertraverseldapserver) | **Get** /users/{user_id}/ldapservers | List the LDAP servers associated with a User -*UsersApi* | [**GraphUserTraverseOffice365**](docs/UsersApi.md#graphusertraverseoffice365) | **Get** /users/{user_id}/office365s | List the Office 365 instances associated with User -*UsersApi* | [**GraphUserTraverseRadiusServer**](docs/UsersApi.md#graphusertraverseradiusserver) | **Get** /users/{user_id}/radiusservers | List the RADIUS Servers associated with a User -*UsersApi* | [**GraphUserTraverseSystem**](docs/UsersApi.md#graphusertraversesystem) | **Get** /users/{user_id}/systems | List the Systems associated with a User -*WorkdayApi* | [**WorkdaysDelete**](docs/WorkdayApi.md#workdaysdelete) | **Delete** /workdays/{id} | Delete Workday -*WorkdayApi* | [**WorkdaysGet**](docs/WorkdayApi.md#workdaysget) | **Get** /workdays/{id} | Get Workday -*WorkdayApi* | [**WorkdaysList**](docs/WorkdayApi.md#workdayslist) | **Get** /workdays | List Workdays -*WorkdayApi* | [**WorkdaysPost**](docs/WorkdayApi.md#workdayspost) | **Post** /workdays | Create new Workday -*WorkdayApi* | [**WorkdaysPut**](docs/WorkdayApi.md#workdaysput) | **Put** /workdays/{id} | Update Workday -*WorkdayApi* | [**WorkdaysReport**](docs/WorkdayApi.md#workdaysreport) | **Get** /workdays/{id}/report | Get Workday Report Results -*WorkdayApi* | [**WorkdaysSettings**](docs/WorkdayApi.md#workdayssettings) | **Get** /workdays/settings | Get Workday Settings +*UsersApi* | [**GraphUserTraverseApplication**](docs/UsersApi.md#graphusertraverseapplication) | **Get** /users/{user_id}/applications | List the Applications bound to a User +*UsersApi* | [**GraphUserTraverseDirectory**](docs/UsersApi.md#graphusertraversedirectory) | **Get** /users/{user_id}/directories | List the Directories bound to a User +*UsersApi* | [**GraphUserTraverseGSuite**](docs/UsersApi.md#graphusertraversegsuite) | **Get** /users/{user_id}/gsuites | List the G Suite instances bound to a User +*UsersApi* | [**GraphUserTraverseLdapServer**](docs/UsersApi.md#graphusertraverseldapserver) | **Get** /users/{user_id}/ldapservers | List the LDAP servers bound to a User +*UsersApi* | [**GraphUserTraverseOffice365**](docs/UsersApi.md#graphusertraverseoffice365) | **Get** /users/{user_id}/office365s | List the Office 365 instances bound to a User +*UsersApi* | [**GraphUserTraverseRadiusServer**](docs/UsersApi.md#graphusertraverseradiusserver) | **Get** /users/{user_id}/radiusservers | List the RADIUS Servers bound to a User +*UsersApi* | [**GraphUserTraverseSystem**](docs/UsersApi.md#graphusertraversesystem) | **Get** /users/{user_id}/systems | List the Systems bound to a User +*UsersApi* | [**GraphUserTraverseSystemGroup**](docs/UsersApi.md#graphusertraversesystemgroup) | **Get** /users/{user_id}/systemgroups | List the System Groups bound to a User +*WorkdayImportApi* | [**WorkdaysAuthorize**](docs/WorkdayImportApi.md#workdaysauthorize) | **Post** /workdays/{workday_id}/auth | Authorize Workday +*WorkdayImportApi* | [**WorkdaysDeauthorize**](docs/WorkdayImportApi.md#workdaysdeauthorize) | **Delete** /workdays/{workday_id}/auth | Deauthorize Workday +*WorkdayImportApi* | [**WorkdaysDelete**](docs/WorkdayImportApi.md#workdaysdelete) | **Delete** /workdays/{id} | Delete Workday +*WorkdayImportApi* | [**WorkdaysGet**](docs/WorkdayImportApi.md#workdaysget) | **Get** /workdays/{id} | Get Workday +*WorkdayImportApi* | [**WorkdaysImport**](docs/WorkdayImportApi.md#workdaysimport) | **Post** /workdays/{workday_id}/import/ | Workday Import +*WorkdayImportApi* | [**WorkdaysList**](docs/WorkdayImportApi.md#workdayslist) | **Get** /workdays | List Workdays +*WorkdayImportApi* | [**WorkdaysPost**](docs/WorkdayImportApi.md#workdayspost) | **Post** /workdays | Create new Workday +*WorkdayImportApi* | [**WorkdaysPut**](docs/WorkdayImportApi.md#workdaysput) | **Put** /workdays/{id} | Update Workday +*WorkdayImportApi* | [**WorkdaysSettings**](docs/WorkdayImportApi.md#workdayssettings) | **Get** /workdays/settings | Get Workday Settings +*WorkdayImportApi* | [**WorkdaysWorkers**](docs/WorkdayImportApi.md#workdaysworkers) | **Get** /workdays/{workday_id}/workers | List Workday Workers ## Documentation For Models - [ActiveDirectoryInput](docs/ActiveDirectoryInput.md) - - [Body](docs/Body.md) + - [AuthInfo](docs/AuthInfo.md) + - [AuthInput](docs/AuthInput.md) + - [AuthInputObject](docs/AuthInputObject.md) + - [AuthinputBasic](docs/AuthinputBasic.md) + - [AuthinputOauth](docs/AuthinputOauth.md) - [Directory](docs/Directory.md) - [GraphConnection](docs/GraphConnection.md) - [GraphManagementReq](docs/GraphManagementReq.md) @@ -219,7 +260,9 @@ Class | Method | HTTP request | Description - [GraphType](docs/GraphType.md) - [Group](docs/Group.md) - [GroupType](docs/GroupType.md) - - [InlineResponse200](docs/InlineResponse200.md) + - [JobDetails](docs/JobDetails.md) + - [JobId](docs/JobId.md) + - [JobWorkresult](docs/JobWorkresult.md) - [LdapServerInput](docs/LdapServerInput.md) - [ModelError](docs/ModelError.md) - [OauthCodeInput](docs/OauthCodeInput.md) @@ -233,22 +276,31 @@ Class | Method | HTTP request | Description - [PolicyValue](docs/PolicyValue.md) - [PolicyWithDetails](docs/PolicyWithDetails.md) - [SambaDomainInput](docs/SambaDomainInput.md) + - [SystemGraphManagementReq](docs/SystemGraphManagementReq.md) + - [SystemGraphManagementReqAttributes](docs/SystemGraphManagementReqAttributes.md) + - [SystemGraphManagementReqAttributesSudo](docs/SystemGraphManagementReqAttributesSudo.md) - [SystemGroup](docs/SystemGroup.md) - [SystemGroupData](docs/SystemGroupData.md) - [SystemGroupGraphManagementReq](docs/SystemGroupGraphManagementReq.md) - [SystemGroupMembersReq](docs/SystemGroupMembersReq.md) + - [UserGraphManagementReq](docs/UserGraphManagementReq.md) - [UserGroup](docs/UserGroup.md) - - [UserGroupData](docs/UserGroupData.md) - - [UserGroupDataAttributes](docs/UserGroupDataAttributes.md) - - [UserGroupDataAttributesPosixGroups](docs/UserGroupDataAttributesPosixGroups.md) - [UserGroupGraphManagementReq](docs/UserGroupGraphManagementReq.md) - [UserGroupMembersReq](docs/UserGroupMembersReq.md) + - [UserGroupPost](docs/UserGroupPost.md) + - [UserGroupPostAttributes](docs/UserGroupPostAttributes.md) + - [UserGroupPostAttributesPosixGroups](docs/UserGroupPostAttributesPosixGroups.md) + - [UserGroupPut](docs/UserGroupPut.md) + - [UserGroupPutAttributes](docs/UserGroupPutAttributes.md) + - [WorkdayFields](docs/WorkdayFields.md) - [WorkdayInput](docs/WorkdayInput.md) - [WorkdayOutput](docs/WorkdayOutput.md) - - [WorkdayReportResult](docs/WorkdayReportResult.md) - [WorkdayReportRow](docs/WorkdayReportRow.md) - [WorkdayRequest](docs/WorkdayRequest.md) - - [WorkdaysOauth](docs/WorkdaysOauth.md) + - [WorkdayWorker](docs/WorkdayWorker.md) + - [Workdayimportresult](docs/Workdayimportresult.md) + - [WorkdayimportresultResult](docs/WorkdayimportresultResult.md) + - [WorkdayoutputAuth](docs/WorkdayoutputAuth.md) - [ActiveDirectoryOutput](docs/ActiveDirectoryOutput.md) - [LdapServerOutput](docs/LdapServerOutput.md) - [SambaDomainOutput](docs/SambaDomainOutput.md) @@ -261,7 +313,7 @@ Class | Method | HTTP request | Description Example ``` - auth := context.WithValue(context.TODO(), sw.ContextAPIKey, sw.APIKey{ + auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{ Key: "APIKEY", Prefix: "Bearer", // Omit if not necessary. }) diff --git a/v2/active_directory_api.go b/v2/active_directory_api.go index 9731e8f..b5f243c 100644 --- a/v2/active_directory_api.go +++ b/v2/active_directory_api.go @@ -1,16 +1,16 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 import ( + "io/ioutil" "net/url" "net/http" "strings" @@ -28,8 +28,8 @@ type ActiveDirectoryApiService service /* ActiveDirectoryApiService Delete an Active Directory - This endpoint allows you to delete an Active Directory. - * @param ctx context.Context Authentication Context + This endpoint allows you to delete an Active Directory Instance. #### Sample Request ``` curl -X DELETE https://console.jumpcloud.com/api/v2/activedirectories/{ActiveDirectory_ID} \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param id ObjectID of this Active Directory instance. @param contentType @param accept @@ -89,21 +89,22 @@ func (a *ActiveDirectoryApiService) ActivedirectoriesDelete(ctx context.Context, return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } /* ActiveDirectoryApiService Get an Active Directory - This endpoint returns a specific Active Directory. - * @param ctx context.Context Authentication Context + This endpoint returns a specific Active Directory. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/activedirectories/{ActiveDirectory_ID} \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param id ObjectID of this Active Directory instance. @param contentType @param accept @@ -164,17 +165,18 @@ func (a *ActiveDirectoryApiService) ActivedirectoriesGet(ctx context.Context, id return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -182,15 +184,16 @@ func (a *ActiveDirectoryApiService) ActivedirectoriesGet(ctx context.Context, id } /* ActiveDirectoryApiService List Active Directories - * @param ctx context.Context Authentication Context + This endpoint allows you to list all your Active Directory Instances. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/activedirectories/ \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: - @param "fields" (string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. - @param "filter" (string) Supported operators are: eq, ne, gt, ge, lt, le, between, search + @param "fields" ([]string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. - @param "sort" (string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. @return []ActiveDirectoryOutput*/ func (a *ActiveDirectoryApiService) ActivedirectoriesList(ctx context.Context, contentType string, accept string, localVarOptionals map[string]interface{}) ([]ActiveDirectoryOutput, *http.Response, error) { var ( @@ -208,27 +211,18 @@ func (a *ActiveDirectoryApiService) ActivedirectoriesList(ctx context.Context, c localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if err := typeCheckParameter(localVarOptionals["fields"], "string", "fields"); err != nil { - return successPayload, nil, err - } - if err := typeCheckParameter(localVarOptionals["filter"], "string", "filter"); err != nil { - return successPayload, nil, err - } if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { return successPayload, nil, err } if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { return successPayload, nil, err } - if err := typeCheckParameter(localVarOptionals["sort"], "string", "sort"); err != nil { - return successPayload, nil, err - } - if localVarTempParam, localVarOk := localVarOptionals["fields"].(string); localVarOk { - localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["fields"].([]string); localVarOk { + localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "csv")) } - if localVarTempParam, localVarOk := localVarOptionals["filter"].(string); localVarOk { - localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) } if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) @@ -236,8 +230,8 @@ func (a *ActiveDirectoryApiService) ActivedirectoriesList(ctx context.Context, c if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } - if localVarTempParam, localVarOk := localVarOptionals["sort"].(string); localVarOk { - localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -277,17 +271,18 @@ func (a *ActiveDirectoryApiService) ActivedirectoriesList(ctx context.Context, c return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -295,8 +290,8 @@ func (a *ActiveDirectoryApiService) ActivedirectoriesList(ctx context.Context, c } /* ActiveDirectoryApiService Create a new Active Directory - This endpoint allows you to create a new Active Directory. - * @param ctx context.Context Authentication Context + This endpoint allows you to create a new Active Directory. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/activedirectories/ \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"domain\": \"{DC=AD_domain_name;DC=com}\" } ' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: @@ -361,17 +356,18 @@ func (a *ActiveDirectoryApiService) ActivedirectoriesPost(ctx context.Context, c return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -379,8 +375,8 @@ func (a *ActiveDirectoryApiService) ActivedirectoriesPost(ctx context.Context, c } /* ActiveDirectoryApiService List the associations of an Active Directory instance - This endpoint returns the direct associations of this Active Directory instance. A direct association can be a non-homogenous relationship between 2 different objects. For example Active Directory and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/activedirectories/{activedirectory_id}/associations?targets=user ``` - * @param ctx context.Context Authentication Context + This endpoint returns the direct associations of this Active Directory instance. A direct association can be a non-homogenous relationship between 2 different objects. For example Active Directory and Users. #### Sample Request ``` curl -X GET 'https://console.jumpcloud.com/api/v2/activedirectories/{ActiveDirectory_ID}/associations?targets=user \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param activedirectoryId @param targets @param contentType @@ -458,17 +454,18 @@ func (a *ActiveDirectoryApiService) GraphActiveDirectoryAssociationsList(ctx con return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -476,8 +473,8 @@ func (a *ActiveDirectoryApiService) GraphActiveDirectoryAssociationsList(ctx con } /* ActiveDirectoryApiService Manage the associations of an Active Directory instance - This endpoint allows you to manage the _direct_ associations of an Active Directory instance. A direct association can be a non-homogenous relationship between 2 different objects. For example Active Directory and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/activedirectories/{activedirectory_id}/associations ``` - * @param ctx context.Context Authentication Context + This endpoint allows you to manage the _direct_ associations of an Active Directory instance. A direct association can be a non-homogenous relationship between 2 different objects. For example Active Directory and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/activedirectories/{AD_Instance_ID}/associations \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user\", \"id\": \"{User_ID}\" } ' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param activedirectoryId @param contentType @param accept @@ -543,21 +540,22 @@ func (a *ActiveDirectoryApiService) GraphActiveDirectoryAssociationsPost(ctx con return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } -/* ActiveDirectoryApiService List the User Groups associated with an Active Directory instance - This endpoint will return User Groups associated with an Active Directory instance. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Active Directory instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this Active Directory instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/activedirectories/{activedirectory_id}/usersgroups ``` - * @param ctx context.Context Authentication Context +/* ActiveDirectoryApiService List the User Groups bound to an Active Directory instance + This endpoint will return all Users Groups bound to an Active Directory instance, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Active Directory instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this Active Directory instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/activedirectories/{ActiveDirectory_ID}/usergroups \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param activedirectoryId ObjectID of the Active Directory instance. @param contentType @param accept @@ -633,17 +631,18 @@ func (a *ActiveDirectoryApiService) GraphActiveDirectoryTraverseUserGroup(ctx co return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } diff --git a/v2/active_directory_input.go b/v2/active_directory_input.go index a78953a..5ec60e2 100644 --- a/v2/active_directory_input.go +++ b/v2/active_directory_input.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/active_directory_output.go b/v2/active_directory_output.go index 34d8fdb..8238749 100644 --- a/v2/active_directory_output.go +++ b/v2/active_directory_output.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/api/swagger.yaml b/v2/api/swagger.yaml new file mode 100644 index 0000000..daeaa92 --- /dev/null +++ b/v2/api/swagger.yaml @@ -0,0 +1,10896 @@ +--- +swagger: "2.0" +info: + description: "V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's\ + \ API. This set of endpoints allows JumpCloud customers to manage objects, groupings\ + \ and mappings. The most recent version of JumpCloud's API. This set of endpoints\ + \ allows JumpCloud customers to manage objects, groupings and mappings." + version: "2.0" + title: "JumpCloud APIs" +host: "console.jumpcloud.com" +basePath: "/api/v2" +schemes: +- "https" +consumes: +- "application/json" +produces: +- "application/json" +paths: + /activedirectories/{activedirectory_id}/associations: + get: + tags: + - "Graph" + - "Active Directory" + summary: "List the associations of an Active Directory instance" + description: "This endpoint returns the direct associations of this Active Directory\ + \ instance.\n\nA direct association can be a non-homogenous relationship between\ + \ 2 different objects. For example Active Directory and Users.\n\n\n#### Sample\ + \ Request\n```\ncurl -X GET 'https://console.jumpcloud.com/api/v2/activedirectories/{ActiveDirectory_ID}/associations?targets=user\ + \ \\\n -H 'accept: application/json' \\\n -H 'content-type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "graph_activeDirectoryAssociationsList" + parameters: + - name: "activedirectory_id" + in: "path" + required: true + type: "string" + x-exportParamName: "ActivedirectoryId" + - name: "targets" + in: "query" + description: "" + required: true + type: "array" + items: + type: "string" + enum: + - "active_directory" + - "application" + - "command" + - "g_suite" + - "ldap_server" + - "office_365" + - "policy" + - "radius_server" + - "system" + - "system_group" + - "user" + - "user_group" + x-exportParamName: "Targets" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "" + schema: + type: "array" + items: + $ref: "#/definitions/GraphConnection" + security: + - x-api-key: [] + x-stoplight: + id: "graph_activeDirectoryAssociationsList" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + post: + tags: + - "Graph" + - "Active Directory" + summary: "Manage the associations of an Active Directory instance" + description: "This endpoint allows you to manage the _direct_ associations of\ + \ an Active Directory instance.\n\nA direct association can be a non-homogenous\ + \ relationship between 2 different objects. For example Active Directory and\ + \ Users.\n\n#### Sample Request\n```\ncurl -X POST https://console.jumpcloud.com/api/v2/activedirectories/{AD_Instance_ID}/associations\ + \ \\\n -H 'accept: application/json' \\\n -H 'content-type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}' \\\n -d '{\n \"op\": \"add\",\n\ + \ \"type\": \"user\",\n \"id\": \"{User_ID}\"\n}\n'\n```" + operationId: "graph_activeDirectoryAssociationsPost" + parameters: + - name: "activedirectory_id" + in: "path" + required: true + type: "string" + x-exportParamName: "ActivedirectoryId" + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/GraphManagementReq" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 204: + description: "" + security: + - x-api-key: [] + x-stoplight: + id: "graph_activeDirectoryAssociationsPost" + beforeScript: null + afterScript: null + public: false + mock: + enabled: false + dynamic: false + statusCode: 200 + /activedirectories: + get: + tags: + - "Active Directory" + summary: "List Active Directories" + description: "This endpoint allows you to list all your Active Directory Instances.\ + \ \n\n#### Sample Request\n```\ncurl -X GET https://console.jumpcloud.com/api/v2/activedirectories/\ + \ \\\n -H 'accept: application/json' \\\n -H 'content-type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n ```" + operationId: "activedirectories_list" + parameters: + - name: "fields" + in: "query" + description: "The comma separated fields included in the returned records.\n\ + If omitted the default list of fields will be returned.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Fields" + - name: "filter" + in: "query" + description: "Supported operators are: eq, ne, gt, ge, lt, le, between, search,\ + \ in" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Filter" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "sort" + in: "query" + description: "The comma separated fields used to sort the collection.\nDefault\ + \ sort is ascending, prefix with `-` to sort descending.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Sort" + responses: + 200: + description: "" + schema: + type: "array" + items: + $ref: "#/definitions/active-directory-output" + security: + - x-api-key: [] + x-stoplight: + id: "activedirectories_list" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + post: + tags: + - "Active Directory" + summary: "Create a new Active Directory" + description: "This endpoint allows you to create a new Active Directory.\n\n\ + \n#### Sample Request\n```\ncurl -X POST https://console.jumpcloud.com/api/v2/activedirectories/\ + \ \\\n -H 'accept: application/json' \\\n -H 'content-type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}' \\\n -d '{\n \"domain\": \"{DC=AD_domain_name;DC=com}\"\ + \n}\n'\n```" + operationId: "activedirectories_post" + parameters: + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/active-directory-input" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 201: + description: "" + schema: + $ref: "#/definitions/active-directory-output" + security: + - x-api-key: [] + x-stoplight: + id: "activedirectories_post" + beforeScript: null + afterScript: null + public: false + mock: + enabled: false + dynamic: false + statusCode: 200 + /activedirectories/{id}: + get: + tags: + - "Active Directory" + summary: "Get an Active Directory" + description: "This endpoint returns a specific Active Directory.\n\n#### Sample\ + \ Request\n\n```\ncurl -X GET https://console.jumpcloud.com/api/v2/activedirectories/{ActiveDirectory_ID}\ + \ \\\n -H 'accept: application/json' \\\n -H 'content-type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n ```" + operationId: "activedirectories_get" + parameters: + - name: "id" + in: "path" + description: "ObjectID of this Active Directory instance." + required: true + type: "string" + x-exportParamName: "Id" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "" + schema: + $ref: "#/definitions/active-directory-output" + security: + - x-api-key: [] + x-stoplight: + id: "activedirectories_get" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + delete: + tags: + - "Active Directory" + summary: "Delete an Active Directory" + description: "This endpoint allows you to delete an Active Directory Instance.\n\ + \n#### Sample Request\n```\ncurl -X DELETE https://console.jumpcloud.com/api/v2/activedirectories/{ActiveDirectory_ID}\ + \ \\\n -H 'accept: application/json' \\\n -H 'content-type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY'\n ```" + operationId: "activedirectories_delete" + parameters: + - name: "id" + in: "path" + description: "ObjectID of this Active Directory instance." + required: true + type: "string" + x-exportParamName: "Id" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 204: + description: "" + security: + - x-api-key: [] + x-stoplight: + id: "activedirectories_delete" + beforeScript: null + afterScript: null + public: false + mock: + enabled: false + dynamic: false + statusCode: 200 + /activedirectories/{activedirectory_id}/usergroups: + get: + tags: + - "Graph" + - "Active Directory" + summary: "List the User Groups bound to an Active Directory instance" + description: "This endpoint will return all Users Groups bound to an Active\ + \ Directory instance, either directly or indirectly, essentially traversing\ + \ the JumpCloud Graph for your Organization.\n\nEach element will contain\ + \ the group's type, id, attributes and paths.\n\nThe `attributes` object is\ + \ a key/value hash of compiled graph attributes for all paths followed.\n\n\ + The `paths` array enumerates each path from this Active Directory instance\ + \ to the corresponding User Group; this array represents all grouping and/or\ + \ associations that would have to be removed to deprovision the User Group\ + \ from this Active Directory instance.\n\nSee `/members` and `/associations`\ + \ endpoints to manage those collections.\n\n#### Sample Request\n```\ncurl\ + \ -X GET https://console.jumpcloud.com/api/v2/activedirectories/{ActiveDirectory_ID}/usergroups\ + \ \\\n -H 'accept: application/json' \\\n -H 'content-type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "graph_activeDirectoryTraverseUserGroup" + parameters: + - name: "activedirectory_id" + in: "path" + description: "ObjectID of the Active Directory instance." + required: true + type: "string" + x-exportParamName: "ActivedirectoryId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + security: + - x-api-key: [] + x-stoplight: + id: "graph_activeDirectoryTraverseUserGroup" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /applications/{application_id}/associations: + get: + tags: + - "Graph" + - "Applications" + summary: "List the associations of an Application" + description: "This endpoint will return the _direct_ associations of an Application.\ + \ A direct association can be a non-homogenous relationship between 2 different\ + \ objects. for example Applications and User Groups.\n\n\n#### Sample Request\n\ + ```\ncurl -X GET 'https://console.jumpcloud.com/api/v2/applications/{Application_ID}/associations?targets=user_group\ + \ \\\n -H 'accept: application/json' \\\n -H 'content-type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "graph_applicationAssociationsList" + parameters: + - name: "application_id" + in: "path" + description: "ObjectID of the Application." + required: true + type: "string" + x-exportParamName: "ApplicationId" + - name: "targets" + in: "query" + description: "" + required: true + type: "array" + items: + type: "string" + enum: + - "active_directory" + - "application" + - "command" + - "g_suite" + - "ldap_server" + - "office_365" + - "policy" + - "radius_server" + - "system" + - "system_group" + - "user" + - "user_group" + x-exportParamName: "Targets" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphConnection" + examples: + application/json: + - type: "user_group" + id: "57980e9c8bdf6b5616207033" + attributes: null + - type: "user" + id: "57980e9c8bdf6b5616207035" + attributes: null + - type: "user_group" + id: "57980e9c8bdf6b5616207034" + attributes: null + security: + - x-api-key: [] + x-stoplight: + id: "graph_applicationAssociationsList" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + post: + tags: + - "Graph" + - "Applications" + summary: "Manage the associations of an Application" + description: "This endpoint allows you to manage the _direct_ associations of\ + \ an Application. A direct association can be a non-homogenous relationship\ + \ between 2 different objects. for example Application and User Groups.\n\n\ + #### Sample Request\n```\ncurl -X POST 'https://console.jumpcloud.com/api/v2/applications/{Application_ID}/associations'\ + \ \\\n -H 'accept: application/json' \\\n -H 'content-type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}' \\\n -d '{\n \"op\": \"add\",\n \"\ + type\": \"user_group\",\n \"id\": \"{Group_ID}\"\n}'\n```" + operationId: "graph_applicationAssociationsPost" + parameters: + - name: "application_id" + in: "path" + description: "ObjectID of the Application." + required: true + type: "string" + x-exportParamName: "ApplicationId" + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/GraphManagementReq" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 204: + description: "OK" + security: + - x-api-key: [] + x-stoplight: + id: "graph_applicationAssociationsPost" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + x-swagger-jumpcloud-auto-insert: true + /applications/{application_id}/users: + get: + tags: + - "Graph" + - "Applications" + summary: "List the Users bound to an Application" + description: "This endpoint will return all Users bound to an Application, either\ + \ directly or indirectly, essentially traversing the JumpCloud Graph for your\ + \ Organization. \n\nEach element will contain the type, id, attributes and\ + \ paths.\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this Application to the corresponding User; this array represents\ + \ all grouping and/or associations that would have to be removed to deprovision\ + \ the User from this Application.\n\nSee `/members` and `/associations` endpoints\ + \ to manage those collections.\n\n#### Sample Request\n```\ncurl -X GET https://console.jumpcloud.com/api/v2/applications/{Application_ID}/users\ + \ \\\n -H 'accept: application/json' \\\n -H 'content-type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "graph_applicationTraverseUser" + parameters: + - name: "application_id" + in: "path" + description: "ObjectID of the Application." + required: true + type: "string" + x-exportParamName: "ApplicationId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "user" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "user" + id: "57980e9c8bdf6b5616207033" + - - type: "user_group" + id: "57980e9c8bdf6b5616207032" + - type: "user" + id: "57980e9c8bdf6b5616207034" + paths: + - - type: "user_group" + id: "57980e9c8bdf6b5616207034" + security: + - x-api-key: [] + x-stoplight: + id: "graph_applicationTraverseUser" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /applications/{application_id}/usergroups: + get: + tags: + - "Graph" + - "Applications" + summary: "List the User Groups bound to an Application" + description: "This endpoint will return all Users Groups bound to an Application,\ + \ either directly or indirectly, essentially traversing the JumpCloud Graph\ + \ for your Organization.\n\nEach element will contain the group's type, id,\ + \ attributes and paths.\n\nThe `attributes` object is a key/value hash of\ + \ compiled graph attributes for all paths followed.\n\nThe `paths` array enumerates\ + \ each path from this Application to the corresponding User Group; this array\ + \ represents all grouping and/or associations that would have to be removed\ + \ to deprovision the User Group from this Application.\n\nSee `/members` and\ + \ `/associations` endpoints to manage those collections.\n\n#### Sample Request\n\ + ```\ncurl -X GET https://console.jumpcloud.com/api/v2/applications/{Application_ID}/usergroups\ + \ \\\n -H 'accept: application/json' \\\n -H 'content-type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "graph_applicationTraverseUserGroup" + parameters: + - name: "application_id" + in: "path" + description: "ObjectID of the Application." + required: true + type: "string" + x-exportParamName: "ApplicationId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "user_group" + id: "57980e9c8bdf6b5616207033" + paths: [] + - type: "user_group" + id: "57980e9c8bdf6b5616207034" + paths: [] + security: + - x-api-key: [] + x-stoplight: + id: "graph_applicationTraverseUserGroup" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /jobs/{id}/results: + get: + tags: + - "Bulk Job Requests" + summary: "List Job Results" + description: "Under development" + operationId: "job_results" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + x-exportParamName: "Id" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "" + schema: + type: "array" + items: + $ref: "#/definitions/job-workresult" + security: + - x-api-key: [] + x-stoplight: + id: "job_results" + beforeScript: null + afterScript: null + public: false + mock: + enabled: false + dynamic: false + statusCode: 200 + /jobs/{id}: + get: + tags: + - "Bulk Job Requests" + summary: "Get Job" + description: "Under development" + operationId: "job_get" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + x-exportParamName: "Id" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "" + schema: + $ref: "#/definitions/job-details" + security: + - x-api-key: [] + x-stoplight: + id: "job_get" + beforeScript: null + afterScript: null + public: false + mock: + enabled: false + dynamic: false + statusCode: 200 + /commands/{command_id}/associations: + get: + tags: + - "Graph" + - "Commands" + summary: "List the associations of a Command" + description: "This endpoint will return the _direct_ associations of this Command.\n\ + \nA direct association can be a non-homogenous relationship between 2 different\ + \ objects. for example Commands and User Groups.\n\n\n#### Sample Request\n\ + ```\ncurl -X GET https://console.jumpcloud.com/api/v2/commands/{Command_ID}/associations?targets=system_group\ + \ \\\n -H 'accept: application/json' \\\n -H 'content-type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "graph_commandAssociationsList" + parameters: + - name: "command_id" + in: "path" + description: "ObjectID of the Command." + required: true + type: "string" + x-exportParamName: "CommandId" + - name: "targets" + in: "query" + description: "" + required: true + type: "array" + items: + type: "string" + enum: + - "active_directory" + - "application" + - "command" + - "g_suite" + - "ldap_server" + - "office_365" + - "policy" + - "radius_server" + - "system" + - "system_group" + - "user" + - "user_group" + x-exportParamName: "Targets" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphConnection" + examples: + application/json: + - type: "system_group" + id: "57980e9c8bdf6b5616207033" + attributes: null + - type: "system" + id: "57980e9c8bdf6b5616207035" + attributes: null + - type: "system_group" + id: "57980e9c8bdf6b5616207034" + attributes: null + security: + - x-api-key: [] + x-stoplight: + id: "graph_commandAssociationsList" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + post: + tags: + - "Graph" + - "Commands" + summary: "Manage the associations of a Command" + description: "This endpoint will allow you to manage the _direct_ associations\ + \ of this Command.\n\nA direct association can be a non-homogenous relationship\ + \ between 2 different objects. for example Commands and User Groups.\n\n\n\ + #### Sample Request\n```\n curl -X POST https://console.jumpcloud.com/api/v2/commands/{Command_ID}/associations\ + \ \\\n -H 'accept: application/json' \\\n -H 'content-type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}' \\\n -d '{\n \"op\": \"add\",\n \"\ + type\": \"system_group\",\n \"id\": \"Group_ID\"\n}'\n```" + operationId: "graph_commandAssociationsPost" + parameters: + - name: "command_id" + in: "path" + description: "ObjectID of the Command." + required: true + type: "string" + x-exportParamName: "CommandId" + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/GraphManagementReq" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 204: + description: "OK" + examples: + application/json: + op: "add" + type: "g_suite" + id: "0000000" + security: + - x-api-key: [] + x-stoplight: + id: "graph_commandAssociationsPost" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + x-swagger-jumpcloud-auto-insert: true + /commands/{command_id}/systems: + get: + tags: + - "Graph" + - "Commands" + summary: "List the Systems bound to a Command" + description: "This endpoint will return all Systems bound to a Command, either\ + \ directly or indirectly, essentially traversing the JumpCloud Graph for your\ + \ Organization.\n\nEach element will contain the type, id, attributes and\ + \ paths.\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this Command to the corresponding System; this array represents\ + \ all grouping and/or associations that would have to be removed to deprovision\ + \ the System from this Command.\n\nSee `/members` and `/associations` endpoints\ + \ to manage those collections.\n\n#### Sample Request\n```\ncurl -X GET https://console.jumpcloud.com/api/v2/commands/{Command_ID}/systems\ + \ \\\n -H 'accept: application/json' \\\n -H 'content-type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "graph_commandTraverseSystem" + parameters: + - name: "command_id" + in: "path" + description: "ObjectID of the Command." + required: true + type: "string" + x-exportParamName: "CommandId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "system" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "system" + id: "57980e9c8bdf6b5616207033" + - - type: "system_group" + id: "57980e9c8bdf6b5616207032" + - type: "system" + id: "57980e9c8bdf6b5616207034" + paths: + - - type: "system_group" + id: "57980e9c8bdf6b5616207034" + security: + - x-api-key: [] + x-stoplight: + id: "graph_commandTraverseSystem" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /commands/{command_id}/systemgroups: + get: + tags: + - "Graph" + - "Commands" + summary: "List the System Groups bound to a Command" + description: "This endpoint will return all System Groups bound to a Command,\ + \ either directly or indirectly, essentially traversing the JumpCloud Graph\ + \ for your Organization.\n\nEach element will contain the group's type, id,\ + \ attributes and paths.\n\nThe `attributes` object is a key/value hash of\ + \ compiled graph attributes for all paths followed.\n\nThe `paths` array enumerates\ + \ each path from this Command to the corresponding System Group; this array\ + \ represents all grouping and/or associations that would have to be removed\ + \ to deprovision the System Group from this Command.\n\nSee `/members` and\ + \ `/associations` endpoints to manage those collections.\n\n#### Sample Request\n\ + ```\ncurl -X GET https://console.jumpcloud.com/api/v2/commands/{Command_ID}/systemgroups\ + \ \\\n -H 'accept: application/json' \\\n -H 'content-type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "graph_commandTraverseSystemGroup" + parameters: + - name: "command_id" + in: "path" + description: "ObjectID of the Command." + required: true + type: "string" + x-exportParamName: "CommandId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "system_group" + id: "57980e9c8bdf6b5616207033" + paths: [] + - type: "system_group" + id: "57980e9c8bdf6b5616207034" + paths: [] + security: + - x-api-key: [] + x-stoplight: + id: "graph_commandTraverseSystemGroup" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /directories: + get: + tags: + - "Directories" + summary: "List All Directories" + description: "This endpoint returns all active directories (LDAP, O365 Suite,\ + \ G-Suite).\n\n#### Sample Request\n```\n curl -X GET https://console.jumpcloud.com/api/v2/directories\ + \ \\\n -H 'accept: application/json' \\\n -H 'content-type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "directories_list" + parameters: + - name: "fields" + in: "query" + description: "The comma separated fields included in the returned records.\n\ + If omitted the default list of fields will be returned.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Fields" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "sort" + in: "query" + description: "The comma separated fields used to sort the collection.\nDefault\ + \ sort is ascending, prefix with `-` to sort descending.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Sort" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/Directory" + examples: + application/json: + - type: "ldap_server" + id: "0000000" + name: "my_ldap" + - type: "g_suite" + id: "0000000" + name: "my_gsuite" + default: + description: "Unexpected error" + schema: + $ref: "#/definitions/Error" + security: + - x-api-key: [] + x-stoplight: + id: "directories_list" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /groups: + get: + tags: + - "Groups" + summary: "List All Groups" + description: "This endpoint returns all Groups that exist in your organization.\n\ + \n#### Available filter fields:\n - `name`\n - `disabled`\n - `type`\n\n\ + #### Sample Request\n\n```\n curl -X GET \\\n https://console.jumpcloud.com/api/v2/groups\ + \ \\\n -H 'accept: application/json' \\\n -H 'content-type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "groups_list" + parameters: + - name: "fields" + in: "query" + description: "The comma separated fields included in the returned records.\n\ + If omitted the default list of fields will be returned.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Fields" + - name: "filter" + in: "query" + description: "Supported operators are: eq, ne, gt, ge, lt, le, between, search,\ + \ in" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Filter" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "sort" + in: "query" + description: "The comma separated fields used to sort the collection.\nDefault\ + \ sort is ascending, prefix with `-` to sort descending.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Sort" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/Group" + examples: + application/json: + - name: "my_user_group" + type: "user_group" + - name: "my_system_group" + type: "system_group" + - {} + default: + description: "Unexpected error" + schema: + $ref: "#/definitions/Error" + security: + - x-api-key: [] + x-stoplight: + id: "groups_list" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /gsuites/{gsuite_id}/associations: + get: + tags: + - "Graph" + - "G Suite" + summary: "List the associations of a G Suite instance" + description: "This endpoint returns the _direct_ associations of this G Suite\ + \ instance.\n\nA direct association can be a non-homogenous relationship between\ + \ 2 different objects. for example G Suite and Users.\n\n\n#### Sample Request\n\ + ```\ncurl -X GET 'https://console.jumpcloud.com/api/v2/gsuites/{Gsuite_ID}/associations?targets=user_group\ + \ \\\n -H 'accept: application/json' \\\n -H 'content-type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "graph_gSuiteAssociationsList" + parameters: + - name: "gsuite_id" + in: "path" + description: "ObjectID of the G Suite instance." + required: true + type: "string" + x-exportParamName: "GsuiteId" + - name: "targets" + in: "query" + description: "" + required: true + type: "array" + items: + type: "string" + enum: + - "active_directory" + - "application" + - "command" + - "g_suite" + - "ldap_server" + - "office_365" + - "policy" + - "radius_server" + - "system" + - "system_group" + - "user" + - "user_group" + x-exportParamName: "Targets" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphConnection" + examples: + application/json: + - type: "user_group" + id: "57980e9c8bdf6b5616207033" + attributes: null + - type: "user" + id: "57980e9c8bdf6b5616207035" + attributes: null + - type: "user_group" + id: "57980e9c8bdf6b5616207034" + attributes: null + security: + - x-api-key: [] + x-stoplight: + id: "graph_gSuiteAssociationsList" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + post: + tags: + - "Graph" + - "G Suite" + summary: "Manage the associations of a G Suite instance" + description: "This endpoint returns the _direct_ associations of this G Suite\ + \ instance.\n\nA direct association can be a non-homogenous relationship between\ + \ 2 different objects. for example G Suite and Users.\n\n\n#### Sample Request\n\ + ```\ncurl -X POST https://console.jumpcloud.com/api/v2/gsuites/{Gsuite_ID}/associations\ + \ \\\n -H 'accept: application/json' \\\n -H 'content-type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}' \\\n -d '{\n \"op\": \"add\",\n \"\ + type\": \"user_group\",\n \"id\": \"{Group_ID}\"\n}'\n```" + operationId: "graph_gSuiteAssociationsPost" + parameters: + - name: "gsuite_id" + in: "path" + description: "ObjectID of the G Suite instance." + required: true + type: "string" + x-exportParamName: "GsuiteId" + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/GraphManagementReq" + x-exportParamName: "Body" + responses: + 204: + description: "OK" + security: + - x-api-key: [] + x-stoplight: + id: "graph_gSuiteAssociationsPost" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + x-swagger-jumpcloud-auto-insert: true + /gsuites/{gsuite_id}/users: + get: + tags: + - "Graph" + - "G Suite" + summary: "List the Users bound to a G Suite instance" + description: "This endpoint will return all Users bound to a G Suite instance,\ + \ either directly or indirectly, essentially traversing the JumpCloud Graph\ + \ for your Organization.\n\nEach element will contain the type, id, attributes\ + \ and paths.\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this G Suite instance to the corresponding User; this array represents\ + \ all grouping and/or associations that would have to be removed to deprovision\ + \ the User from this G Suite instance.\n\nSee `/members` and `/associations`\ + \ endpoints to manage those collections.\n\n#### Sample Request\n```\n curl\ + \ -X GET https://console.jumpcloud.com/api/v2/gsuites/{Gsuite_ID}/users \\\ + \n -H 'accept: application/json' \\\n -H 'content-type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "graph_gSuiteTraverseUser" + parameters: + - name: "gsuite_id" + in: "path" + description: "ObjectID of the G Suite instance." + required: true + type: "string" + x-exportParamName: "GsuiteId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "user" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "g_suite" + id: "57980e9c8bdf6b5616207032" + - type: "user" + id: "57980e9c8bdf6b5616207033" + - type: "user" + id: "57980e9c8bdf6b5616207034" + paths: + - - type: "g_suite" + id: "57980e9c8bdf6b5616207033" + - type: "user" + id: "57980e9c8bdf6b5616207034" + security: + - x-api-key: [] + x-stoplight: + id: "graph_gSuiteTraverseUser" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /gsuites/{gsuite_id}/usergroups: + get: + tags: + - "Graph" + - "G Suite" + summary: "List the User Groups bound to a G Suite instance" + description: "This endpoint will return all User Groups bound to an G Suite\ + \ instance, either directly or indirectly, essentially traversing the JumpCloud\ + \ Graph for your Organization.\n\nEach element will contain the group's type,\ + \ id, attributes and paths.\n\nThe `attributes` object is a key/value hash\ + \ of compiled graph attributes for all paths followed.\n\nThe `paths` array\ + \ enumerates each path from this G Suite instance to the corresponding User\ + \ Group; this array represents all grouping and/or associations that would\ + \ have to be removed to deprovision the User Group from this G Suite instance.\n\ + \nSee `/members` and `/associations` endpoints to manage those collections.\n\ + \n#### Sample Request\n```\n curl -X GET https://console.jumpcloud.com/api/v2/gsuites/{GSuite_ID}/usergroups\ + \ \\\n -H 'accept: application/json' \\\n -H 'content-type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "graph_gSuiteTraverseUserGroup" + parameters: + - name: "gsuite_id" + in: "path" + description: "ObjectID of the G Suite instance." + required: true + type: "string" + x-exportParamName: "GsuiteId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "user_group" + id: "57980e9c8bdf6b5616207033" + paths: [] + - type: "user_group" + id: "57980e9c8bdf6b5616207034" + paths: [] + security: + - x-api-key: [] + x-stoplight: + id: "graph_gSuiteTraverseUserGroup" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /ldapservers/{ldapserver_id}/associations: + get: + tags: + - "Graph" + - "LDAP Servers" + summary: "List the associations of a LDAP Server" + description: "This endpoint returns the _direct_ associations of this LDAP Server.\n\ + \nA direct association can be a non-homogenous relationship between 2 different\ + \ objects. for example LDAP and Users.\n\n#### Sample Request\n\n```\n curl\ + \ -X GET 'https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/associations?targets=user_group\ + \ \\\n -H 'accept: application/json' \\\n -H 'content-type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "graph_ldapServerAssociationsList" + parameters: + - name: "ldapserver_id" + in: "path" + description: "ObjectID of the LDAP Server." + required: true + type: "string" + x-exportParamName: "LdapserverId" + - name: "targets" + in: "query" + description: "" + required: true + type: "array" + items: + type: "string" + enum: + - "active_directory" + - "application" + - "command" + - "g_suite" + - "ldap_server" + - "office_365" + - "policy" + - "radius_server" + - "system" + - "system_group" + - "user" + - "user_group" + x-exportParamName: "Targets" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphConnection" + examples: + application/json: + - type: "user_group" + id: "57980e9c8bdf6b5616207033" + attributes: null + - type: "user" + id: "57980e9c8bdf6b5616207035" + attributes: null + - type: "user_group" + id: "57980e9c8bdf6b5616207034" + attributes: null + security: + - x-api-key: [] + x-stoplight: + id: "graph_ldapServerAssociationsList" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + post: + tags: + - "Graph" + - "LDAP Servers" + summary: "Manage the associations of a LDAP Server" + description: "This endpoint allows you to manage the _direct_ associations of\ + \ a LDAP Server.\n\nA direct association can be a non-homogenous relationship\ + \ between 2 different objects. for example LDAP and Users.\n\n#### Sample\ + \ Request\n```\ncurl -X POST https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/associations\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}' \\\n -d '{\n \"op\": \"add\",\n \"\ + type\": \"user\",\n \"id\": \"{User_ID}\"\n}'\n```" + operationId: "graph_ldapServerAssociationsPost" + parameters: + - name: "ldapserver_id" + in: "path" + description: "ObjectID of the LDAP Server." + required: true + type: "string" + x-exportParamName: "LdapserverId" + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/GraphManagementReq" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 204: + description: "OK" + security: + - x-api-key: [] + x-stoplight: + id: "graph_ldapServerAssociationsPost" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + x-swagger-jumpcloud-auto-insert: true + /ldapservers/{ldapserver_id}/users: + get: + tags: + - "Graph" + - "LDAP Servers" + summary: "List the Users bound to a LDAP Server" + description: "This endpoint will return all Users bound to an LDAP Server, either\ + \ directly or indirectly, essentially traversing the JumpCloud Graph for your\ + \ Organization.\n\nEach element will contain the type, id, attributes and\ + \ paths.\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this LDAP server instance to the corresponding User; this array\ + \ represents all grouping and/or associations that would have to be removed\ + \ to deprovision the User from this LDAP server instance.\n\nSee `/members`\ + \ and `/associations` endpoints to manage those collections.\n\n#### Sample\ + \ Request\n```\ncurl -X GET https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/users\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "graph_ldapServerTraverseUser" + parameters: + - name: "ldapserver_id" + in: "path" + description: "ObjectID of the LDAP Server." + required: true + type: "string" + x-exportParamName: "LdapserverId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "user" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "user" + id: "57980e9c8bdf6b5616207033" + - - type: "user_group" + id: "57980e9c8bdf6b5616207032" + - type: "user" + id: "57980e9c8bdf6b5616207034" + paths: + - - type: "user_group" + id: "57980e9c8bdf6b5616207034" + security: + - x-api-key: [] + x-stoplight: + id: "graph_ldapServerTraverseUser" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /ldapservers/{ldapserver_id}/usergroups: + get: + tags: + - "Graph" + - "LDAP Servers" + summary: "List the User Groups bound to a LDAP Server" + description: "This endpoint will return all Users Groups bound to a LDAP Server,\ + \ either directly or indirectly, essentially traversing the JumpCloud Graph\ + \ for your Organization.\n\nEach element will contain the group's type, id,\ + \ attributes and paths.\n\nThe `attributes` object is a key/value hash of\ + \ compiled graph attributes for all paths followed.\n\nThe `paths` array enumerates\ + \ each path from this LDAP server instance to the corresponding User Group;\ + \ this array represents all grouping and/or associations that would have to\ + \ be removed to deprovision the User Group from this LDAP server instance.\n\ + \nSee `/members` and `/associations` endpoints to manage those collections.\n\ + \n#### Sample Request\n```\ncurl -X GET https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/usergroups\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "graph_ldapServerTraverseUserGroup" + parameters: + - name: "ldapserver_id" + in: "path" + description: "ObjectID of the LDAP Server." + required: true + type: "string" + x-exportParamName: "LdapserverId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "user_group" + id: "57980e9c8bdf6b5616207033" + paths: [] + - type: "user_group" + id: "57980e9c8bdf6b5616207034" + paths: [] + security: + - x-api-key: [] + x-stoplight: + id: "graph_ldapServerTraverseUserGroup" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /ldapservers: + get: + tags: + - "LDAP Servers" + summary: "List LDAP Servers" + description: "This endpoint returns the object IDs of your LDAP servers.\n\n\ + \n##### Sample Request\n\n```\n curl -X GET https://console.jumpcloud.com/api/v2/ldapservers/\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'" + operationId: "ldapservers_list" + parameters: + - name: "fields" + in: "query" + description: "The comma separated fields included in the returned records.\n\ + If omitted the default list of fields will be returned.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Fields" + - name: "filter" + in: "query" + description: "Supported operators are: eq, ne, gt, ge, lt, le, between, search,\ + \ in" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Filter" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "sort" + in: "query" + description: "The comma separated fields used to sort the collection.\nDefault\ + \ sort is ascending, prefix with `-` to sort descending.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Sort" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "" + schema: + type: "array" + items: + $ref: "#/definitions/ldap-server-output" + security: + - x-api-key: [] + x-stoplight: + id: "ldapservers_list" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /ldapservers/{id}: + get: + tags: + - "LDAP Servers" + summary: "Get LDAP Server" + description: "This endpoint returns a specific LDAP server.\n\n##### Sample\ + \ Request\n\n```\n curl -X GET https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "ldapservers_get" + parameters: + - name: "id" + in: "path" + description: "Unique identifier of the LDAP server." + required: true + type: "string" + x-exportParamName: "Id" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "" + schema: + $ref: "#/definitions/ldap-server-output" + security: + - x-api-key: [] + x-stoplight: + id: "ldapservers_get" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /office365s/{office365_id}/associations: + get: + tags: + - "Graph" + - "Office 365" + summary: "List the associations of an Office 365 instance" + description: "This endpoint returns _direct_ associations of an Office 365 instance.\n\ + \n\nA direct association can be a non-homogenous relationship between 2 different\ + \ objects. for example Office 365 and Users.\n\n#### Sample Request\n```\n\ + curl -X GET 'https://console.jumpcloud.com/api/v2/office365s/{O365_ID}/associations?targets=user_group\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n\n```" + operationId: "graph_office365AssociationsList" + parameters: + - name: "office365_id" + in: "path" + description: "ObjectID of the Office 365 instance." + required: true + type: "string" + x-exportParamName: "Office365Id" + - name: "targets" + in: "query" + description: "" + required: true + type: "array" + items: + type: "string" + enum: + - "active_directory" + - "application" + - "command" + - "g_suite" + - "ldap_server" + - "office_365" + - "policy" + - "radius_server" + - "system" + - "system_group" + - "user" + - "user_group" + x-exportParamName: "Targets" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphConnection" + examples: + application/json: + - type: "user_group" + id: "57980e9c8bdf6b5616207033" + attributes: null + - type: "user" + id: "57980e9c8bdf6b5616207035" + attributes: null + - type: "user_group" + id: "57980e9c8bdf6b5616207034" + attributes: null + security: + - x-api-key: [] + x-stoplight: + id: "graph_office365AssociationsList" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + post: + tags: + - "Graph" + - "Office 365" + summary: "Manage the associations of an Office 365 instance" + description: "This endpoint allows you to manage the _direct_ associations of\ + \ a Office 365 instance.\n\nA direct association can be a non-homogenous relationship\ + \ between 2 different objects. for example Office 365 and Users.\n\n#### Sample\ + \ Request\n```\ncurl -X POST https://console.jumpcloud.com/api/v2/office365s/{O365_ID}/associations\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}' \\\n -d '{\n \"op\": \"add\",\n \"\ + type\": \"user_group\",\n \"id\": \"{Group_ID}\"\n}'\n```" + operationId: "graph_office365AssociationsPost" + parameters: + - name: "office365_id" + in: "path" + description: "ObjectID of the Office 365 instance." + required: true + type: "string" + x-exportParamName: "Office365Id" + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/GraphManagementReq" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 204: + description: "OK" + security: + - x-api-key: [] + x-stoplight: + id: "graph_office365AssociationsPost" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + x-swagger-jumpcloud-auto-insert: true + /office365s/{office365_id}/users: + get: + tags: + - "Graph" + - "Office 365" + summary: "List the Users bound to an Office 365 instance" + description: "This endpoint will return all Users bound to an Office 365 instance,\ + \ either directly or indirectly, essentially traversing the JumpCloud Graph\ + \ for your Organization.\n\nEach element will contain the type, id, attributes\ + \ and paths.\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this Office 365 instance to the corresponding User; this array\ + \ represents all grouping and/or associations that would have to be removed\ + \ to deprovision the User from this Office 365 instance.\n\nSee `/members`\ + \ and `/associations` endpoints to manage those collections.\n\n#### Sample\ + \ Request\n```\ncurl -X GET https://console.jumpcloud.com/api/v2/office365s/{O365_ID}/users\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "graph_office365TraverseUser" + parameters: + - name: "office365_id" + in: "path" + description: "ObjectID of the Office 365 suite." + required: true + type: "string" + x-exportParamName: "Office365Id" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "user" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "user" + id: "57980e9c8bdf6b5616207033" + - - type: "user_group" + id: "57980e9c8bdf6b5616207032" + - type: "user" + id: "57980e9c8bdf6b5616207034" + paths: + - - type: "user_group" + id: "57980e9c8bdf6b5616207034" + security: + - x-api-key: [] + x-stoplight: + id: "graph_office365TraverseUser" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /office365s/{office365_id}/usergroups: + get: + tags: + - "Graph" + - "Office 365" + summary: "List the User Groups bound to an Office 365 instance" + description: "This endpoint will return all Users Groups bound to an Office\ + \ 365 instance, either directly or indirectly, essentially traversing the\ + \ JumpCloud Graph for your Organization.\n\nEach element will contain the\ + \ group's type, id, attributes and paths.\n\nThe `attributes` object is a\ + \ key/value hash of compiled graph attributes for all paths followed.\n\n\ + The `paths` array enumerates each path from this Office 365 instance to the\ + \ corresponding User Group; this array represents all grouping and/or associations\ + \ that would have to be removed to deprovision the User Group from this Office\ + \ 365 instance.\n\nSee `/members` and `/associations` endpoints to manage\ + \ those collections.\n\n#### Sample Request\n```\n curl -X GET https://console.jumpcloud.com/api/v2/office365s/{O365_ID/usergroups\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "graph_office365TraverseUserGroup" + parameters: + - name: "office365_id" + in: "path" + description: "ObjectID of the Office 365 suite." + required: true + type: "string" + x-exportParamName: "Office365Id" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "user_group" + id: "57980e9c8bdf6b5616207033" + paths: [] + - type: "user_group" + id: "57980e9c8bdf6b5616207034" + paths: [] + security: + - x-api-key: [] + x-stoplight: + id: "graph_office365TraverseUserGroup" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /policies: + get: + tags: + - "Policies" + summary: "Lists all the Policies" + description: "This endpoint returns all policies.\n\n##### Sample Request\n\n\ + ```\n curl -X GET https://console.jumpcloud.com/api/v2/policies \\\n -H\ + \ 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n\ + \ -H 'x-api-key: {API_KEY}'\n ```" + operationId: "policies_list" + parameters: + - name: "fields" + in: "query" + description: "The comma separated fields included in the returned records.\n\ + If omitted the default list of fields will be returned.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Fields" + - name: "filter" + in: "query" + description: "Supported operators are: eq, ne, gt, ge, lt, le, between, search,\ + \ in" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Filter" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "sort" + in: "query" + description: "The comma separated fields used to sort the collection.\nDefault\ + \ sort is ascending, prefix with `-` to sort descending.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Sort" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/Policy" + 500: + description: "Unexpected error." + schema: + $ref: "#/definitions/Error" + security: + - x-api-key: [] + x-stoplight: + id: "policies_list" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + post: + tags: + - "Policies" + summary: "Create a new Policy" + description: "This endpoint allows you to create a policy. Given the amount\ + \ of configurable parameters required to create a Policy, we suggest you use\ + \ the JumpCloud Admin Console to create new policies.\n\n##### Sample Request\ + \ \n```\ncurl -X POST https://console.jumpcloud.com/api/v2/policies \\\n \ + \ -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}' \\\n -d '{ \n {Policy_Parameters}\n}'\n\ + \n```" + operationId: "policies_post" + parameters: + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/PolicyRequest" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 201: + description: "Created" + schema: + $ref: "#/definitions/PolicyWithDetails" + security: + - x-api-key: [] + x-stoplight: + id: "policies_post" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /policies/{policy_id}/associations: + get: + tags: + - "Graph" + - "Policies" + summary: "List the associations of a Policy" + description: "This endpoint returns the _direct_ associations of a Policy.\n\ + \nA direct association can be a non-homogenous relationship between 2 different\ + \ objects. for example Policies and Systems.\n\n#### Sample Request\n```\n\ + curl -X GET 'https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/associations?targets=system_group\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "graph_policyAssociationsList" + parameters: + - name: "policy_id" + in: "path" + required: true + type: "string" + x-exportParamName: "PolicyId" + - name: "targets" + in: "query" + description: "" + required: true + type: "array" + items: + type: "string" + enum: + - "active_directory" + - "application" + - "command" + - "g_suite" + - "ldap_server" + - "office_365" + - "policy" + - "radius_server" + - "system" + - "system_group" + - "user" + - "user_group" + x-exportParamName: "Targets" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphConnection" + examples: + application/json: + - type: "user_group" + id: "57980e9c8bdf6b5616207033" + attributes: null + - type: "user" + id: "57980e9c8bdf6b5616207035" + attributes: null + - type: "user_group" + id: "57980e9c8bdf6b5616207034" + attributes: null + security: + - x-api-key: [] + x-stoplight: + id: "graph_policyAssociationsList" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + post: + tags: + - "Graph" + - "Policies" + summary: "Manage the associations of a Policy" + description: "This endpoint allows you to manage the _direct_ associations of\ + \ a Policy.\n\nA direct association can be a non-homogenous relationship between\ + \ 2 different objects. for example Policies and Systems.\n\n#### Sample Request\n\ + ```\ncurl -X POST https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/associations/\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}' \\\n -d '{\n \"op\": \"add\",\n \"\ + type\": \"system_group\",\n \"id\": \"{Group_ID}\"\n}'\n```" + operationId: "graph_policyAssociationsPost" + parameters: + - name: "policy_id" + in: "path" + required: true + type: "string" + x-exportParamName: "PolicyId" + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/GraphManagementReq" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 204: + description: "" + security: + - x-api-key: [] + x-stoplight: + id: "graph_policyAssociationsPost" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /policies/{id}: + get: + tags: + - "Policies" + summary: "Gets a specific Policy." + description: "This endpoint returns a specific policy.\n\n###### Sample Request\n\ + \n```\n curl -X GET https://console.jumpcloud.com/api/v2/policies/{PolicyID}\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n ```" + operationId: "policies_get" + parameters: + - name: "id" + in: "path" + description: "ObjectID of the Policy object." + required: true + type: "string" + x-exportParamName: "Id" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "OK" + schema: + $ref: "#/definitions/PolicyWithDetails" + security: + - x-api-key: [] + x-stoplight: + id: "policies_get" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + put: + tags: + - "Policies" + summary: "Update an existing Policy" + description: "This endpoint allows you to update a policy. Given the amount\ + \ of configurable parameters required to update a Policy, we suggest you use\ + \ the JumpCloud Admin Console to create new policies.\n\n\n##### Sample Request\n\ + ```\ncurl -X PUT https://console.jumpcloud.com/api/v2/policies/59fced45c9118022172547ff\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY' \\\n -d '{\n {Policy_Parameters}\n}'\n\ + ```" + operationId: "policies_put" + parameters: + - name: "id" + in: "path" + description: "ObjectID of the Policy object." + required: true + type: "string" + x-exportParamName: "Id" + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/PolicyRequest" + x-exportParamName: "Body" + responses: + 200: + description: "OK" + schema: + $ref: "#/definitions/Policy" + security: + - x-api-key: [] + x-stoplight: + id: "policies_put" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + delete: + tags: + - "Policies" + summary: "Deletes a Policy" + description: "This endpoint allows you to delete a policy.\n\n#### Sample Request\n\ + \n```\ncurl -X DELETE https://console.jumpcloud.com/api/v2/policies/5a837ecd232e110d4291e6b9\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n ```" + operationId: "policies_delete" + parameters: + - name: "id" + in: "path" + description: "ObjectID of the Policy object." + required: true + type: "string" + x-exportParamName: "Id" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 204: + description: "No Content" + security: + - x-api-key: [] + x-stoplight: + id: "policies_delete" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /policytemplates: + get: + tags: + - "Policytemplates" + - "Policies" + summary: "Lists all of the Policy Templates" + description: "This endpoint returns all policy templates.\n\n#### Sample Request\n\ + ```\ncurl -X GET https://console.jumpcloud.com/api/v2/policytemplates \\\n\ + \ -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n ```" + operationId: "policytemplates_list" + parameters: + - name: "fields" + in: "query" + description: "The comma separated fields included in the returned records.\n\ + If omitted the default list of fields will be returned.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Fields" + - name: "filter" + in: "query" + description: "Supported operators are: eq, ne, gt, ge, lt, le, between, search,\ + \ in" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Filter" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "sort" + in: "query" + description: "The comma separated fields used to sort the collection.\nDefault\ + \ sort is ascending, prefix with `-` to sort descending.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Sort" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/PolicyTemplate" + 500: + description: "Unexpected error." + schema: + $ref: "#/definitions/Error" + security: + - x-api-key: [] + x-stoplight: + id: "policytemplates_list" + beforeScript: null + afterScript: "function (ctx, request, response) {\n // Your javascript code\ + \ here.\n}" + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /policytemplates/{id}: + get: + tags: + - "Policytemplates" + - "Policies" + summary: "Get a specific Policy Template" + description: "This endpoint returns a specific policy template.\n\n#### Sample\ + \ Request\n```\n curl -X GET https://console.jumpcloud.com/api/v2/policies/{Policy_ID}\\\ + \n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "policytemplates_get" + parameters: + - name: "id" + in: "path" + description: "ObjectID of the Policy Template." + required: true + type: "string" + x-exportParamName: "Id" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "OK" + schema: + $ref: "#/definitions/PolicyTemplateWithDetails" + security: + - x-api-key: [] + x-stoplight: + id: "policytemplates_get" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /policies/{policy_id}/policyresults: + get: + tags: + - "Policies" + summary: "Lists all the policy results of a given policy." + description: "This endpoint returns all policies results for a specific policy.\ + \ \n\n##### Sample Results\n\n```\n curl -X GET https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/policyresults\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n ```" + operationId: "policyresults_list" + parameters: + - name: "policy_id" + in: "path" + required: true + type: "string" + x-exportParamName: "PolicyId" + - name: "fields" + in: "query" + description: "The comma separated fields included in the returned records.\n\ + If omitted the default list of fields will be returned.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Fields" + - name: "filter" + in: "query" + description: "Supported operators are: eq, ne, gt, ge, lt, le, between, search,\ + \ in" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Filter" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "sort" + in: "query" + description: "The comma separated fields used to sort the collection.\nDefault\ + \ sort is ascending, prefix with `-` to sort descending.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Sort" + - name: "aggregate" + in: "query" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Aggregate" + responses: + 200: + description: "" + schema: + type: "array" + items: + $ref: "#/definitions/PolicyResult" + security: + - x-api-key: [] + x-stoplight: + id: "policyresults_list" + beforeScript: null + afterScript: null + public: false + mock: + enabled: false + dynamic: false + statusCode: 200 + /policyresults: + get: + tags: + - "Policies" + summary: "Lists all the policy results for an organization." + description: "This endpoint returns all policies results for an Organization.\ + \ \n\n##### Sample Results\n\n```\n curl -X GET https://console.jumpcloud.com/api/v2/policyresults\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n ```" + operationId: "policyresults_list" + parameters: + - name: "fields" + in: "query" + description: "The comma separated fields included in the returned records.\n\ + If omitted the default list of fields will be returned.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Fields" + - name: "filter" + in: "query" + description: "Supported operators are: eq, ne, gt, ge, lt, le, between, search,\ + \ in" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Filter" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "sort" + in: "query" + description: "The comma separated fields used to sort the collection.\nDefault\ + \ sort is ascending, prefix with `-` to sort descending.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Sort" + - name: "aggregate" + in: "query" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Aggregate" + responses: + 200: + description: "" + schema: + type: "array" + items: + $ref: "#/definitions/PolicyResult" + security: + - x-api-key: [] + x-stoplight: + id: "policyresults_list" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /policyresults/{id}: + get: + tags: + - "Policies" + summary: "Get a specific Policy Result." + description: "This endpoint will return the policy results for a specific policy.\n\ + \n##### Sample Request\n```\ncurl -X GET https://console.jumpcloud.com/api/v2/policyresults/{Policy_ID}\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n ```" + operationId: "policyresults_get" + parameters: + - name: "id" + in: "path" + description: "ObjectID of the Policy Result." + required: true + type: "string" + x-exportParamName: "Id" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "OK" + schema: + $ref: "#/definitions/PolicyResult" + security: + - x-api-key: [] + x-stoplight: + id: "policyresults_get" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /policies/{policy_id}/systems: + get: + tags: + - "Graph" + - "Policies" + summary: "List the Systems bound to a Policy" + description: "This endpoint will return all Systems bound to a Policy, either\ + \ directly or indirectly, essentially traversing the JumpCloud Graph for your\ + \ Organization. \n\nEach element will contain the type, id, attributes and\ + \ paths.\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this Policy to the corresponding System; this array represents\ + \ all grouping and/or associations that would have to be removed to deprovision\ + \ the System from this Policy.\n\nSee `/members` and `/associations` endpoints\ + \ to manage those collections.\n\n#### Sample Request\n```\ncurl -X GET https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/systems\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "graph_policyTraverseSystem" + parameters: + - name: "policy_id" + in: "path" + description: "ObjectID of the Command." + required: true + type: "string" + x-exportParamName: "PolicyId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "system" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "system" + id: "57980e9c8bdf6b5616207033" + - - type: "system_group" + id: "57980e9c8bdf6b5616207032" + - type: "system" + id: "57980e9c8bdf6b5616207034" + paths: + - - type: "system_group" + id: "57980e9c8bdf6b5616207034" + security: + - x-api-key: [] + x-stoplight: + id: "graph_policyTraverseSystem" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /policies/{policy_id}/systemgroups: + get: + tags: + - "Graph" + - "Policies" + summary: "List the System Groups bound to a Policy" + description: "This endpoint will return all Systems Groups bound to a Policy,\ + \ either directly or indirectly, essentially traversing the JumpCloud Graph\ + \ for your Organization.\n\nEach element will contain the group's type, id,\ + \ attributes and paths.\n\nThe `attributes` object is a key/value hash of\ + \ compiled graph attributes for all paths followed.\n\nThe `paths` array enumerates\ + \ each path from this Policy to the corresponding System Group; this array\ + \ represents all grouping and/or associations that would have to be removed\ + \ to deprovision the System Group from this Policy.\n\nSee `/members` and\ + \ `/associations` endpoints to manage those collections.\n\n#### Sample Request\n\ + ```\ncurl -X GET https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/systemgroups\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "graph_policyTraverseSystemGroup" + parameters: + - name: "policy_id" + in: "path" + description: "ObjectID of the Command." + required: true + type: "string" + x-exportParamName: "PolicyId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "system_group" + id: "57980e9c8bdf6b5616207033" + paths: [] + - type: "system_group" + id: "57980e9c8bdf6b5616207034" + paths: [] + security: + - x-api-key: [] + x-stoplight: + id: "graph_policyTraverseSystemGroup" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /radiusservers/{radiusserver_id}/associations: + get: + tags: + - "Graph" + - "RADIUS Servers" + summary: "List the associations of a RADIUS Server" + description: "This endpoint returns the _direct_ associations of a Radius Server.\n\ + \nA direct association can be a non-homogenous relationship between 2 different\ + \ objects. for example Radius Servers and Users.\n\n#### Sample Request\n\ + ```\ncurl -X GET https://console.jumpcloud.com/api/v2/radiusservers/{RADIUS_ID}/associations?targets=user_group\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "graph_radiusServerAssociationsList" + parameters: + - name: "radiusserver_id" + in: "path" + description: "ObjectID of the Radius Server." + required: true + type: "string" + x-exportParamName: "RadiusserverId" + - name: "targets" + in: "query" + description: "" + required: true + type: "array" + items: + type: "string" + enum: + - "active_directory" + - "application" + - "command" + - "g_suite" + - "ldap_server" + - "office_365" + - "policy" + - "radius_server" + - "system" + - "system_group" + - "user" + - "user_group" + x-exportParamName: "Targets" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphConnection" + examples: + application/json: + - type: "user_group" + id: "57980e9c8bdf6b5616207033" + attributes: null + - type: "user" + id: "57980e9c8bdf6b5616207035" + attributes: null + - type: "user_group" + id: "57980e9c8bdf6b5616207034" + attributes: null + security: + - x-api-key: [] + x-stoplight: + id: "graph_radiusServerAssociationsList" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + post: + tags: + - "Graph" + - "RADIUS Servers" + summary: "Manage the associations of a RADIUS Server" + description: "This endpoint allows you to manage the _direct_ associations of\ + \ a Radius Server.\n\nA direct association can be a non-homogenous relationship\ + \ between 2 different objects. for example Radius Servers and Users.\n\n####\ + \ Sample Request\n```\ncurl -X POST https://console.jumpcloud.com/api/v2/radiusservers/{RADIUS_ID}/associations\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}' \\\n -d '{\n\t\n\"type\":\"user\", \n\"\ + id\":\"{USER_ID}\", \n\"op\":\"add\"\n\t\n}'\n```" + operationId: "graph_radiusServerAssociationsPost" + parameters: + - name: "radiusserver_id" + in: "path" + description: "ObjectID of the Radius Server." + required: true + type: "string" + x-exportParamName: "RadiusserverId" + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/GraphManagementReq" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 204: + description: "OK" + security: + - x-api-key: [] + x-stoplight: + id: "graph_radiusServerAssociationsPost" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + x-swagger-jumpcloud-auto-insert: true + /radiusservers/{radiusserver_id}/users: + get: + tags: + - "Graph" + - "RADIUS Servers" + summary: "List the Users bound to a RADIUS Server" + description: "This endpoint will return all Users bound to a RADIUS Server,\ + \ either directly or indirectly, essentially traversing the JumpCloud Graph\ + \ for your Organization. \n\nEach element will contain the type, id, attributes\ + \ and paths.\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this RADIUS server instance to the corresponding User; this array\ + \ represents all grouping and/or associations that would have to be removed\ + \ to deprovision the User from this RADIUS server instance.\n\nSee `/members`\ + \ and `/associations` endpoints to manage those collections.\n\n\n#### Sample\ + \ Request\n```\ncurl -X GET https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/users\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n ```" + operationId: "graph_radiusServerTraverseUser" + parameters: + - name: "radiusserver_id" + in: "path" + description: "ObjectID of the Radius Server." + required: true + type: "string" + x-exportParamName: "RadiusserverId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "user" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "user" + id: "57980e9c8bdf6b5616207033" + - - type: "user_group" + id: "57980e9c8bdf6b5616207032" + - type: "user" + id: "57980e9c8bdf6b5616207034" + paths: + - - type: "user" + id: "57980e9c8bdf6b5616207033" + - - type: "user_group" + id: "57980e9c8bdf6b5616207035" + security: + - x-api-key: [] + x-stoplight: + id: "graph_radiusServerTraverseUser" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /radiusservers/{radiusserver_id}/usergroups: + get: + tags: + - "Graph" + - "RADIUS Servers" + summary: "List the User Groups bound to a RADIUS Server" + description: "This endpoint will return all Users Groups bound to a RADIUS Server,\ + \ either directly or indirectly, essentially traversing the JumpCloud Graph\ + \ for your Organization. \n\nEach element will contain the group's type, id,\ + \ attributes and paths.\n\nThe `attributes` object is a key/value hash of\ + \ compiled graph attributes for all paths followed.\n\nThe `paths` array enumerates\ + \ each path from this RADIUS server instance to the corresponding User Group;\ + \ this array represents all grouping and/or associations that would have to\ + \ be removed to deprovision the User Group from this RADIUS server instance.\n\ + \nSee `/members` and `/associations` endpoints to manage those collections.\n\ + \n#### Sample Request\n```\ncurl -X GET https://console.jumpcloud.com/api/v2/radiusservers/{RADIUS_ID}/usergroups\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "graph_radiusServerTraverseUserGroup" + parameters: + - name: "radiusserver_id" + in: "path" + description: "ObjectID of the Radius Server." + required: true + type: "string" + x-exportParamName: "RadiusserverId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "user_group" + id: "57980e9c8bdf6b5616207033" + paths: [] + - type: "user_group" + id: "57980e9c8bdf6b5616207034" + paths: [] + security: + - x-api-key: [] + x-stoplight: + id: "graph_radiusServerTraverseUserGroup" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /ldapservers/{ldapserver_id}/sambadomains: + get: + tags: + - "Samba Domains" + summary: "List Samba Domains" + description: "This endpoint returns all samba domains for an LDAP server.\n\n\ + ##### Sample Request\n```\ncurl -X GET https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/sambadomains\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n ```" + operationId: "ldapservers_sambaDomainsList" + parameters: + - name: "ldapserver_id" + in: "path" + description: "Unique identifier of the LDAP server." + required: true + type: "string" + x-exportParamName: "LdapserverId" + - name: "Content-Type" + in: "header" + required: false + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: false + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "fields" + in: "query" + description: "The comma separated fields included in the returned records.\n\ + If omitted the default list of fields will be returned.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Fields" + - name: "filter" + in: "query" + description: "Supported operators are: eq, ne, gt, ge, lt, le, between, search,\ + \ in" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Filter" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "sort" + in: "query" + description: "The comma separated fields used to sort the collection.\nDefault\ + \ sort is ascending, prefix with `-` to sort descending.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Sort" + responses: + 200: + description: "" + schema: + type: "array" + items: + $ref: "#/definitions/samba-domain-output" + default: + description: "" + schema: + $ref: "#/definitions/Error" + security: + - x-api-key: [] + x-stoplight: + id: "ldapservers_sambaDomainsList" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + post: + tags: + - "Samba Domains" + summary: "Create Samba Domain" + description: "This endpoint allows you to create a samba domain for an LDAP\ + \ server.\n\n##### Sample Request\n```\ncurl -X POST https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/sambadomains\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}' \\\n -d '{\n\"sid\":\"{SID_ID}\", \n\"\ + name\":\"{WORKGROUP_NAME}\" \n}'\n```" + operationId: "ldapservers_sambaDomainsPost" + parameters: + - name: "ldapserver_id" + in: "path" + description: "Unique identifier of the LDAP server." + required: true + type: "string" + x-exportParamName: "LdapserverId" + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/samba-domain-input" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: false + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: false + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 201: + description: "" + schema: + $ref: "#/definitions/samba-domain-output" + security: + - x-api-key: [] + x-stoplight: + id: "ldapservers_sambaDomainsPost" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /ldapservers/{ldapserver_id}/sambadomains/{id}: + get: + tags: + - "Samba Domains" + summary: "Get Samba Domain" + description: "This endpoint returns a specific samba domain for an LDAP server.\n\ + \n##### Sample Request\n```\ncurl -X GET \\\n https://console.jumpcloud.com/api/v2/ldapservers/ldapservers/{LDAP_ID}/sambadomains/{SAMBA_ID}\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n ```" + operationId: "ldapservers_sambaDomainsGet" + parameters: + - name: "ldapserver_id" + in: "path" + description: "Unique identifier of the LDAP server." + required: true + type: "string" + x-exportParamName: "LdapserverId" + - name: "id" + in: "path" + description: "Unique identifier of the samba domain." + required: true + type: "string" + x-exportParamName: "Id" + - name: "Content-Type" + in: "header" + required: false + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: false + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "" + schema: + $ref: "#/definitions/samba-domain-output" + security: + - x-api-key: [] + x-stoplight: + id: "ldapservers_sambaDomainsGet" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + put: + tags: + - "Samba Domains" + summary: "Update Samba Domain" + description: "This endpoint allows you to update the samba domain information\ + \ for an LDAP server.\n\n##### Sample Request\n```\ncurl -X PUT https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/sambadomains/{SAMBA_ID}\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}' \\\n -d '{\n\"sid\":\"{SID_ID}\", \n\"\ + name\":\"{WORKGROUP_NAME}\"\n}'\n\n```" + operationId: "ldapservers_sambaDomainsPut" + parameters: + - name: "ldapserver_id" + in: "path" + description: "Unique identifier of the LDAP server." + required: true + type: "string" + x-exportParamName: "LdapserverId" + - name: "id" + in: "path" + description: "Unique identifier of the samba domain." + required: true + type: "string" + x-exportParamName: "Id" + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/samba-domain-input" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: false + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: false + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "" + schema: + $ref: "#/definitions/samba-domain-output" + security: + - x-api-key: [] + x-stoplight: + id: "ldapservers_sambaDomainsPut" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + delete: + tags: + - "Samba Domains" + summary: "Delete Samba Domain" + description: "This endpoint allows you to delete a samba domain from an LDAP\ + \ server.\n\n##### Sample Request\n```\ncurl -X DELETE https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/sambadomains/{SAMBA_ID}\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "ldapservers_sambaDomainsDelete" + parameters: + - name: "ldapserver_id" + in: "path" + description: "Unique identifier of the LDAP server." + required: true + type: "string" + x-exportParamName: "LdapserverId" + - name: "id" + in: "path" + description: "Unique identifier of the samba domain." + required: true + type: "string" + x-exportParamName: "Id" + - name: "Content-Type" + in: "header" + required: false + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: false + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "" + schema: + type: "string" + 204: + description: "" + security: + - x-api-key: [] + x-stoplight: + id: "ldapservers_sambaDomainsDelete" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /systems/{system_id}/associations: + get: + tags: + - "Graph" + - "Systems" + summary: "List the associations of a System" + description: "This endpoint returns the _direct_ associations of a System.\n\ + \nA direct association can be a non-homogenous relationship between 2 different\ + \ objects. for example Systems and Users.\n\n\n#### Sample Request\n```\n\ + curl -X GET https://console.jumpcloud.com/api/v2/systems/{System_ID}/associations?targets=user\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n\n```" + operationId: "graph_systemAssociationsList" + parameters: + - name: "system_id" + in: "path" + description: "ObjectID of the System." + required: true + type: "string" + x-exportParamName: "SystemId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "Date" + in: "header" + description: "Current date header for the System Context API" + required: false + type: "string" + x-exportParamName: "Date" + - name: "Authorization" + in: "header" + description: "Authorization header for the System Context API" + required: false + type: "string" + x-exportParamName: "Authorization" + - name: "targets" + in: "query" + description: "" + required: true + type: "array" + items: + type: "string" + enum: + - "active_directory" + - "application" + - "command" + - "g_suite" + - "ldap_server" + - "office_365" + - "policy" + - "radius_server" + - "user" + - "user_group" + x-exportParamName: "Targets" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphConnection" + examples: + application/json: + - type: "user_group" + id: "57980e9c8bdf6b5616207033" + attributes: "{sudo: {enabled: false, withoutPassword: false}, posixGroups:\ + \ [{id: 5001, name: \"groupOne\"}]}" + - type: "user" + id: "57980e9c8bdf6b5616207035" + attributes: "{sudo: {enabled: true, withoutPassword: false}, posixGroups:\ + \ [{id: 5002, name: \"groupTwo\"}]}" + - type: "user_group" + id: "57980e9c8bdf6b5616207034" + attributes: "{sudo: {enabled: true, withoutPassword: true}, posixGroups:\ + \ [{id: 5001, name: \"groupOne\"}, {id: 5002, name: \"groupTwo\"}]}" + security: + - x-api-key: [] + x-stoplight: + id: "graph_systemAssociationsList" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + post: + tags: + - "Graph" + - "Systems" + summary: "Manage associations of a System" + description: "This endpoint allows you to manage the _direct_ associations of\ + \ a System.\n\nA direct association can be a non-homogenous relationship between\ + \ 2 different objects. for example Systems and Users.\n\n\n#### Sample Request\n\ + ```\ncurl -X POST https://console.jumpcloud.com/api/v2/systems/{System_ID}/associations\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}' \\\n -d '{\n \"op\": \"add\",\n \"\ + type\": \"user\",\n \"id\": \"{User_ID}\"\n}'\n\n```" + operationId: "graph_systemAssociationsPost" + parameters: + - name: "system_id" + in: "path" + description: "ObjectID of the System." + required: true + type: "string" + x-exportParamName: "SystemId" + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/SystemGraphManagementReq" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "Date" + in: "header" + description: "Current date header for the System Context API" + required: false + type: "string" + x-exportParamName: "Date" + - name: "Authorization" + in: "header" + description: "Authorization header for the System Context API" + required: false + type: "string" + x-exportParamName: "Authorization" + responses: + 204: + description: "OK" + security: + - x-api-key: [] + x-stoplight: + id: "graph_systemAssociationsPost" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + x-swagger-jumpcloud-auto-insert: true + /systems/{system_id}/memberof: + get: + tags: + - "Graph" + - "Systems" + summary: "List the parent Groups of a System" + description: "This endpoint returns all the System Groups a System is a member\ + \ of.\n\n#### Sample Request\n```\ncurl -X GET https://console.jumpcloud.com/api/v2/systems/{System_ID}/memberof\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n\n```" + operationId: "graph_systemMemberOf" + parameters: + - name: "system_id" + in: "path" + description: "ObjectID of the System." + required: true + type: "string" + x-exportParamName: "SystemId" + - name: "filter" + in: "query" + description: "Supported operators are: eq, ne, gt, ge, lt, le, between, search,\ + \ in" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Filter" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "Date" + in: "header" + description: "Current date header for the System Context API" + required: false + type: "string" + x-exportParamName: "Date" + - name: "Authorization" + in: "header" + description: "Authorization header for the System Context API" + required: false + type: "string" + x-exportParamName: "Authorization" + - name: "sort" + in: "query" + description: "The comma separated fields used to sort the collection.\nDefault\ + \ sort is ascending, prefix with `-` to sort descending.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Sort" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "system_group" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "system_group" + id: "57980e9c8bdf6b5616207033" + - - type: "system_group" + id: "57980e9c8bdf6b5616207032" + - type: "system_group" + id: "57980e9c8bdf6b5616207033" + - type: "system_group" + id: "57980e9c8bdf6b5616207034" + paths: + - - type: "system_group" + id: "57980e9c8bdf6b5616207034" + security: + - x-api-key: [] + x-stoplight: + id: "graph_systemMemberOf" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /systems/{system_id}/policies: + get: + tags: + - "Graph" + - "Systems" + summary: "List the Policies bound to a System" + description: "This endpoint will return all Policies bound to a System, either\ + \ directly or indirectly, essentially traversing the JumpCloud Graph for your\ + \ Organization. \n\nEach element will contain the type, id, attributes and\ + \ paths.\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this System to the corresponding Policy; this array represents\ + \ all grouping and/or associations that would have to be removed to deprovision\ + \ the Policy from this System.\n\nSee `/members` and `/associations` endpoints\ + \ to manage those collections.\n\nThis endpoint is not yet public as we have\ + \ finish the code.\n\n##### Sample Request\n\n```\ncurl -X GET https://console.jumpcloud.com/api/v2/{System_ID}/policies\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n\n```" + operationId: "graph_systemTraversePolicy" + parameters: + - name: "system_id" + in: "path" + description: "ObjectID of the System." + required: true + type: "string" + x-exportParamName: "SystemId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "system_group" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "system_group" + id: "57980e9c8bdf6b5616207033" + - - type: "system_group" + id: "57980e9c8bdf6b5616207032" + - type: "system_group" + id: "57980e9c8bdf6b5616207033" + - type: "system_group" + id: "57980e9c8bdf6b5616207034" + paths: + - - type: "system_group" + id: "57980e9c8bdf6b5616207034" + security: + - x-api-key: [] + x-stoplight: + id: "graph_systemTraversePolicy" + beforeScript: null + afterScript: null + public: false + mock: + enabled: false + dynamic: false + statusCode: 200 + /systems/{system_id}/users: + get: + tags: + - "Graph" + - "Systems" + summary: "List the Users bound to a System" + description: "This endpoint will return all Users bound to a System, either\ + \ directly or indirectly essentially traversing the JumpCloud Graph for your\ + \ Organization. \n\nEach element will contain the type, id, attributes and\ + \ paths.\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this System to the corresponding User; this array represents all\ + \ grouping and/or associations that would have to be removed to deprovision\ + \ the User from this System.\n\nSee `/members` and `/associations` endpoints\ + \ to manage those collections.\n\n#### Sample Request\n```\ncurl -X GET https://console.jumpcloud.com/api/v2/systems/{System_ID}/users\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n\n```" + operationId: "graph_systemTraverseUser" + parameters: + - name: "system_id" + in: "path" + description: "ObjectID of the System." + required: true + type: "string" + x-exportParamName: "SystemId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "Date" + in: "header" + description: "Current date header for the System Context API" + required: false + type: "string" + x-exportParamName: "Date" + - name: "Authorization" + in: "header" + description: "Authorization header for the System Context API" + required: false + type: "string" + x-exportParamName: "Authorization" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "user" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "system_group" + id: "57980e9c8bdf6b5616207030" + - - type: "user_group" + id: "57980e9c8bdf6b5616207033" + - - type: "user_group" + id: "57980e9c8bdf6b5616207032" + - type: "user" + id: "57980e9c8bdf6b5616207033" + - type: "user" + id: "57980e9c8bdf6b5616207034" + paths: + - - type: "system_group" + id: "57980e9c8bdf6b5616207030" + - - type: "user" + id: "57980e9c8bdf6b5616207034" + security: + - x-api-key: [] + x-stoplight: + id: "graph_systemTraverseUser" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /systems/{system_id}/commands: + get: + tags: + - "Graph" + - "Systems" + summary: "List the Commands bound to a System" + description: "This endpoint will return all Commands bound to a System, either\ + \ directly or indirectly, essentially traversing the JumpCloud Graph for your\ + \ Organization.\n\nEach element will contain the type, id, attributes and\ + \ paths.\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this System to the corresponding Command; this array represents\ + \ all grouping and/or associations that would have to be removed to deprovision\ + \ the Command from this System.\n\nSee `/members` and `/associations` endpoints\ + \ to manage those collections.\n\n#### Sample Request\n```\ncurl -X GET https://console.jumpcloud.com/api/v2/systems/{System_ID}/commands\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n\n```" + operationId: "graph_systemTraverseCommand" + parameters: + - name: "system_id" + in: "path" + description: "ObjectID of the System." + required: true + type: "string" + x-exportParamName: "SystemId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "system" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "system" + id: "57980e9c8bdf6b5616207033" + - - type: "system_group" + id: "57980e9c8bdf6b5616207032" + - type: "system" + id: "57980e9c8bdf6b5616207034" + paths: + - - type: "system_group" + id: "57980e9c8bdf6b5616207034" + security: + - x-api-key: [] + x-stoplight: + id: "graph_systemTraverseCommand" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /systems/{system_id}/usergroups: + get: + tags: + - "Graph" + - "Systems" + summary: "List the User Groups bound to a System" + description: "This endpoint will return all User Groups bound to a System, either\ + \ directly or indirectly essentially traversing the JumpCloud Graph for your\ + \ Organization. \n\nEach element will contain the type, id, attributes and\ + \ paths.\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this System to the corresponding User Group; this array represents\ + \ all grouping and/or associations that would have to be removed to deprovision\ + \ the User Group from this System.\n\nSee `/members` and `/associations` endpoints\ + \ to manage those collections.\n\n#### Sample Request\n```\ncurl -X GET https://console.jumpcloud.com/api/v2/systems/{System_ID}/usergroups\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n\n```" + operationId: "graph_systemTraverseUserGroup" + parameters: + - name: "system_id" + in: "path" + description: "ObjectID of the System." + required: true + type: "string" + x-exportParamName: "SystemId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "Date" + in: "header" + description: "Current date header for the System Context API" + required: false + type: "string" + x-exportParamName: "Date" + - name: "Authorization" + in: "header" + description: "Authorization header for the System Context API" + required: false + type: "string" + x-exportParamName: "Authorization" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - attributes: + - "object" + - "null" + type: "string (required)" + id: "string (required)" + paths: + - - null + security: + - x-api-key: [] + x-stoplight: + id: "graph_systemTraverseUserGroup" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /systemgroups: + get: + tags: + - "System Groups" + summary: "List all System Groups" + description: "This endpoint returns all System Groups.\n\nAvailable filter fields:\n\ + \ - `name`\n - `disabled`\n - `type`\n\n#### Sample Request\n\n```\ncurl\ + \ -X GET https://console.jumpcloud.com/api/v2/systemgroups \\\n -H 'Accept:\ + \ application/json' \\\n -H 'Content-Type: application/json' \\\n -H 'x-api-key:\ + \ {API_KEY}'\n```" + operationId: "groups_system_list" + parameters: + - name: "fields" + in: "query" + description: "The comma separated fields included in the returned records.\n\ + If omitted the default list of fields will be returned.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Fields" + - name: "filter" + in: "query" + description: "Supported operators are: eq, ne, gt, ge, lt, le, between, search,\ + \ in" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Filter" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "sort" + in: "query" + description: "The comma separated fields used to sort the collection.\nDefault\ + \ sort is ascending, prefix with `-` to sort descending.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Sort" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/SystemGroup" + examples: + application/json: + - id: "000000" + - type: "system_group" + - name: "group1" + id: "000000" + default: + description: "Unexpected error" + schema: + $ref: "#/definitions/Error" + security: + - x-api-key: [] + x-stoplight: + id: "groups_system_list" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + post: + tags: + - "System Groups" + summary: "Create a new System Group" + description: "This endpoint allows you to create a new System Group.\n\n####\ + \ Sample Request\n\n```\ncurl -X POST https://console.jumpcloud.com/api/v2/systemgroups\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}' \\\n -d '{\n \"name\": \"{Group_Name}\"\ + \n}'\n\n```" + operationId: "groups_system_post" + parameters: + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/SystemGroupData" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 201: + description: "Created" + schema: + $ref: "#/definitions/SystemGroup" + examples: + application/json: + id: "00000" + type: "system_group" + name: "group1" + security: + - x-api-key: [] + x-stoplight: + id: "groups_system_post" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /systemgroups/{id}: + get: + tags: + - "System Groups" + summary: "View an individual System Group details" + description: "This endpoint returns the details of a System Group.\n\n#### Sample\ + \ Request\n```\ncurl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID}\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n\n```" + operationId: "groups_system_get" + parameters: + - name: "id" + in: "path" + description: "ObjectID of the System Group." + required: true + type: "string" + x-exportParamName: "Id" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "OK" + schema: + $ref: "#/definitions/SystemGroup" + examples: + application/json: + id: "000000" + type: "system_group" + name: "group1" + security: + - x-api-key: [] + x-stoplight: + id: "groups_system_get" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + put: + tags: + - "System Groups" + summary: "Update a System Group" + description: "This enpoint allows you to do a full update of the System Group.\n\ + \n#### Sample Request\n```\ncurl -X PUT https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID}\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}' \\\n -d '{\n \"name\": \"Name_Update\"\n\ + }'\n```" + operationId: "groups_system_put" + parameters: + - name: "id" + in: "path" + description: "ObjectID of the System Group." + required: true + type: "string" + x-exportParamName: "Id" + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/SystemGroupData" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "OK" + schema: + $ref: "#/definitions/SystemGroup" + examples: + application/json: + id: "00000" + type: "system_group" + name: "group1" + security: + - x-api-key: [] + x-stoplight: + id: "groups_system_put" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + delete: + tags: + - "System Groups" + summary: "Delete a System Group" + description: "This endpoint allows you to delete a System Group.\n\n#### Sample\ + \ Request\n```\ncurl -X DELETE https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID}\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n\n```" + operationId: "groups_system_delete" + parameters: + - name: "id" + in: "path" + description: "ObjectID of the System Group." + required: true + type: "string" + x-exportParamName: "Id" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 204: + description: "No Content" + security: + - x-api-key: [] + x-stoplight: + id: "groups_system_delete" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + patch: + tags: + - "System Groups" + summary: "Partial update a System Group" + description: "We have hidden PATCH on the systemgroups and usergroups for now;\ + \ we don't have that implemented correctly yet, people should use PUT until\ + \ we do a true PATCH operation.\n\n#### Sample Request\n```\nhttps://console.jumpcloud.com/api/v2/systemgroups/{id}\n\ + ```" + operationId: "groups_system_patch" + parameters: + - name: "id" + in: "path" + description: "ObjectID of the System Group." + required: true + type: "string" + x-exportParamName: "Id" + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/SystemGroupData" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "OK" + schema: + $ref: "#/definitions/SystemGroup" + examples: + application/json: + id: "00000" + type: "system_group" + name: "group1" + security: + - x-api-key: [] + x-stoplight: + id: "groups_system_patch" + beforeScript: null + afterScript: null + public: false + mock: + enabled: false + dynamic: false + statusCode: 200 + /systemgroups/{group_id}/members: + get: + tags: + - "Graph" + - "System Groups" + - "System Group Members & Membership" + summary: "List the members of a System Group" + description: "This endpoint returns the system members of a System Group.\n\n\ + #### Sample Request\n```\ncurl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID}/members\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n\n```" + operationId: "graph_systemGroupMembersList" + parameters: + - name: "group_id" + in: "path" + description: "ObjectID of the System Group." + required: true + type: "string" + x-exportParamName: "GroupId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphConnection" + examples: + application/json: + - type: "system_group" + id: "57980e9c8bdf6b5616207033" + attributes: null + - type: "system_group" + id: "57980e9c8bdf6b5616207035" + attributes: null + - type: "system" + id: "57980e9c8bdf6b5616207034" + attributes: null + security: + - x-api-key: [] + x-stoplight: + id: "graph_systemGroupMembersList" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + post: + tags: + - "Graph" + - "System Groups" + - "System Group Members & Membership" + summary: "Manage the members of a System Group" + description: "This endpoint allows you to manage the system members of a System\ + \ Group.\n\n#### Sample Request\n```\ncurl -X POST https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID}/members\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY' \\\n -d '{\n \"op\": \"add\",\n \"\ + type\": \"system\",\n \"id\": \"{System_ID\"\n}'\n```" + operationId: "graph_systemGroupMembersPost" + parameters: + - name: "group_id" + in: "path" + description: "ObjectID of the System Group." + required: true + type: "string" + x-exportParamName: "GroupId" + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/SystemGroupMembersReq" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "Date" + in: "header" + description: "Current date header for the System Context API" + required: false + type: "string" + x-exportParamName: "Date" + - name: "Authorization" + in: "header" + description: "Authorization header for the System Context API" + required: false + type: "string" + x-exportParamName: "Authorization" + responses: + 204: + description: "OK" + security: + - x-api-key: [] + x-stoplight: + id: "graph_systemGroupMembersPost" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + x-swagger-jumpcloud-auto-insert: true + /systemgroups/{group_id}/memberof: + get: + tags: + - "Graph" + - "System Groups" + - "System Group Members & Membership" + summary: "List the System Group's parents" + description: "This endpoint returns all System Groups a System Group is a member\ + \ of.\n\nThis endpoint is not yet public as we haven't completed the code\ + \ yet." + operationId: "graph_systemGroupMemberOf" + parameters: + - name: "group_id" + in: "path" + description: "ObjectID of the System Group." + required: true + type: "string" + x-exportParamName: "GroupId" + - name: "filter" + in: "query" + description: "Supported operators are: eq, ne, gt, ge, lt, le, between, search,\ + \ in" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Filter" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "sort" + in: "query" + description: "The comma separated fields used to sort the collection.\nDefault\ + \ sort is ascending, prefix with `-` to sort descending.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Sort" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "system_group" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "system_group" + id: "57980e9c8bdf6b5616207033" + - - type: "system_group" + id: "57980e9c8bdf6b5616207032" + - type: "system_group" + id: "57980e9c8bdf6b5616207033" + - type: "system_group" + id: "57980e9c8bdf6b5616207034" + paths: + - - type: "system_group" + id: "57980e9c8bdf6b5616207034" + security: + - x-api-key: [] + x-stoplight: + id: "graph_systemGroupMemberOf" + beforeScript: null + afterScript: null + public: false + mock: + enabled: false + dynamic: false + statusCode: 200 + /systemgroups/{group_id}/membership: + get: + tags: + - "Graph" + - "System Groups" + - "System Group Members & Membership" + summary: "List the System Group's membership" + description: "This endpoint returns all Systems that are a member of this System\ + \ Group.\n\n#### Sample Request\n```\ncurl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID/membership\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n\n```" + operationId: "graph_systemGroupMembership" + parameters: + - name: "group_id" + in: "path" + description: "ObjectID of the System Group." + required: true + type: "string" + x-exportParamName: "GroupId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "sort" + in: "query" + description: "The comma separated fields used to sort the collection.\nDefault\ + \ sort is ascending, prefix with `-` to sort descending.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Sort" + - name: "filter" + in: "query" + description: "Supported operators are: eq, ne, gt, ge, lt, le, between, search,\ + \ in" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Filter" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "system" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "system_group" + id: "57980e9c8bdf6b5616207033" + - - type: "system_group" + id: "57980e9c8bdf6b5616207032" + - type: "system" + id: "57980e9c8bdf6b5616207033" + - type: "system_group" + id: "57980e9c8bdf6b5616207034" + paths: + - - type: "system_group" + id: "57980e9c8bdf6b5616207034" + security: + - x-api-key: [] + x-stoplight: + id: "graph_systemGroupMembership" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /systemgroups/{group_id}/associations: + get: + tags: + - "Graph" + - "System Groups" + - "System Group Associations" + summary: "List the associations of a System Group" + description: "This endpoint returns the _direct_ associations of a System Group.\n\ + \nA direct association can be a non-homogenous relationship between 2 different\ + \ objects. for example System Groups and Users.\n\n\n#### Sample Request\n\ + ```\ncurl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/associations?targets=user\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "graph_systemGroupAssociationsList" + parameters: + - name: "group_id" + in: "path" + description: "ObjectID of the System Group." + required: true + type: "string" + x-exportParamName: "GroupId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "targets" + in: "query" + description: "" + required: true + type: "array" + items: + type: "string" + enum: + - "active_directory" + - "application" + - "command" + - "g_suite" + - "ldap_server" + - "office_365" + - "policy" + - "radius_server" + - "user" + - "user_group" + x-exportParamName: "Targets" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphConnection" + examples: + application/json: + - type: "user_group" + id: "57980e9c8bdf6b5616207033" + attributes: null + - type: "user" + id: "57980e9c8bdf6b5616207035" + attributes: null + - type: "user_group" + id: "57980e9c8bdf6b5616207034" + attributes: null + security: + - x-api-key: [] + x-stoplight: + id: "graph_systemGroupAssociationsList" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + post: + tags: + - "Graph" + - "System Groups" + - "System Group Associations" + summary: "Manage the associations of a System Group" + description: "This endpoint allows you to manage the _direct_ associations of\ + \ a System Group.\n\nA direct association can be a non-homogenous relationship\ + \ between 2 different objects. for example System Groups and Users.\n\n\n\ + #### Sample Request\n```\ncurl -X POST https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/associations\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}' \\\n -d '{\n \"op\": \"add\",\n \"\ + type\": \"user\",\n \"id\": \"{UserID}\"\n}'\n\n```" + operationId: "graph_systemGroupAssociationsPost" + parameters: + - name: "group_id" + in: "path" + description: "ObjectID of the System Group." + required: true + type: "string" + x-exportParamName: "GroupId" + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/SystemGroupGraphManagementReq" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 204: + description: "OK" + security: + - x-api-key: [] + x-stoplight: + id: "graph_systemGroupAssociationsPost" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + x-swagger-jumpcloud-auto-insert: true + /systemgroups/{group_id}/users: + get: + tags: + - "Graph" + - "System Groups" + - "System Group Associations" + summary: "List the Users bound to a System Group" + description: "This endpoint will return all Users bound to a System Group, either\ + \ directly or indirectly, essentially traversing the JumpCloud Graph for your\ + \ Organization.\n\nEach element will contain the type, id, attributes and\ + \ paths.\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this System Group to the corresponding User; this array represents\ + \ all grouping and/or associations that would have to be removed to deprovision\ + \ the User from this System Group.\n\nSee `/members` and `/associations` endpoints\ + \ to manage those collections.\n\n#### Sample Request\n```\ncurl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/users\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "graph_systemGroupTraverseUser" + parameters: + - name: "group_id" + in: "path" + description: "ObjectID of the System Group." + required: true + type: "string" + x-exportParamName: "GroupId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "user" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "system_group" + id: "57980e9c8bdf6b5616207030" + - - type: "user_group" + id: "57980e9c8bdf6b5616207033" + - - type: "user_group" + id: "57980e9c8bdf6b5616207032" + - type: "user" + id: "57980e9c8bdf6b5616207033" + - type: "user" + id: "57980e9c8bdf6b5616207034" + paths: + - - type: "system_group" + id: "57980e9c8bdf6b5616207030" + - - type: "user" + id: "57980e9c8bdf6b5616207034" + security: + - x-api-key: [] + x-stoplight: + id: "graph_systemGroupTraverseUser" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /systemgroups/{group_id}/usergroups: + get: + tags: + - "Graph" + - "System Groups" + - "System Group Associations" + summary: "List the User Groups bound to a System Group" + description: "This endpoint will return all User Groups bound to a System Group,\ + \ either directly or indirectly, essentially traversing the JumpCloud Graph\ + \ for your Organization.\n\nEach element will contain the type, id, attributes\ + \ and paths.\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this System Group to the corresponding User Group; this array\ + \ represents all grouping and/or associations that would have to be removed\ + \ to deprovision the User Group from this System Group.\n\nSee `/members`\ + \ and `/associations` endpoints to manage those collections.\n\n#### Sample\ + \ Request\n```\ncurl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/usergroups\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n\n```" + operationId: "graph_systemGroupTraverseUserGroup" + parameters: + - name: "group_id" + in: "path" + description: "ObjectID of the System Group." + required: true + type: "string" + x-exportParamName: "GroupId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "user_group" + id: "57980e9c8bdf6b5616207033" + paths: [] + - type: "user_group" + id: "57980e9c8bdf6b5616207034" + paths: [] + security: + - x-api-key: [] + x-stoplight: + id: "graph_systemGroupTraverseUserGroup" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /systemgroups/{group_id}/policies: + get: + tags: + - "Graph" + - "System Groups" + - "System Group Associations" + summary: "List the Policies bound to a System Group" + description: "This endpoint will return all Policies bound to a System Group,\ + \ either directly or indirectly, essentially traversing the JumpCloud Graph\ + \ for your Organization.\n\nEach element will contain the type, id, attributes\ + \ and paths.\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this System Group to the corresponding Policy; this array represents\ + \ all grouping and/or associations that would have to be removed to deprovision\ + \ the Policy from this System Group.\n\nSee `/members` and `/associations`\ + \ endpoints to manage those collections.\n\nThis endpoint is not public yet\ + \ as we haven't finished the code.\n\n##### Sample Request\n```\ncurl -X GET\ + \ https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/policies \\\n\ + \ -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "graph_systemGroupTraversePolicy" + parameters: + - name: "group_id" + in: "path" + description: "ObjectID of the System Group." + required: true + type: "string" + x-exportParamName: "GroupId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "system_group" + id: "57980e9c8bdf6b5616207033" + attributes: null + - type: "system_group" + id: "57980e9c8bdf6b5616207035" + attributes: null + - type: "system" + id: "57980e9c8bdf6b5616207034" + attributes: null + security: + - x-api-key: [] + x-stoplight: + id: "graph_systemGroupTraversePolicy" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /systemgroups/{group_id}/commands: + get: + tags: + - "Graph" + - "System Group Associations" + summary: "List the Commands bound to a System Group" + description: "This endpoint will return all Commands bound to a System Group,\ + \ either directly or indirectly, essentially traversing the JumpCloud Graph\ + \ for your Organization.\n\nEach element will contain the group's type, id,\ + \ attributes and paths.\n\nThe `attributes` object is a key/value hash of\ + \ compiled graph attributes for all paths followed.\n\nThe `paths` array enumerates\ + \ each path from this System Group to the corresponding Command; this array\ + \ represents all grouping and/or associations that would have to be removed\ + \ to deprovision the Command from this System Group.\n\nSee `/members` and\ + \ `/associations` endpoints to manage those collections.\n\n#### Sample Request\n\ + ```\ncurl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/commands\ + \ \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json'\ + \ \\\n -H 'x-api-key: {API_KEY}'\n```" + operationId: "graph_systemGroupTraverseCommand" + parameters: + - name: "group_id" + in: "path" + description: "ObjectID of the System Group." + required: true + type: "string" + x-exportParamName: "GroupId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "system_group" + id: "57980e9c8bdf6b5616207033" + paths: [] + - type: "system_group" + id: "57980e9c8bdf6b5616207034" + paths: [] + security: + - x-api-key: [] + x-stoplight: + id: "graph_systemGroupTraverseCommand" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /users/{user_id}/associations: + get: + tags: + - "Graph" + - "Users" + summary: "List the associations of a User" + description: "This endpoint returns the _direct_ associations of a User.\n\n\ + A direct association can be a non-homogenous relationship between 2 different\ + \ objects. for example Users and Systems.\n\n\n#### Sample Request\n```\n\ + https://console.jumpcloud.com/api/v2/users/{user_id}/associations?targets=user_group\n\ + ```" + operationId: "graph_userAssociationsList" + parameters: + - name: "user_id" + in: "path" + description: "ObjectID of the User." + required: true + type: "string" + x-exportParamName: "UserId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "targets" + in: "query" + description: "" + required: true + type: "array" + items: + type: "string" + enum: + - "active_directory" + - "application" + - "command" + - "g_suite" + - "ldap_server" + - "office_365" + - "policy" + - "radius_server" + - "system" + - "system_group" + x-exportParamName: "Targets" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphConnection" + examples: + application/json: + - type: "system_group" + id: "57980e9c8bdf6b5616207033" + attributes: "{sudo: {enabled: false, withoutPassword: false}, posixGroups:\ + \ [{id: 5001, name: \"groupOne\"}]}" + - type: "system" + id: "57980e9c8bdf6b5616207035" + attributes: "{sudo: {enabled: true, withoutPassword: false}, posixGroups:\ + \ [{id: 5002, name: \"groupTwo\"}]}" + - type: "system_group" + id: "57980e9c8bdf6b5616207034" + attributes: "{sudo: {enabled: true, withoutPassword: true}, posixGroups:\ + \ [{id: 5001, name: \"groupOne\"}, {id: 5002, name: \"groupTwo\"}]}" + security: + - x-api-key: [] + x-stoplight: + id: "graph_userAssociationsList" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + post: + tags: + - "Graph" + - "Users" + summary: "Manage the associations of a User" + description: "This endpoint allows you to manage the _direct_ associations of\ + \ a User.\n\nA direct association can be a non-homogenous relationship between\ + \ 2 different objects. for example Users and Systems.\n\n\n#### Sample Request\n\ + ```\nhttps://console.jumpcloud.com/api/v2/users/{user_id}/associations\n```" + operationId: "graph_userAssociationsPost" + parameters: + - name: "user_id" + in: "path" + description: "ObjectID of the User." + required: true + type: "string" + x-exportParamName: "UserId" + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/UserGraphManagementReq" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 204: + description: "OK" + security: + - x-api-key: [] + x-stoplight: + id: "graph_userAssociationsPost" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + x-swagger-jumpcloud-auto-insert: true + /users/{user_id}/memberof: + get: + tags: + - "Graph" + - "Users" + summary: "List the parent Groups of a User" + description: "This endpoint returns all the User Groups a User is a member of.\n\ + \n#### Sample Request\n```\nhttps://console.jumpcloud.com/api/v2/users/{user_id}/memberof\n\ + ```" + operationId: "graph_userMemberOf" + parameters: + - name: "user_id" + in: "path" + description: "ObjectID of the User." + required: true + type: "string" + x-exportParamName: "UserId" + - name: "filter" + in: "query" + description: "Supported operators are: eq, ne, gt, ge, lt, le, between, search,\ + \ in" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Filter" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "sort" + in: "query" + description: "The comma separated fields used to sort the collection.\nDefault\ + \ sort is ascending, prefix with `-` to sort descending.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Sort" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "user_group" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "user_group" + id: "57980e9c8bdf6b5616207033" + - - type: "user_group" + id: "57980e9c8bdf6b5616207032" + - type: "user_group" + id: "57980e9c8bdf6b5616207033" + - type: "user_group" + id: "57980e9c8bdf6b5616207034" + paths: + - - type: "user_group" + id: "57980e9c8bdf6b5616207034" + security: + - x-api-key: [] + x-stoplight: + id: "graph_userMemberOf" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /users/{user_id}/applications: + get: + tags: + - "Graph" + - "Users" + summary: "List the Applications bound to a User" + description: "This endpoint will return all Applications bound to a User, either\ + \ directly or indirectly, essentially traversing the JumpCloud Graph for your\ + \ Organization. \n\nEach element will contain the type, id, attributes and\ + \ paths.\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this User to the corresponding Application; this array represents\ + \ all grouping and/or associations that would have to be removed to deprovision\ + \ the Application from this User.\n\nSee `/members` and `/associations` endpoints\ + \ to manage those collections.\n\n#### Sample Request\n```\nhttps://console.jumpcloud.com/api/v2/users/{user_id}/applications\n\ + ```" + operationId: "graph_userTraverseApplication" + parameters: + - name: "user_id" + in: "path" + description: "ObjectID of the User." + required: true + type: "string" + x-exportParamName: "UserId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "application" + id: "57980e9c8bdf6b5616207033" + paths: [] + - type: "application" + id: "57980e9c8bdf6b5616207034" + paths: [] + security: + - x-api-key: [] + x-stoplight: + id: "graph_userTraverseApplication" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /users/{user_id}/directories: + get: + tags: + - "Graph" + - "Users" + summary: "List the Directories bound to a User" + description: "This endpoint will return all Directories bound to a User, either\ + \ directly or indirectly, essentially traversing the JumpCloud Graph for your\ + \ Organization. \n\nEach element will contain the type, id, attributes and\ + \ paths.\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this User to the corresponding Directory; this array represents\ + \ all grouping and/or associations that would have to be removed to deprovision\ + \ the Directory from this User.\n\nSee `/members` and `/associations` endpoints\ + \ to manage those collections.\n\n#### Sample Request\n```\nhttps://console.jumpcloud.com/api/v2/users/{user_id}/directories\n\ + ```" + operationId: "graph_userTraverseDirectory" + parameters: + - name: "user_id" + in: "path" + description: "ObjectID of the User." + required: true + type: "string" + x-exportParamName: "UserId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "g_suite" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "user" + id: "57980e9c8bdf6b5616207030" + - - type: "g_suite" + id: "57980e9c8bdf6b5616207033" + - type: "office_365" + id: "57980e9c8bdf6b5616207034" + paths: + - - type: "user" + id: "57980e9c8bdf6b5616207030" + - - type: "office_365" + id: "57980e9c8bdf6b5616207034" + security: + - x-api-key: [] + x-stoplight: + id: "graph_userTraverseDirectory" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /users/{user_id}/gsuites: + get: + tags: + - "Graph" + - "Users" + summary: "List the G Suite instances bound to a User" + description: "This endpoint will return all G-Suite Instances bound to a User,\ + \ either directly or indirectly, essentially traversing the JumpCloud Graph\ + \ for your Organization. \n\nEach element will contain the type, id, attributes\ + \ and paths.\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this User to the corresponding G Suite instance; this array represents\ + \ all grouping and/or associations that would have to be removed to deprovision\ + \ the G Suite instance from this User.\n\nSee `/members` and `/associations`\ + \ endpoints to manage those collections.\n\n#### Sample Request\n```\nhttps://console.jumpcloud.com/api/v2/users/{user_id}/gsuites\n\ + ```" + operationId: "graph_userTraverseGSuite" + parameters: + - name: "user_id" + in: "path" + description: "ObjectID of the User." + required: true + type: "string" + x-exportParamName: "UserId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "g_suite" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "user" + id: "57980e9c8bdf6b5616207030" + security: + - x-api-key: [] + x-stoplight: + id: "graph_userTraverseGSuite" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /users/{user_id}/ldapservers: + get: + tags: + - "Graph" + - "Users" + summary: "List the LDAP servers bound to a User" + description: "This endpoint will return all LDAP Servers bound to a User, either\ + \ directly or indirectly, essentially traversing the JumpCloud Graph for your\ + \ Organization. \n\nEach element will contain the type, id, attributes and\ + \ paths.\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this User to the corresponding LDAP Server; this array represents\ + \ all grouping and/or associations that would have to be removed to deprovision\ + \ the LDAP Server from this User.\n\nSee `/members` and `/associations` endpoints\ + \ to manage those collections.\n\n#### Sample Request\n```\nhttps://console.jumpcloud.com/api/v2/users/{user_id}/ldapservers\n\ + ```" + operationId: "graph_userTraverseLdapServer" + parameters: + - name: "user_id" + in: "path" + description: "ObjectID of the User." + required: true + type: "string" + x-exportParamName: "UserId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "ldap_server" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "user" + id: "57980e9c8bdf6b5616207030" + security: + - x-api-key: [] + x-stoplight: + id: "graph_userTraverseLdapServer" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /users/{user_id}/office365s: + get: + tags: + - "Graph" + - "Users" + summary: "List the Office 365 instances bound to a User" + description: "This endpoint will return all Office 365 Instances bound to a\ + \ User, either directly or indirectly, essentially traversing the JumpCloud\ + \ Graph for your Organization. \n\nEach element will contain the type, id,\ + \ attributes and paths.\n\nThe `attributes` object is a key/value hash of\ + \ compiled graph attributes for all paths followed.\n\nThe `paths` array enumerates\ + \ each path from this User to the corresponding Office 365 instance; this\ + \ array represents all grouping and/or associations that would have to be\ + \ removed to deprovision the Office 365 instance from this User.\n\nSee `/members`\ + \ and `/associations` endpoints to manage those collections.\n\n#### Sample\ + \ Request\n```\nhttps://console.jumpcloud.com/api/v2/users/{user_id}/office365s\n\ + ```" + operationId: "graph_userTraverseOffice365" + parameters: + - name: "user_id" + in: "path" + description: "ObjectID of the User." + required: true + type: "string" + x-exportParamName: "UserId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "office_365" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "user" + id: "57980e9c8bdf6b5616207030" + security: + - x-api-key: [] + x-stoplight: + id: "graph_userTraverseOffice365" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /users/{user_id}/systems: + get: + tags: + - "Graph" + - "Users" + summary: "List the Systems bound to a User" + description: "This endpoint will return all Systems bound to a User, either\ + \ directly or indirectly, essentially traversing the JumpCloud Graph for your\ + \ Organization. \n\nEach element will contain the type, id, attributes and\ + \ paths.\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this User to the corresponding System; this array represents all\ + \ grouping and/or associations that would have to be removed to deprovision\ + \ the System from this User.\n\nSee `/members` and `/associations` endpoints\ + \ to manage those collections.\n\n#### Sample Request\n```\nhttps://console.jumpcloud.com/api/v2/users/{user_id}/systems\n\ + ```" + operationId: "graph_userTraverseSystem" + parameters: + - name: "user_id" + in: "path" + description: "ObjectID of the User." + required: true + type: "string" + x-exportParamName: "UserId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "system" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "user_group" + id: "57980e9c8bdf6b5616207030" + - - type: "system_group" + id: "57980e9c8bdf6b5616207033" + - - type: "system_group" + id: "57980e9c8bdf6b5616207032" + - type: "system" + id: "57980e9c8bdf6b5616207033" + - type: "system" + id: "57980e9c8bdf6b5616207034" + paths: + - - type: "user_group" + id: "57980e9c8bdf6b5616207030" + - - type: "system" + id: "57980e9c8bdf6b5616207034" + security: + - x-api-key: [] + x-stoplight: + id: "graph_userTraverseSystem" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /users/{user_id}/radiusservers: + get: + tags: + - "Graph" + - "Users" + summary: "List the RADIUS Servers bound to a User" + description: "This endpoint will return all RADIUS Servers bound to a User,\ + \ either directly or indirectly, essentially traversing the JumpCloud Graph\ + \ for your Organization. \n\nEach element will contain the type, id, attributes\ + \ and paths.\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this User to the corresponding RADIUS Server; this array represents\ + \ all grouping and/or associations that would have to be removed to deprovision\ + \ the RADIUS Server from this User.\n\nSee `/members` and `/associations`\ + \ endpoints to manage those collections.\n\n#### Sample Request\n```\nhttps://console.jumpcloud.com/api/v2/users/{user_id}/radiusservers\n\ + ```" + operationId: "graph_userTraverseRadiusServer" + parameters: + - name: "user_id" + in: "path" + description: "ObjectID of the User." + required: true + type: "string" + x-exportParamName: "UserId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "radius_server" + id: "57980e9c8bdf6b5616207033" + paths: [] + - type: "radius_server" + id: "57980e9c8bdf6b5616207034" + paths: [] + security: + - x-api-key: [] + x-stoplight: + id: "graph_userTraverseRadiusServer" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /users/{user_id}/systemgroups: + get: + tags: + - "Graph" + - "Users" + summary: "List the System Groups bound to a User" + description: "This endpoint will return all System Groups bound to a User, either\ + \ directly or indirectly, essentially traversing the JumpCloud Graph for your\ + \ Organization. \n\nEach element will contain the type, id, attributes and\ + \ paths.\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this User to the corresponding System Group; this array represents\ + \ all grouping and/or associations that would have to be removed to deprovision\ + \ the System Group from this User.\n\nSee `/members` and `/associations` endpoints\ + \ to manage those collections.\n\n#### Sample Request\n```\nhttps://console.jumpcloud.com/api/v2/users/{user_id}/systemgroups\n\ + ```" + operationId: "graph_userTraverseSystemGroup" + parameters: + - name: "user_id" + in: "path" + description: "ObjectID of the User." + required: true + type: "string" + x-exportParamName: "UserId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "system" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "user_group" + id: "57980e9c8bdf6b5616207030" + - - type: "system_group" + id: "57980e9c8bdf6b5616207033" + - - type: "system_group" + id: "57980e9c8bdf6b5616207032" + - type: "system" + id: "57980e9c8bdf6b5616207033" + - type: "system" + id: "57980e9c8bdf6b5616207034" + paths: + - - type: "user_group" + id: "57980e9c8bdf6b5616207030" + - - type: "system" + id: "57980e9c8bdf6b5616207034" + security: + - x-api-key: [] + x-stoplight: + id: "graph_userTraverseSystemGroup" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /usergroups: + get: + tags: + - "User Groups" + summary: "List all User Groups" + description: "This endpoint returns all User Groups.\n\nAvailable filter fields:\n\ + \ - `name`\n - `disabled`\n - `type`\n\n#### Sample Request\n```\nhttps://console.jumpcloud.com/api/v2/usergroups\n\ + ```" + operationId: "groups_user_list" + parameters: + - name: "fields" + in: "query" + description: "The comma separated fields included in the returned records.\n\ + If omitted the default list of fields will be returned.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Fields" + - name: "filter" + in: "query" + description: "Supported operators are: eq, ne, gt, ge, lt, le, between, search,\ + \ in" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Filter" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "sort" + in: "query" + description: "The comma separated fields used to sort the collection.\nDefault\ + \ sort is ascending, prefix with `-` to sort descending.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Sort" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/UserGroup" + examples: + application/json: + - attributes: null + type: "user_group" + - type: "user_group" + name: "group1" + - {} + - {} + - {} + default: + description: "Unexpected error" + schema: + $ref: "#/definitions/Error" + security: + - x-api-key: [] + x-stoplight: + id: "groups_user_list" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + post: + tags: + - "User Groups" + summary: "Create a new User Group" + description: "This endpoint allows you to create a new User Group.\n\n#### Sample\ + \ Request\n```\nhttps://console.jumpcloud.com/api/v2/usergroups\n```" + operationId: "groups_user_post" + parameters: + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/UserGroupPost" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 201: + description: "Created" + schema: + $ref: "#/definitions/UserGroup" + examples: + application/json: + attributes: null + id: "00000" + type: "user_group" + name: "group1" + security: + - x-api-key: [] + x-stoplight: + id: "groups_user_post" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /usergroups/{id}: + get: + tags: + - "User Groups" + summary: "View an indvidual User Group details" + description: "This endpoint allows you to view the details of a User Group.\n\ + \n#### Sample Request\n```\nhttps://console.jumpcloud.com/api/v2/usergroups/{id}\n\ + ```" + operationId: "groups_user_get" + parameters: + - name: "id" + in: "path" + description: "ObjectID of the User Group." + required: true + type: "string" + x-exportParamName: "Id" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "OK" + schema: + $ref: "#/definitions/UserGroup" + examples: + application/json: + attributes: null + id: "00000" + type: "user_group" + name: "group1" + security: + - x-api-key: [] + x-stoplight: + id: "groups_user_get" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + put: + tags: + - "User Groups" + summary: "Update a User Group" + description: "This enpoint allows you to do a full update of the User Group.\n\ + \n#### Sample Request\n```\nhttps://console.jumpcloud.com/api/v2/usergroups/{id}\n\ + ```" + operationId: "groups_user_put" + parameters: + - name: "id" + in: "path" + description: "ObjectID of the User Group." + required: true + type: "string" + x-exportParamName: "Id" + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/UserGroupPut" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "OK" + schema: + $ref: "#/definitions/UserGroup" + examples: + application/json: + attributes: null + id: "00000" + type: "user_group" + name: "group1" + security: + - x-api-key: [] + x-stoplight: + id: "groups_user_put" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + delete: + tags: + - "User Groups" + summary: "Delete a User Group" + description: "This endpoint allows you to delete a User Group.\n\n#### Sample\ + \ Request\n```\nhttps://console.jumpcloud.com/api/v2/usergroups/{id}\n```" + operationId: "groups_user_delete" + parameters: + - name: "id" + in: "path" + description: "ObjectID of the User Group." + required: true + type: "string" + x-exportParamName: "Id" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 204: + description: "No Content" + security: + - x-api-key: [] + x-stoplight: + id: "groups_user_delete" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + patch: + tags: + - "User Groups" + summary: "Partial update a User Group" + description: "We have hidden PATCH on the systemgroups and usergroups for now;\ + \ we don't have that implemented correctly yet, people should use PUT until\ + \ we do a true PATCH operation.\n\n#### Sample Request\n```\nhttps://console.jumpcloud.com/api/v2/usergroups/{id}\n\ + ```" + operationId: "groups_user_patch" + parameters: + - name: "id" + in: "path" + description: "ObjectID of the User Group." + required: true + type: "string" + x-exportParamName: "Id" + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/UserGroupPost" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "OK" + schema: + $ref: "#/definitions/UserGroup" + examples: + application/json: + attributes: null + id: "00000" + type: "user_group" + name: "group1" + security: + - x-api-key: [] + x-stoplight: + id: "groups_user_patch" + beforeScript: null + afterScript: null + public: false + mock: + enabled: false + dynamic: false + statusCode: 200 + /usergroups/{group_id}/members: + get: + tags: + - "Graph" + - "User Groups" + - "User Group Members & Membership" + summary: "List the members of a User Group" + description: "This endpoint returns the user members of a User Group.\n\n####\ + \ Sample Request\n```\nhttps://console.jumpcloud.com/api/v2/usergroups/{group_id}/members\n\ + ```" + operationId: "graph_userGroupMembersList" + parameters: + - name: "group_id" + in: "path" + description: "ObjectID of the User Group." + required: true + type: "string" + x-exportParamName: "GroupId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphConnection" + examples: + application/json: + - type: "user_group" + id: "57980e9c8bdf6b5616207033" + attributes: null + - type: "user_group" + id: "57980e9c8bdf6b5616207035" + attributes: null + - type: "user" + id: "57980e9c8bdf6b5616207034" + attributes: null + security: + - x-api-key: [] + x-stoplight: + id: "graph_userGroupMembersList" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + post: + tags: + - "Graph" + - "User Groups" + - "User Group Members & Membership" + summary: "Manage the members of a User Group" + description: "This endpoint allows you to manage the user members of a User\ + \ Group.\n\n#### Sample Request\n```\nhttps://console.jumpcloud.com/api/v2/usergroups/{group_id}/members\n\ + ```" + operationId: "graph_userGroupMembersPost" + parameters: + - name: "group_id" + in: "path" + description: "ObjectID of the User Group." + required: true + type: "string" + x-exportParamName: "GroupId" + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/UserGroupMembersReq" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 204: + description: "OK" + security: + - x-api-key: [] + x-stoplight: + id: "graph_userGroupMembersPost" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + x-swagger-jumpcloud-auto-insert: true + /usergroups/{group_id}/memberof: + get: + tags: + - "Graph" + - "User Groups" + - "User Group Members & Membership" + summary: "List the User Group's parents" + description: "This endpoint returns all User Groups a User Group is a member\ + \ of.\n\n#### Sample Request\n```\nhttps://console.jumpcloud.com/api/v2/usergroups/{group_id}/membersof\n\ + ```\n\nNot public yet, as the code is not finished," + operationId: "graph_userGroupMemberOf" + parameters: + - name: "group_id" + in: "path" + description: "ObjectID of the User Group." + required: true + type: "string" + x-exportParamName: "GroupId" + - name: "filter" + in: "query" + description: "Supported operators are: eq, ne, gt, ge, lt, le, between, search,\ + \ in" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Filter" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "sort" + in: "query" + description: "The comma separated fields used to sort the collection.\nDefault\ + \ sort is ascending, prefix with `-` to sort descending.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Sort" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "user_group" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "user_group" + id: "57980e9c8bdf6b5616207033" + - - type: "user_group" + id: "57980e9c8bdf6b5616207032" + - type: "user_group" + id: "57980e9c8bdf6b5616207033" + - type: "user_group" + id: "57980e9c8bdf6b5616207034" + paths: + - - type: "user_group" + id: "57980e9c8bdf6b5616207034" + security: + - x-api-key: [] + x-stoplight: + id: "graph_userGroupMemberOf" + beforeScript: null + afterScript: null + public: false + mock: + enabled: false + dynamic: false + statusCode: 200 + /usergroups/{group_id}/membership: + get: + tags: + - "Graph" + - "User Groups" + - "User Group Members & Membership" + summary: "List the User Group's membership" + description: "This endpoint returns all users members that are a member of this\ + \ User Group.\n\n#### Sample Request\n```\nhttps://console.jumpcloud.com/api/v2/usergroups/{group_id}/membership\n\ + ```" + operationId: "graph_userGroupMembership" + parameters: + - name: "group_id" + in: "path" + description: "ObjectID of the User Group." + required: true + type: "string" + x-exportParamName: "GroupId" + - name: "filter" + in: "query" + description: "Supported operators are: eq, ne, gt, ge, lt, le, between, search,\ + \ in" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Filter" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "sort" + in: "query" + description: "The comma separated fields used to sort the collection.\nDefault\ + \ sort is ascending, prefix with `-` to sort descending.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Sort" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "user" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "user_group" + id: "57980e9c8bdf6b5616207033" + - - type: "user_group" + id: "57980e9c8bdf6b5616207032" + - type: "user" + id: "57980e9c8bdf6b5616207033" + - type: "user_group" + id: "57980e9c8bdf6b5616207034" + paths: + - - type: "user_group" + id: "57980e9c8bdf6b5616207034" + security: + - x-api-key: [] + x-stoplight: + id: "graph_userGroupMembership" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /usergroups/{group_id}/associations: + get: + tags: + - "Graph" + - "User Groups" + - "User Group Associations" + summary: "List the associations of a User Group." + description: "This endpoint returns the _direct_ associations of this User Group.\n\ + \nA direct association can be a non-homogenous relationship between 2 different\ + \ objects. for example User Groups and Users.\n\n\n#### Sample Request\n```\n\ + https://console.jumpcloud.com/api/v2/usergroups/group_id}/associations?targets=user\n\ + ```" + operationId: "graph_userGroupAssociationsList" + parameters: + - name: "group_id" + in: "path" + description: "ObjectID of the User Group." + required: true + type: "string" + x-exportParamName: "GroupId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "targets" + in: "query" + description: "" + required: true + type: "array" + items: + type: "string" + enum: + - "active_directory" + - "application" + - "command" + - "g_suite" + - "ldap_server" + - "office_365" + - "policy" + - "radius_server" + - "system" + - "system_group" + x-exportParamName: "Targets" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphConnection" + examples: + application/json: + - type: "system_group" + id: "57980e9c8bdf6b5616207033" + attributes: null + - type: "system" + id: "57980e9c8bdf6b5616207035" + attributes: null + - type: "system_group" + id: "57980e9c8bdf6b5616207034" + attributes: null + security: + - x-api-key: [] + x-stoplight: + id: "graph_userGroupAssociationsList" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + post: + tags: + - "Graph" + - "User Groups" + - "User Group Associations" + summary: "Manage the associations of a User Group" + description: "This endpoint manages the _direct_ associations of this User Group.\n\ + \nA direct association can be a non-homogenous relationship between 2 different\ + \ objects. for example User Groups and Users.\n\n\n#### Sample Request\n```\n\ + https://console.jumpcloud.com/api/v2/usergroups/group_id}/associations\n```" + operationId: "graph_userGroupAssociationsPost" + parameters: + - name: "group_id" + in: "path" + description: "ObjectID of the User Group." + required: true + type: "string" + x-exportParamName: "GroupId" + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/UserGroupGraphManagementReq" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 204: + description: "OK" + security: + - x-api-key: [] + x-stoplight: + id: "graph_userGroupAssociationsPost" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + x-swagger-jumpcloud-auto-insert: true + /usergroups/{group_id}/activedirectories: + get: + tags: + - "Graph" + - "User Groups" + - "User Group Associations" + summary: "List the Active Directories bound to a User Group" + description: "This endpoint will return all Active Directory Instances bound\ + \ to a User Group, either directly or indirectly, essentially traversing the\ + \ JumpCloud Graph for your Organization. \n\nThe `attributes` object is a\ + \ key/value hash of compiled graph attributes for all paths followed.\n\n\ + The `paths` array enumerates each path from this User Group to the corresponding\ + \ Active Directory; this array represents all grouping and/or associations\ + \ that would have to be removed to deprovision the Active Directory from this\ + \ User Group.\n\nSee `/members` and `/associations` endpoints to manage those\ + \ collections.\n\n#### Sample Request\n```\nhttps://console.jumpcloud.com/api/v2/usergroups/group_id}/activedirectories\n\ + ```" + operationId: "graph_userGroupTraverseActiveDirectory" + parameters: + - name: "group_id" + in: "path" + description: "ObjectID of the User Group." + required: true + type: "string" + x-exportParamName: "GroupId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + security: + - x-api-key: [] + x-stoplight: + id: "graph_userGroupTraverseActiveDirectory" + beforeScript: null + afterScript: null + public: false + mock: + enabled: false + dynamic: false + statusCode: 200 + /usergroups/{group_id}/systemgroups: + get: + tags: + - "Graph" + - "User Groups" + - "User Group Associations" + summary: "List the System Groups bound to User Groups" + description: "This endpoint will return all System Groups bound to a User Group,\ + \ either directly or indirectly, essentially traversing the JumpCloud Graph\ + \ for your Organization. \n\nEach element will contain the type, id, attributes\ + \ and paths.\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this User Group to the corresponding System Group; this array\ + \ represents all grouping and/or associations that would have to be removed\ + \ to deprovision the System Group from this User Group.\n\nSee `/members`\ + \ and `/associations` endpoints to manage those collections.\n\n#### Sample\ + \ Request\n```\nhttps://console.jumpcloud.com/api/v2/usergroups/group_id}/systemsgroups\n\ + ```" + operationId: "graph_userGroupTraverseSystemGroup" + parameters: + - name: "group_id" + in: "path" + description: "ObjectID of the User Group." + required: true + type: "string" + x-exportParamName: "GroupId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "system_group" + id: "57980e9c8bdf6b5616207033" + paths: [] + - type: "system_group" + id: "57980e9c8bdf6b5616207034" + paths: [] + security: + - x-api-key: [] + x-stoplight: + id: "graph_userGroupTraverseSystemGroup" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /usergroups/{group_id}/systems: + get: + tags: + - "Graph" + - "User Groups" + - "User Group Associations" + summary: "List the Systems bound to a User Group" + description: "This endpoint will return all Systems bound to a User Group, either\ + \ directly or indirectly, essentially traversing the JumpCloud Graph for your\ + \ Organization. \n\nEach element will contain the type, id, attributes and\ + \ paths\n\nThe `attributes` object is a key/value hash of compiled graph attributes\ + \ for all paths followed.\n\nThe `paths` array enumerates each path from this\ + \ User Group to the corresponding System; this array represents all grouping\ + \ and/or associations that would have to be removed to deprovision the System\ + \ from this User Group.\n\nSee `/members` and `/associations` endpoints to\ + \ manage those collections.\n\n#### Sample Request\n```\nhttps://console.jumpcloud.com/api/v2/usergroups/group_id}/systems\n\ + ```" + operationId: "graph_userGroupTraverseSystem" + parameters: + - name: "group_id" + in: "path" + description: "ObjectID of the User Group." + required: true + type: "string" + x-exportParamName: "GroupId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "system" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "user_group" + id: "57980e9c8bdf6b5616207030" + - - type: "system_group" + id: "57980e9c8bdf6b5616207033" + - - type: "system_group" + id: "57980e9c8bdf6b5616207032" + - type: "system" + id: "57980e9c8bdf6b5616207033" + - type: "system" + id: "57980e9c8bdf6b5616207034" + paths: + - - type: "user_group" + id: "57980e9c8bdf6b5616207030" + - - type: "system" + id: "57980e9c8bdf6b5616207034" + security: + - x-api-key: [] + x-stoplight: + id: "graph_userGroupTraverseSystem" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /usergroups/{group_id}/radiusservers: + get: + tags: + - "Graph" + - "User Groups" + - "User Group Associations" + summary: "List the RADIUS Servers bound to a User Group" + description: "This endpoint will return all RADIUS servers bound to a User Group,\ + \ either directly or indirectly, essentially traversing the JumpCloud Graph\ + \ for your Organization. \n\nEach element will contain the type, id, attributes\ + \ and paths\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this User Group to the corresponding RADIUS Server; this array\ + \ represents all grouping and/or associations that would have to be removed\ + \ to deprovision the RADIUS Server from this User Group.\n\nSee `/members`\ + \ and `/associations` endpoints to manage those collections.\n\n#### Sample\ + \ Request\n```\nhttps://console.jumpcloud.com/api/v2/usergroups/group_id}/radiusservers\n\ + ```" + operationId: "graph_userGroupTraverseRadiusServer" + parameters: + - name: "group_id" + in: "path" + description: "ObjectID of the User Group." + required: true + type: "string" + x-exportParamName: "GroupId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "radius_server" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "user_group" + id: "57980e9c8bdf6b5616207030" + security: + - x-api-key: [] + x-stoplight: + id: "graph_userGroupTraverseRadiusServer" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /usergroups/{group_id}/office365s: + get: + tags: + - "Graph" + - "User Groups" + - "User Group Associations" + summary: "List the Office 365 instances bound to a User Group" + description: "This endpoint will return all Office 365 instances bound to a\ + \ User Group, either directly or indirectly, essentially traversing the JumpCloud\ + \ Graph for your Organization.\n\nEach element will contain the type, id,\ + \ attributes and paths\n\nThe `attributes` object is a key/value hash of compiled\ + \ graph attributes for all paths followed.\n\nThe `paths` array enumerates\ + \ each path from this User Group to the corresponding Office 365 instance;\ + \ this array represents all grouping and/or associations that would have to\ + \ be removed to deprovision the Office 365 instance from this User Group.\n\ + \nSee `/members` and `/associations` endpoints to manage those collections.\n\ + \n#### Sample Request\n```\nhttps://console.jumpcloud.com/api/v2/usergroups/group_id}/office365s\n\ + ```" + operationId: "graph_userGroupTraverseOffice365" + parameters: + - name: "group_id" + in: "path" + description: "ObjectID of the User Group." + required: true + type: "string" + x-exportParamName: "GroupId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "office_365" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "user_group" + id: "57980e9c8bdf6b5616207030" + security: + - x-api-key: [] + x-stoplight: + id: "graph_userGroupTraverseOffice365" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /usergroups/{group_id}/ldapservers: + get: + tags: + - "Graph" + - "User Groups" + - "User Group Associations" + summary: "List the LDAP Servers bound to a User Group" + description: "This endpoint will return all LDAP Servers bound to a User Group,\ + \ either directly or indirectly, essentially traversing the JumpCloud Graph\ + \ for your Organization.\n\nEach element will contain the type, id, attributes\ + \ and paths\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this User Group to the corresponding LDAP Server; this array represents\ + \ all grouping and/or associations that would have to be removed to deprovision\ + \ the LDAP Server from this User Group.\n\nSee `/members` and `/associations`\ + \ endpoints to manage those collections.\n\n#### Sample Request\n```\nhttps://console.jumpcloud.com/api/v2/usergroups/group_id}/ldapservers\n\ + ```" + operationId: "graph_userGroupTraverseLdapServer" + parameters: + - name: "group_id" + in: "path" + description: "ObjectID of the User Group." + required: true + type: "string" + x-exportParamName: "GroupId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "ldap_server" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "user_group" + id: "57980e9c8bdf6b5616207030" + security: + - x-api-key: [] + x-stoplight: + id: "graph_userGroupTraverseLdapServer" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /usergroups/{group_id}/gsuites: + get: + tags: + - "Graph" + - "User Groups" + - "User Group Associations" + summary: "List the G Suite instances bound to a User Group" + description: "This endpoint will return all Gsuite Instances bound to a User\ + \ Group, either directly or indirectly, essentially traversing the JumpCloud\ + \ Graph for your Organization.\n\nEach element will contain the type, id,\ + \ attributes and paths\n\nThe `attributes` object is a key/value hash of compiled\ + \ graph attributes for all paths followed.\n\nThe `paths` array enumerates\ + \ each path from this User Group to the corresponding G Suite instance; this\ + \ array represents all grouping and/or associations that would have to be\ + \ removed to deprovision the G Suite instance from this User Group.\n\nSee\ + \ `/members` and `/associations` endpoints to manage those collections.\n\n\ + #### Sample Request\n```\nhttps://console.jumpcloud.com/api/v2/usergroups/group_id}/gsuites\n\ + ```" + operationId: "graph_userGroupTraverseGSuite" + parameters: + - name: "group_id" + in: "path" + description: "ObjectID of the User Group." + required: true + type: "string" + x-exportParamName: "GroupId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "g_suite" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "user_group" + id: "57980e9c8bdf6b5616207030" + security: + - x-api-key: [] + x-stoplight: + id: "graph_userGroupTraverseGSuite" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /usergroups/{group_id}/directories: + get: + tags: + - "Graph" + - "User Groups" + - "User Group Associations" + summary: "List the Directories bound to a User Group" + description: "This endpoint will return all Directories bound to a User Group,\ + \ either directly or indirectly, essentially traversing the JumpCloud Graph\ + \ for your Organization.\n\nEach element will contain the type, id, attributes\ + \ and paths\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this User Group to the corresponding Directory; this array represents\ + \ all grouping and/or associations that would have to be removed to deprovision\ + \ the Directories from this User Group.\n\nSee `/members` and `/associations`\ + \ endpoints to manage those collections.\n\n#### Sample Request\n```\nhttps://console.jumpcloud.com/api/v2/usergroups/group_id}/directories\n\ + ```" + operationId: "graph_userGroupTraverseDirectory" + parameters: + - name: "group_id" + in: "path" + description: "ObjectID of the User Group." + required: true + type: "string" + x-exportParamName: "GroupId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "g_suite" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "user_group" + id: "57980e9c8bdf6b5616207030" + - - type: "g_suite" + id: "57980e9c8bdf6b5616207033" + - type: "office_365" + id: "57980e9c8bdf6b5616207034" + paths: + - - type: "user_group" + id: "57980e9c8bdf6b5616207030" + - - type: "office_365" + id: "57980e9c8bdf6b5616207034" + security: + - x-api-key: [] + x-stoplight: + id: "graph_userGroupTraverseDirectory" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /usergroups/{group_id}/applications: + get: + tags: + - "Graph" + - "User Groups" + - "User Group Associations" + summary: "List the Applications bound to a User Group" + description: "This endpoint will return all Applications bound to a User Group,\ + \ either directly or indirectly, essentially traversing the JumpCloud Graph\ + \ for your Organization.\n\nEach element will contain the type, id, attributes\ + \ and paths\n\nThe `attributes` object is a key/value hash of compiled graph\ + \ attributes for all paths followed.\n\nThe `paths` array enumerates each\ + \ path from this User Group to the corresponding Application; this array represents\ + \ all grouping and/or associations that would have to be removed to deprovision\ + \ the Application from this User Group.\n\nSee `/members` and `/associations`\ + \ endpoints to manage those collections.\n\n#### Sample Request\n```\nhttps://console.jumpcloud.com/api/v2/usergroups/group_id}/applications\n\ + ```" + operationId: "graph_userGroupTraverseApplication" + parameters: + - name: "group_id" + in: "path" + description: "ObjectID of the User Group." + required: true + type: "string" + x-exportParamName: "GroupId" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + responses: + 200: + description: "OK" + schema: + type: "array" + items: + $ref: "#/definitions/GraphObjectWithPaths" + examples: + application/json: + - type: "application" + id: "57980e9c8bdf6b5616207033" + paths: + - - type: "user_group" + id: "57980e9c8bdf6b5616207030" + security: + - x-api-key: [] + x-stoplight: + id: "graph_userGroupTraverseApplication" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /workdays/{id}: + get: + tags: + - "Workday Import" + summary: "Get Workday" + description: "This endpoint will return all the available information about\ + \ an instance of Workday." + operationId: "workdays_get" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + x-exportParamName: "Id" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "" + schema: + $ref: "#/definitions/workday-output" + security: + - x-api-key: [] + x-stoplight: + id: "workdays_get" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + put: + tags: + - "Workday Import" + summary: "Update Workday" + description: "This endpoint allows you to update the name and Custom Report\ + \ URL for a Workday Instance." + operationId: "workdays_put" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + x-exportParamName: "Id" + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/workday-fields" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "" + schema: + $ref: "#/definitions/workday-output" + security: + - x-api-key: [] + x-stoplight: + id: "workdays_put" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + delete: + tags: + - "Workday Import" + summary: "Delete Workday" + description: "This endpoint allows you to delete an instance of Workday." + operationId: "workdays_delete" + parameters: + - name: "id" + in: "path" + required: true + type: "string" + x-exportParamName: "Id" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 204: + description: "" + schema: + type: "object" + properties: {} + security: + - x-api-key: [] + x-stoplight: + id: "workdays_delete" + beforeScript: null + afterScript: null + public: false + mock: + enabled: false + dynamic: false + statusCode: 200 + /workdays: + get: + tags: + - "Workday Import" + summary: "List Workdays" + description: "This endpoint will return all the available information about\ + \ all your instances of Workday." + operationId: "workdays_list" + parameters: + - name: "fields" + in: "query" + description: "The comma separated fields included in the returned records.\n\ + If omitted the default list of fields will be returned.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Fields" + - name: "filter" + in: "query" + description: "Supported operators are: eq, ne, gt, ge, lt, le, between, search,\ + \ in" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Filter" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "sort" + in: "query" + description: "The comma separated fields used to sort the collection.\nDefault\ + \ sort is ascending, prefix with `-` to sort descending.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Sort" + responses: + 200: + description: "" + schema: + type: "array" + items: + $ref: "#/definitions/workday-output" + security: + - x-api-key: [] + x-stoplight: + id: "workdays_list" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + post: + tags: + - "Workday Import" + summary: "Create new Workday" + description: "This endpoint allows you to create a new workday instance.\n\n\ + You must supply a username and password for Basic Authentication that is the\ + \ same as your WorkDay Integrator System User. Failure to provide these credentials\ + \ will result in the request being rejected." + operationId: "workdays_post" + parameters: + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/workday-input" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 201: + description: "" + schema: + $ref: "#/definitions/workday-output" + security: + - x-api-key: [] + x-stoplight: + id: "workdays_post" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /workdays/settings: + get: + tags: + - "Workday Import" + summary: "Get Workday Settings" + description: "This endpoint allows you to obtain all settings needed for creating\ + \ a workday instance, specifically the URL to initiate Basic Authentication\ + \ with WorkDay." + operationId: "workdays_settings" + parameters: + - name: "state" + in: "query" + required: false + type: "string" + x-exportParamName: "State" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 200: + description: "" + security: + - x-api-key: [] + x-stoplight: + id: "workdays_settings" + beforeScript: null + afterScript: null + public: false + mock: + enabled: false + dynamic: false + statusCode: 200 + /workdays/{workday_id}/workers: + get: + tags: + - "Workday Import" + summary: "List Workday Workers" + description: "This endpoint will return all of the data available in your WorkDay\ + \ Custom Report that has been associated with your WorkDay Instance." + operationId: "workdays_workers" + parameters: + - name: "workday_id" + in: "path" + required: true + type: "string" + x-exportParamName: "WorkdayId" + - name: "filter" + in: "query" + description: "Supported operators are: eq, ne, gt, ge, lt, le, between, search,\ + \ in" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Filter" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + - name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + - name: "sort" + in: "query" + description: "The comma separated fields used to sort the collection.\nDefault\ + \ sort is ascending, prefix with `-` to sort descending.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Sort" + - name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + responses: + 200: + description: "" + schema: + type: "array" + items: + $ref: "#/definitions/workday-worker" + examples: + application/json: + - lastName: "sint dolore Excepteur ad" + - firstName: "et ad" + attributes: {} + email: "nostrud tempor anim ips" + username: "Excepteur culpa nulla aliqua" + - attributes: {} + email: "veniam ullamco" + - {} + - lastName: "do" + security: + - x-api-key: [] + x-stoplight: + id: "workdays_workers" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /workdays/{workday_id}/auth: + post: + tags: + - "Workday Import" + summary: "Authorize Workday" + description: "Adds an authorization method to a workday instance" + operationId: "workdays_authorize" + parameters: + - name: "workday_id" + in: "path" + required: true + type: "string" + x-exportParamName: "WorkdayId" + - in: "body" + name: "body" + required: false + schema: + $ref: "#/definitions/auth-input-object" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 204: + description: "" + security: + - x-api-key: [] + x-stoplight: + id: "workdays_authorize" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + delete: + tags: + - "Workday Import" + summary: "Deauthorize Workday" + description: "Removes any and all authorization methods from the workday instance" + operationId: "workdays_deauthorize" + parameters: + - name: "workday_id" + in: "path" + required: true + type: "string" + x-exportParamName: "WorkdayId" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 204: + description: "" + security: + - x-api-key: [] + x-stoplight: + id: "workdays_deauthorize" + beforeScript: null + afterScript: null + public: true + mock: + enabled: false + dynamic: false + statusCode: 200 + /workdays/{workday_id}/import/: + post: + tags: + - "Workday Import" + summary: "Workday Import" + description: "Still in development." + operationId: "workdays_import" + parameters: + - name: "workday_id" + in: "path" + required: true + type: "string" + x-exportParamName: "WorkdayId" + - in: "body" + name: "body" + required: false + schema: + type: "array" + items: + $ref: "#/definitions/workday-worker" + x-exportParamName: "Body" + - name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + - name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + responses: + 201: + description: "" + schema: + $ref: "#/definitions/job-id" + security: + - x-api-key: [] + x-stoplight: + id: "workdays_import" + beforeScript: null + afterScript: null + public: false + mock: + enabled: false + dynamic: false + statusCode: 200 +securityDefinitions: + x-api-key: + type: "apiKey" + name: "x-api-key" + in: "header" +definitions: + GraphConnection: + type: "object" + required: + - "to" + properties: + from: + $ref: "#/definitions/GraphObject" + to: + $ref: "#/definitions/GraphObject" + title: "GraphConnection" + description: "Represents an edge between two graph objects. From can be omitted\ + \ if it is clear from context." + example: + from: + id: "id" + type: "type" + to: + id: "id" + type: "type" + x-stoplight: + id: "GraphConnection" + name: "GraphConnection" + public: true + SystemGroupMembersReq: + type: "object" + required: + - "id" + - "op" + - "type" + properties: + op: + type: "string" + description: "How to modify the membership connection." + enum: + - "add" + - "remove" + type: + type: "string" + description: "The member type." + enum: + - "system" + id: + type: "string" + description: "The ObjectID of member being added or removed." + title: "SystemGroupMembersReq" + example: + op: "add" + id: "id" + type: "system" + x-stoplight: + id: "SystemGroupMembersReq" + name: "SystemGroupMembersReq" + public: true + Group: + type: "object" + properties: + id: + type: "string" + description: "ObjectId uniquely identifying a Group." + type: + $ref: "#/definitions/GroupType" + name: + type: "string" + description: "Display name of a Group." + title: "Group" + x-stoplight: + id: "Group" + name: "Group" + public: true + SystemGroupData: + type: "object" + required: + - "name" + properties: + name: + type: "string" + description: "Display name of a System Group." + title: "SystemGroupData" + example: + name: "name" + x-stoplight: + id: "SystemGroupData" + name: "SystemGroupData" + public: true + UserGroupMembersReq: + type: "object" + required: + - "id" + - "op" + - "type" + properties: + op: + type: "string" + description: "How to modify the membership connection." + enum: + - "add" + - "remove" + type: + type: "string" + description: "The member type." + enum: + - "user" + id: + type: "string" + description: "The ObjectID of member being added or removed." + title: "UserGroupMembersReq" + example: + op: "add" + id: "id" + type: "user" + x-stoplight: + id: "UserGroupMembersReq" + name: "UserGroupMembersReq" + public: true + Directory: + type: "object" + required: + - "id" + - "name" + - "type" + properties: + type: + type: "string" + description: "The type of directory." + enum: + - "g_suite" + - "ldap_server" + - "office_365" + - "workday" + id: + type: "string" + description: "The ObjectID of the directory." + name: + type: "string" + description: "The name of the directory." + title: "Directory" + x-stoplight: + id: "Directory" + name: "Directory" + public: true + UserGroup: + type: "object" + properties: + id: + type: "string" + description: "ObjectId uniquely identifying a User Group." + type: + type: "string" + description: "The type of the group." + enum: + - "user_group" + name: + type: "string" + description: "Display name of a User Group." + title: "UserGroup" + x-stoplight: + id: "UserGroup" + name: "UserGroup" + public: true + Error: + type: "object" + properties: + code: + type: "integer" + format: "int32" + message: + type: "string" + fields: + type: "string" + title: "Error" + x-stoplight: + id: "Error" + name: "Error" + public: true + GraphObject: + type: "object" + required: + - "id" + - "type" + properties: + type: + type: "string" + description: "The type of graph object." + id: + type: "string" + description: "The ObjectID of the graph object." + title: "GraphObject" + example: + id: "id" + type: "type" + x-stoplight: + id: "GraphObject" + name: "GraphObject" + public: true + SystemGroup: + type: "object" + properties: + id: + type: "string" + description: "ObjectId uniquely identifying a System Group." + type: + type: "string" + description: "The type of the group; always 'system' for a System Group." + enum: + - "system_group" + name: + type: "string" + description: "Display name of a System Group." + title: "SystemGroup" + x-stoplight: + id: "SystemGroup" + name: "SystemGroup" + public: true + UserGroupPost: + type: "object" + required: + - "name" + properties: + attributes: + $ref: "#/definitions/UserGroupPost_attributes" + name: + type: "string" + description: "Display name of a User Group." + title: "UserGroupPost" + example: + name: "name" + attributes: + sambaEnabled: true + posixGroups: + - name: "name" + id: 0 + - name: "name" + id: 0 + x-stoplight: + id: "UserGroupPost" + name: "UserGroupPost" + public: true + GraphObjectWithPaths: + type: "object" + required: + - "id" + - "paths" + - "type" + properties: + type: + $ref: "#/definitions/GraphType" + id: + type: "string" + description: "Object ID of this graph object." + paths: + type: "array" + description: "A path through the graph between two graph objects." + items: + type: "array" + items: + $ref: "#/definitions/GraphConnection" + title: "GraphObjectWithPaths" + example: + paths: + - - from: + id: "id" + type: "type" + to: + id: "id" + type: "type" + - from: + id: "id" + type: "type" + to: + id: "id" + type: "type" + - - from: + id: "id" + type: "type" + to: + id: "id" + type: "type" + - from: + id: "id" + type: "type" + to: + id: "id" + type: "type" + id: "id" + type: {} + x-stoplight: + id: "GraphObjectWithPaths" + name: "GraphObjectWithPaths" + public: true + GroupType: + type: "string" + title: "GroupType" + description: "The group type." + enum: + - "system_group" + - "user_group" + x-stoplight: + id: "GroupType" + name: "GroupType" + public: true + PolicyTemplate: + type: "object" + properties: + id: + type: "string" + description: "ObjectId uniquely indetifying a Policy Template." + name: + type: "string" + description: "The unique name for the Policy Template." + description: + type: "string" + description: "The default description for the Policy." + displayName: + type: "string" + description: "The default display name for the Policy." + osMetaFamily: + type: "string" + enum: + - "linux" + - "darwin" + - "windows" + activation: + type: "string" + description: "Requirements before the policy can be activated." + behavior: + type: "string" + description: "Specifics about the behavior of the policy." + title: "PolicyTemplate" + description: "The shallow information about a Policy Template." + example: + displayName: "displayName" + osMetaFamily: "linux" + name: "name" + description: "description" + id: "id" + activation: "activation" + behavior: "behavior" + x-stoplight: + id: "PolicyTemplate" + name: "PolicyTemplate" + public: true + GraphType: + type: "string" + title: "GraphType" + description: "The graph type." + enum: + - "active_directory" + - "application" + - "command" + - "g_suite" + - "ldap_server" + - "office_365" + - "policy" + - "radius_server" + - "system" + - "system_group" + - "user" + - "user_group" + x-stoplight: + id: "GraphType" + name: "GraphType" + public: true + Policy: + type: "object" + properties: + id: + type: "string" + description: "ObjectId uniquely indetifying a Policy." + template: + $ref: "#/definitions/PolicyTemplate" + name: + type: "string" + description: "The description for this specific Policy." + title: "Policy" + description: "An instance of a policty template." + example: + template: + displayName: "displayName" + osMetaFamily: "linux" + name: "name" + description: "description" + id: "id" + activation: "activation" + behavior: "behavior" + name: "name" + id: "id" + x-stoplight: + id: "Policy" + name: "Policy" + public: true + GraphManagementReq: + type: "object" + required: + - "id" + - "op" + - "type" + properties: + op: + type: "string" + description: "How to modify the graph connection." + enum: + - "add" + - "remove" + - "update" + type: + $ref: "#/definitions/GraphType" + id: + type: "string" + description: "The ObjectID of graph object being added or removed as an association." + title: "GraphManagementReq" + example: + op: "add" + id: "id" + type: {} + x-stoplight: + id: "GraphManagementReq" + name: "GraphManagementReq" + public: true + samba-domain-input: + type: "object" + required: + - "name" + - "sid" + properties: + name: + type: "string" + description: "Name of this domain's WorkGroup" + sid: + type: "string" + description: "Security identifier of this domain" + title: "Samba Domain Input" + x-stoplight: + id: "samba-domain-input" + name: "Samba Domain Input" + public: true + samba-domain-output: + title: "Samba Domain Output" + allOf: + - type: "object" + required: + - "id" + properties: + id: + type: "string" + description: "Unique identifier of this domain" + - $ref: "#/definitions/samba-domain-input" + x-stoplight: + id: "samba-domain-output" + name: "Samba Domain Output" + public: true + PolicyTemplateWithDetails: + type: "object" + properties: + id: + type: "string" + description: "ObjectId uniquely indetifying a Policy Template." + name: + type: "string" + description: "The unique name for the Policy Template." + description: + type: "string" + description: "The default description for the Policy." + displayName: + type: "string" + description: "The default display name for the Policy." + osMetaFamily: + type: "string" + enum: + - "linux" + - "darwin" + - "windows" + configFields: + type: "array" + description: "An unordered list of all the fields that can be configured for\ + \ this Policy Template." + items: + $ref: "#/definitions/PolicyTemplateConfigField" + activation: + type: "string" + description: "Requirements before the policy can be activated." + behavior: + type: "string" + description: "Specifics about the behavior of the policy." + title: "PolicyTemplateWithDetails" + description: "The shallow information about a Policy Template." + example: + displayName: "displayName" + osMetaFamily: "linux" + name: "name" + description: "description" + id: "id" + activation: "activation" + behavior: "behavior" + configFields: + - displayType: "checkbox" + name: "name" + readOnly: true + id: "id" + label: "label" + position: 0.80082819046101150206595775671303272247314453125 + required: true + - displayType: "checkbox" + name: "name" + readOnly: true + id: "id" + label: "label" + position: 0.80082819046101150206595775671303272247314453125 + required: true + x-stoplight: + id: "PolicyTemplateWithDetails" + name: "PolicyTemplateWithDetails" + public: true + PolicyTemplateConfigField: + type: "object" + required: + - "id" + - "name" + properties: + id: + type: "string" + description: "ObjectId uniquely identifying a Policy Template Configuration\ + \ Field" + displayType: + type: "string" + description: "The default rendering for this field." + enum: + - "checkbox" + - "date" + - "email" + - "number" + - "select" + - "text" + - "textarea" + label: + type: "string" + description: "The default label for this field." + name: + type: "string" + description: "A unique name identifying this config field." + position: + type: "number" + description: "The default position to render this field." + readOnly: + type: "boolean" + description: "If an admin is allowed to modify this field." + required: + type: "boolean" + description: "If this field is required for this field." + title: "PolicyTemplateConfigField" + example: + displayType: "checkbox" + name: "name" + readOnly: true + id: "id" + label: "label" + position: 0.80082819046101150206595775671303272247314453125 + required: true + x-stoplight: + id: "PolicyTemplateConfigField" + name: "PolicyTemplateConfigField" + public: true + PolicyWithDetails: + type: "object" + properties: + id: + type: "string" + description: "ObjectId uniquely indetifying a Policy." + template: + $ref: "#/definitions/PolicyTemplate" + name: + type: "string" + description: "The description for this specific Policy." + values: + type: "array" + items: + $ref: "#/definitions/PolicyValue" + title: "PolicyWithDetails" + description: "An instance of a policty template." + example: + template: + displayName: "displayName" + osMetaFamily: "linux" + name: "name" + description: "description" + id: "id" + activation: "activation" + behavior: "behavior" + values: + - configFieldID: "configFieldID" + - configFieldID: "configFieldID" + name: "name" + id: "id" + x-stoplight: + id: "PolicyWithDetails" + name: "PolicyWithDetails" + public: true + PolicyValue: + type: "object" + properties: + configFieldID: + type: "string" + description: "The ObjectId of the corresponding Policy Template configuration\ + \ field." + title: "PolicyValue" + example: + configFieldID: "configFieldID" + x-stoplight: + id: "PolicyValue" + name: "PolicyValue" + public: true + PolicyResult: + type: "object" + properties: + policyID: + type: "string" + description: "ObjectId uniquely identifying the parent Policy." + systemID: + type: "string" + description: "ObjectId uniquely identifying the parent System." + id: + type: "string" + description: "ObjectId uniquely identifying a Policy Result." + startedAt: + type: "string" + format: "date-time" + description: "The start of the policy application." + endedAt: + type: "string" + format: "date-time" + description: "The end of the policy application." + success: + type: "boolean" + description: "True if the policy was successfully applied; false otherwise." + exitStatus: + type: "integer" + description: "The 32-bit unsigned exit status from the applying the policy." + stdErr: + type: "string" + description: "The STDERR output from applying the policy." + stdOut: + type: "string" + description: "The STDOUT output from applying the policy." + title: "PolicyResult" + example: + systemID: "systemID" + policyID: "policyID" + stdOut: "stdOut" + endedAt: "2000-01-23T04:56:07.000+00:00" + success: true + startedAt: "2000-01-23T04:56:07.000+00:00" + id: "id" + stdErr: "stdErr" + exitStatus: 0 + x-stoplight: + id: "PolicyResult" + name: "PolicyResult" + public: true + PolicyRequest: + type: "object" + required: + - "name" + properties: + name: + type: "string" + description: "The description for this specific Policy." + values: + type: "array" + items: + $ref: "#/definitions/PolicyValue" + template: + $ref: "#/definitions/PolicyRequest_template" + title: "PolicyRequest" + description: "An instance of a policty template." + example: + template: + id: "id" + values: + - configFieldID: "configFieldID" + - configFieldID: "configFieldID" + name: "name" + x-stoplight: + id: "PolicyRequest" + name: "PolicyRequest" + public: true + ldap-server-input: + type: "object" + properties: + name: + type: "string" + description: "The name of this LDAP server" + title: "LDAP Server Input" + x-stoplight: + id: "ldap-server-input" + name: "LDAP Server Input" + public: true + ldap-server-output: + title: "LDAP Server Output" + allOf: + - type: "object" + required: + - "id" + properties: + id: + type: "string" + description: "Unique identifier of this LDAP server" + - $ref: "#/definitions/ldap-server-input" + x-stoplight: + id: "ldap-server-output" + name: "LDAP Server Output" + public: true + active-directory-input: + type: "object" + properties: + domain: + type: "string" + description: "Domain name for this Active Directory instance." + title: "Active Directory Input" + x-stoplight: + id: "active-directory-input" + name: "Active Directory Input" + public: true + active-directory-output: + title: "Active Directory Output" + allOf: + - type: "object" + required: + - "id" + properties: + id: + type: "string" + description: "ObjectID of this Active Directory instance." + - $ref: "#/definitions/active-directory-input" + x-stoplight: + id: "active-directory-output" + name: "Active Directory Output" + public: true + UserGroupGraphManagementReq: + type: "object" + required: + - "id" + - "op" + - "type" + properties: + op: + type: "string" + description: "How to modify the graph connection." + enum: + - "add" + - "remove" + - "update" + type: + type: "string" + description: "The graph type" + enum: + - "active_directory" + - "application" + - "command" + - "g_suite" + - "ldap_server" + - "office_365" + - "policy" + - "radius_server" + - "system" + - "system_group" + id: + type: "string" + description: "The ObjectID of graph object being added or removed as an association." + title: "UserGroupGraphManagementReq" + example: + op: "add" + id: "id" + type: "active_directory" + x-stoplight: + id: "UserGroupGraphManagementReq" + name: "UserGroupGraphManagementReq" + public: true + SystemGroupGraphManagementReq: + type: "object" + required: + - "id" + - "op" + - "type" + properties: + op: + type: "string" + description: "How to modify the graph connection." + enum: + - "add" + - "remove" + - "update" + type: + type: "string" + enum: + - "active_directory" + - "application" + - "command" + - "g_suite" + - "ldap_server" + - "office_365" + - "policy" + - "radius_server" + - "user" + - "user_group" + id: + type: "string" + description: "The ObjectID of graph object being added or removed as an association." + title: "SystemGroupGraphManagementReq" + example: + op: "add" + id: "id" + type: "active_directory" + x-stoplight: + id: "SystemGroupGraphManagementReq" + name: "SystemGroupGraphManagementReq" + public: true + oauth-code-input: + type: "object" + properties: + code: + type: "string" + title: "OAuth Code Input" + x-stoplight: + id: "oauth-code-input" + name: "OAuth Code Input" + public: true + workday-report-row: + title: "Workday Report Row" + type: "array" + items: + type: "string" + x-stoplight: + id: "workday-report-row" + name: "Workday Report Row" + public: true + workday-worker: + type: "object" + properties: + username: + type: "string" + firstName: + type: "string" + lastName: + type: "string" + email: + type: "string" + attributes: + type: "object" + properties: {} + title: "Workday Worker" + x-stoplight: + id: "workday-worker" + name: "Workday Worker" + public: true + workday-request: + type: "object" + properties: + objectId: + type: "string" + name: + type: "string" + title: "Workday Request" + x-stoplight: + id: "workday-request" + name: "Workday Request" + public: true + workday-input: + type: "object" + properties: + reportUrl: + type: "string" + name: + type: "string" + auth: + $ref: "#/definitions/auth-input" + title: "Workday Input" + example: + reportUrl: "eu est sint Lorem" + name: "in voluptate ullamco" + auth: + auth: + credentials: + username: "mollit ex" + password: "cillum occaecat id eiusmod ullamco" + ? + : domain: "veniam" + x-stoplight: + id: "workday-input" + name: "Workday Input" + public: true + auth-info: + type: "object" + properties: + expiry: + type: "string" + isValid: + type: "boolean" + message: + type: "string" + title: "Auth Info" + example: + credentials: + username: "in adipisicing nostrud culpa proident" + password: "officia voluptate mollit eu" + oauth: + isValid: true + message: "cillum aliqua veniam deserunt cupidatat" + expiry: "sunt incididunt officia" + x-stoplight: + id: "auth-info" + name: "Auth Info" + public: true + workday-output: + type: "object" + properties: + id: + type: "string" + name: + type: "string" + reportUrl: + type: "string" + lastImport: + type: "string" + auth: + $ref: "#/definitions/workdayoutput_auth" + title: "Workday Output" + example: + lastImport: "lastImport" + auth: + basic: + credentials: + username: "in adipisicing nostrud culpa proident" + password: "officia voluptate mollit eu" + oauth: + isValid: true + message: "cillum aliqua veniam deserunt cupidatat" + expiry: "sunt incididunt officia" + oauth: + credentials: + username: "in adipisicing nostrud culpa proident" + password: "officia voluptate mollit eu" + oauth: + isValid: true + message: "cillum aliqua veniam deserunt cupidatat" + expiry: "sunt incididunt officia" + name: "name" + id: "id" + reportUrl: "reportUrl" + x-stoplight: + id: "workday-output" + name: "Workday Output" + public: true + auth-input: + type: "object" + properties: + oauth: + $ref: "#/definitions/authinput_oauth" + basic: + $ref: "#/definitions/authinput_basic" + title: "Auth Input" + example: + oauth: + code: "sint ut ex" + basic: + username: "eiusmod" + password: "incididunt ad ullamco id eiusmod" + auth: {} + x-stoplight: + id: "auth-input" + name: "Auth Input" + public: true + SystemGraphManagementReq: + type: "object" + required: + - "id" + - "op" + - "type" + properties: + attributes: + $ref: "#/definitions/SystemGraphManagementReq_attributes" + op: + type: "string" + description: "How to modify the graph connection." + enum: + - "add" + - "remove" + - "update" + type: + type: "string" + enum: + - "active_directory" + - "application" + - "command" + - "g_suite" + - "ldap_server" + - "office_365" + - "policy" + - "radius_server" + - "user" + - "user_group" + id: + type: "string" + description: "The ObjectID of graph object being added or removed as an association." + title: "SystemGraphManagementReq" + example: + op: "add" + attributes: + sudo: + withoutPassword: true + enabled: true + id: "id" + type: "active_directory" + x-stoplight: + id: "SystemGraphManagementReq" + name: "SystemGraphManagementReq" + public: true + UserGraphManagementReq: + type: "object" + required: + - "id" + - "op" + - "type" + properties: + attributes: + $ref: "#/definitions/SystemGraphManagementReq_attributes" + op: + type: "string" + description: "How to modify the graph connection." + enum: + - "add" + - "remove" + - "update" + type: + type: "string" + enum: + - "active_directory" + - "application" + - "command" + - "g_suite" + - "ldap_server" + - "office_365" + - "policy" + - "radius_server" + - "system" + - "system_group" + id: + type: "string" + description: "The ObjectID of graph object being added or removed as an association." + title: "UserGraphManagementReq" + example: + op: "add" + attributes: + sudo: + withoutPassword: true + enabled: true + id: "id" + type: "active_directory" + x-stoplight: + id: "UserGraphManagementReq" + name: "UserGraphManagementReq" + public: true + workdayimportresult: + type: "object" + properties: + success: + type: "boolean" + result: + $ref: "#/definitions/workdayimportresult_result" + title: "WorkdayImportResult" + x-stoplight: + id: "workdayimportresult" + name: "WorkdayImportResult" + public: true + UserGroupPut: + type: "object" + required: + - "name" + properties: + attributes: + $ref: "#/definitions/UserGroupPut_attributes" + name: + type: "string" + description: "Display name of a User Group." + title: "UserGroupPut" + example: + name: "name" + attributes: + sambaEnabled: true + x-stoplight: + id: "UserGroupPut" + name: "UserGroupPut" + public: true + job-workresult: + type: "object" + properties: + status: + type: "string" + statusMessage: + type: "string" + meta: + type: "object" + properties: {} + title: "Job WorkResult" + example: + meta: "{}" + statusMessage: "statusMessage" + status: "status" + x-stoplight: + id: "job-workresult" + name: "Job WorkResult" + public: true + auth-input-object: + type: "object" + properties: + auth: + $ref: "#/definitions/auth-input" + title: "Auth Input Object" + x-stoplight: + id: "auth-input-object" + name: "Auth Input Object" + public: true + job-id: + type: "object" + properties: + jobId: + type: "string" + title: "Job ID" + example: + jobId: "jobId" + x-stoplight: + id: "job-id" + name: "Job ID" + public: true + workday-fields: + type: "object" + properties: + reportUrl: + type: "string" + name: + type: "string" + title: "Workday Fields" + x-stoplight: + id: "workday-fields" + name: "Workday Fields" + public: true + job-details: + type: "object" + properties: + status: + type: "string" + totalWorkCount: + type: "integer" + workCompletedCount: + type: "integer" + meta: + type: "object" + properties: {} + title: "Job Details" + example: + workCompletedCount: 6 + meta: "{}" + totalWorkCount: 0 + status: "status" + x-stoplight: + id: "job-details" + name: "Job Details" + public: true + UserGroupPost_attributes_posixGroups: + properties: + id: + type: "integer" + name: + type: "string" + example: + name: "name" + id: 0 + UserGroupPost_attributes: + properties: + posixGroups: + type: "array" + items: + $ref: "#/definitions/UserGroupPost_attributes_posixGroups" + sambaEnabled: + type: "boolean" + description: "The group object's attributes." + example: + sambaEnabled: true + posixGroups: + - name: "name" + id: 0 + - name: "name" + id: 0 + PolicyRequest_template: + properties: + id: + type: "string" + description: "ObjectId uniquely identifying a Policy instance; only allowed\ + \ on POST requests." + example: + id: "id" + workdayoutput_auth: + properties: + basic: + $ref: "#/definitions/auth-info" + oauth: + $ref: "#/definitions/auth-info" + example: + basic: + credentials: + username: "in adipisicing nostrud culpa proident" + password: "officia voluptate mollit eu" + oauth: + isValid: true + message: "cillum aliqua veniam deserunt cupidatat" + expiry: "sunt incididunt officia" + oauth: + credentials: + username: "in adipisicing nostrud culpa proident" + password: "officia voluptate mollit eu" + oauth: + isValid: true + message: "cillum aliqua veniam deserunt cupidatat" + expiry: "sunt incididunt officia" + authinput_oauth: + properties: + code: + type: "string" + authinput_basic: + properties: + username: + type: "string" + password: + type: "string" + SystemGraphManagementReq_attributes_sudo: + properties: + enabled: + type: "boolean" + withoutPassword: + type: "boolean" + example: + withoutPassword: true + enabled: true + SystemGraphManagementReq_attributes: + properties: + sudo: + $ref: "#/definitions/SystemGraphManagementReq_attributes_sudo" + description: "The graph connection's attributes" + example: + sudo: + withoutPassword: true + enabled: true + workdayimportresult_result: + properties: + msg: + type: "string" + UserGroupPut_attributes: + properties: + sambaEnabled: + type: "boolean" + description: "The group object's attributes." + example: + sambaEnabled: true +parameters: + trait:limit:limit: + name: "limit" + in: "query" + description: "The number of records to return at once." + required: false + type: "integer" + default: 10 + x-exportParamName: "Limit" + trait:skip:skip: + name: "skip" + in: "query" + description: "The offset into the records to return." + required: false + type: "integer" + default: 0 + x-exportParamName: "Skip" + trait:graphTargets:targets: + name: "targets" + in: "query" + description: "" + required: true + type: "array" + items: + type: "string" + enum: + - "active_directory" + - "application" + - "command" + - "g_suite" + - "ldap_server" + - "office_365" + - "policy" + - "radius_server" + - "system" + - "system_group" + - "user" + - "user_group" + x-exportParamName: "Targets" + trait:filter:filter: + name: "filter" + in: "query" + description: "Supported operators are: eq, ne, gt, ge, lt, le, between, search,\ + \ in" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Filter" + trait:sort:sort: + name: "sort" + in: "query" + description: "The comma separated fields used to sort the collection.\nDefault\ + \ sort is ascending, prefix with `-` to sort descending.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Sort" + trait:fields:fields: + name: "fields" + in: "query" + description: "The comma separated fields included in the returned records.\nIf\ + \ omitted the default list of fields will be returned.\n" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Fields" + trait:requestHeaders:Content-Type: + name: "Content-Type" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "ContentType" + trait:requestHeaders:Accept: + name: "Accept" + in: "header" + required: true + type: "string" + default: "application/json" + x-exportParamName: "Accept" + trait:aggregate:aggregate: + name: "aggregate" + in: "query" + required: false + type: "array" + items: + type: "string" + x-exportParamName: "Aggregate" + trait:systemContextAuth:Date: + name: "Date" + in: "header" + description: "Current date header for the System Context API" + required: false + type: "string" + x-exportParamName: "Date" + trait:systemContextAuth:Authorization: + name: "Authorization" + in: "header" + description: "Authorization header for the System Context API" + required: false + type: "string" + x-exportParamName: "Authorization" + trait:listCount:x-total-count: + name: "x-total-count" + in: "header" + required: false + type: "integer" + trait:graphSystemTargets:targets: + name: "targets" + in: "query" + description: "" + required: true + type: "array" + items: + type: "string" + enum: + - "active_directory" + - "application" + - "command" + - "g_suite" + - "ldap_server" + - "office_365" + - "policy" + - "radius_server" + - "user" + - "user_group" + x-exportParamName: "Targets" + trait:graphUserTargets:targets: + name: "targets" + in: "query" + description: "" + required: true + type: "array" + items: + type: "string" + enum: + - "active_directory" + - "application" + - "command" + - "g_suite" + - "ldap_server" + - "office_365" + - "policy" + - "radius_server" + - "system" + - "system_group" + x-exportParamName: "Targets" + trait:graphUserGroupTargets:targets: + name: "targets" + in: "query" + description: "" + required: true + type: "array" + items: + type: "string" + enum: + - "active_directory" + - "application" + - "command" + - "g_suite" + - "ldap_server" + - "office_365" + - "policy" + - "radius_server" + - "system" + - "system_group" + x-exportParamName: "Targets" + trait:graphSystemGroupTargets:targets: + name: "targets" + in: "query" + description: "" + required: true + type: "array" + items: + type: "string" + enum: + - "active_directory" + - "application" + - "command" + - "g_suite" + - "ldap_server" + - "office_365" + - "policy" + - "radius_server" + - "user" + - "user_group" + x-exportParamName: "Targets" +x-stoplight: + beforeScript: "" + afterScript: "" + version: + groups: + docs: + - divider: false + items: + - _id: "v2-api" + type: "docTextSections" + name: "API Overview" + - divider: false + items: + - _id: "authentication-and-authorization-overview" + type: "docTextSections" + - _id: "system-context" + type: "docTextSections" + name: "Authentication & Authorization" + description: "" + - divider: false + items: + - _id: "graph_activeDirectoryAssociationsPost" + type: "endpoints" + - _id: "activedirectories_post" + type: "endpoints" + - _id: "activedirectories_list" + type: "endpoints" + - _id: "activedirectories_delete" + type: "endpoints" + - _id: "graph_activeDirectoryTraverseUserGroup" + type: "endpoints" + - _id: "activedirectories_get" + type: "endpoints" + - _id: "graph_activeDirectoryAssociationsList" + type: "endpoints" + name: "Active Directory" + description: "You can associate your groups of users to Active Directory." + - divider: false + description: "You can associate your Groups of Users with Applications that\ + \ are SSO enabled for easy access via JumpCloud's User Portal.\n\nPlease\ + \ see [this page](https://jumpcloud.com/daas-product/sso-single-sign-on)\ + \ for a full list of supported SSO apps." + name: "Applications" + items: + - _id: "oSvkKjXMXDRCDigPW" + type: "endpoints" + - _id: "graph_applicationAssociationsPost" + type: "endpoints" + - _id: "graph_applicationAssociationsList" + type: "endpoints" + - _id: "graph_applicationTraverseUser" + type: "endpoints" + - _id: "graph_applicationTraverseUserGroup" + type: "endpoints" + - _id: "GpsCqv5EJe7C8g3gi" + type: "endpoints" + - divider: false + items: + - _id: "job_results" + type: "endpoints" + - _id: "job_get" + type: "endpoints" + name: "Bulk Job Requests" + - divider: false + description: "You can associate your Groups of Users or Systems with Commands.\n\ + \nPlease see [this page](https://support.jumpcloud.com/customer/portal/articles/2443893-using-the-commands-tab)\ + \ for more information on Commands." + name: "Commands" + items: + - _id: "4b2YvGPq7gRTpuNsk" + type: "endpoints" + - _id: "cubfZCh9HKWWqnSR7" + type: "endpoints" + - _id: "graph_commandAssociationsPost" + type: "endpoints" + - _id: "graph_commandAssociationsList" + type: "endpoints" + - _id: "graph_commandTraverseSystem" + type: "endpoints" + - _id: "graph_commandTraverseSystemGroup" + type: "endpoints" + - _id: "AC9tCEFMSDqk9hFKD" + type: "schemas" + - _id: "TkDovo4uYnDm6qNyj" + type: "schemas" + - _id: "5jEQyXrx8qSkQMm9q" + type: "schemas" + - _id: "Qs6Z9YexBXkHyTsPs" + type: "schemas" + - _id: "bbn5ztJs444czn3y7" + type: "schemas" + - _id: "aTdhv6ygRuaJZWEJp" + type: "schemas" + - _id: "WbYr4KDRGCQ2oj5wM" + type: "schemas" + - _id: "RCxMohSZD4WvRxB6e" + type: "schemas" + - _id: "p7ZrNkR7taQZ8xo5D" + type: "schemas" + - _id: "RRyEu9v9r8HRpGRHm" + type: "schemas" + - _id: "hXuvCC7TpQpMcoorZ" + type: "schemas" + - _id: "iGqpCFo43kXixJ4KE" + type: "schemas" + - _id: "cSMXzBSc73d3wLynW" + type: "schemas" + - _id: "QeMiCzxyEWwWb2BhL" + type: "schemas" + - _id: "fkLhQizgqFPsieegx" + type: "schemas" + - _id: "GYBhpRAqNLXBvTkfd" + type: "schemas" + - _id: "wBsqbJSy99t4xbq8f" + type: "schemas" + - _id: "icghut8wyMFmSD2fc" + type: "schemas" + - _id: "3YZP8o94zNs3TboQC" + type: "schemas" + - _id: "ar4AvRE4hLCyR3C5f" + type: "schemas" + - _id: "W9GEzqnBsESKuvRwp" + type: "schemas" + - _id: "J8Ju9fhzBZh5E94nH" + type: "schemas" + - divider: false + description: "You can associate your groups of users or systems with Directories.\ + \ (LDAP, Office 365, or G-Suite.)\n\nPlease see [this page](https://jumpcloud.com/daas-product/directory-services)\ + \ for more information on JumpCloud's Directories Services." + name: "Directories" + items: + - _id: "xaK74AR4z9LZSWQjy" + type: "endpoints" + - _id: "directories_list" + type: "endpoints" + - _id: "bt7NrBLGW3hjTcqFu" + type: "endpoints" + - _id: "fKHEZEPiAoAjdNnrs" + type: "endpoints" + - type: "endpoints" + _id: "p78rXxMWTeeRazsHw" + - divider: false + description: "Groups are designed to enhance JumpCloud's existing grouping\ + \ functionality which relied heavily on flexible “tags” to allow you to\ + \ organize users, systems and applications into hierarchies.\n\nOur Tagging\ + \ functionality worked well in the early days of JumpCloud, but as our our\ + \ users became more sophisticated, and our product’s reach has expanding\ + \ deeper into IT infrastructure we thought it was time to offer a more traditional\ + \ way of managing a directory’s hierarchy.\n\nYou can find more information\ + \ on Groups on [this page](https://support.jumpcloud.com/customer/en/portal/articles/2703450-getting-started-groups)." + name: "Groups" + items: + - _id: "byrbFjvbPaELLWEm9" + type: "endpoints" + - _id: "groups_list" + type: "endpoints" + - divider: false + description: "You can associate your Groups of Users to G-Suite.\nPlease see\ + \ [this page](https://support.jumpcloud.com/customer/portal/articles/2426953)\ + \ for more information on G-Suite." + name: "G Suite" + items: + - _id: "FDG6kMMJrX3kMJ9cn" + type: "endpoints" + - _id: "SSStLReXcKe4Dr4LD" + type: "endpoints" + - _id: "graph_gSuiteAssociationsPost" + type: "endpoints" + - _id: "graph_gSuiteAssociationsList" + type: "endpoints" + - _id: "graph_gSuiteTraverseUser" + type: "endpoints" + - _id: "graph_gSuiteTraverseUserGroup" + type: "endpoints" + - divider: false + description: "You can associate your groups of users to LDAP. Please see\ + \ [this page](https://support.jumpcloud.com/customer/en/portal/topics/926832-ldap-as-a-service)\ + \ for more information on LDAP." + name: "LDAP Servers" + items: + - _id: "DG46bmf92DFRKBRuE" + type: "endpoints" + - _id: "XuTD8jvsNtCrbu3Sa" + type: "endpoints" + - _id: "graph_ldapServerAssociationsPost" + type: "endpoints" + - _id: "graph_ldapServerAssociationsList" + type: "endpoints" + - _id: "graph_ldapServerTraverseUser" + type: "endpoints" + - _id: "graph_ldapServerTraverseUserGroup" + type: "endpoints" + - _id: "ldapservers_list" + type: "endpoints" + - _id: "ldapservers_get" + type: "endpoints" + - divider: false + description: "You can associate your groups of users to Office 365. Please\ + \ see [this page](https://support.jumpcloud.com/customer/en/portal/topics/926836-office-365-integration)\ + \ for more information on Office 365." + name: "Office 365" + items: + - _id: "A7g5bR8ox8wEBLB6d" + type: "endpoints" + - _id: "graph_office365AssociationsPost" + type: "endpoints" + - _id: "graph_office365AssociationsList" + type: "endpoints" + - _id: "graph_office365TraverseUser" + type: "endpoints" + - _id: "graph_office365TraverseUserGroup" + type: "endpoints" + - divider: false + description: "Jumpcloud provides a library of policy templates for Windows,\ + \ Mac and Linux which provide administrators the capability to set security\ + \ features or apply uniform configurations across a range of systems. These\ + \ endpoints allow you to interact with our Policies feature via the JumpCloud\ + \ API." + name: "Policies" + items: + - _id: "3j7iRXfuA4cJrRJi8" + type: "endpoints" + - _id: "policies_post" + type: "endpoints" + - _id: "graph_policyAssociationsPost" + type: "endpoints" + - _id: "policies_put" + type: "endpoints" + - _id: "policies_delete" + type: "endpoints" + - _id: "policytemplates_list" + type: "endpoints" + - _id: "policytemplates_get" + type: "endpoints" + - _id: "policies_list" + type: "endpoints" + - _id: "policies_get" + type: "endpoints" + - _id: "policyresults_list" + type: "endpoints" + - _id: "policyresults_list" + type: "endpoints" + - _id: "policyresults_get" + type: "endpoints" + - _id: "graph_policyAssociationsList" + type: "endpoints" + - _id: "graph_policyTraverseSystem" + type: "endpoints" + - _id: "graph_policyTraverseSystemGroup" + type: "endpoints" + - divider: false + description: "You can associate your groups of users to Radius Servers. \ + \ Please see [this page](https://support.jumpcloud.com/customer/en/portal/topics/926833-radius-as-a-service)\ + \ for more information on Radius." + name: "RADIUS Servers" + items: + - _id: "graph_radiusServerAssociationsPost" + type: "endpoints" + - _id: "graph_radiusServerAssociationsList" + type: "endpoints" + - _id: "graph_radiusServerTraverseUser" + type: "endpoints" + - _id: "graph_radiusServerTraverseUserGroup" + type: "endpoints" + - name: "Samba Domains" + divider: false + items: + - _id: "ldapservers_sambaDomainsPost" + type: "endpoints" + - _id: "ldapservers_sambaDomainsPut" + type: "endpoints" + - _id: "ldapservers_sambaDomainsDelete" + type: "endpoints" + - _id: "ldapservers_sambaDomainsList" + type: "endpoints" + - _id: "ldapservers_sambaDomainsGet" + type: "endpoints" + - divider: false + description: "You can associate your Groups of Users with systems.\n\nTo obtain\ + \ your System IDs, you can use our [V1 Endpoints for Systems](https://docs.jumpcloud.com/1.0/systemusers).\n\ + \nPlease see [this page](https://support.jumpcloud.com/customer/en/portal/articles/2703450-getting-started-groups)\ + \ for more information on Groups and Systems." + name: "Systems" + items: + - _id: "4DjML5aWZnY3GXcDM" + type: "endpoints" + - _id: "Zdf254ynsk9DJR9oL" + type: "endpoints" + - _id: "graph_systemAssociationsPost" + type: "endpoints" + - _id: "graph_systemMemberOf" + type: "endpoints" + - _id: "graph_systemAssociationsList" + type: "endpoints" + - _id: "graph_systemTraversePolicy" + type: "endpoints" + - _id: "graph_systemTraverseUser" + type: "endpoints" + - _id: "graph_systemTraverseCommand" + type: "endpoints" + - _id: "graph_systemTraverseUserGroup" + type: "endpoints" + - divider: false + description: "System Groups are designed to enhance JumpCloud's existing grouping\ + \ functionality which relied heavily on flexible “tags” to allow you to\ + \ organize users, systems and applications into hierarchies.\n\nWith System\ + \ Groups you can easily group Systems together and assign them to Groups\ + \ of Users.\n\nYou can find more information on Groups on [this page](https://support.jumpcloud.com/customer/en/portal/articles/2703450-getting-started-groups)." + name: "System Groups" + items: + - _id: "e3ufsPvtsKCqCmPpA" + type: "endpoints" + - _id: "m5hjYe7nHomt75ghs" + type: "endpoints" + - _id: "jPih8cFWBWkA6x3cJ" + type: "endpoints" + - _id: "k3wxKsnGWNg6EhpnJ" + type: "endpoints" + - _id: "groups_system_post" + type: "endpoints" + - _id: "groups_system_put" + type: "endpoints" + - _id: "groups_system_patch" + type: "endpoints" + - _id: "groups_system_delete" + type: "endpoints" + - _id: "groups_system_list" + type: "endpoints" + - _id: "groups_system_get" + type: "endpoints" + - divider: false + items: + - _id: "graph_systemGroupMembersPost" + type: "endpoints" + - _id: "graph_systemGroupMemberOf" + type: "endpoints" + - _id: "graph_systemGroupMembership" + type: "endpoints" + - _id: "graph_systemGroupMembersList" + type: "endpoints" + name: "System Group Members & Membership" + description: "Any Directory Object that supports grouping also has the ability\ + \ to allow management of the group members. This includes listing, adding\ + \ and removing Directory Objects and Groups of Directory Objects to and\ + \ from the Group. These endpoints allow you to control the members and membership\ + \ of System Objects.\n\nMembers are the direct objects of an object group.\ + \ \n\nMembership is defined as the direct and indirect members of an object\ + \ group." + - divider: false + items: + - _id: "graph_systemGroupAssociationsPost" + type: "endpoints" + - _id: "graph_systemGroupTraverseUser" + type: "endpoints" + - _id: "graph_systemGroupTraverseUserGroup" + type: "endpoints" + - _id: "graph_systemGroupTraversePolicy" + type: "endpoints" + - _id: "graph_systemGroupAssociationsList" + type: "endpoints" + - _id: "graph_systemGroupTraverseCommand" + type: "endpoints" + description: "Directory Objects can be associated to one another to create\ + \ bidirectional member associations, i.e. users to systems, commands to\ + \ systems, users to applications, etc. JumpCloud controls the types of\ + \ Directory Objects that exist and the pairings that can exist; but with\ + \ these set of endpoints we will allow you to leverage the JumpCloud Graph\ + \ to have more control over your System Group Associations." + name: "System Group Associations" + - divider: false + description: "You can associate your Users with groups of Users, Systems,\ + \ Applications, Radius Servers, Commands and Directories.\n\nTo obtain you\ + \ your User IDs, you can use our V1 Endpoints for [System Users](https://docs.jumpcloud.com/1.0/systemusers)\n\ + \nPlease see [this page](https://support.jumpcloud.com/customer/en/portal/articles/2703450-getting-started-groups)\ + \ for more information on Groups and Systems." + name: "Users" + items: + - _id: "5aNya5RzjgJed6BmL" + type: "endpoints" + - _id: "XpjQonbguJ55dy4TQ" + type: "endpoints" + - _id: "4uQMx676oTq4RTqF2" + type: "endpoints" + - _id: "BHuLmHMsdsTkF5f6H" + type: "endpoints" + - _id: "graph_userAssociationsPost" + type: "endpoints" + - _id: "graph_userMemberOf" + type: "endpoints" + - _id: "graph_userAssociationsList" + type: "endpoints" + - _id: "graph_userTraverseApplication" + type: "endpoints" + - _id: "graph_userTraverseDirectory" + type: "endpoints" + - _id: "graph_userTraverseGSuite" + type: "endpoints" + - _id: "graph_userTraverseLdapServer" + type: "endpoints" + - _id: "graph_userTraverseOffice365" + type: "endpoints" + - _id: "graph_userTraverseSystem" + type: "endpoints" + - _id: "graph_userTraverseRadiusServer" + type: "endpoints" + - _id: "graph_userTraverseSystemGroup" + type: "endpoints" + - divider: false + description: "User Groups are designed to enhance JumpCloud's existing grouping\ + \ functionality which relied heavily on flexible “tags” to allow you to\ + \ organize users, systems and applications into hierarchies.\n\nWith User\ + \ Groups you can easily group Users together and assign them to Systems.\n\ + \nYou can find more information on Groups on [this page](https://support.jumpcloud.com/customer/en/portal/articles/2703450-getting-started-groups)." + name: "User Groups" + items: + - _id: "groups_user_post" + type: "endpoints" + - _id: "groups_user_put" + type: "endpoints" + - _id: "groups_user_patch" + type: "endpoints" + - _id: "groups_user_delete" + type: "endpoints" + - _id: "vycgDSzsLqZ4Ntdjk" + type: "endpoints" + - _id: "ExyRxHQtM8tZCmKiS" + type: "endpoints" + - _id: "HxDaihcTN24XfxTYT" + type: "endpoints" + - _id: "ycnNWjNDDW7b94ch2" + type: "endpoints" + - _id: "GbLmbD8YRLFqhaab8" + type: "endpoints" + - _id: "gF7r9PNuQ2PCkazSW" + type: "endpoints" + - _id: "h6EK4LxjcAFCx5pE2" + type: "endpoints" + - _id: "groups_user_list" + type: "endpoints" + - _id: "groups_user_get" + type: "endpoints" + - divider: false + items: + - _id: "graph_userGroupMembersPost" + type: "endpoints" + - _id: "graph_userGroupMemberOf" + type: "endpoints" + - _id: "graph_userGroupMembership" + type: "endpoints" + - _id: "graph_userGroupMembersList" + type: "endpoints" + name: "User Group Members & Membership" + description: "Any Directory Object that supports grouping also has the ability\ + \ to allow management of the group members. This includes listing, adding\ + \ and removing Directory Objects and Groups of Directory Objects to and\ + \ from the Group. These endpoints allow you to control the members and membership\ + \ of User Objects.\n\nMembers are the direct objects of an object group.\ + \ \n\nMembership is defined as the direct and indirect members of an object\ + \ group." + - divider: false + items: + - _id: "graph_userGroupAssociationsPost" + type: "endpoints" + - _id: "graph_userGroupTraverseActiveDirectory" + type: "endpoints" + - _id: "graph_userGroupTraverseSystemGroup" + type: "endpoints" + - _id: "graph_userGroupAssociationsList" + type: "endpoints" + - _id: "graph_userGroupTraverseSystem" + type: "endpoints" + - _id: "graph_userGroupTraverseRadiusServer" + type: "endpoints" + - _id: "graph_userGroupTraverseOffice365" + type: "endpoints" + - _id: "graph_userGroupTraverseLdapServer" + type: "endpoints" + - _id: "graph_userGroupTraverseGSuite" + type: "endpoints" + - _id: "graph_userGroupTraverseDirectory" + type: "endpoints" + - _id: "graph_userGroupTraverseApplication" + type: "endpoints" + name: "User Group Associations" + description: "Directory Objects can be associated to one another to create\ + \ bidirectional membership associations, i.e. users to systems, commands\ + \ to systems, users to applications, etc. JumpCloud controls the types of\ + \ Directory Objects that exist and the pairings that can exist; but with\ + \ these set of endpoints we will allow you to leverage the JumpCloud Graph\ + \ to have more control over your User Group Associations." + - divider: false + items: + - _id: "workdays_delete" + type: "endpoints" + - _id: "workdays_post" + type: "endpoints" + - _id: "workdays_settings" + type: "endpoints" + - _id: "workdays_get" + type: "endpoints" + - _id: "workdays_list" + type: "endpoints" + - _id: "workdays_put" + type: "endpoints" + - _id: "workdays_workers" + type: "endpoints" + - _id: "workdays_authorize" + type: "endpoints" + - _id: "workdays_deauthorize" + type: "endpoints" + - _id: "workdays_import" + type: "endpoints" + name: "Workday Import" + - name: "Models" + description: "Models make up the core input and ouput structures in this API.\ + \ They are used in endpoint request and response bodies." + items: + - _id: "auth-info" + type: "schemas" + - _id: "auth-input" + type: "schemas" + - _id: "auth-input-object" + type: "schemas" + - _id: "active-directory-output" + type: "schemas" + - _id: "active-directory-input" + type: "schemas" + - _id: "Directory" + type: "schemas" + - _id: "Error" + type: "schemas" + - _id: "GraphConnection" + type: "schemas" + - _id: "GraphManagementReq" + type: "schemas" + - _id: "GraphObject" + type: "schemas" + - _id: "GraphObjectWithPaths" + type: "schemas" + - _id: "GraphType" + type: "schemas" + - _id: "Group" + type: "schemas" + - _id: "GroupType" + type: "schemas" + - _id: "ldap-server-input" + type: "schemas" + - _id: "ldap-server-output" + type: "schemas" + - _id: "oauth-code-input" + type: "schemas" + - _id: "Policy" + type: "schemas" + - _id: "PolicyRequest" + type: "schemas" + - _id: "PolicyResult" + type: "schemas" + - _id: "PolicyTemplateConfigField" + type: "schemas" + - _id: "PolicyTemplate" + type: "schemas" + - _id: "PolicyTemplateWithDetails" + type: "schemas" + - _id: "PolicyValue" + type: "schemas" + - _id: "PolicyWithDetails" + type: "schemas" + - _id: "samba-domain-input" + type: "schemas" + - _id: "samba-domain-output" + type: "schemas" + - _id: "SystemGraphManagementReq" + type: "schemas" + - _id: "SystemGroup" + type: "schemas" + - _id: "SystemGroupData" + type: "schemas" + - _id: "SystemGroupMembersReq" + type: "schemas" + - _id: "SystemGroupGraphManagementReq" + type: "schemas" + - _id: "UserGroup" + type: "schemas" + - _id: "UserGroupPut" + type: "schemas" + - _id: "UserGroupPost" + type: "schemas" + - _id: "UserGroupMembersReq" + type: "schemas" + - _id: "hitWKRiHhPaZpAx7q" + type: "schemas" + - _id: "HaivXzJCYeryM9e35" + type: "schemas" + - _id: "workday-report-row" + type: "schemas" + - _id: "workdayimportresult" + type: "schemas" + - _id: "workday-worker" + type: "schemas" + - _id: "workday-request" + type: "schemas" + - _id: "workday-fields" + type: "schemas" + - _id: "workday-input" + type: "schemas" + - _id: "workday-output" + type: "schemas" + - _id: "UserGroupGraphManagementReq" + type: "schemas" + - _id: "UserGraphManagementReq" + type: "schemas" + - _id: "job-workresult" + type: "schemas" + - _id: "job-id" + type: "schemas" + - _id: "job-details" + type: "schemas" + - name: "Traits" + description: "These Traits describe the common behaviors or structures in\ + \ this API." + items: + - _id: "aggregate" + type: "traits" + - _id: "fields" + type: "traits" + - _id: "filter" + type: "traits" + - _id: "limit" + type: "traits" + - _id: "skip" + type: "traits" + - _id: "sort" + type: "traits" + - _id: "graphTargets" + type: "traits" + - _id: "requestHeaders" + type: "traits" + - _id: "systemContextAuth" + type: "traits" + - _id: "listCount" + type: "traits" + - _id: "graphSystemTargets" + type: "traits" + - _id: "graphSystemGroupTargets" + type: "traits" + - _id: "graphUserGroupTargets" + type: "traits" + - _id: "graphUserTargets" + type: "traits" + divider: false + traits: [] + tests: [] + savedEntries: [] + utilFuncs: [] + functions: {} + textSections: + v2-api: + id: "v2-api" + name: "V2 API" + content: "#### Directory Objects \n\nOur new API offers the ability to interact\ + \ with some of our core features; otherwise known as Directory Objects. The\ + \ Directory Objects are:\n\n* Commands\n* Policies\n* Applications\n* Systems\n\ + * Users\n* User Groups \n* System Groups\n* Radius Servers\n* Directories:\ + \ Office 365, LDAP,G-Suite, Active Directory \n\nThe Directory Object is an\ + \ important concept to understand in order to successfully use JumpCloud APIs.\ + \ \n\n#### JumpCloud Graph\n\nWe've also introduced the concept of the JumpCloud\ + \ Graph along with Directory Objects. The Graph is a powerful aspect of our\ + \ platform which will enable you to associate objects with each other, or\ + \ establish membership for certain objects to become members of other objects.\n\ + \nSpecific `GET` endpoints will allow you to traverse the JumpCloud Graph\ + \ to return all indirect and directly bound objects in your organization.\ + \ \n\n\n##### JumpCloud Graph Model Example\n\nThe diagram below highlights\ + \ our association and membership model as it relates to Directory Objects.\ + \ \n\n![alt text](https://s3.amazonaws.com/jumpcloud-kb/Knowledge+Base+Photos/API+Docs/jumpcloud_graph.png\ + \ \"JumpCloud Graph Model Example\")\n\n\n#### API Considerations\n\nWe are\ + \ currently in the process of migrating our [API V1](https://docs.jumpcloud.com/1.0)\ + \ features to API V2. Depending on your type of integration you may be required\ + \ to use both V1 and V2 APIs.\n\nPlease refer to our [API V1](https://docs.jumpcloud.com/1.0)\ + \ docs to understand the functionality still available in that API set.\n\n\ + #### API SDKS\n\nYou can find language specific SDKs that can help you kickstart\ + \ your Integration with JumpCloud in the following GitHub Repos: \n\n* [Python](https://github.com/TheJumpCloud/jcapi-python)\n\ + * [Go](https://github.com/TheJumpCloud/jcapi-go)\n* [Ruby](https://github.com/TheJumpCloud/jcapi-ruby)\n\ + \n**Groups Migration & API V2 Access**\n\nIf you have not yet migrated to\ + \ Groups from Tags, you will not be able to use this set of endpoints. Please\ + \ contact [JumpCloud Support](mailto:support@jumpcloud.com) on questions about\ + \ migrating to Groups if you have not begun the migration process." + public: true + authentication-and-authorization-overview: + id: "authentication-and-authorization-overview" + name: "API Key" + content: "#### Access your API Key\n\nTo locate your API Key:\n1. Log into the\ + \ [JumpCloud Admin Console](https://console.jumpcloud.com/) \n2. Go to the\ + \ username drop down located in the top-right of the Console. \n3. Retrieve\ + \ your API key from API Settings.\n\n#### API Key Considerations\n\nThis API\ + \ key is associated to the currently logged in administrator. Other admins\ + \ will have different API keys.\n\nPlease keep this API key secret, as it\ + \ grants full access to any data accessible via your JumpCloud console account.\n\ + \nYou can also reset your API key in the same location in the JumpCloud Admin\ + \ Console.\n\n\n##### Recycling or Reseting your API Key\n\nIn order to revoke\ + \ access with the current API key, simply reset your API key. This will render\ + \ all calls using the previous API key inaccessible.\n\nFor API V2 the API\ + \ key will be passed in as a header with the header name \"x-api-key\".\n\n\ + **Example**\n```\ncurl -H \"x-api-key: [YOUR_API_KEY_HERE]\" \"https://console.jumpcloud.com/api/v2/systemgroups\"\ + \n```" + public: true + system-context: + id: "system-context" + name: "System Context" + content: "* [Introduction](#introduction)\n* [Supported Endpoints](#endpoints)\n\ + * [Authentication](#authentication)\n* [Data structures](#data-structures)\n\ + * [Examples](#additional-examples)\n* [Third party](#third-party)\n\n### Introduction\n\ + \nJumpCloud System Context Authorization is an alternative way to authenticate\ + \ with a subset of JumpCloud's REST APIs. Using this method a system can manage\ + \ its information and resource associations, allowing modern auto provisioning\ + \ environments to scale as needed.\n\n**Note: The following documentation\ + \ applies to Linux Operating Systems only.**\n\n### Supported Endpoints \n\ + \nJumpCloud System Context Authorizationcan be used in conjunction with Systems\ + \ endpoints found in the V1 API and certain System Group endpoints found in\ + \ the v2 API.\n\n- A system may fetch, alter, and delete metatdata about itself,\ + \ including manipulating a system's Group and Systemuser associations, \n\ + \ - `/api/systems/{system_id}` | [`GET`](https://docs.jumpcloud.com/1.0/systems/list-an-individual-system)\ + \ [`PUT`](https://docs.jumpcloud.com/1.0/systems/update-a-system)\n- A system\ + \ may delete itself from your JumpCloud organization\n - `/api/systems/{system_id}`\ + \ | [`DELETE`](https://docs.jumpcloud.com/1.0/systems/delete-a-system)\n-\ + \ A system may fetch it's direct resource associations under v2 (Groups)\n\ + \ - `/api/v2/systems/{system_id}/memberof` | [`GET`](https://docs.jumpcloud.com/2.0/systems/list-a-systems-group-membership)\n\ + \ - `/api/v2/systems/{system_id}/associations` | [`GET`](https://docs.jumpcloud.com/2.0/systems/list-associations-of-a-system)\n\ + \ - `/api/v2/systems/{system_id}/users` | [`GET`](https://docs.jumpcloud.com/2.0/systems/list-the-users-associated-with-a-system)\n\ + - A system may alter it's direct resource associations under v2 (Groups)\n\ + \ - `/api/v2/systems/{system_id}/associations` | [`POST`](https://docs.jumpcloud.com/2.0/systems/manage-associations-of-a-system)\n\ + - A system may alter it's System Group associations\n - `/api/v2/systemgroups/{systemgroup_id}/members`\ + \ | [`POST`](https://docs.jumpcloud.com/2.0/system-groups/update-a-system-group)\n\ + \ - _NOTE_ If a system attempts to alter the system group membership of\ + \ a different system the request will be rejected\n\n\n### Response Codes\n\ + \nIf endpoints other than those described above are called using the System\ + \ Context API the server will return a `401` response.\n\n### Authentication\n\ + \nTo allow for secure access to our APIs, you must authenticate each API request.\n\ + JumpCloud System Context Authorization uses [HTTP Signatures](http://tools.ietf.org/html/draft-cavage-http-signatures-00)\ + \ to authenticate API requests. \nThe HTTP Signatures sent with each request\ + \ are similar to the signatures used by the Amazon Web Services REST API.\n\ + To help with the request-signing process, we have provided an [example bash\ + \ script](https://github.com/TheJumpCloud/SystemContextAPI/blob/master/examples/shell/SigningExample.sh).\ + \ You must be root, or have permissions to access the contents of the `/opt/jc`\ + \ directory to generate a signature.\n\n\nHere is a breakdown of the example\ + \ script, with explanations.\n\nThe first thing the script does is extract\ + \ the systemKey from the JSON formatted `/opt/jc/jcagent.conf` file.\n\n```\n\ + #!/bin/bash\n\nconf=\"`cat /opt/jc/jcagent.conf`\"\nregex=\"systemKey\\\"\ + :\\\"(\\w+)\\\"\"\n\nif [[ $conf =~ $regex ]] ; then\n systemKey=\"${BASH_REMATCH[1]}\"\ + \nfi\n```\n\nThen the script retrieves the current date in the correct format.\n\ + \n```\nnow=`date -u \"+%a, %d %h %Y %H:%M:%S GMT\"`;\n```\n\nNext we build\ + \ a signing string to demonstrate the expected signature format. The signed\ + \ string must consist of the [request-line](http://tools.ietf.org/html/rfc2616#page-35)\ + \ and the date header, separated by a newline character.\n\n```\nsignstr=\"\ + GET /api/systems/${systemKey} HTTP/1.1\\ndate: ${now}\"\n```\n\nThe next step\ + \ is to calculate and apply the signature. This is a two-step process:\n\n\ + 1. Create a signature from the signing string using the JumpCloud Agent private\ + \ key: ``printf \"$signstr\" | openssl dgst -sha256 -sign /opt/jc/client.key``\n\ + 1. Then Base64-encode the signature string and trim off the newline characters:\ + \ ``| openssl enc -e -a | tr -d '\\n'``\n\nThe combined steps above result\ + \ in:\n\n```\nsignature=`printf \"$signstr\" | openssl dgst -sha256 -sign\ + \ /opt/jc/client.key | openssl enc -e -a | tr -d '\\n'` ;\n```\n\nFinally,\ + \ we make sure the API call sending the signature has the same Authorization\ + \ header and Date header values that were used in the signing string.\nThis\ + \ example API request simply requests the entire system record.\n\n```\ncurl\ + \ -iq \\\n -H \"Accept: application/json\" \\\n -H \"Date: ${now}\" \\\n\ + \ -H \"Authorization: Signature keyId=\\\"system/${systemKey}\\\",headers=\\\ + \"request-line date\\\",algorithm=\\\"rsa-sha256\\\",signature=\\\"${signature}\\\ + \"\" \\\n --url https://console.jumpcloud.com/api/systems/${systemKey}\n\ + ```\n\n#### Input data\n\nAll PUT methods should use the HTTP Content-Type\ + \ header with a value of 'application/json'. PUT methods are used for updating\ + \ a record.\n\nThe following example demonstrates how to update the `displayName`\ + \ of the system.\n\n```\nsignstr=\"PUT /api/systems/${systemKey} HTTP/1.1\\\ + ndate: ${now}\"\nsignature=`printf \"$signstr\" | openssl dgst -sha256 -sign\ + \ /opt/jc/client.key | openssl enc -e -a | tr -d '\\n'` ;\n\ncurl -iq \\\n\ + \ -d \"{\\\"displayName\\\" : \\\"updated-system-name-1\\\"}\" \\\n -X \"\ + PUT\" \\\n -H \"Content-Type: application/json\" \\\n -H \"Accept: application/json\"\ + \ \\\n -H \"Date: ${now}\" \\\n -H \"Authorization: Signature keyId=\\\"\ + system/${systemKey}\\\",headers=\\\"request-line date\\\",algorithm=\\\"rsa-sha256\\\ + \",signature=\\\"${signature}\\\"\" \\\n --url https://console.jumpcloud.com/api/systems/${systemKey}\n\ + ```\n\n\n#### Output data\n\nAll results will be formatted as JSON.\n\nHere\ + \ is an abbreviated example of response output:\n\n```\n{\n \"__v\": 0,\n\ + \ \"_id\": \"525ee96f52e144993e000015\",\n \"agentServer\": \"lappy386\"\ + ,\n \"agentVersion\": \"0.9.42\",\n \"arch\": \"x86_64\",\n \"connectionKey\"\ + : \"127.0.0.1_51812\",\n \"displayName\": \"ubuntu-1204\",\n \"firstContact\"\ + : \"2013-10-16T19:30:55.611Z\",\n \"hostname\": \"ubuntu-1204\" \n ...\n\ + ```\n\n\n### Additional Examples\n\n#### Signing authentication example\n\n\ + This example demonstrates how to make an authenticated request to fetch the\ + \ JumpCloud record for this system.\n\n[SigningExample.sh](https://github.com/TheJumpCloud/SystemContextAPI/blob/master/examples/shell/SigningExample.sh)\n\ + \n\n#### Shutdown hook \n\nThis example demonstrates how to make authenticated\ + \ request on system shutdown.\nUsing an init.d script registered at run level\ + \ 0, you can call the System Context API as the system is shutting down.\n\ + \n[Instance-shutdown-initd](/examples/instance-shutdown-initd) is an example\ + \ of an init.d script that only runs at system shutdown.\n\nAfter customizing\ + \ the [instance-shutdown-initd](https://github.com/TheJumpCloud/SystemContextAPI/blob/master/examples/instance-shutdown-initd)\ + \ script, you should install it on the system(s) running the JumpCloud agent...\n\ + \n1. Copy the modified [instance-shutdown-initd](https://github.com/TheJumpCloud/SystemContextAPI/blob/master/examples/instance-shutdown-initd)\ + \ to `/etc/init.d/instance-shutdown`\n2. On Ubuntu systems, run `update-rc.d\ + \ instance-shutdown defaults`. On RedHat/CentOS systems, run `chkconfig --add\ + \ instance-shutdown`\n\n\n### Third party\n\n#### Chef cookbooks\n\n[https://github.com/nshenry03/jumpcloud](https://github.com/nshenry03/jumpcloud)\n\ + \n[https://github.com/cjs226/jumpcloud](https://github.com/cjs226/jumpcloud)" + public: true + mock: + dynamic: false + enabled: false +x-tests: {} diff --git a/v2/api_client.go b/v2/api_client.go index c30ddfd..48ff844 100644 --- a/v2/api_client.go +++ b/v2/api_client.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 @@ -46,6 +45,7 @@ type APIClient struct { // API Services ActiveDirectoryApi *ActiveDirectoryApiService ApplicationsApi *ApplicationsApiService + BulkJobRequestsApi *BulkJobRequestsApiService CommandsApi *CommandsApiService DirectoriesApi *DirectoriesApiService GSuiteApi *GSuiteApiService @@ -57,11 +57,15 @@ type APIClient struct { PolicytemplatesApi *PolicytemplatesApiService RADIUSServersApi *RADIUSServersApiService SambaDomainsApi *SambaDomainsApiService + SystemGroupAssociationsApi *SystemGroupAssociationsApiService + SystemGroupMembersMembershipApi *SystemGroupMembersMembershipApiService SystemGroupsApi *SystemGroupsApiService SystemsApi *SystemsApiService + UserGroupAssociationsApi *UserGroupAssociationsApiService + UserGroupMembersMembershipApi *UserGroupMembersMembershipApiService UserGroupsApi *UserGroupsApiService UsersApi *UsersApiService - WorkdayApi *WorkdayApiService + WorkdayImportApi *WorkdayImportApiService } type service struct { @@ -82,6 +86,7 @@ func NewAPIClient(cfg *Configuration) *APIClient { // API Services c.ActiveDirectoryApi = (*ActiveDirectoryApiService)(&c.common) c.ApplicationsApi = (*ApplicationsApiService)(&c.common) + c.BulkJobRequestsApi = (*BulkJobRequestsApiService)(&c.common) c.CommandsApi = (*CommandsApiService)(&c.common) c.DirectoriesApi = (*DirectoriesApiService)(&c.common) c.GSuiteApi = (*GSuiteApiService)(&c.common) @@ -93,11 +98,15 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.PolicytemplatesApi = (*PolicytemplatesApiService)(&c.common) c.RADIUSServersApi = (*RADIUSServersApiService)(&c.common) c.SambaDomainsApi = (*SambaDomainsApiService)(&c.common) + c.SystemGroupAssociationsApi = (*SystemGroupAssociationsApiService)(&c.common) + c.SystemGroupMembersMembershipApi = (*SystemGroupMembersMembershipApiService)(&c.common) c.SystemGroupsApi = (*SystemGroupsApiService)(&c.common) c.SystemsApi = (*SystemsApiService)(&c.common) + c.UserGroupAssociationsApi = (*UserGroupAssociationsApiService)(&c.common) + c.UserGroupMembersMembershipApi = (*UserGroupMembersMembershipApiService)(&c.common) c.UserGroupsApi = (*UserGroupsApiService)(&c.common) c.UsersApi = (*UsersApiService)(&c.common) - c.WorkdayApi = (*WorkdayApiService)(&c.common) + c.WorkdayImportApi = (*WorkdayImportApiService)(&c.common) return c } @@ -214,7 +223,7 @@ func (c *APIClient) prepareRequest ( } } - // add form paramters and file if available. + // add form parameters and file if available. if len(formParams) > 0 || (len(fileBytes) > 0 && fileName != "") { if body != nil { return nil, errors.New("Cannot specify postBody and multipart form at the same time.") @@ -254,7 +263,7 @@ func (c *APIClient) prepareRequest ( w.Close() } - // Setup path and query paramters + // Setup path and query parameters url, err := url.Parse(path) if err != nil { return nil, err @@ -298,8 +307,13 @@ func (c *APIClient) prepareRequest ( // Add the user agent to the request. localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) - // Walk through any authentication. + if ctx != nil { + // add context to the request + localVarRequest = localVarRequest.WithContext(ctx) + + // Walk through any authentication. + // OAuth2 authentication if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { // We were able to grab an oauth2 token from the context diff --git a/v2/api_response.go b/v2/api_response.go index ca65d07..78307a4 100644 --- a/v2/api_response.go +++ b/v2/api_response.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/applications_api.go b/v2/applications_api.go index cc21f07..c4926fe 100644 --- a/v2/applications_api.go +++ b/v2/applications_api.go @@ -1,16 +1,16 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 import ( + "io/ioutil" "net/url" "net/http" "strings" @@ -28,8 +28,8 @@ type ApplicationsApiService service /* ApplicationsApiService List the associations of an Application - This endpoint will return the _direct_ associations of an Application. A direct association can be a non-homogenous relationship between 2 different objects. for example Applications and User Groups. #### Sample Request ``` https://console.jumpcloud.com/api/v2/applications/{application_id}/associations?targets=user_group ``` - * @param ctx context.Context Authentication Context + This endpoint will return the _direct_ associations of an Application. A direct association can be a non-homogenous relationship between 2 different objects. for example Applications and User Groups. #### Sample Request ``` curl -X GET 'https://console.jumpcloud.com/api/v2/applications/{Application_ID}/associations?targets=user_group \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param applicationId ObjectID of the Application. @param targets @param contentType @@ -107,17 +107,18 @@ func (a *ApplicationsApiService) GraphApplicationAssociationsList(ctx context.Co return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -125,8 +126,8 @@ func (a *ApplicationsApiService) GraphApplicationAssociationsList(ctx context.Co } /* ApplicationsApiService Manage the associations of an Application - This endpoint allows you to manage the _direct_ associations of an Application. A direct association can be a non-homogenous relationship between 2 different objects. for example Application and User Groups. #### Sample Request ``` https://console.jumpcloud.com/api/v2/applications/{application_id}/associations ``` - * @param ctx context.Context Authentication Context + This endpoint allows you to manage the _direct_ associations of an Application. A direct association can be a non-homogenous relationship between 2 different objects. for example Application and User Groups. #### Sample Request ``` curl -X POST 'https://console.jumpcloud.com/api/v2/applications/{Application_ID}/associations' \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user_group\", \"id\": \"{Group_ID}\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param applicationId ObjectID of the Application. @param contentType @param accept @@ -192,21 +193,22 @@ func (a *ApplicationsApiService) GraphApplicationAssociationsPost(ctx context.Co return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } -/* ApplicationsApiService List the Users associated with an Application - This endpoint will return Users associated with an Application. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Application to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this Application. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/applications/{application_id}/users ``` - * @param ctx context.Context Authentication Context +/* ApplicationsApiService List the Users bound to an Application + This endpoint will return all Users bound to an Application, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Application to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this Application. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/applications/{Application_ID}/users \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param applicationId ObjectID of the Application. @param contentType @param accept @@ -282,26 +284,27 @@ func (a *ApplicationsApiService) GraphApplicationTraverseUser(ctx context.Contex return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* ApplicationsApiService List the User Groups associated with an Application - This endpoint will return User Groups associated with an Application. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Application to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this Application. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/applications/{application_id}/usergroups ``` - * @param ctx context.Context Authentication Context +/* ApplicationsApiService List the User Groups bound to an Application + This endpoint will return all Users Groups bound to an Application, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Application to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this Application. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/applications/{Application_ID}/usergroups \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param applicationId ObjectID of the Application. @param contentType @param accept @@ -377,17 +380,18 @@ func (a *ApplicationsApiService) GraphApplicationTraverseUserGroup(ctx context.C return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } diff --git a/v2/auth_info.go b/v2/auth_info.go new file mode 100644 index 0000000..45f20eb --- /dev/null +++ b/v2/auth_info.go @@ -0,0 +1,19 @@ +/* + * JumpCloud APIs + * + * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. + * + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package v2 + +type AuthInfo struct { + + Expiry string `json:"expiry,omitempty"` + + IsValid bool `json:"isValid,omitempty"` + + Message string `json:"message,omitempty"` +} diff --git a/v2/workday_report_result.go b/v2/auth_input.go similarity index 60% rename from v2/workday_report_result.go rename to v2/auth_input.go index cc76cfb..673fbe0 100644 --- a/v2/workday_report_result.go +++ b/v2/auth_input.go @@ -1,18 +1,17 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 -type WorkdayReportResult struct { +type AuthInput struct { - Colums []string `json:"colums,omitempty"` + Oauth *AuthinputOauth `json:"oauth,omitempty"` - Rows []WorkdayReportRow `json:"rows,omitempty"` + Basic *AuthinputBasic `json:"basic,omitempty"` } diff --git a/v2/inline_response_200.go b/v2/auth_input_object.go similarity index 65% rename from v2/inline_response_200.go rename to v2/auth_input_object.go index 4c99452..08fc27e 100644 --- a/v2/inline_response_200.go +++ b/v2/auth_input_object.go @@ -1,16 +1,15 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 -type InlineResponse200 struct { +type AuthInputObject struct { - OAuthUrl string `json:"oAuthUrl,omitempty"` + Auth *AuthInput `json:"auth,omitempty"` } diff --git a/v2/authinput_basic.go b/v2/authinput_basic.go new file mode 100644 index 0000000..4fa68b0 --- /dev/null +++ b/v2/authinput_basic.go @@ -0,0 +1,17 @@ +/* + * JumpCloud APIs + * + * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. + * + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package v2 + +type AuthinputBasic struct { + + Username string `json:"username,omitempty"` + + Password string `json:"password,omitempty"` +} diff --git a/v2/authinput_oauth.go b/v2/authinput_oauth.go new file mode 100644 index 0000000..e361d1c --- /dev/null +++ b/v2/authinput_oauth.go @@ -0,0 +1,15 @@ +/* + * JumpCloud APIs + * + * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. + * + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package v2 + +type AuthinputOauth struct { + + Code string `json:"code,omitempty"` +} diff --git a/v2/bulk_job_requests_api.go b/v2/bulk_job_requests_api.go new file mode 100644 index 0000000..3dac08b --- /dev/null +++ b/v2/bulk_job_requests_api.go @@ -0,0 +1,206 @@ +/* + * JumpCloud APIs + * + * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. + * + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package v2 + +import ( + "io/ioutil" + "net/url" + "net/http" + "strings" + "golang.org/x/net/context" + "encoding/json" + "fmt" +) + +// Linger please +var ( + _ context.Context +) + +type BulkJobRequestsApiService service + + +/* BulkJobRequestsApiService Get Job + Under development + * @param ctx context.Context for authentication, logging, tracing, etc. + @param id + @param contentType + @param accept + @return JobDetails*/ +func (a *BulkJobRequestsApiService) JobGet(ctx context.Context, id string, contentType string, accept string) (JobDetails, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload JobDetails + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/jobs/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* BulkJobRequestsApiService List Job Results + Under development + * @param ctx context.Context for authentication, logging, tracing, etc. + @param id + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @return []JobWorkresult*/ +func (a *BulkJobRequestsApiService) JobResults(ctx context.Context, id string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]JobWorkresult, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []JobWorkresult + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/jobs/{id}/results" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + diff --git a/v2/commands_api.go b/v2/commands_api.go index 38e3283..8b54ac9 100644 --- a/v2/commands_api.go +++ b/v2/commands_api.go @@ -1,16 +1,16 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 import ( + "io/ioutil" "net/url" "net/http" "strings" @@ -28,8 +28,8 @@ type CommandsApiService service /* CommandsApiService List the associations of a Command - This endpoint will return the _direct_ associations of this Command. A direct association can be a non-homogenous relationship between 2 different objects. for example Commands and User Groups. #### Sample Request ``` https://console.jumpcloud.com/api/v2/commands/{command_id}/associations?targets=user_group ``` - * @param ctx context.Context Authentication Context + This endpoint will return the _direct_ associations of this Command. A direct association can be a non-homogenous relationship between 2 different objects. for example Commands and User Groups. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/commands/{Command_ID}/associations?targets=system_group \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param commandId ObjectID of the Command. @param targets @param contentType @@ -107,17 +107,18 @@ func (a *CommandsApiService) GraphCommandAssociationsList(ctx context.Context, c return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -125,8 +126,8 @@ func (a *CommandsApiService) GraphCommandAssociationsList(ctx context.Context, c } /* CommandsApiService Manage the associations of a Command - This endpoint will allow you to manage the _direct_ associations of this Command. A direct association can be a non-homogenous relationship between 2 different objects. for example Commands and User Groups. #### Sample Request ``` https://console.jumpcloud.com/api/v2/commands/{command_id}/associations - * @param ctx context.Context Authentication Context + This endpoint will allow you to manage the _direct_ associations of this Command. A direct association can be a non-homogenous relationship between 2 different objects. for example Commands and User Groups. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/commands/{Command_ID}/associations \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"system_group\", \"id\": \"Group_ID\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param commandId ObjectID of the Command. @param contentType @param accept @@ -192,21 +193,22 @@ func (a *CommandsApiService) GraphCommandAssociationsPost(ctx context.Context, c return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } -/* CommandsApiService List the Systems associated with a Command - This endpoint will return Systems associated with a Command. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Command to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this Command. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/commands/{command_id}/systems ``` - * @param ctx context.Context Authentication Context +/* CommandsApiService List the Systems bound to a Command + This endpoint will return all Systems bound to a Command, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Command to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this Command. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/commands/{Command_ID}/systems \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param commandId ObjectID of the Command. @param contentType @param accept @@ -282,26 +284,27 @@ func (a *CommandsApiService) GraphCommandTraverseSystem(ctx context.Context, com return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* CommandsApiService List the System Groups associated with a Command - This endpoint will return System Groups associated with a Command. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Command to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this Command. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/commands/{command_id}/systemsgroups ``` - * @param ctx context.Context Authentication Context +/* CommandsApiService List the System Groups bound to a Command + This endpoint will return all System Groups bound to a Command, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Command to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this Command. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/commands/{Command_ID}/systemgroups \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param commandId ObjectID of the Command. @param contentType @param accept @@ -377,17 +380,18 @@ func (a *CommandsApiService) GraphCommandTraverseSystemGroup(ctx context.Context return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } diff --git a/v2/configuration.go b/v2/configuration.go index 0bb3aba..52c3f07 100644 --- a/v2/configuration.go +++ b/v2/configuration.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 @@ -14,16 +13,37 @@ import ( "net/http" ) -const ContextOAuth2 int = 1 -const ContextBasicAuth int = 2 -const ContextAccessToken int = 3 -const ContextAPIKey int = 4 +// contextKeys are used to identify the type of value in the context. +// Since these are string, it is possible to get a short description of the +// context key for logging and debugging using key.String(). +type contextKey string + +func (c contextKey) String() string { + return "auth " + string(c) +} + +var ( + // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. + ContextOAuth2 = contextKey("token") + + // ContextBasicAuth takes BasicAuth as authentication for the request. + ContextBasicAuth = contextKey("basic") + + // ContextAccessToken takes a string oauth2 access token as authentication for the request. + ContextAccessToken = contextKey("accesstoken") + + // ContextAPIKey takes an APIKey as authentication for the request + ContextAPIKey = contextKey("apikey") +) + +// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` } +// APIKey provides API key based authentication to a request passed via context using ContextAPIKey type APIKey struct { Key string Prefix string diff --git a/v2/directories_api.go b/v2/directories_api.go index 61352a5..6e8f19f 100644 --- a/v2/directories_api.go +++ b/v2/directories_api.go @@ -1,16 +1,16 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 import ( + "io/ioutil" "net/url" "net/http" "strings" @@ -27,15 +27,15 @@ type DirectoriesApiService service /* DirectoriesApiService List All Directories - This endpoint returns all active directories (LDAP, O365 Suite, G-Suite). #### Sample Request ``` https://console.jumpcloud.com/api/v2/directories ``` - * @param ctx context.Context Authentication Context + This endpoint returns all active directories (LDAP, O365 Suite, G-Suite). #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/directories \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: - @param "fields" (string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. + @param "fields" ([]string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. - @param "sort" (string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. @return []Directory*/ func (a *DirectoriesApiService) DirectoriesList(ctx context.Context, contentType string, accept string, localVarOptionals map[string]interface{}) ([]Directory, *http.Response, error) { var ( @@ -53,21 +53,15 @@ func (a *DirectoriesApiService) DirectoriesList(ctx context.Context, contentType localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if err := typeCheckParameter(localVarOptionals["fields"], "string", "fields"); err != nil { - return successPayload, nil, err - } if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { return successPayload, nil, err } if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { return successPayload, nil, err } - if err := typeCheckParameter(localVarOptionals["sort"], "string", "sort"); err != nil { - return successPayload, nil, err - } - if localVarTempParam, localVarOk := localVarOptionals["fields"].(string); localVarOk { - localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["fields"].([]string); localVarOk { + localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "csv")) } if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) @@ -75,8 +69,8 @@ func (a *DirectoriesApiService) DirectoriesList(ctx context.Context, contentType if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } - if localVarTempParam, localVarOk := localVarOptionals["sort"].(string); localVarOk { - localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -116,17 +110,18 @@ func (a *DirectoriesApiService) DirectoriesList(ctx context.Context, contentType return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } diff --git a/v2/directory.go b/v2/directory.go index 406d30c..1af1f10 100644 --- a/v2/directory.go +++ b/v2/directory.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/docs/ActiveDirectoryApi.md b/v2/docs/ActiveDirectoryApi.md index 30f64a3..2c9fbb5 100644 --- a/v2/docs/ActiveDirectoryApi.md +++ b/v2/docs/ActiveDirectoryApi.md @@ -10,20 +10,20 @@ Method | HTTP request | Description [**ActivedirectoriesPost**](ActiveDirectoryApi.md#ActivedirectoriesPost) | **Post** /activedirectories | Create a new Active Directory [**GraphActiveDirectoryAssociationsList**](ActiveDirectoryApi.md#GraphActiveDirectoryAssociationsList) | **Get** /activedirectories/{activedirectory_id}/associations | List the associations of an Active Directory instance [**GraphActiveDirectoryAssociationsPost**](ActiveDirectoryApi.md#GraphActiveDirectoryAssociationsPost) | **Post** /activedirectories/{activedirectory_id}/associations | Manage the associations of an Active Directory instance -[**GraphActiveDirectoryTraverseUserGroup**](ActiveDirectoryApi.md#GraphActiveDirectoryTraverseUserGroup) | **Get** /activedirectories/{activedirectory_id}/usergroups | List the User Groups associated with an Active Directory instance +[**GraphActiveDirectoryTraverseUserGroup**](ActiveDirectoryApi.md#GraphActiveDirectoryTraverseUserGroup) | **Get** /activedirectories/{activedirectory_id}/usergroups | List the User Groups bound to an Active Directory instance # **ActivedirectoriesDelete** > ActivedirectoriesDelete(ctx, id, contentType, accept) Delete an Active Directory -This endpoint allows you to delete an Active Directory. +This endpoint allows you to delete an Active Directory Instance. #### Sample Request ``` curl -X DELETE https://console.jumpcloud.com/api/v2/activedirectories/{ActiveDirectory_ID} \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **id** | **string**| ObjectID of this Active Directory instance. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -47,13 +47,13 @@ Name | Type | Description | Notes > ActiveDirectoryOutput ActivedirectoriesGet(ctx, id, contentType, accept) Get an Active Directory -This endpoint returns a specific Active Directory. +This endpoint returns a specific Active Directory. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/activedirectories/{ActiveDirectory_ID} \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **id** | **string**| ObjectID of this Active Directory instance. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -77,11 +77,13 @@ Name | Type | Description | Notes > []ActiveDirectoryOutput ActivedirectoriesList(ctx, contentType, accept, optional) List Active Directories +This endpoint allows you to list all your Active Directory Instances. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/activedirectories/ \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -93,11 +95,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] - **fields** | **string**| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | [default to ] - **filter** | **string**| Supported operators are: eq, ne, gt, ge, lt, le, between, search | [default to ] + **fields** | [**[]string**](string.md)| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] - **sort** | **string**| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | [default to ] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | ### Return type @@ -118,13 +120,13 @@ Name | Type | Description | Notes > ActiveDirectoryOutput ActivedirectoriesPost(ctx, contentType, accept, optional) Create a new Active Directory -This endpoint allows you to create a new Active Directory. +This endpoint allows you to create a new Active Directory. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/activedirectories/ \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"domain\": \"{DC=AD_domain_name;DC=com}\" } ' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -157,13 +159,13 @@ Name | Type | Description | Notes > []GraphConnection GraphActiveDirectoryAssociationsList(ctx, activedirectoryId, targets, contentType, accept, optional) List the associations of an Active Directory instance -This endpoint returns the direct associations of this Active Directory instance. A direct association can be a non-homogenous relationship between 2 different objects. For example Active Directory and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/activedirectories/{activedirectory_id}/associations?targets=user ``` +This endpoint returns the direct associations of this Active Directory instance. A direct association can be a non-homogenous relationship between 2 different objects. For example Active Directory and Users. #### Sample Request ``` curl -X GET 'https://console.jumpcloud.com/api/v2/activedirectories/{ActiveDirectory_ID}/associations?targets=user \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **activedirectoryId** | **string**| | **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] @@ -201,13 +203,13 @@ Name | Type | Description | Notes > GraphActiveDirectoryAssociationsPost(ctx, activedirectoryId, contentType, accept, optional) Manage the associations of an Active Directory instance -This endpoint allows you to manage the _direct_ associations of an Active Directory instance. A direct association can be a non-homogenous relationship between 2 different objects. For example Active Directory and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/activedirectories/{activedirectory_id}/associations ``` +This endpoint allows you to manage the _direct_ associations of an Active Directory instance. A direct association can be a non-homogenous relationship between 2 different objects. For example Active Directory and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/activedirectories/{AD_Instance_ID}/associations \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user\", \"id\": \"{User_ID}\" } ' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **activedirectoryId** | **string**| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -240,15 +242,15 @@ Name | Type | Description | Notes # **GraphActiveDirectoryTraverseUserGroup** > []GraphObjectWithPaths GraphActiveDirectoryTraverseUserGroup(ctx, activedirectoryId, contentType, accept, optional) -List the User Groups associated with an Active Directory instance +List the User Groups bound to an Active Directory instance -This endpoint will return User Groups associated with an Active Directory instance. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Active Directory instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this Active Directory instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/activedirectories/{activedirectory_id}/usersgroups ``` +This endpoint will return all Users Groups bound to an Active Directory instance, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Active Directory instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this Active Directory instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/activedirectories/{ActiveDirectory_ID}/usergroups \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **activedirectoryId** | **string**| ObjectID of the Active Directory instance. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] diff --git a/v2/docs/ApplicationsApi.md b/v2/docs/ApplicationsApi.md index f68cfae..aeaafe1 100644 --- a/v2/docs/ApplicationsApi.md +++ b/v2/docs/ApplicationsApi.md @@ -6,21 +6,21 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**GraphApplicationAssociationsList**](ApplicationsApi.md#GraphApplicationAssociationsList) | **Get** /applications/{application_id}/associations | List the associations of an Application [**GraphApplicationAssociationsPost**](ApplicationsApi.md#GraphApplicationAssociationsPost) | **Post** /applications/{application_id}/associations | Manage the associations of an Application -[**GraphApplicationTraverseUser**](ApplicationsApi.md#GraphApplicationTraverseUser) | **Get** /applications/{application_id}/users | List the Users associated with an Application -[**GraphApplicationTraverseUserGroup**](ApplicationsApi.md#GraphApplicationTraverseUserGroup) | **Get** /applications/{application_id}/usergroups | List the User Groups associated with an Application +[**GraphApplicationTraverseUser**](ApplicationsApi.md#GraphApplicationTraverseUser) | **Get** /applications/{application_id}/users | List the Users bound to an Application +[**GraphApplicationTraverseUserGroup**](ApplicationsApi.md#GraphApplicationTraverseUserGroup) | **Get** /applications/{application_id}/usergroups | List the User Groups bound to an Application # **GraphApplicationAssociationsList** > []GraphConnection GraphApplicationAssociationsList(ctx, applicationId, targets, contentType, accept, optional) List the associations of an Application -This endpoint will return the _direct_ associations of an Application. A direct association can be a non-homogenous relationship between 2 different objects. for example Applications and User Groups. #### Sample Request ``` https://console.jumpcloud.com/api/v2/applications/{application_id}/associations?targets=user_group ``` +This endpoint will return the _direct_ associations of an Application. A direct association can be a non-homogenous relationship between 2 different objects. for example Applications and User Groups. #### Sample Request ``` curl -X GET 'https://console.jumpcloud.com/api/v2/applications/{Application_ID}/associations?targets=user_group \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **applicationId** | **string**| ObjectID of the Application. | **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] @@ -58,13 +58,13 @@ Name | Type | Description | Notes > GraphApplicationAssociationsPost(ctx, applicationId, contentType, accept, optional) Manage the associations of an Application -This endpoint allows you to manage the _direct_ associations of an Application. A direct association can be a non-homogenous relationship between 2 different objects. for example Application and User Groups. #### Sample Request ``` https://console.jumpcloud.com/api/v2/applications/{application_id}/associations ``` +This endpoint allows you to manage the _direct_ associations of an Application. A direct association can be a non-homogenous relationship between 2 different objects. for example Application and User Groups. #### Sample Request ``` curl -X POST 'https://console.jumpcloud.com/api/v2/applications/{Application_ID}/associations' \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user_group\", \"id\": \"{Group_ID}\" }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **applicationId** | **string**| ObjectID of the Application. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -97,15 +97,15 @@ Name | Type | Description | Notes # **GraphApplicationTraverseUser** > []GraphObjectWithPaths GraphApplicationTraverseUser(ctx, applicationId, contentType, accept, optional) -List the Users associated with an Application +List the Users bound to an Application -This endpoint will return Users associated with an Application. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Application to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this Application. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/applications/{application_id}/users ``` +This endpoint will return all Users bound to an Application, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Application to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this Application. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/applications/{Application_ID}/users \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **applicationId** | **string**| ObjectID of the Application. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -139,15 +139,15 @@ Name | Type | Description | Notes # **GraphApplicationTraverseUserGroup** > []GraphObjectWithPaths GraphApplicationTraverseUserGroup(ctx, applicationId, contentType, accept, optional) -List the User Groups associated with an Application +List the User Groups bound to an Application -This endpoint will return User Groups associated with an Application. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Application to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this Application. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/applications/{application_id}/usergroups ``` +This endpoint will return all Users Groups bound to an Application, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Application to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this Application. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/applications/{Application_ID}/usergroups \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **applicationId** | **string**| ObjectID of the Application. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] diff --git a/v2/docs/AuthInfo.md b/v2/docs/AuthInfo.md new file mode 100644 index 0000000..e98d466 --- /dev/null +++ b/v2/docs/AuthInfo.md @@ -0,0 +1,12 @@ +# AuthInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Expiry** | **string** | | [optional] [default to null] +**IsValid** | **bool** | | [optional] [default to null] +**Message** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/v2/docs/Body.md b/v2/docs/AuthInput.md similarity index 59% rename from v2/docs/Body.md rename to v2/docs/AuthInput.md index 4d6b888..c0f8aba 100644 --- a/v2/docs/Body.md +++ b/v2/docs/AuthInput.md @@ -1,11 +1,10 @@ -# Body +# AuthInput ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | | [default to null] -**ReportUrl** | **string** | | [default to null] -**Oauth** | [***WorkdaysOauth**](workdays_oauth.md) | | [optional] [default to null] +**Oauth** | [***AuthinputOauth**](authinput_oauth.md) | | [optional] [default to null] +**Basic** | [***AuthinputBasic**](authinput_basic.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/v2/docs/WorkdayReportResult.md b/v2/docs/AuthInputObject.md similarity index 61% rename from v2/docs/WorkdayReportResult.md rename to v2/docs/AuthInputObject.md index 6684f00..863a8b1 100644 --- a/v2/docs/WorkdayReportResult.md +++ b/v2/docs/AuthInputObject.md @@ -1,10 +1,9 @@ -# WorkdayReportResult +# AuthInputObject ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Colums** | **[]string** | | [optional] [default to null] -**Rows** | [**[]WorkdayReportRow**](workday-report-row.md) | | [optional] [default to null] +**Auth** | [***AuthInput**](auth-input.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/v2/docs/AuthinputBasic.md b/v2/docs/AuthinputBasic.md new file mode 100644 index 0000000..6e8c4c9 --- /dev/null +++ b/v2/docs/AuthinputBasic.md @@ -0,0 +1,11 @@ +# AuthinputBasic + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | | [optional] [default to null] +**Password** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/v2/docs/InlineResponse200.md b/v2/docs/AuthinputOauth.md similarity index 77% rename from v2/docs/InlineResponse200.md rename to v2/docs/AuthinputOauth.md index 343e92b..b711b0d 100644 --- a/v2/docs/InlineResponse200.md +++ b/v2/docs/AuthinputOauth.md @@ -1,9 +1,9 @@ -# InlineResponse200 +# AuthinputOauth ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**OAuthUrl** | **string** | | [optional] [default to null] +**Code** | **string** | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/v2/docs/BulkJobRequestsApi.md b/v2/docs/BulkJobRequestsApi.md new file mode 100644 index 0000000..4234b99 --- /dev/null +++ b/v2/docs/BulkJobRequestsApi.md @@ -0,0 +1,82 @@ +# \BulkJobRequestsApi + +All URIs are relative to *https://console.jumpcloud.com/api/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**JobGet**](BulkJobRequestsApi.md#JobGet) | **Get** /jobs/{id} | Get Job +[**JobResults**](BulkJobRequestsApi.md#JobResults) | **Get** /jobs/{id}/results | List Job Results + + +# **JobGet** +> JobDetails JobGet(ctx, id, contentType, accept) +Get Job + +Under development + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **id** | **string**| | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + +### Return type + +[**JobDetails**](job-details.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **JobResults** +> []JobWorkresult JobResults(ctx, id, contentType, accept, optional) +List Job Results + +Under development + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **id** | **string**| | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **string**| | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + +### Return type + +[**[]JobWorkresult**](job-workresult.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/v2/docs/CommandsApi.md b/v2/docs/CommandsApi.md index 1cc01ae..d68c836 100644 --- a/v2/docs/CommandsApi.md +++ b/v2/docs/CommandsApi.md @@ -6,21 +6,21 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**GraphCommandAssociationsList**](CommandsApi.md#GraphCommandAssociationsList) | **Get** /commands/{command_id}/associations | List the associations of a Command [**GraphCommandAssociationsPost**](CommandsApi.md#GraphCommandAssociationsPost) | **Post** /commands/{command_id}/associations | Manage the associations of a Command -[**GraphCommandTraverseSystem**](CommandsApi.md#GraphCommandTraverseSystem) | **Get** /commands/{command_id}/systems | List the Systems associated with a Command -[**GraphCommandTraverseSystemGroup**](CommandsApi.md#GraphCommandTraverseSystemGroup) | **Get** /commands/{command_id}/systemgroups | List the System Groups associated with a Command +[**GraphCommandTraverseSystem**](CommandsApi.md#GraphCommandTraverseSystem) | **Get** /commands/{command_id}/systems | List the Systems bound to a Command +[**GraphCommandTraverseSystemGroup**](CommandsApi.md#GraphCommandTraverseSystemGroup) | **Get** /commands/{command_id}/systemgroups | List the System Groups bound to a Command # **GraphCommandAssociationsList** > []GraphConnection GraphCommandAssociationsList(ctx, commandId, targets, contentType, accept, optional) List the associations of a Command -This endpoint will return the _direct_ associations of this Command. A direct association can be a non-homogenous relationship between 2 different objects. for example Commands and User Groups. #### Sample Request ``` https://console.jumpcloud.com/api/v2/commands/{command_id}/associations?targets=user_group ``` +This endpoint will return the _direct_ associations of this Command. A direct association can be a non-homogenous relationship between 2 different objects. for example Commands and User Groups. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/commands/{Command_ID}/associations?targets=system_group \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **commandId** | **string**| ObjectID of the Command. | **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] @@ -58,13 +58,13 @@ Name | Type | Description | Notes > GraphCommandAssociationsPost(ctx, commandId, contentType, accept, optional) Manage the associations of a Command -This endpoint will allow you to manage the _direct_ associations of this Command. A direct association can be a non-homogenous relationship between 2 different objects. for example Commands and User Groups. #### Sample Request ``` https://console.jumpcloud.com/api/v2/commands/{command_id}/associations +This endpoint will allow you to manage the _direct_ associations of this Command. A direct association can be a non-homogenous relationship between 2 different objects. for example Commands and User Groups. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/commands/{Command_ID}/associations \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"system_group\", \"id\": \"Group_ID\" }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **commandId** | **string**| ObjectID of the Command. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -97,15 +97,15 @@ Name | Type | Description | Notes # **GraphCommandTraverseSystem** > []GraphObjectWithPaths GraphCommandTraverseSystem(ctx, commandId, contentType, accept, optional) -List the Systems associated with a Command +List the Systems bound to a Command -This endpoint will return Systems associated with a Command. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Command to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this Command. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/commands/{command_id}/systems ``` +This endpoint will return all Systems bound to a Command, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Command to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this Command. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/commands/{Command_ID}/systems \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **commandId** | **string**| ObjectID of the Command. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -139,15 +139,15 @@ Name | Type | Description | Notes # **GraphCommandTraverseSystemGroup** > []GraphObjectWithPaths GraphCommandTraverseSystemGroup(ctx, commandId, contentType, accept, optional) -List the System Groups associated with a Command +List the System Groups bound to a Command -This endpoint will return System Groups associated with a Command. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Command to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this Command. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/commands/{command_id}/systemsgroups ``` +This endpoint will return all System Groups bound to a Command, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Command to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this Command. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/commands/{Command_ID}/systemgroups \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **commandId** | **string**| ObjectID of the Command. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] diff --git a/v2/docs/DirectoriesApi.md b/v2/docs/DirectoriesApi.md index 032a9fb..753ab66 100644 --- a/v2/docs/DirectoriesApi.md +++ b/v2/docs/DirectoriesApi.md @@ -11,13 +11,13 @@ Method | HTTP request | Description > []Directory DirectoriesList(ctx, contentType, accept, optional) List All Directories -This endpoint returns all active directories (LDAP, O365 Suite, G-Suite). #### Sample Request ``` https://console.jumpcloud.com/api/v2/directories ``` +This endpoint returns all active directories (LDAP, O365 Suite, G-Suite). #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/directories \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -29,10 +29,10 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] - **fields** | **string**| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | [default to ] + **fields** | [**[]string**](string.md)| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] - **sort** | **string**| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | [default to ] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | ### Return type diff --git a/v2/docs/GSuiteApi.md b/v2/docs/GSuiteApi.md index 59b8527..44ffc16 100644 --- a/v2/docs/GSuiteApi.md +++ b/v2/docs/GSuiteApi.md @@ -6,21 +6,21 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**GraphGSuiteAssociationsList**](GSuiteApi.md#GraphGSuiteAssociationsList) | **Get** /gsuites/{gsuite_id}/associations | List the associations of a G Suite instance [**GraphGSuiteAssociationsPost**](GSuiteApi.md#GraphGSuiteAssociationsPost) | **Post** /gsuites/{gsuite_id}/associations | Manage the associations of a G Suite instance -[**GraphGSuiteTraverseUser**](GSuiteApi.md#GraphGSuiteTraverseUser) | **Get** /gsuites/{gsuite_id}/users | List the Users associated with a G Suite instance -[**GraphGSuiteTraverseUserGroup**](GSuiteApi.md#GraphGSuiteTraverseUserGroup) | **Get** /gsuites/{gsuite_id}/usergroups | List the User Groups associated with a G Suite instance +[**GraphGSuiteTraverseUser**](GSuiteApi.md#GraphGSuiteTraverseUser) | **Get** /gsuites/{gsuite_id}/users | List the Users bound to a G Suite instance +[**GraphGSuiteTraverseUserGroup**](GSuiteApi.md#GraphGSuiteTraverseUserGroup) | **Get** /gsuites/{gsuite_id}/usergroups | List the User Groups bound to a G Suite instance # **GraphGSuiteAssociationsList** > []GraphConnection GraphGSuiteAssociationsList(ctx, gsuiteId, targets, contentType, accept, optional) List the associations of a G Suite instance -This endpoint returns the _direct_ associations of this G Suite instance. A direct association can be a non-homogenous relationship between 2 different objects. for example G Suite and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/gsuites/{gsuite_id}/associations?targets=user ``` +This endpoint returns the _direct_ associations of this G Suite instance. A direct association can be a non-homogenous relationship between 2 different objects. for example G Suite and Users. #### Sample Request ``` curl -X GET 'https://console.jumpcloud.com/api/v2/gsuites/{Gsuite_ID}/associations?targets=user_group \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **gsuiteId** | **string**| ObjectID of the G Suite instance. | **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] @@ -58,13 +58,13 @@ Name | Type | Description | Notes > GraphGSuiteAssociationsPost(ctx, gsuiteId, optional) Manage the associations of a G Suite instance -This endpoint returns the _direct_ associations of this G Suite instance. A direct association can be a non-homogenous relationship between 2 different objects. for example G Suite and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/gsuites/{gsuite_id}/associations ``` +This endpoint returns the _direct_ associations of this G Suite instance. A direct association can be a non-homogenous relationship between 2 different objects. for example G Suite and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/gsuites/{Gsuite_ID}/associations \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user_group\", \"id\": \"{Group_ID}\" }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **gsuiteId** | **string**| ObjectID of the G Suite instance. | **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -93,15 +93,15 @@ Name | Type | Description | Notes # **GraphGSuiteTraverseUser** > []GraphObjectWithPaths GraphGSuiteTraverseUser(ctx, gsuiteId, contentType, accept, optional) -List the Users associated with a G Suite instance +List the Users bound to a G Suite instance -This endpoint will return Users associated with a G Suite instance. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this G Suite instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this G Suite instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/gsuites/{gsuite_id}/users ``` +This endpoint will return all Users bound to a G Suite instance, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this G Suite instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this G Suite instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/gsuites/{Gsuite_ID}/users \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **gsuiteId** | **string**| ObjectID of the G Suite instance. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -135,15 +135,15 @@ Name | Type | Description | Notes # **GraphGSuiteTraverseUserGroup** > []GraphObjectWithPaths GraphGSuiteTraverseUserGroup(ctx, gsuiteId, contentType, accept, optional) -List the User Groups associated with a G Suite instance +List the User Groups bound to a G Suite instance -This endpoint will return User Groups associated with a G Suite instance. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this G Suite instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this G Suite instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/gsuites/{gsuite_id}/usersgroups ``` +This endpoint will return all User Groups bound to an G Suite instance, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this G Suite instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this G Suite instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/gsuites/{GSuite_ID}/usergroups \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **gsuiteId** | **string**| ObjectID of the G Suite instance. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] diff --git a/v2/docs/GraphApi.md b/v2/docs/GraphApi.md index e1b0702..7d24fc2 100644 --- a/v2/docs/GraphApi.md +++ b/v2/docs/GraphApi.md @@ -6,35 +6,35 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**GraphActiveDirectoryAssociationsList**](GraphApi.md#GraphActiveDirectoryAssociationsList) | **Get** /activedirectories/{activedirectory_id}/associations | List the associations of an Active Directory instance [**GraphActiveDirectoryAssociationsPost**](GraphApi.md#GraphActiveDirectoryAssociationsPost) | **Post** /activedirectories/{activedirectory_id}/associations | Manage the associations of an Active Directory instance -[**GraphActiveDirectoryTraverseUserGroup**](GraphApi.md#GraphActiveDirectoryTraverseUserGroup) | **Get** /activedirectories/{activedirectory_id}/usergroups | List the User Groups associated with an Active Directory instance +[**GraphActiveDirectoryTraverseUserGroup**](GraphApi.md#GraphActiveDirectoryTraverseUserGroup) | **Get** /activedirectories/{activedirectory_id}/usergroups | List the User Groups bound to an Active Directory instance [**GraphApplicationAssociationsList**](GraphApi.md#GraphApplicationAssociationsList) | **Get** /applications/{application_id}/associations | List the associations of an Application [**GraphApplicationAssociationsPost**](GraphApi.md#GraphApplicationAssociationsPost) | **Post** /applications/{application_id}/associations | Manage the associations of an Application -[**GraphApplicationTraverseUser**](GraphApi.md#GraphApplicationTraverseUser) | **Get** /applications/{application_id}/users | List the Users associated with an Application -[**GraphApplicationTraverseUserGroup**](GraphApi.md#GraphApplicationTraverseUserGroup) | **Get** /applications/{application_id}/usergroups | List the User Groups associated with an Application +[**GraphApplicationTraverseUser**](GraphApi.md#GraphApplicationTraverseUser) | **Get** /applications/{application_id}/users | List the Users bound to an Application +[**GraphApplicationTraverseUserGroup**](GraphApi.md#GraphApplicationTraverseUserGroup) | **Get** /applications/{application_id}/usergroups | List the User Groups bound to an Application [**GraphCommandAssociationsList**](GraphApi.md#GraphCommandAssociationsList) | **Get** /commands/{command_id}/associations | List the associations of a Command [**GraphCommandAssociationsPost**](GraphApi.md#GraphCommandAssociationsPost) | **Post** /commands/{command_id}/associations | Manage the associations of a Command -[**GraphCommandTraverseSystem**](GraphApi.md#GraphCommandTraverseSystem) | **Get** /commands/{command_id}/systems | List the Systems associated with a Command -[**GraphCommandTraverseSystemGroup**](GraphApi.md#GraphCommandTraverseSystemGroup) | **Get** /commands/{command_id}/systemgroups | List the System Groups associated with a Command +[**GraphCommandTraverseSystem**](GraphApi.md#GraphCommandTraverseSystem) | **Get** /commands/{command_id}/systems | List the Systems bound to a Command +[**GraphCommandTraverseSystemGroup**](GraphApi.md#GraphCommandTraverseSystemGroup) | **Get** /commands/{command_id}/systemgroups | List the System Groups bound to a Command [**GraphGSuiteAssociationsList**](GraphApi.md#GraphGSuiteAssociationsList) | **Get** /gsuites/{gsuite_id}/associations | List the associations of a G Suite instance [**GraphGSuiteAssociationsPost**](GraphApi.md#GraphGSuiteAssociationsPost) | **Post** /gsuites/{gsuite_id}/associations | Manage the associations of a G Suite instance -[**GraphGSuiteTraverseUser**](GraphApi.md#GraphGSuiteTraverseUser) | **Get** /gsuites/{gsuite_id}/users | List the Users associated with a G Suite instance -[**GraphGSuiteTraverseUserGroup**](GraphApi.md#GraphGSuiteTraverseUserGroup) | **Get** /gsuites/{gsuite_id}/usergroups | List the User Groups associated with a G Suite instance +[**GraphGSuiteTraverseUser**](GraphApi.md#GraphGSuiteTraverseUser) | **Get** /gsuites/{gsuite_id}/users | List the Users bound to a G Suite instance +[**GraphGSuiteTraverseUserGroup**](GraphApi.md#GraphGSuiteTraverseUserGroup) | **Get** /gsuites/{gsuite_id}/usergroups | List the User Groups bound to a G Suite instance [**GraphLdapServerAssociationsList**](GraphApi.md#GraphLdapServerAssociationsList) | **Get** /ldapservers/{ldapserver_id}/associations | List the associations of a LDAP Server [**GraphLdapServerAssociationsPost**](GraphApi.md#GraphLdapServerAssociationsPost) | **Post** /ldapservers/{ldapserver_id}/associations | Manage the associations of a LDAP Server -[**GraphLdapServerTraverseUser**](GraphApi.md#GraphLdapServerTraverseUser) | **Get** /ldapservers/{ldapserver_id}/users | List the Users associated with a LDAP Server -[**GraphLdapServerTraverseUserGroup**](GraphApi.md#GraphLdapServerTraverseUserGroup) | **Get** /ldapservers/{ldapserver_id}/usergroups | List the User Groups associated with a LDAP Server +[**GraphLdapServerTraverseUser**](GraphApi.md#GraphLdapServerTraverseUser) | **Get** /ldapservers/{ldapserver_id}/users | List the Users bound to a LDAP Server +[**GraphLdapServerTraverseUserGroup**](GraphApi.md#GraphLdapServerTraverseUserGroup) | **Get** /ldapservers/{ldapserver_id}/usergroups | List the User Groups bound to a LDAP Server [**GraphOffice365AssociationsList**](GraphApi.md#GraphOffice365AssociationsList) | **Get** /office365s/{office365_id}/associations | List the associations of an Office 365 instance [**GraphOffice365AssociationsPost**](GraphApi.md#GraphOffice365AssociationsPost) | **Post** /office365s/{office365_id}/associations | Manage the associations of an Office 365 instance -[**GraphOffice365TraverseUser**](GraphApi.md#GraphOffice365TraverseUser) | **Get** /office365s/{office365_id}/users | List the Users associated with an Office 365 instance -[**GraphOffice365TraverseUserGroup**](GraphApi.md#GraphOffice365TraverseUserGroup) | **Get** /office365s/{office365_id}/usergroups | List the User Groups associated with an Office 365 instance +[**GraphOffice365TraverseUser**](GraphApi.md#GraphOffice365TraverseUser) | **Get** /office365s/{office365_id}/users | List the Users bound to an Office 365 instance +[**GraphOffice365TraverseUserGroup**](GraphApi.md#GraphOffice365TraverseUserGroup) | **Get** /office365s/{office365_id}/usergroups | List the User Groups bound to an Office 365 instance [**GraphPolicyAssociationsList**](GraphApi.md#GraphPolicyAssociationsList) | **Get** /policies/{policy_id}/associations | List the associations of a Policy [**GraphPolicyAssociationsPost**](GraphApi.md#GraphPolicyAssociationsPost) | **Post** /policies/{policy_id}/associations | Manage the associations of a Policy -[**GraphPolicyTraverseSystem**](GraphApi.md#GraphPolicyTraverseSystem) | **Get** /policies/{policy_id}/systems | List the Systems associated with a Policy -[**GraphPolicyTraverseSystemGroup**](GraphApi.md#GraphPolicyTraverseSystemGroup) | **Get** /policies/{policy_id}/systemgroups | List the System Groups associated with a Policy -[**GraphRadiusServerAssociationsList**](GraphApi.md#GraphRadiusServerAssociationsList) | **Get** /radiusservers/{radiusserver_id}/associations | List the associations of a Radius Server -[**GraphRadiusServerAssociationsPost**](GraphApi.md#GraphRadiusServerAssociationsPost) | **Post** /radiusservers/{radiusserver_id}/associations | Manage the associations of a Radius Server -[**GraphRadiusServerTraverseUser**](GraphApi.md#GraphRadiusServerTraverseUser) | **Get** /radiusservers/{radiusserver_id}/users | List the Users associated with a Radius Server -[**GraphRadiusServerTraverseUserGroup**](GraphApi.md#GraphRadiusServerTraverseUserGroup) | **Get** /radiusservers/{radiusserver_id}/usergroups | List the User Groups associated with a Radius Server +[**GraphPolicyTraverseSystem**](GraphApi.md#GraphPolicyTraverseSystem) | **Get** /policies/{policy_id}/systems | List the Systems bound to a Policy +[**GraphPolicyTraverseSystemGroup**](GraphApi.md#GraphPolicyTraverseSystemGroup) | **Get** /policies/{policy_id}/systemgroups | List the System Groups bound to a Policy +[**GraphRadiusServerAssociationsList**](GraphApi.md#GraphRadiusServerAssociationsList) | **Get** /radiusservers/{radiusserver_id}/associations | List the associations of a RADIUS Server +[**GraphRadiusServerAssociationsPost**](GraphApi.md#GraphRadiusServerAssociationsPost) | **Post** /radiusservers/{radiusserver_id}/associations | Manage the associations of a RADIUS Server +[**GraphRadiusServerTraverseUser**](GraphApi.md#GraphRadiusServerTraverseUser) | **Get** /radiusservers/{radiusserver_id}/users | List the Users bound to a RADIUS Server +[**GraphRadiusServerTraverseUserGroup**](GraphApi.md#GraphRadiusServerTraverseUserGroup) | **Get** /radiusservers/{radiusserver_id}/usergroups | List the User Groups bound to a RADIUS Server [**GraphSystemAssociationsList**](GraphApi.md#GraphSystemAssociationsList) | **Get** /systems/{system_id}/associations | List the associations of a System [**GraphSystemAssociationsPost**](GraphApi.md#GraphSystemAssociationsPost) | **Post** /systems/{system_id}/associations | Manage associations of a System [**GraphSystemGroupAssociationsList**](GraphApi.md#GraphSystemGroupAssociationsList) | **Get** /systemgroups/{group_id}/associations | List the associations of a System Group @@ -43,12 +43,15 @@ Method | HTTP request | Description [**GraphSystemGroupMembersList**](GraphApi.md#GraphSystemGroupMembersList) | **Get** /systemgroups/{group_id}/members | List the members of a System Group [**GraphSystemGroupMembersPost**](GraphApi.md#GraphSystemGroupMembersPost) | **Post** /systemgroups/{group_id}/members | Manage the members of a System Group [**GraphSystemGroupMembership**](GraphApi.md#GraphSystemGroupMembership) | **Get** /systemgroups/{group_id}/membership | List the System Group's membership -[**GraphSystemGroupTraversePolicy**](GraphApi.md#GraphSystemGroupTraversePolicy) | **Get** /systemgroups/{group_id}/policies | List the Policies associated with a System Group -[**GraphSystemGroupTraverseUser**](GraphApi.md#GraphSystemGroupTraverseUser) | **Get** /systemgroups/{group_id}/users | List the Users associated with a System Group -[**GraphSystemGroupTraverseUserGroup**](GraphApi.md#GraphSystemGroupTraverseUserGroup) | **Get** /systemgroups/{group_id}/usergroups | List the User Groups associated with a System Group +[**GraphSystemGroupTraverseCommand**](GraphApi.md#GraphSystemGroupTraverseCommand) | **Get** /systemgroups/{group_id}/commands | List the Commands bound to a System Group +[**GraphSystemGroupTraversePolicy**](GraphApi.md#GraphSystemGroupTraversePolicy) | **Get** /systemgroups/{group_id}/policies | List the Policies bound to a System Group +[**GraphSystemGroupTraverseUser**](GraphApi.md#GraphSystemGroupTraverseUser) | **Get** /systemgroups/{group_id}/users | List the Users bound to a System Group +[**GraphSystemGroupTraverseUserGroup**](GraphApi.md#GraphSystemGroupTraverseUserGroup) | **Get** /systemgroups/{group_id}/usergroups | List the User Groups bound to a System Group [**GraphSystemMemberOf**](GraphApi.md#GraphSystemMemberOf) | **Get** /systems/{system_id}/memberof | List the parent Groups of a System -[**GraphSystemTraversePolicy**](GraphApi.md#GraphSystemTraversePolicy) | **Get** /systems/{system_id}/policies | List the Policies associated with a System -[**GraphSystemTraverseUser**](GraphApi.md#GraphSystemTraverseUser) | **Get** /systems/{system_id}/users | List the Users associated with a System +[**GraphSystemTraverseCommand**](GraphApi.md#GraphSystemTraverseCommand) | **Get** /systems/{system_id}/commands | List the Commands bound to a System +[**GraphSystemTraversePolicy**](GraphApi.md#GraphSystemTraversePolicy) | **Get** /systems/{system_id}/policies | List the Policies bound to a System +[**GraphSystemTraverseUser**](GraphApi.md#GraphSystemTraverseUser) | **Get** /systems/{system_id}/users | List the Users bound to a System +[**GraphSystemTraverseUserGroup**](GraphApi.md#GraphSystemTraverseUserGroup) | **Get** /systems/{system_id}/usergroups | List the User Groups bound to a System [**GraphUserAssociationsList**](GraphApi.md#GraphUserAssociationsList) | **Get** /users/{user_id}/associations | List the associations of a User [**GraphUserAssociationsPost**](GraphApi.md#GraphUserAssociationsPost) | **Post** /users/{user_id}/associations | Manage the associations of a User [**GraphUserGroupAssociationsList**](GraphApi.md#GraphUserGroupAssociationsList) | **Get** /usergroups/{group_id}/associations | List the associations of a User Group. @@ -57,36 +60,37 @@ Method | HTTP request | Description [**GraphUserGroupMembersList**](GraphApi.md#GraphUserGroupMembersList) | **Get** /usergroups/{group_id}/members | List the members of a User Group [**GraphUserGroupMembersPost**](GraphApi.md#GraphUserGroupMembersPost) | **Post** /usergroups/{group_id}/members | Manage the members of a User Group [**GraphUserGroupMembership**](GraphApi.md#GraphUserGroupMembership) | **Get** /usergroups/{group_id}/membership | List the User Group's membership -[**GraphUserGroupTraverseActiveDirectory**](GraphApi.md#GraphUserGroupTraverseActiveDirectory) | **Get** /usergroups/{group_id}/activedirectories | List the Active Directories associated with a User Group -[**GraphUserGroupTraverseApplication**](GraphApi.md#GraphUserGroupTraverseApplication) | **Get** /usergroups/{group_id}/applications | List the Applications associated with a User Group -[**GraphUserGroupTraverseDirectory**](GraphApi.md#GraphUserGroupTraverseDirectory) | **Get** /usergroups/{group_id}/directories | List the Directories associated with a User Group -[**GraphUserGroupTraverseGSuite**](GraphApi.md#GraphUserGroupTraverseGSuite) | **Get** /usergroups/{group_id}/gsuites | List the G Suite instances associated with a User Group -[**GraphUserGroupTraverseLdapServer**](GraphApi.md#GraphUserGroupTraverseLdapServer) | **Get** /usergroups/{group_id}/ldapservers | List the LDAP Servers associated with a User Group -[**GraphUserGroupTraverseOffice365**](GraphApi.md#GraphUserGroupTraverseOffice365) | **Get** /usergroups/{group_id}/office365s | List the Office 365 instances associated with a User Group -[**GraphUserGroupTraverseRadiusServer**](GraphApi.md#GraphUserGroupTraverseRadiusServer) | **Get** /usergroups/{group_id}/radiusservers | List the RADIUS Servers associated with a User Group -[**GraphUserGroupTraverseSystem**](GraphApi.md#GraphUserGroupTraverseSystem) | **Get** /usergroups/{group_id}/systems | List the Systems associated with a User Group -[**GraphUserGroupTraverseSystemGroup**](GraphApi.md#GraphUserGroupTraverseSystemGroup) | **Get** /usergroups/{group_id}/systemgroups | List the System Groups associated with User Groups +[**GraphUserGroupTraverseActiveDirectory**](GraphApi.md#GraphUserGroupTraverseActiveDirectory) | **Get** /usergroups/{group_id}/activedirectories | List the Active Directories bound to a User Group +[**GraphUserGroupTraverseApplication**](GraphApi.md#GraphUserGroupTraverseApplication) | **Get** /usergroups/{group_id}/applications | List the Applications bound to a User Group +[**GraphUserGroupTraverseDirectory**](GraphApi.md#GraphUserGroupTraverseDirectory) | **Get** /usergroups/{group_id}/directories | List the Directories bound to a User Group +[**GraphUserGroupTraverseGSuite**](GraphApi.md#GraphUserGroupTraverseGSuite) | **Get** /usergroups/{group_id}/gsuites | List the G Suite instances bound to a User Group +[**GraphUserGroupTraverseLdapServer**](GraphApi.md#GraphUserGroupTraverseLdapServer) | **Get** /usergroups/{group_id}/ldapservers | List the LDAP Servers bound to a User Group +[**GraphUserGroupTraverseOffice365**](GraphApi.md#GraphUserGroupTraverseOffice365) | **Get** /usergroups/{group_id}/office365s | List the Office 365 instances bound to a User Group +[**GraphUserGroupTraverseRadiusServer**](GraphApi.md#GraphUserGroupTraverseRadiusServer) | **Get** /usergroups/{group_id}/radiusservers | List the RADIUS Servers bound to a User Group +[**GraphUserGroupTraverseSystem**](GraphApi.md#GraphUserGroupTraverseSystem) | **Get** /usergroups/{group_id}/systems | List the Systems bound to a User Group +[**GraphUserGroupTraverseSystemGroup**](GraphApi.md#GraphUserGroupTraverseSystemGroup) | **Get** /usergroups/{group_id}/systemgroups | List the System Groups bound to User Groups [**GraphUserMemberOf**](GraphApi.md#GraphUserMemberOf) | **Get** /users/{user_id}/memberof | List the parent Groups of a User -[**GraphUserTraverseApplication**](GraphApi.md#GraphUserTraverseApplication) | **Get** /users/{user_id}/applications | List the Applications associated with a User -[**GraphUserTraverseDirectory**](GraphApi.md#GraphUserTraverseDirectory) | **Get** /users/{user_id}/directories | List the Directories associated with a User -[**GraphUserTraverseGSuite**](GraphApi.md#GraphUserTraverseGSuite) | **Get** /users/{user_id}/gsuites | List the G Suite instances associated with a User -[**GraphUserTraverseLdapServer**](GraphApi.md#GraphUserTraverseLdapServer) | **Get** /users/{user_id}/ldapservers | List the LDAP servers associated with a User -[**GraphUserTraverseOffice365**](GraphApi.md#GraphUserTraverseOffice365) | **Get** /users/{user_id}/office365s | List the Office 365 instances associated with User -[**GraphUserTraverseRadiusServer**](GraphApi.md#GraphUserTraverseRadiusServer) | **Get** /users/{user_id}/radiusservers | List the RADIUS Servers associated with a User -[**GraphUserTraverseSystem**](GraphApi.md#GraphUserTraverseSystem) | **Get** /users/{user_id}/systems | List the Systems associated with a User +[**GraphUserTraverseApplication**](GraphApi.md#GraphUserTraverseApplication) | **Get** /users/{user_id}/applications | List the Applications bound to a User +[**GraphUserTraverseDirectory**](GraphApi.md#GraphUserTraverseDirectory) | **Get** /users/{user_id}/directories | List the Directories bound to a User +[**GraphUserTraverseGSuite**](GraphApi.md#GraphUserTraverseGSuite) | **Get** /users/{user_id}/gsuites | List the G Suite instances bound to a User +[**GraphUserTraverseLdapServer**](GraphApi.md#GraphUserTraverseLdapServer) | **Get** /users/{user_id}/ldapservers | List the LDAP servers bound to a User +[**GraphUserTraverseOffice365**](GraphApi.md#GraphUserTraverseOffice365) | **Get** /users/{user_id}/office365s | List the Office 365 instances bound to a User +[**GraphUserTraverseRadiusServer**](GraphApi.md#GraphUserTraverseRadiusServer) | **Get** /users/{user_id}/radiusservers | List the RADIUS Servers bound to a User +[**GraphUserTraverseSystem**](GraphApi.md#GraphUserTraverseSystem) | **Get** /users/{user_id}/systems | List the Systems bound to a User +[**GraphUserTraverseSystemGroup**](GraphApi.md#GraphUserTraverseSystemGroup) | **Get** /users/{user_id}/systemgroups | List the System Groups bound to a User # **GraphActiveDirectoryAssociationsList** > []GraphConnection GraphActiveDirectoryAssociationsList(ctx, activedirectoryId, targets, contentType, accept, optional) List the associations of an Active Directory instance -This endpoint returns the direct associations of this Active Directory instance. A direct association can be a non-homogenous relationship between 2 different objects. For example Active Directory and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/activedirectories/{activedirectory_id}/associations?targets=user ``` +This endpoint returns the direct associations of this Active Directory instance. A direct association can be a non-homogenous relationship between 2 different objects. For example Active Directory and Users. #### Sample Request ``` curl -X GET 'https://console.jumpcloud.com/api/v2/activedirectories/{ActiveDirectory_ID}/associations?targets=user \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **activedirectoryId** | **string**| | **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] @@ -124,13 +128,13 @@ Name | Type | Description | Notes > GraphActiveDirectoryAssociationsPost(ctx, activedirectoryId, contentType, accept, optional) Manage the associations of an Active Directory instance -This endpoint allows you to manage the _direct_ associations of an Active Directory instance. A direct association can be a non-homogenous relationship between 2 different objects. For example Active Directory and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/activedirectories/{activedirectory_id}/associations ``` +This endpoint allows you to manage the _direct_ associations of an Active Directory instance. A direct association can be a non-homogenous relationship between 2 different objects. For example Active Directory and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/activedirectories/{AD_Instance_ID}/associations \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user\", \"id\": \"{User_ID}\" } ' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **activedirectoryId** | **string**| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -163,15 +167,15 @@ Name | Type | Description | Notes # **GraphActiveDirectoryTraverseUserGroup** > []GraphObjectWithPaths GraphActiveDirectoryTraverseUserGroup(ctx, activedirectoryId, contentType, accept, optional) -List the User Groups associated with an Active Directory instance +List the User Groups bound to an Active Directory instance -This endpoint will return User Groups associated with an Active Directory instance. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Active Directory instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this Active Directory instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/activedirectories/{activedirectory_id}/usersgroups ``` +This endpoint will return all Users Groups bound to an Active Directory instance, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Active Directory instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this Active Directory instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/activedirectories/{ActiveDirectory_ID}/usergroups \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **activedirectoryId** | **string**| ObjectID of the Active Directory instance. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -207,13 +211,13 @@ Name | Type | Description | Notes > []GraphConnection GraphApplicationAssociationsList(ctx, applicationId, targets, contentType, accept, optional) List the associations of an Application -This endpoint will return the _direct_ associations of an Application. A direct association can be a non-homogenous relationship between 2 different objects. for example Applications and User Groups. #### Sample Request ``` https://console.jumpcloud.com/api/v2/applications/{application_id}/associations?targets=user_group ``` +This endpoint will return the _direct_ associations of an Application. A direct association can be a non-homogenous relationship between 2 different objects. for example Applications and User Groups. #### Sample Request ``` curl -X GET 'https://console.jumpcloud.com/api/v2/applications/{Application_ID}/associations?targets=user_group \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **applicationId** | **string**| ObjectID of the Application. | **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] @@ -251,13 +255,13 @@ Name | Type | Description | Notes > GraphApplicationAssociationsPost(ctx, applicationId, contentType, accept, optional) Manage the associations of an Application -This endpoint allows you to manage the _direct_ associations of an Application. A direct association can be a non-homogenous relationship between 2 different objects. for example Application and User Groups. #### Sample Request ``` https://console.jumpcloud.com/api/v2/applications/{application_id}/associations ``` +This endpoint allows you to manage the _direct_ associations of an Application. A direct association can be a non-homogenous relationship between 2 different objects. for example Application and User Groups. #### Sample Request ``` curl -X POST 'https://console.jumpcloud.com/api/v2/applications/{Application_ID}/associations' \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user_group\", \"id\": \"{Group_ID}\" }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **applicationId** | **string**| ObjectID of the Application. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -290,15 +294,15 @@ Name | Type | Description | Notes # **GraphApplicationTraverseUser** > []GraphObjectWithPaths GraphApplicationTraverseUser(ctx, applicationId, contentType, accept, optional) -List the Users associated with an Application +List the Users bound to an Application -This endpoint will return Users associated with an Application. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Application to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this Application. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/applications/{application_id}/users ``` +This endpoint will return all Users bound to an Application, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Application to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this Application. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/applications/{Application_ID}/users \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **applicationId** | **string**| ObjectID of the Application. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -332,15 +336,15 @@ Name | Type | Description | Notes # **GraphApplicationTraverseUserGroup** > []GraphObjectWithPaths GraphApplicationTraverseUserGroup(ctx, applicationId, contentType, accept, optional) -List the User Groups associated with an Application +List the User Groups bound to an Application -This endpoint will return User Groups associated with an Application. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Application to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this Application. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/applications/{application_id}/usergroups ``` +This endpoint will return all Users Groups bound to an Application, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Application to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this Application. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/applications/{Application_ID}/usergroups \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **applicationId** | **string**| ObjectID of the Application. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -376,13 +380,13 @@ Name | Type | Description | Notes > []GraphConnection GraphCommandAssociationsList(ctx, commandId, targets, contentType, accept, optional) List the associations of a Command -This endpoint will return the _direct_ associations of this Command. A direct association can be a non-homogenous relationship between 2 different objects. for example Commands and User Groups. #### Sample Request ``` https://console.jumpcloud.com/api/v2/commands/{command_id}/associations?targets=user_group ``` +This endpoint will return the _direct_ associations of this Command. A direct association can be a non-homogenous relationship between 2 different objects. for example Commands and User Groups. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/commands/{Command_ID}/associations?targets=system_group \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **commandId** | **string**| ObjectID of the Command. | **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] @@ -420,13 +424,13 @@ Name | Type | Description | Notes > GraphCommandAssociationsPost(ctx, commandId, contentType, accept, optional) Manage the associations of a Command -This endpoint will allow you to manage the _direct_ associations of this Command. A direct association can be a non-homogenous relationship between 2 different objects. for example Commands and User Groups. #### Sample Request ``` https://console.jumpcloud.com/api/v2/commands/{command_id}/associations +This endpoint will allow you to manage the _direct_ associations of this Command. A direct association can be a non-homogenous relationship between 2 different objects. for example Commands and User Groups. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/commands/{Command_ID}/associations \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"system_group\", \"id\": \"Group_ID\" }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **commandId** | **string**| ObjectID of the Command. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -459,15 +463,15 @@ Name | Type | Description | Notes # **GraphCommandTraverseSystem** > []GraphObjectWithPaths GraphCommandTraverseSystem(ctx, commandId, contentType, accept, optional) -List the Systems associated with a Command +List the Systems bound to a Command -This endpoint will return Systems associated with a Command. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Command to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this Command. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/commands/{command_id}/systems ``` +This endpoint will return all Systems bound to a Command, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Command to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this Command. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/commands/{Command_ID}/systems \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **commandId** | **string**| ObjectID of the Command. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -501,15 +505,15 @@ Name | Type | Description | Notes # **GraphCommandTraverseSystemGroup** > []GraphObjectWithPaths GraphCommandTraverseSystemGroup(ctx, commandId, contentType, accept, optional) -List the System Groups associated with a Command +List the System Groups bound to a Command -This endpoint will return System Groups associated with a Command. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Command to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this Command. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/commands/{command_id}/systemsgroups ``` +This endpoint will return all System Groups bound to a Command, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Command to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this Command. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/commands/{Command_ID}/systemgroups \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **commandId** | **string**| ObjectID of the Command. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -545,13 +549,13 @@ Name | Type | Description | Notes > []GraphConnection GraphGSuiteAssociationsList(ctx, gsuiteId, targets, contentType, accept, optional) List the associations of a G Suite instance -This endpoint returns the _direct_ associations of this G Suite instance. A direct association can be a non-homogenous relationship between 2 different objects. for example G Suite and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/gsuites/{gsuite_id}/associations?targets=user ``` +This endpoint returns the _direct_ associations of this G Suite instance. A direct association can be a non-homogenous relationship between 2 different objects. for example G Suite and Users. #### Sample Request ``` curl -X GET 'https://console.jumpcloud.com/api/v2/gsuites/{Gsuite_ID}/associations?targets=user_group \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **gsuiteId** | **string**| ObjectID of the G Suite instance. | **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] @@ -589,13 +593,13 @@ Name | Type | Description | Notes > GraphGSuiteAssociationsPost(ctx, gsuiteId, optional) Manage the associations of a G Suite instance -This endpoint returns the _direct_ associations of this G Suite instance. A direct association can be a non-homogenous relationship between 2 different objects. for example G Suite and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/gsuites/{gsuite_id}/associations ``` +This endpoint returns the _direct_ associations of this G Suite instance. A direct association can be a non-homogenous relationship between 2 different objects. for example G Suite and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/gsuites/{Gsuite_ID}/associations \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user_group\", \"id\": \"{Group_ID}\" }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **gsuiteId** | **string**| ObjectID of the G Suite instance. | **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -624,15 +628,15 @@ Name | Type | Description | Notes # **GraphGSuiteTraverseUser** > []GraphObjectWithPaths GraphGSuiteTraverseUser(ctx, gsuiteId, contentType, accept, optional) -List the Users associated with a G Suite instance +List the Users bound to a G Suite instance -This endpoint will return Users associated with a G Suite instance. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this G Suite instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this G Suite instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/gsuites/{gsuite_id}/users ``` +This endpoint will return all Users bound to a G Suite instance, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this G Suite instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this G Suite instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/gsuites/{Gsuite_ID}/users \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **gsuiteId** | **string**| ObjectID of the G Suite instance. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -666,15 +670,15 @@ Name | Type | Description | Notes # **GraphGSuiteTraverseUserGroup** > []GraphObjectWithPaths GraphGSuiteTraverseUserGroup(ctx, gsuiteId, contentType, accept, optional) -List the User Groups associated with a G Suite instance +List the User Groups bound to a G Suite instance -This endpoint will return User Groups associated with a G Suite instance. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this G Suite instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this G Suite instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/gsuites/{gsuite_id}/usersgroups ``` +This endpoint will return all User Groups bound to an G Suite instance, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this G Suite instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this G Suite instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/gsuites/{GSuite_ID}/usergroups \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **gsuiteId** | **string**| ObjectID of the G Suite instance. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -710,13 +714,13 @@ Name | Type | Description | Notes > []GraphConnection GraphLdapServerAssociationsList(ctx, ldapserverId, targets, contentType, accept, optional) List the associations of a LDAP Server -This endpoint returns the _direct_ associations of this LDAP Server. A direct association can be a non-homogenous relationship between 2 different objects. for example LDAP and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/ldapservers/{ldapserver_id}/associations?targets=user ``` +This endpoint returns the _direct_ associations of this LDAP Server. A direct association can be a non-homogenous relationship between 2 different objects. for example LDAP and Users. #### Sample Request ``` curl -X GET 'https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/associations?targets=user_group \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **ldapserverId** | **string**| ObjectID of the LDAP Server. | **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] @@ -754,13 +758,13 @@ Name | Type | Description | Notes > GraphLdapServerAssociationsPost(ctx, ldapserverId, contentType, accept, optional) Manage the associations of a LDAP Server -This endpoint allows you to manage the _direct_ associations of a LDAP Server. A direct association can be a non-homogenous relationship between 2 different objects. for example LDAP and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/ldapservers/{ldapserver_id}/associations ``` +This endpoint allows you to manage the _direct_ associations of a LDAP Server. A direct association can be a non-homogenous relationship between 2 different objects. for example LDAP and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/associations \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user\", \"id\": \"{User_ID}\" }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **ldapserverId** | **string**| ObjectID of the LDAP Server. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -793,15 +797,15 @@ Name | Type | Description | Notes # **GraphLdapServerTraverseUser** > []GraphObjectWithPaths GraphLdapServerTraverseUser(ctx, ldapserverId, contentType, accept, optional) -List the Users associated with a LDAP Server +List the Users bound to a LDAP Server -This endpoint will return Users associated with an LDAP server instance. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this LDAP server instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this LDAP server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/ldapservers/{ldapserver_id}/users ``` +This endpoint will return all Users bound to an LDAP Server, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this LDAP server instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this LDAP server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/users \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **ldapserverId** | **string**| ObjectID of the LDAP Server. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -835,15 +839,15 @@ Name | Type | Description | Notes # **GraphLdapServerTraverseUserGroup** > []GraphObjectWithPaths GraphLdapServerTraverseUserGroup(ctx, ldapserverId, contentType, accept, optional) -List the User Groups associated with a LDAP Server +List the User Groups bound to a LDAP Server -This endpoint will return User Groups associated with a LDAP server instance. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this LDAP server instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this LDAP server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/ldapservers/{ldapserver_id}/usersgroups ``` +This endpoint will return all Users Groups bound to a LDAP Server, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this LDAP server instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this LDAP server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/usergroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **ldapserverId** | **string**| ObjectID of the LDAP Server. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -879,13 +883,13 @@ Name | Type | Description | Notes > []GraphConnection GraphOffice365AssociationsList(ctx, office365Id, targets, contentType, accept, optional) List the associations of an Office 365 instance -This endpoint returns _direct_ associations of an Office 365 instance. A direct association can be a non-homogenous relationship between 2 different objects. for example Office 365 and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/office365s/{office365_id}/associations?targets=user ``` +This endpoint returns _direct_ associations of an Office 365 instance. A direct association can be a non-homogenous relationship between 2 different objects. for example Office 365 and Users. #### Sample Request ``` curl -X GET 'https://console.jumpcloud.com/api/v2/office365s/{O365_ID}/associations?targets=user_group \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **office365Id** | **string**| ObjectID of the Office 365 instance. | **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] @@ -923,13 +927,13 @@ Name | Type | Description | Notes > GraphOffice365AssociationsPost(ctx, office365Id, contentType, accept, optional) Manage the associations of an Office 365 instance -This endpoint allows you to manage the _direct_ associations of a Office 365 instance. A direct association can be a non-homogenous relationship between 2 different objects. for example Office 365 and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/office365s/{office365_id}/associations ``` +This endpoint allows you to manage the _direct_ associations of a Office 365 instance. A direct association can be a non-homogenous relationship between 2 different objects. for example Office 365 and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/office365s/{O365_ID}/associations \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user_group\", \"id\": \"{Group_ID}\" }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **office365Id** | **string**| ObjectID of the Office 365 instance. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -962,15 +966,15 @@ Name | Type | Description | Notes # **GraphOffice365TraverseUser** > []GraphObjectWithPaths GraphOffice365TraverseUser(ctx, office365Id, contentType, accept, optional) -List the Users associated with an Office 365 instance +List the Users bound to an Office 365 instance -This endpoint will return Users associated with an Office 365 instance. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Office 365 instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this Office 365 instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/office365s/{office365_id}/users ``` +This endpoint will return all Users bound to an Office 365 instance, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Office 365 instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this Office 365 instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/office365s/{O365_ID}/users \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **office365Id** | **string**| ObjectID of the Office 365 suite. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -1004,15 +1008,15 @@ Name | Type | Description | Notes # **GraphOffice365TraverseUserGroup** > []GraphObjectWithPaths GraphOffice365TraverseUserGroup(ctx, office365Id, contentType, accept, optional) -List the User Groups associated with an Office 365 instance +List the User Groups bound to an Office 365 instance -This endpoint will return User Groups associated with an Office 365 instance. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Office 365 instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this Office 365 instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/office365s/{office365_id}/usergroups ``` +This endpoint will return all Users Groups bound to an Office 365 instance, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Office 365 instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this Office 365 instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/office365s/{O365_ID/usergroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **office365Id** | **string**| ObjectID of the Office 365 suite. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -1048,14 +1052,14 @@ Name | Type | Description | Notes > []GraphConnection GraphPolicyAssociationsList(ctx, policyId, targets, contentType, accept, optional) List the associations of a Policy -This endpoint returns the _direct_ associations of a Policy. A direct association can be a non-homogenous relationship between 2 different objects. for example Policies and Systems. #### Sample Request ``` https://console.jumpcloud.com/api/v2/policies/{policy_id}/associations?targets=system ``` +This endpoint returns the _direct_ associations of a Policy. A direct association can be a non-homogenous relationship between 2 different objects. for example Policies and Systems. #### Sample Request ``` curl -X GET 'https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/associations?targets=system_group \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **policyId** | **string**| ObjectID of the Policy. | + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **policyId** | **string**| | **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -1066,7 +1070,7 @@ Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **policyId** | **string**| ObjectID of the Policy. | + **policyId** | **string**| | **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -1092,14 +1096,14 @@ Name | Type | Description | Notes > GraphPolicyAssociationsPost(ctx, policyId, contentType, accept, optional) Manage the associations of a Policy -This endpoint allows you to manage the _direct_ associations of a Policy. A direct association can be a non-homogenous relationship between 2 different objects. for example Policies and Systems. #### Sample Request ``` https://console.jumpcloud.com/api/v2/policies/{policy_id}/associations ``` +This endpoint allows you to manage the _direct_ associations of a Policy. A direct association can be a non-homogenous relationship between 2 different objects. for example Policies and Systems. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/associations/ \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"system_group\", \"id\": \"{Group_ID}\" }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **policyId** | **string**| ObjectID of the Policy. | + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **policyId** | **string**| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -1109,7 +1113,7 @@ Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **policyId** | **string**| ObjectID of the Policy. | + **policyId** | **string**| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] **body** | [**GraphManagementReq**](GraphManagementReq.md)| | @@ -1131,15 +1135,15 @@ Name | Type | Description | Notes # **GraphPolicyTraverseSystem** > []GraphObjectWithPaths GraphPolicyTraverseSystem(ctx, policyId, contentType, accept, optional) -List the Systems associated with a Policy +List the Systems bound to a Policy -This endpoint will return Systems associated with a Policy. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Policy to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this Policy. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/policies/{policy_id}/systems ``` +This endpoint will return all Systems bound to a Policy, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Policy to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this Policy. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/systems \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **policyId** | **string**| ObjectID of the Command. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -1173,15 +1177,15 @@ Name | Type | Description | Notes # **GraphPolicyTraverseSystemGroup** > []GraphObjectWithPaths GraphPolicyTraverseSystemGroup(ctx, policyId, contentType, accept, optional) -List the System Groups associated with a Policy +List the System Groups bound to a Policy -This endpoint will return System Groups associated with a Policy. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Policy to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this Policy. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/policies/{policy_id}/systemsgroups ``` +This endpoint will return all Systems Groups bound to a Policy, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Policy to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this Policy. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/systemgroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **policyId** | **string**| ObjectID of the Command. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -1215,15 +1219,15 @@ Name | Type | Description | Notes # **GraphRadiusServerAssociationsList** > []GraphConnection GraphRadiusServerAssociationsList(ctx, radiusserverId, targets, contentType, accept, optional) -List the associations of a Radius Server +List the associations of a RADIUS Server -This endpoint returns the _direct_ associations of a Radius Server. A direct association can be a non-homogenous relationship between 2 different objects. for example Radius Servers and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/radiusservers/{radiusserver_id}/associations?targets=user ``` +This endpoint returns the _direct_ associations of a Radius Server. A direct association can be a non-homogenous relationship between 2 different objects. for example Radius Servers and Users. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/radiusservers/{RADIUS_ID}/associations?targets=user_group \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **radiusserverId** | **string**| ObjectID of the Radius Server. | **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] @@ -1259,15 +1263,15 @@ Name | Type | Description | Notes # **GraphRadiusServerAssociationsPost** > GraphRadiusServerAssociationsPost(ctx, radiusserverId, contentType, accept, optional) -Manage the associations of a Radius Server +Manage the associations of a RADIUS Server -This endpoint allows you to manage the _direct_ associations of a Radius Server. A direct association can be a non-homogenous relationship between 2 different objects. for example Radius Servers and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/radiusservers/{radiusserver_id}/associations +This endpoint allows you to manage the _direct_ associations of a Radius Server. A direct association can be a non-homogenous relationship between 2 different objects. for example Radius Servers and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/radiusservers/{RADIUS_ID}/associations \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"type\":\"user\", \"id\":\"{USER_ID}\", \"op\":\"add\" }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **radiusserverId** | **string**| ObjectID of the Radius Server. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -1300,15 +1304,15 @@ Name | Type | Description | Notes # **GraphRadiusServerTraverseUser** > []GraphObjectWithPaths GraphRadiusServerTraverseUser(ctx, radiusserverId, contentType, accept, optional) -List the Users associated with a Radius Server +List the Users bound to a RADIUS Server -This endpoint will return Users associated with a RADIUS server instance. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this RADIUS server instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this RADIUS server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/radiusservers/{radiusserver_id}/users +This endpoint will return all Users bound to a RADIUS Server, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this RADIUS server instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this RADIUS server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/users \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **radiusserverId** | **string**| ObjectID of the Radius Server. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -1342,15 +1346,15 @@ Name | Type | Description | Notes # **GraphRadiusServerTraverseUserGroup** > []GraphObjectWithPaths GraphRadiusServerTraverseUserGroup(ctx, radiusserverId, contentType, accept, optional) -List the User Groups associated with a Radius Server +List the User Groups bound to a RADIUS Server -This endpoint will return User Groups associated with a RADIUS server instance. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this RADIUS server instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this RADIUS server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/radiusservers/{radiusserver_id}/usergroups +This endpoint will return all Users Groups bound to a RADIUS Server, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this RADIUS server instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this RADIUS server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/radiusservers/{RADIUS_ID}/usergroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **radiusserverId** | **string**| ObjectID of the Radius Server. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -1383,20 +1387,20 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **GraphSystemAssociationsList** -> []GraphConnection GraphSystemAssociationsList(ctx, systemId, targets, contentType, accept, optional) +> []GraphConnection GraphSystemAssociationsList(ctx, systemId, contentType, accept, targets, optional) List the associations of a System -This endpoint returns the _direct_ associations of a System. A direct association can be a non-homogenous relationship between 2 different objects. for example Systems and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systems/{system_id}/associations?targets=user ``` +This endpoint returns the _direct_ associations of a System. A direct association can be a non-homogenous relationship between 2 different objects. for example Systems and Users. #### Sample Request ``` 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}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **systemId** | **string**| ObjectID of the System. | - **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **targets** | [**[]string**](string.md)| | **optional** | **map[string]interface{}** | optional parameters | nil if no parameters ### Optional Parameters @@ -1405,9 +1409,9 @@ Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **systemId** | **string**| ObjectID of the System. | - **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **targets** | [**[]string**](string.md)| | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] **date** | **string**| Current date header for the System Context API | @@ -1432,13 +1436,13 @@ Name | Type | Description | Notes > GraphSystemAssociationsPost(ctx, systemId, contentType, accept, optional) Manage associations of a System -This endpoint allows you to manage the _direct_ associations of a System. A direct association can be a non-homogenous relationship between 2 different objects. for example Systems and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systems/{system_id}/associations ``` +This endpoint allows you to manage the _direct_ associations of a System. A direct association can be a non-homogenous relationship between 2 different objects. for example Systems and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/systems/{System_ID}/associations \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user\", \"id\": \"{User_ID}\" }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **systemId** | **string**| ObjectID of the System. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -1452,7 +1456,7 @@ Name | Type | Description | Notes **systemId** | **string**| ObjectID of the System. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] - **body** | [**GraphManagementReq**](GraphManagementReq.md)| | + **body** | [**SystemGraphManagementReq**](SystemGraphManagementReq.md)| | **date** | **string**| Current date header for the System Context API | **authorization** | **string**| Authorization header for the System Context API | @@ -1472,20 +1476,20 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **GraphSystemGroupAssociationsList** -> []GraphConnection GraphSystemGroupAssociationsList(ctx, groupId, targets, contentType, accept, optional) +> []GraphConnection GraphSystemGroupAssociationsList(ctx, groupId, contentType, accept, targets, optional) List the associations of a System Group -This endpoint returns the _direct_ associations of a System Group. A direct association can be a non-homogenous relationship between 2 different objects. for example System Groups and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/associations?targets=user ``` +This endpoint returns the _direct_ associations of a System Group. A direct association can be a non-homogenous relationship between 2 different objects. for example System Groups and Users. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/associations?targets=user \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the System Group. | - **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **targets** | [**[]string**](string.md)| | **optional** | **map[string]interface{}** | optional parameters | nil if no parameters ### Optional Parameters @@ -1494,9 +1498,9 @@ Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **groupId** | **string**| ObjectID of the System Group. | - **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **targets** | [**[]string**](string.md)| | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] @@ -1519,13 +1523,13 @@ Name | Type | Description | Notes > GraphSystemGroupAssociationsPost(ctx, groupId, contentType, accept, optional) Manage the associations of a System Group -This endpoint allows you to manage the _direct_ associations of a System Group. A direct association can be a non-homogenous relationship between 2 different objects. for example System Groups and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/associations ``` +This endpoint allows you to manage the _direct_ associations of a System Group. A direct association can be a non-homogenous relationship between 2 different objects. for example System Groups and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/associations \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user\", \"id\": \"{UserID}\" }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the System Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -1566,7 +1570,7 @@ This endpoint returns all System Groups a System Group is a member of. This end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the System Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -1580,8 +1584,10 @@ Name | Type | Description | Notes **groupId** | **string**| ObjectID of the System Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | ### Return type @@ -1602,13 +1608,13 @@ Name | Type | Description | Notes > []GraphConnection GraphSystemGroupMembersList(ctx, groupId, contentType, accept, optional) List the members of a System Group -This endpoint returns the system members of a System Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/members ``` +This endpoint returns the system members of a System Group. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID}/members \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the System Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -1644,13 +1650,13 @@ Name | Type | Description | Notes > GraphSystemGroupMembersPost(ctx, groupId, contentType, accept, optional) Manage the members of a System Group -This endpoint allows you to manage the system members of a System Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/members ``` +This endpoint allows you to manage the system members of a System Group. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID}/members \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY' \\ -d '{ \"op\": \"add\", \"type\": \"system\", \"id\": \"{System_ID\" }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the System Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -1687,13 +1693,57 @@ Name | Type | Description | Notes > []GraphObjectWithPaths GraphSystemGroupMembership(ctx, groupId, contentType, accept, optional) List the System Group's membership -This endpoint returns all Systems that are a member of this System Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/membership ``` +This endpoint returns all Systems that are a member of this System Group. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID/membership \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the System Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the System Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | + +### Return type + +[**[]GraphObjectWithPaths**](GraphObjectWithPaths.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphSystemGroupTraverseCommand** +> []GraphObjectWithPaths GraphSystemGroupTraverseCommand(ctx, groupId, contentType, accept, optional) +List the Commands bound to a System Group + +This endpoint will return all Commands bound to a System Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System Group to the corresponding Command; this array represents all grouping and/or associations that would have to be removed to deprovision the Command from this System Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/commands \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the System Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -1727,15 +1777,15 @@ Name | Type | Description | Notes # **GraphSystemGroupTraversePolicy** > []GraphObjectWithPaths GraphSystemGroupTraversePolicy(ctx, groupId, contentType, accept, optional) -List the Policies associated with a System Group +List the Policies bound to a System Group -This endpoint will return Policies associated with a System Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this System Group to the corresponding Policy; this array represents all grouping and/or associations that would have to be removed to deprovision the Policy from this System Group. See `/members` and `/associations` endpoints to manage those collections. This endpoint is not public yet as we haven't finished the code. +This endpoint will return all Policies bound to a System Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System Group to the corresponding Policy; this array represents all grouping and/or associations that would have to be removed to deprovision the Policy from this System Group. See `/members` and `/associations` endpoints to manage those collections. This endpoint is not public yet as we haven't finished the code. ##### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/policies \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the System Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -1769,15 +1819,15 @@ Name | Type | Description | Notes # **GraphSystemGroupTraverseUser** > []GraphObjectWithPaths GraphSystemGroupTraverseUser(ctx, groupId, contentType, accept, optional) -List the Users associated with a System Group +List the Users bound to a System Group -This endpoint will return Users associated with a System Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this System Group to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this System Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/users ``` +This endpoint will return all Users bound to a System Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System Group to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this System Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/users \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the System Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -1811,15 +1861,15 @@ Name | Type | Description | Notes # **GraphSystemGroupTraverseUserGroup** > []GraphObjectWithPaths GraphSystemGroupTraverseUserGroup(ctx, groupId, contentType, accept, optional) -List the User Groups associated with a System Group +List the User Groups bound to a System Group -This endpoint will return User Groups associated with a System Group. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this System Group to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this System Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/usergroups ``` +This endpoint will return all User Groups bound to a System Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System Group to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this System Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/usergroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the System Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -1855,13 +1905,13 @@ Name | Type | Description | Notes > []GraphObjectWithPaths GraphSystemMemberOf(ctx, systemId, contentType, accept, optional) List the parent Groups of a System -This endpoint returns all the System Groups a System is a member of. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systems/{system_id}/memberof ``` +This endpoint returns all the System Groups a System is a member of. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systems/{System_ID}/memberof \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **systemId** | **string**| ObjectID of the System. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -1875,10 +1925,54 @@ Name | Type | Description | Notes **systemId** | **string**| ObjectID of the System. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] **date** | **string**| Current date header for the System Context API | **authorization** | **string**| Authorization header for the System Context API | + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | + +### Return type + +[**[]GraphObjectWithPaths**](GraphObjectWithPaths.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphSystemTraverseCommand** +> []GraphObjectWithPaths GraphSystemTraverseCommand(ctx, systemId, contentType, accept, optional) +List the Commands bound to a System + +This endpoint will return all Commands bound to a System, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System to the corresponding Command; this array represents all grouping and/or associations that would have to be removed to deprovision the Command from this System. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systems/{System_ID}/commands \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **systemId** | **string**| ObjectID of the System. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **string**| ObjectID of the System. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] ### Return type @@ -1897,15 +1991,15 @@ Name | Type | Description | Notes # **GraphSystemTraversePolicy** > []GraphObjectWithPaths GraphSystemTraversePolicy(ctx, systemId, contentType, accept, optional) -List the Policies associated with a System +List the Policies bound to a System -This endpoint will return Policies associated with a System. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this System to the corresponding Policy; this array represents all grouping and/or associations that would have to be removed to deprovision the Policy from this System. See `/members` and `/associations` endpoints to manage those collections. This endpoint is not yet public as we have finish the code. +This endpoint will return all Policies bound to a System, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System to the corresponding Policy; this array represents all grouping and/or associations that would have to be removed to deprovision the Policy from this System. See `/members` and `/associations` endpoints to manage those collections. This endpoint is not yet public as we have finish the code. ##### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/{System_ID}/policies \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **systemId** | **string**| ObjectID of the System. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -1939,15 +2033,59 @@ Name | Type | Description | Notes # **GraphSystemTraverseUser** > []GraphObjectWithPaths GraphSystemTraverseUser(ctx, systemId, contentType, accept, optional) -List the Users associated with a System +List the Users bound to a System + +This endpoint will return all Users bound to a System, either directly or indirectly essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this System. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systems/{System_ID}/users \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` -This endpoint will return Users associated with a System. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this System to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this System. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systems/{system_id}/users ``` +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **systemId** | **string**| ObjectID of the System. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **string**| ObjectID of the System. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + **date** | **string**| Current date header for the System Context API | + **authorization** | **string**| Authorization header for the System Context API | + +### Return type + +[**[]GraphObjectWithPaths**](GraphObjectWithPaths.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphSystemTraverseUserGroup** +> []GraphObjectWithPaths GraphSystemTraverseUserGroup(ctx, systemId, contentType, accept, optional) +List the User Groups bound to a System + +This endpoint will return all User Groups bound to a System, either directly or indirectly essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this System. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systems/{System_ID}/usergroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **systemId** | **string**| ObjectID of the System. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -1982,7 +2120,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **GraphUserAssociationsList** -> []GraphConnection GraphUserAssociationsList(ctx, userId, targets, contentType, accept, optional) +> []GraphConnection GraphUserAssociationsList(ctx, userId, contentType, accept, targets, optional) List the associations of a User This endpoint returns the _direct_ associations of a User. A direct association can be a non-homogenous relationship between 2 different objects. for example Users and Systems. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/associations?targets=user_group ``` @@ -1991,11 +2129,11 @@ This endpoint returns the _direct_ associations of a User. A direct association Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **userId** | **string**| ObjectID of the User. | - **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **targets** | [**[]string**](string.md)| | **optional** | **map[string]interface{}** | optional parameters | nil if no parameters ### Optional Parameters @@ -2004,9 +2142,9 @@ Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **userId** | **string**| ObjectID of the User. | - **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **targets** | [**[]string**](string.md)| | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] @@ -2035,7 +2173,7 @@ This endpoint allows you to manage the _direct_ associations of a User. A direc Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **userId** | **string**| ObjectID of the User. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -2049,7 +2187,7 @@ Name | Type | Description | Notes **userId** | **string**| ObjectID of the User. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] - **body** | [**GraphManagementReq**](GraphManagementReq.md)| | + **body** | [**UserGraphManagementReq**](UserGraphManagementReq.md)| | ### Return type @@ -2067,7 +2205,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **GraphUserGroupAssociationsList** -> []GraphConnection GraphUserGroupAssociationsList(ctx, groupId, targets, contentType, accept, optional) +> []GraphConnection GraphUserGroupAssociationsList(ctx, groupId, contentType, accept, targets, optional) List the associations of a User Group. This endpoint returns the _direct_ associations of this User Group. A direct association can be a non-homogenous relationship between 2 different objects. for example User Groups and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/associations?targets=user ``` @@ -2076,11 +2214,11 @@ This endpoint returns the _direct_ associations of this User Group. A direct as Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | - **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **targets** | [**[]string**](string.md)| | **optional** | **map[string]interface{}** | optional parameters | nil if no parameters ### Optional Parameters @@ -2089,9 +2227,9 @@ Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **groupId** | **string**| ObjectID of the User Group. | - **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **targets** | [**[]string**](string.md)| | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] @@ -2120,7 +2258,7 @@ This endpoint manages the _direct_ associations of this User Group. A direct as Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -2161,7 +2299,7 @@ This endpoint returns all User Groups a User Group is a member of. #### Sample Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -2175,8 +2313,10 @@ Name | Type | Description | Notes **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | ### Return type @@ -2203,7 +2343,7 @@ This endpoint returns the user members of a User Group. #### Sample Request ``` Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -2245,7 +2385,7 @@ This endpoint allows you to manage the user members of a User Group. #### Sampl Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -2286,7 +2426,7 @@ This endpoint returns all users members that are a member of this User Group. # Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -2300,8 +2440,10 @@ Name | Type | Description | Notes **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | ### Return type @@ -2320,15 +2462,15 @@ Name | Type | Description | Notes # **GraphUserGroupTraverseActiveDirectory** > []GraphObjectWithPaths GraphUserGroupTraverseActiveDirectory(ctx, groupId, contentType, accept, optional) -List the Active Directories associated with a User Group +List the Active Directories bound to a User Group -This endpoint will return the Active Directories associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding Active Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Active Directory from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/activedirectories ``` +This endpoint will return all Active Directory Instances bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding Active Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Active Directory from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/activedirectories ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -2362,15 +2504,15 @@ Name | Type | Description | Notes # **GraphUserGroupTraverseApplication** > []GraphObjectWithPaths GraphUserGroupTraverseApplication(ctx, groupId, contentType, accept, optional) -List the Applications associated with a User Group +List the Applications bound to a User Group -This endpoint will return Applications associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding Application; this array represents all grouping and/or associations that would have to be removed to deprovision the Application from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/applications ``` +This endpoint will return all Applications bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding Application; this array represents all grouping and/or associations that would have to be removed to deprovision the Application from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/applications ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -2404,15 +2546,15 @@ Name | Type | Description | Notes # **GraphUserGroupTraverseDirectory** > []GraphObjectWithPaths GraphUserGroupTraverseDirectory(ctx, groupId, contentType, accept, optional) -List the Directories associated with a User Group +List the Directories bound to a User Group -This endpoint will return Directories associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Directories from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/directories ``` +This endpoint will return all Directories bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Directories from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/directories ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -2446,15 +2588,15 @@ Name | Type | Description | Notes # **GraphUserGroupTraverseGSuite** > []GraphObjectWithPaths GraphUserGroupTraverseGSuite(ctx, groupId, contentType, accept, optional) -List the G Suite instances associated with a User Group +List the G Suite instances bound to a User Group -This endpoint will return the G Suite instances associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding G Suite instance; this array represents all grouping and/or associations that would have to be removed to deprovision the G Suite instance from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/gsuites ``` +This endpoint will return all Gsuite Instances bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding G Suite instance; this array represents all grouping and/or associations that would have to be removed to deprovision the G Suite instance from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/gsuites ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -2488,15 +2630,15 @@ Name | Type | Description | Notes # **GraphUserGroupTraverseLdapServer** > []GraphObjectWithPaths GraphUserGroupTraverseLdapServer(ctx, groupId, contentType, accept, optional) -List the LDAP Servers associated with a User Group +List the LDAP Servers bound to a User Group -This endpoint will return the LDAP Servers associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding LDAP Server; this array represents all grouping and/or associations that would have to be removed to deprovision the LDAP Server from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/ldapservers ``` +This endpoint will return all LDAP Servers bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding LDAP Server; this array represents all grouping and/or associations that would have to be removed to deprovision the LDAP Server from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/ldapservers ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -2530,15 +2672,15 @@ Name | Type | Description | Notes # **GraphUserGroupTraverseOffice365** > []GraphObjectWithPaths GraphUserGroupTraverseOffice365(ctx, groupId, contentType, accept, optional) -List the Office 365 instances associated with a User Group +List the Office 365 instances bound to a User Group -This endpoint will return the Office 365 instances associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding Office 365 instance; this array represents all grouping and/or associations that would have to be removed to deprovision the Office 365 instance from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/office365s ``` +This endpoint will return all Office 365 instances bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding Office 365 instance; this array represents all grouping and/or associations that would have to be removed to deprovision the Office 365 instance from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/office365s ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -2572,15 +2714,15 @@ Name | Type | Description | Notes # **GraphUserGroupTraverseRadiusServer** > []GraphObjectWithPaths GraphUserGroupTraverseRadiusServer(ctx, groupId, contentType, accept, optional) -List the RADIUS Servers associated with a User Group +List the RADIUS Servers bound to a User Group -This endpoint will return a RADIUS Servers associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding RADIUS Server; this array represents all grouping and/or associations that would have to be removed to deprovision the RADIUS Server from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/radiusservers ``` +This endpoint will return all RADIUS servers bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding RADIUS Server; this array represents all grouping and/or associations that would have to be removed to deprovision the RADIUS Server from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/radiusservers ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -2614,15 +2756,15 @@ Name | Type | Description | Notes # **GraphUserGroupTraverseSystem** > []GraphObjectWithPaths GraphUserGroupTraverseSystem(ctx, groupId, contentType, accept, optional) -List the Systems associated with a User Group +List the Systems bound to a User Group -This endpoint will return Systems associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/systems ``` +This endpoint will return all Systems bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/systems ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -2656,15 +2798,15 @@ Name | Type | Description | Notes # **GraphUserGroupTraverseSystemGroup** > []GraphObjectWithPaths GraphUserGroupTraverseSystemGroup(ctx, groupId, contentType, accept, optional) -List the System Groups associated with User Groups +List the System Groups bound to User Groups -This endpoint will return System Groups associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/systemsgroups ``` +This endpoint will return all System Groups bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/systemsgroups ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -2706,7 +2848,7 @@ This endpoint returns all the User Groups a User is a member of. #### Sample Re Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **userId** | **string**| ObjectID of the User. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -2720,8 +2862,10 @@ Name | Type | Description | Notes **userId** | **string**| ObjectID of the User. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | ### Return type @@ -2740,15 +2884,15 @@ Name | Type | Description | Notes # **GraphUserTraverseApplication** > []GraphObjectWithPaths GraphUserTraverseApplication(ctx, userId, contentType, accept, optional) -List the Applications associated with a User +List the Applications bound to a User -This endpoint will return Applications associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding Application; this array represents all grouping and/or associations that would have to be removed to deprovision the Application from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/applications ``` +This endpoint will return all Applications bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding Application; this array represents all grouping and/or associations that would have to be removed to deprovision the Application from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/applications ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **userId** | **string**| ObjectID of the User. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -2782,15 +2926,15 @@ Name | Type | Description | Notes # **GraphUserTraverseDirectory** > []GraphObjectWithPaths GraphUserTraverseDirectory(ctx, userId, contentType, accept, optional) -List the Directories associated with a User +List the Directories bound to a User -This endpoint will return Directories associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Directory from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/directories ``` +This endpoint will return all Directories bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Directory from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/directories ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **userId** | **string**| ObjectID of the User. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -2824,15 +2968,15 @@ Name | Type | Description | Notes # **GraphUserTraverseGSuite** > []GraphObjectWithPaths GraphUserTraverseGSuite(ctx, userId, contentType, accept, optional) -List the G Suite instances associated with a User +List the G Suite instances bound to a User -This endpoint will return G Suite instances associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding G Suite instance; this array represents all grouping and/or associations that would have to be removed to deprovision the G Suite instance from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/gsuites ``` +This endpoint will return all G-Suite Instances bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding G Suite instance; this array represents all grouping and/or associations that would have to be removed to deprovision the G Suite instance from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/gsuites ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **userId** | **string**| ObjectID of the User. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -2866,15 +3010,15 @@ Name | Type | Description | Notes # **GraphUserTraverseLdapServer** > []GraphObjectWithPaths GraphUserTraverseLdapServer(ctx, userId, contentType, accept, optional) -List the LDAP servers associated with a User +List the LDAP servers bound to a User -This endpoint will return LDAP Servers associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding LDAP Server; this array represents all grouping and/or associations that would have to be removed to deprovision the LDAP Server from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/ldapservers ``` +This endpoint will return all LDAP Servers bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding LDAP Server; this array represents all grouping and/or associations that would have to be removed to deprovision the LDAP Server from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/ldapservers ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **userId** | **string**| ObjectID of the User. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -2908,15 +3052,15 @@ Name | Type | Description | Notes # **GraphUserTraverseOffice365** > []GraphObjectWithPaths GraphUserTraverseOffice365(ctx, userId, contentType, accept, optional) -List the Office 365 instances associated with User +List the Office 365 instances bound to a User -This endpoint will return Office 365 instances associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding Office 365 instance; this array represents all grouping and/or associations that would have to be removed to deprovision the Office 365 instance from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/office365s ``` +This endpoint will return all Office 365 Instances bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding Office 365 instance; this array represents all grouping and/or associations that would have to be removed to deprovision the Office 365 instance from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/office365s ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **userId** | **string**| ObjectID of the User. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -2950,15 +3094,15 @@ Name | Type | Description | Notes # **GraphUserTraverseRadiusServer** > []GraphObjectWithPaths GraphUserTraverseRadiusServer(ctx, userId, contentType, accept, optional) -List the RADIUS Servers associated with a User +List the RADIUS Servers bound to a User -This endpoint will return RADIUS Servers associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding RADIUS Server; this array represents all grouping and/or associations that would have to be removed to deprovision the RADIUS Server from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/radiusservers ``` +This endpoint will return all RADIUS Servers bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding RADIUS Server; this array represents all grouping and/or associations that would have to be removed to deprovision the RADIUS Server from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/radiusservers ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **userId** | **string**| ObjectID of the User. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -2992,15 +3136,57 @@ Name | Type | Description | Notes # **GraphUserTraverseSystem** > []GraphObjectWithPaths GraphUserTraverseSystem(ctx, userId, contentType, accept, optional) -List the Systems associated with a User +List the Systems bound to a User + +This endpoint will return all Systems bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/systems ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **userId** | **string**| ObjectID of the User. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **string**| ObjectID of the User. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + +### Return type + +[**[]GraphObjectWithPaths**](GraphObjectWithPaths.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphUserTraverseSystemGroup** +> []GraphObjectWithPaths GraphUserTraverseSystemGroup(ctx, userId, contentType, accept, optional) +List the System Groups bound to a User -This endpoint will return Systems associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/systems ``` +This endpoint will return all System Groups bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/systemgroups ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **userId** | **string**| ObjectID of the User. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] diff --git a/v2/docs/GroupsApi.md b/v2/docs/GroupsApi.md index fe4d921..1694fca 100644 --- a/v2/docs/GroupsApi.md +++ b/v2/docs/GroupsApi.md @@ -11,13 +11,13 @@ Method | HTTP request | Description > []Group GroupsList(ctx, contentType, accept, optional) List All Groups -This endpoint returns all Groups that exist in your organization. #### Available filter fields: - `name` - `disabled` - `type` #### Sample Request ``` https://console.jumpcloud.com/api/v2/groups ``` +This endpoint returns all Groups that exist in your organization. #### Available filter fields: - `name` - `disabled` - `type` #### Sample Request ``` curl -X GET \\ https://console.jumpcloud.com/api/v2/groups \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -29,11 +29,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] - **fields** | **string**| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | [default to ] - **filter** | **string**| Supported operators are: eq, ne, gt, ge, lt, le, between, search | [default to ] + **fields** | [**[]string**](string.md)| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] - **sort** | **string**| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | [default to ] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | ### Return type diff --git a/v2/docs/JobDetails.md b/v2/docs/JobDetails.md new file mode 100644 index 0000000..f8e72df --- /dev/null +++ b/v2/docs/JobDetails.md @@ -0,0 +1,13 @@ +# JobDetails + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | **string** | | [optional] [default to null] +**TotalWorkCount** | **int32** | | [optional] [default to null] +**WorkCompletedCount** | **int32** | | [optional] [default to null] +**Meta** | [***interface{}**](interface{}.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/v2/docs/WorkdaysOauth.md b/v2/docs/JobId.md similarity index 80% rename from v2/docs/WorkdaysOauth.md rename to v2/docs/JobId.md index ccf2766..93daa59 100644 --- a/v2/docs/WorkdaysOauth.md +++ b/v2/docs/JobId.md @@ -1,9 +1,9 @@ -# WorkdaysOauth +# JobId ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Code** | **string** | | [default to null] +**JobId** | **string** | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/v2/docs/JobWorkresult.md b/v2/docs/JobWorkresult.md new file mode 100644 index 0000000..33406bb --- /dev/null +++ b/v2/docs/JobWorkresult.md @@ -0,0 +1,12 @@ +# JobWorkresult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | **string** | | [optional] [default to null] +**StatusMessage** | **string** | | [optional] [default to null] +**Meta** | [***interface{}**](interface{}.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/v2/docs/LDAPServersApi.md b/v2/docs/LDAPServersApi.md index b1db661..e4a1add 100644 --- a/v2/docs/LDAPServersApi.md +++ b/v2/docs/LDAPServersApi.md @@ -6,8 +6,8 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**GraphLdapServerAssociationsList**](LDAPServersApi.md#GraphLdapServerAssociationsList) | **Get** /ldapservers/{ldapserver_id}/associations | List the associations of a LDAP Server [**GraphLdapServerAssociationsPost**](LDAPServersApi.md#GraphLdapServerAssociationsPost) | **Post** /ldapservers/{ldapserver_id}/associations | Manage the associations of a LDAP Server -[**GraphLdapServerTraverseUser**](LDAPServersApi.md#GraphLdapServerTraverseUser) | **Get** /ldapservers/{ldapserver_id}/users | List the Users associated with a LDAP Server -[**GraphLdapServerTraverseUserGroup**](LDAPServersApi.md#GraphLdapServerTraverseUserGroup) | **Get** /ldapservers/{ldapserver_id}/usergroups | List the User Groups associated with a LDAP Server +[**GraphLdapServerTraverseUser**](LDAPServersApi.md#GraphLdapServerTraverseUser) | **Get** /ldapservers/{ldapserver_id}/users | List the Users bound to a LDAP Server +[**GraphLdapServerTraverseUserGroup**](LDAPServersApi.md#GraphLdapServerTraverseUserGroup) | **Get** /ldapservers/{ldapserver_id}/usergroups | List the User Groups bound to a LDAP Server [**LdapserversGet**](LDAPServersApi.md#LdapserversGet) | **Get** /ldapservers/{id} | Get LDAP Server [**LdapserversList**](LDAPServersApi.md#LdapserversList) | **Get** /ldapservers | List LDAP Servers @@ -16,13 +16,13 @@ Method | HTTP request | Description > []GraphConnection GraphLdapServerAssociationsList(ctx, ldapserverId, targets, contentType, accept, optional) List the associations of a LDAP Server -This endpoint returns the _direct_ associations of this LDAP Server. A direct association can be a non-homogenous relationship between 2 different objects. for example LDAP and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/ldapservers/{ldapserver_id}/associations?targets=user ``` +This endpoint returns the _direct_ associations of this LDAP Server. A direct association can be a non-homogenous relationship between 2 different objects. for example LDAP and Users. #### Sample Request ``` curl -X GET 'https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/associations?targets=user_group \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **ldapserverId** | **string**| ObjectID of the LDAP Server. | **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] @@ -60,13 +60,13 @@ Name | Type | Description | Notes > GraphLdapServerAssociationsPost(ctx, ldapserverId, contentType, accept, optional) Manage the associations of a LDAP Server -This endpoint allows you to manage the _direct_ associations of a LDAP Server. A direct association can be a non-homogenous relationship between 2 different objects. for example LDAP and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/ldapservers/{ldapserver_id}/associations ``` +This endpoint allows you to manage the _direct_ associations of a LDAP Server. A direct association can be a non-homogenous relationship between 2 different objects. for example LDAP and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/associations \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user\", \"id\": \"{User_ID}\" }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **ldapserverId** | **string**| ObjectID of the LDAP Server. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -99,15 +99,15 @@ Name | Type | Description | Notes # **GraphLdapServerTraverseUser** > []GraphObjectWithPaths GraphLdapServerTraverseUser(ctx, ldapserverId, contentType, accept, optional) -List the Users associated with a LDAP Server +List the Users bound to a LDAP Server -This endpoint will return Users associated with an LDAP server instance. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this LDAP server instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this LDAP server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/ldapservers/{ldapserver_id}/users ``` +This endpoint will return all Users bound to an LDAP Server, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this LDAP server instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this LDAP server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/users \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **ldapserverId** | **string**| ObjectID of the LDAP Server. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -141,15 +141,15 @@ Name | Type | Description | Notes # **GraphLdapServerTraverseUserGroup** > []GraphObjectWithPaths GraphLdapServerTraverseUserGroup(ctx, ldapserverId, contentType, accept, optional) -List the User Groups associated with a LDAP Server +List the User Groups bound to a LDAP Server -This endpoint will return User Groups associated with a LDAP server instance. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this LDAP server instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this LDAP server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/ldapservers/{ldapserver_id}/usersgroups ``` +This endpoint will return all Users Groups bound to a LDAP Server, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this LDAP server instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this LDAP server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/usergroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **ldapserverId** | **string**| ObjectID of the LDAP Server. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -185,13 +185,13 @@ Name | Type | Description | Notes > LdapServerOutput LdapserversGet(ctx, id, contentType, accept) Get LDAP Server -This endpoint returns a specific LDAP server. +This endpoint returns a specific LDAP server. ##### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID} \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **id** | **string**| Unique identifier of the LDAP server. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -215,11 +215,13 @@ Name | Type | Description | Notes > []LdapServerOutput LdapserversList(ctx, contentType, accept, optional) List LDAP Servers +This endpoint returns the object IDs of your LDAP servers. ##### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/ldapservers/ \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' + ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -231,11 +233,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] - **fields** | **string**| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | [default to ] - **filter** | **string**| Supported operators are: eq, ne, gt, ge, lt, le, between, search | [default to ] + **fields** | [**[]string**](string.md)| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] - **sort** | **string**| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | [default to ] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | ### Return type diff --git a/v2/docs/Office365Api.md b/v2/docs/Office365Api.md index 4554257..4378447 100644 --- a/v2/docs/Office365Api.md +++ b/v2/docs/Office365Api.md @@ -6,21 +6,21 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**GraphOffice365AssociationsList**](Office365Api.md#GraphOffice365AssociationsList) | **Get** /office365s/{office365_id}/associations | List the associations of an Office 365 instance [**GraphOffice365AssociationsPost**](Office365Api.md#GraphOffice365AssociationsPost) | **Post** /office365s/{office365_id}/associations | Manage the associations of an Office 365 instance -[**GraphOffice365TraverseUser**](Office365Api.md#GraphOffice365TraverseUser) | **Get** /office365s/{office365_id}/users | List the Users associated with an Office 365 instance -[**GraphOffice365TraverseUserGroup**](Office365Api.md#GraphOffice365TraverseUserGroup) | **Get** /office365s/{office365_id}/usergroups | List the User Groups associated with an Office 365 instance +[**GraphOffice365TraverseUser**](Office365Api.md#GraphOffice365TraverseUser) | **Get** /office365s/{office365_id}/users | List the Users bound to an Office 365 instance +[**GraphOffice365TraverseUserGroup**](Office365Api.md#GraphOffice365TraverseUserGroup) | **Get** /office365s/{office365_id}/usergroups | List the User Groups bound to an Office 365 instance # **GraphOffice365AssociationsList** > []GraphConnection GraphOffice365AssociationsList(ctx, office365Id, targets, contentType, accept, optional) List the associations of an Office 365 instance -This endpoint returns _direct_ associations of an Office 365 instance. A direct association can be a non-homogenous relationship between 2 different objects. for example Office 365 and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/office365s/{office365_id}/associations?targets=user ``` +This endpoint returns _direct_ associations of an Office 365 instance. A direct association can be a non-homogenous relationship between 2 different objects. for example Office 365 and Users. #### Sample Request ``` curl -X GET 'https://console.jumpcloud.com/api/v2/office365s/{O365_ID}/associations?targets=user_group \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **office365Id** | **string**| ObjectID of the Office 365 instance. | **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] @@ -58,13 +58,13 @@ Name | Type | Description | Notes > GraphOffice365AssociationsPost(ctx, office365Id, contentType, accept, optional) Manage the associations of an Office 365 instance -This endpoint allows you to manage the _direct_ associations of a Office 365 instance. A direct association can be a non-homogenous relationship between 2 different objects. for example Office 365 and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/office365s/{office365_id}/associations ``` +This endpoint allows you to manage the _direct_ associations of a Office 365 instance. A direct association can be a non-homogenous relationship between 2 different objects. for example Office 365 and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/office365s/{O365_ID}/associations \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user_group\", \"id\": \"{Group_ID}\" }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **office365Id** | **string**| ObjectID of the Office 365 instance. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -97,15 +97,15 @@ Name | Type | Description | Notes # **GraphOffice365TraverseUser** > []GraphObjectWithPaths GraphOffice365TraverseUser(ctx, office365Id, contentType, accept, optional) -List the Users associated with an Office 365 instance +List the Users bound to an Office 365 instance -This endpoint will return Users associated with an Office 365 instance. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Office 365 instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this Office 365 instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/office365s/{office365_id}/users ``` +This endpoint will return all Users bound to an Office 365 instance, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Office 365 instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this Office 365 instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/office365s/{O365_ID}/users \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **office365Id** | **string**| ObjectID of the Office 365 suite. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -139,15 +139,15 @@ Name | Type | Description | Notes # **GraphOffice365TraverseUserGroup** > []GraphObjectWithPaths GraphOffice365TraverseUserGroup(ctx, office365Id, contentType, accept, optional) -List the User Groups associated with an Office 365 instance +List the User Groups bound to an Office 365 instance -This endpoint will return User Groups associated with an Office 365 instance. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Office 365 instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this Office 365 instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/office365s/{office365_id}/usergroups ``` +This endpoint will return all Users Groups bound to an Office 365 instance, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Office 365 instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this Office 365 instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/office365s/{O365_ID/usergroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **office365Id** | **string**| ObjectID of the Office 365 suite. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] diff --git a/v2/docs/PoliciesApi.md b/v2/docs/PoliciesApi.md index a28cbd7..c6ea93f 100644 --- a/v2/docs/PoliciesApi.md +++ b/v2/docs/PoliciesApi.md @@ -6,16 +6,16 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**GraphPolicyAssociationsList**](PoliciesApi.md#GraphPolicyAssociationsList) | **Get** /policies/{policy_id}/associations | List the associations of a Policy [**GraphPolicyAssociationsPost**](PoliciesApi.md#GraphPolicyAssociationsPost) | **Post** /policies/{policy_id}/associations | Manage the associations of a Policy -[**GraphPolicyTraverseSystem**](PoliciesApi.md#GraphPolicyTraverseSystem) | **Get** /policies/{policy_id}/systems | List the Systems associated with a Policy -[**GraphPolicyTraverseSystemGroup**](PoliciesApi.md#GraphPolicyTraverseSystemGroup) | **Get** /policies/{policy_id}/systemgroups | List the System Groups associated with a Policy +[**GraphPolicyTraverseSystem**](PoliciesApi.md#GraphPolicyTraverseSystem) | **Get** /policies/{policy_id}/systems | List the Systems bound to a Policy +[**GraphPolicyTraverseSystemGroup**](PoliciesApi.md#GraphPolicyTraverseSystemGroup) | **Get** /policies/{policy_id}/systemgroups | List the System Groups bound to a Policy [**PoliciesDelete**](PoliciesApi.md#PoliciesDelete) | **Delete** /policies/{id} | Deletes a Policy [**PoliciesGet**](PoliciesApi.md#PoliciesGet) | **Get** /policies/{id} | Gets a specific Policy. [**PoliciesList**](PoliciesApi.md#PoliciesList) | **Get** /policies | Lists all the Policies [**PoliciesPost**](PoliciesApi.md#PoliciesPost) | **Post** /policies | Create a new Policy [**PoliciesPut**](PoliciesApi.md#PoliciesPut) | **Put** /policies/{id} | Update an existing Policy [**PolicyresultsGet**](PoliciesApi.md#PolicyresultsGet) | **Get** /policyresults/{id} | Get a specific Policy Result. -[**PolicyresultsList**](PoliciesApi.md#PolicyresultsList) | **Get** /policyresults | Lists all the policy results for an organization. -[**PolicyresultsList_0**](PoliciesApi.md#PolicyresultsList_0) | **Get** /policies/{policy_id}/policyresults | Lists all the policy results of a given policy. +[**PolicyresultsList**](PoliciesApi.md#PolicyresultsList) | **Get** /policies/{policy_id}/policyresults | Lists all the policy results of a given policy. +[**PolicyresultsList_0**](PoliciesApi.md#PolicyresultsList_0) | **Get** /policyresults | Lists all the policy results for an organization. [**PolicytemplatesGet**](PoliciesApi.md#PolicytemplatesGet) | **Get** /policytemplates/{id} | Get a specific Policy Template [**PolicytemplatesList**](PoliciesApi.md#PolicytemplatesList) | **Get** /policytemplates | Lists all of the Policy Templates @@ -24,14 +24,14 @@ Method | HTTP request | Description > []GraphConnection GraphPolicyAssociationsList(ctx, policyId, targets, contentType, accept, optional) List the associations of a Policy -This endpoint returns the _direct_ associations of a Policy. A direct association can be a non-homogenous relationship between 2 different objects. for example Policies and Systems. #### Sample Request ``` https://console.jumpcloud.com/api/v2/policies/{policy_id}/associations?targets=system ``` +This endpoint returns the _direct_ associations of a Policy. A direct association can be a non-homogenous relationship between 2 different objects. for example Policies and Systems. #### Sample Request ``` curl -X GET 'https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/associations?targets=system_group \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **policyId** | **string**| ObjectID of the Policy. | + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **policyId** | **string**| | **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -42,7 +42,7 @@ Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **policyId** | **string**| ObjectID of the Policy. | + **policyId** | **string**| | **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -68,14 +68,14 @@ Name | Type | Description | Notes > GraphPolicyAssociationsPost(ctx, policyId, contentType, accept, optional) Manage the associations of a Policy -This endpoint allows you to manage the _direct_ associations of a Policy. A direct association can be a non-homogenous relationship between 2 different objects. for example Policies and Systems. #### Sample Request ``` https://console.jumpcloud.com/api/v2/policies/{policy_id}/associations ``` +This endpoint allows you to manage the _direct_ associations of a Policy. A direct association can be a non-homogenous relationship between 2 different objects. for example Policies and Systems. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/associations/ \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"system_group\", \"id\": \"{Group_ID}\" }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **policyId** | **string**| ObjectID of the Policy. | + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **policyId** | **string**| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -85,7 +85,7 @@ Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **policyId** | **string**| ObjectID of the Policy. | + **policyId** | **string**| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] **body** | [**GraphManagementReq**](GraphManagementReq.md)| | @@ -107,15 +107,15 @@ Name | Type | Description | Notes # **GraphPolicyTraverseSystem** > []GraphObjectWithPaths GraphPolicyTraverseSystem(ctx, policyId, contentType, accept, optional) -List the Systems associated with a Policy +List the Systems bound to a Policy -This endpoint will return Systems associated with a Policy. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Policy to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this Policy. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/policies/{policy_id}/systems ``` +This endpoint will return all Systems bound to a Policy, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Policy to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this Policy. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/systems \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **policyId** | **string**| ObjectID of the Command. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -149,15 +149,15 @@ Name | Type | Description | Notes # **GraphPolicyTraverseSystemGroup** > []GraphObjectWithPaths GraphPolicyTraverseSystemGroup(ctx, policyId, contentType, accept, optional) -List the System Groups associated with a Policy +List the System Groups bound to a Policy -This endpoint will return System Groups associated with a Policy. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Policy to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this Policy. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/policies/{policy_id}/systemsgroups ``` +This endpoint will return all Systems Groups bound to a Policy, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Policy to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this Policy. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/systemgroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **policyId** | **string**| ObjectID of the Command. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -193,13 +193,13 @@ Name | Type | Description | Notes > PoliciesDelete(ctx, id, contentType, accept) Deletes a Policy -This endpoint allows you to delete a policy. +This endpoint allows you to delete a policy. #### Sample Request ``` curl -X DELETE https://console.jumpcloud.com/api/v2/policies/5a837ecd232e110d4291e6b9 \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **id** | **string**| ObjectID of the Policy object. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -223,13 +223,13 @@ Name | Type | Description | Notes > PolicyWithDetails PoliciesGet(ctx, id, contentType, accept) Gets a specific Policy. -This endpoint returns a specific policy. +This endpoint returns a specific policy. ###### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/policies/{PolicyID} \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **id** | **string**| ObjectID of the Policy object. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -253,13 +253,13 @@ Name | Type | Description | Notes > []Policy PoliciesList(ctx, contentType, accept, optional) Lists all the Policies -This endpoint returns all policies. +This endpoint returns all policies. ##### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/policies \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -271,11 +271,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] - **fields** | **string**| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | [default to ] - **filter** | **string**| Supported operators are: eq, ne, gt, ge, lt, le, between, search | [default to ] + **fields** | [**[]string**](string.md)| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] - **sort** | **string**| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | [default to ] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | ### Return type @@ -296,13 +296,13 @@ Name | Type | Description | Notes > PolicyWithDetails PoliciesPost(ctx, contentType, accept, optional) Create a new Policy -This endpoint allows you to create a policy. +This endpoint allows you to create a policy. Given the amount of configurable parameters required to create a Policy, we suggest you use the JumpCloud Admin Console to create new policies. ##### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/policies \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ {Policy_Parameters} }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -335,13 +335,13 @@ Name | Type | Description | Notes > Policy PoliciesPut(ctx, id, optional) Update an existing Policy -This endpoint allows you to update a policy. +This endpoint allows you to update a policy. Given the amount of configurable parameters required to update a Policy, we suggest you use the JumpCloud Admin Console to create new policies. ##### Sample Request ``` curl -X PUT https://console.jumpcloud.com/api/v2/policies/59fced45c9118022172547ff \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY' \\ -d '{ {Policy_Parameters} }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **id** | **string**| ObjectID of the Policy object. | **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -372,11 +372,13 @@ Name | Type | Description | Notes > PolicyResult PolicyresultsGet(ctx, id, contentType, accept) Get a specific Policy Result. +This endpoint will return the policy results for a specific policy. ##### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/policyresults/{Policy_ID} \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **id** | **string**| ObjectID of the Policy Result. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -397,14 +399,17 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **PolicyresultsList** -> []PolicyResult PolicyresultsList(ctx, contentType, accept, optional) -Lists all the policy results for an organization. +> []PolicyResult PolicyresultsList(ctx, policyId, contentType, accept, optional) +Lists all the policy results of a given policy. + +This endpoint returns all policies results for a specific policy. ##### Sample Results ``` curl -X GET https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/policyresults \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **policyId** | **string**| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -414,14 +419,15 @@ Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **policyId** | **string**| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] - **fields** | **string**| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | [default to ] - **filter** | **string**| Supported operators are: eq, ne, gt, ge, lt, le, between, search | [default to ] + **fields** | [**[]string**](string.md)| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] - **sort** | **string**| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | [default to ] - **aggregate** | **string**| | [default to ] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | + **aggregate** | [**[]string**](string.md)| | ### Return type @@ -439,15 +445,16 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **PolicyresultsList_0** -> []PolicyResult PolicyresultsList_0(ctx, policyId, contentType, accept, optional) -Lists all the policy results of a given policy. +> []PolicyResult PolicyresultsList_0(ctx, contentType, accept, optional) +Lists all the policy results for an organization. + +This endpoint returns all policies results for an Organization. ##### Sample Results ``` curl -X GET https://console.jumpcloud.com/api/v2/policyresults \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **policyId** | **string**| | + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -457,15 +464,14 @@ Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **policyId** | **string**| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] - **fields** | **string**| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | [default to ] - **filter** | **string**| Supported operators are: eq, ne, gt, ge, lt, le, between, search | [default to ] + **fields** | [**[]string**](string.md)| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] - **sort** | **string**| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | [default to ] - **aggregate** | **string**| | [default to ] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | + **aggregate** | [**[]string**](string.md)| | ### Return type @@ -486,13 +492,13 @@ Name | Type | Description | Notes > PolicyTemplateWithDetails PolicytemplatesGet(ctx, id, contentType, accept) Get a specific Policy Template -This endpoint returns a specific policy template. +This endpoint returns a specific policy template. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/policies/{Policy_ID}\\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **id** | **string**| ObjectID of the Policy Template. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -516,13 +522,13 @@ Name | Type | Description | Notes > []PolicyTemplate PolicytemplatesList(ctx, contentType, accept, optional) Lists all of the Policy Templates -This endpoint returns all policy templates. +This endpoint returns all policy templates. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/policytemplates \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -534,11 +540,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] - **fields** | **string**| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | [default to ] - **filter** | **string**| Supported operators are: eq, ne, gt, ge, lt, le, between, search | [default to ] + **fields** | [**[]string**](string.md)| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] - **sort** | **string**| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | [default to ] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | ### Return type diff --git a/v2/docs/PolicytemplatesApi.md b/v2/docs/PolicytemplatesApi.md index ad52292..a2f7af9 100644 --- a/v2/docs/PolicytemplatesApi.md +++ b/v2/docs/PolicytemplatesApi.md @@ -12,13 +12,13 @@ Method | HTTP request | Description > PolicyTemplateWithDetails PolicytemplatesGet(ctx, id, contentType, accept) Get a specific Policy Template -This endpoint returns a specific policy template. +This endpoint returns a specific policy template. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/policies/{Policy_ID}\\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **id** | **string**| ObjectID of the Policy Template. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -42,13 +42,13 @@ Name | Type | Description | Notes > []PolicyTemplate PolicytemplatesList(ctx, contentType, accept, optional) Lists all of the Policy Templates -This endpoint returns all policy templates. +This endpoint returns all policy templates. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/policytemplates \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -60,11 +60,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] - **fields** | **string**| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | [default to ] - **filter** | **string**| Supported operators are: eq, ne, gt, ge, lt, le, between, search | [default to ] + **fields** | [**[]string**](string.md)| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] - **sort** | **string**| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | [default to ] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | ### Return type diff --git a/v2/docs/RADIUSServersApi.md b/v2/docs/RADIUSServersApi.md index 6044bf6..56a6dde 100644 --- a/v2/docs/RADIUSServersApi.md +++ b/v2/docs/RADIUSServersApi.md @@ -4,23 +4,23 @@ All URIs are relative to *https://console.jumpcloud.com/api/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**GraphRadiusServerAssociationsList**](RADIUSServersApi.md#GraphRadiusServerAssociationsList) | **Get** /radiusservers/{radiusserver_id}/associations | List the associations of a Radius Server -[**GraphRadiusServerAssociationsPost**](RADIUSServersApi.md#GraphRadiusServerAssociationsPost) | **Post** /radiusservers/{radiusserver_id}/associations | Manage the associations of a Radius Server -[**GraphRadiusServerTraverseUser**](RADIUSServersApi.md#GraphRadiusServerTraverseUser) | **Get** /radiusservers/{radiusserver_id}/users | List the Users associated with a Radius Server -[**GraphRadiusServerTraverseUserGroup**](RADIUSServersApi.md#GraphRadiusServerTraverseUserGroup) | **Get** /radiusservers/{radiusserver_id}/usergroups | List the User Groups associated with a Radius Server +[**GraphRadiusServerAssociationsList**](RADIUSServersApi.md#GraphRadiusServerAssociationsList) | **Get** /radiusservers/{radiusserver_id}/associations | List the associations of a RADIUS Server +[**GraphRadiusServerAssociationsPost**](RADIUSServersApi.md#GraphRadiusServerAssociationsPost) | **Post** /radiusservers/{radiusserver_id}/associations | Manage the associations of a RADIUS Server +[**GraphRadiusServerTraverseUser**](RADIUSServersApi.md#GraphRadiusServerTraverseUser) | **Get** /radiusservers/{radiusserver_id}/users | List the Users bound to a RADIUS Server +[**GraphRadiusServerTraverseUserGroup**](RADIUSServersApi.md#GraphRadiusServerTraverseUserGroup) | **Get** /radiusservers/{radiusserver_id}/usergroups | List the User Groups bound to a RADIUS Server # **GraphRadiusServerAssociationsList** > []GraphConnection GraphRadiusServerAssociationsList(ctx, radiusserverId, targets, contentType, accept, optional) -List the associations of a Radius Server +List the associations of a RADIUS Server -This endpoint returns the _direct_ associations of a Radius Server. A direct association can be a non-homogenous relationship between 2 different objects. for example Radius Servers and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/radiusservers/{radiusserver_id}/associations?targets=user ``` +This endpoint returns the _direct_ associations of a Radius Server. A direct association can be a non-homogenous relationship between 2 different objects. for example Radius Servers and Users. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/radiusservers/{RADIUS_ID}/associations?targets=user_group \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **radiusserverId** | **string**| ObjectID of the Radius Server. | **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] @@ -56,15 +56,15 @@ Name | Type | Description | Notes # **GraphRadiusServerAssociationsPost** > GraphRadiusServerAssociationsPost(ctx, radiusserverId, contentType, accept, optional) -Manage the associations of a Radius Server +Manage the associations of a RADIUS Server -This endpoint allows you to manage the _direct_ associations of a Radius Server. A direct association can be a non-homogenous relationship between 2 different objects. for example Radius Servers and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/radiusservers/{radiusserver_id}/associations +This endpoint allows you to manage the _direct_ associations of a Radius Server. A direct association can be a non-homogenous relationship between 2 different objects. for example Radius Servers and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/radiusservers/{RADIUS_ID}/associations \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"type\":\"user\", \"id\":\"{USER_ID}\", \"op\":\"add\" }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **radiusserverId** | **string**| ObjectID of the Radius Server. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -97,15 +97,15 @@ Name | Type | Description | Notes # **GraphRadiusServerTraverseUser** > []GraphObjectWithPaths GraphRadiusServerTraverseUser(ctx, radiusserverId, contentType, accept, optional) -List the Users associated with a Radius Server +List the Users bound to a RADIUS Server -This endpoint will return Users associated with a RADIUS server instance. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this RADIUS server instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this RADIUS server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/radiusservers/{radiusserver_id}/users +This endpoint will return all Users bound to a RADIUS Server, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this RADIUS server instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this RADIUS server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/users \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **radiusserverId** | **string**| ObjectID of the Radius Server. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -139,15 +139,15 @@ Name | Type | Description | Notes # **GraphRadiusServerTraverseUserGroup** > []GraphObjectWithPaths GraphRadiusServerTraverseUserGroup(ctx, radiusserverId, contentType, accept, optional) -List the User Groups associated with a Radius Server +List the User Groups bound to a RADIUS Server -This endpoint will return User Groups associated with a RADIUS server instance. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this RADIUS server instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this RADIUS server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/radiusservers/{radiusserver_id}/usergroups +This endpoint will return all Users Groups bound to a RADIUS Server, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this RADIUS server instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this RADIUS server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/radiusservers/{RADIUS_ID}/usergroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **radiusserverId** | **string**| ObjectID of the Radius Server. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] diff --git a/v2/docs/SambaDomainInput.md b/v2/docs/SambaDomainInput.md index 3de9081..cfa48f3 100644 --- a/v2/docs/SambaDomainInput.md +++ b/v2/docs/SambaDomainInput.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | Name of this domain | [default to null] +**Name** | **string** | Name of this domain's WorkGroup | [default to null] **Sid** | **string** | Security identifier of this domain | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/v2/docs/SambaDomainOutput.md b/v2/docs/SambaDomainOutput.md index 6264cab..d4d4bab 100644 --- a/v2/docs/SambaDomainOutput.md +++ b/v2/docs/SambaDomainOutput.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | Name of this domain | [default to null] +**Name** | **string** | Name of this domain's WorkGroup | [default to null] **Sid** | **string** | Security identifier of this domain | [default to null] **Id** | **string** | Unique identifier of this domain | [default to null] diff --git a/v2/docs/SambaDomainsApi.md b/v2/docs/SambaDomainsApi.md index 979c73c..b3e9b9d 100644 --- a/v2/docs/SambaDomainsApi.md +++ b/v2/docs/SambaDomainsApi.md @@ -15,14 +15,14 @@ Method | HTTP request | Description > string LdapserversSambaDomainsDelete(ctx, ldapserverId, id, optional) Delete Samba Domain -This endpoint allows you to delete a samba domain from an LDAP server. +This endpoint allows you to delete a samba domain from an LDAP server. ##### Sample Request ``` curl -X DELETE https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/sambadomains/{SAMBA_ID} \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **ldapserverId** | **string**| Unique identifier o f the LDAP server. | + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **ldapserverId** | **string**| Unique identifier of the LDAP server. | **id** | **string**| Unique identifier of the samba domain. | **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -31,7 +31,7 @@ Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ldapserverId** | **string**| Unique identifier o f the LDAP server. | + **ldapserverId** | **string**| Unique identifier of the LDAP server. | **id** | **string**| Unique identifier of the samba domain. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -55,14 +55,14 @@ Name | Type | Description | Notes > SambaDomainOutput LdapserversSambaDomainsGet(ctx, ldapserverId, id, optional) Get Samba Domain -This endpoint returns a specific samba domain for an LDAP server. +This endpoint returns a specific samba domain for an LDAP server. ##### Sample Request ``` curl -X GET \\ https://console.jumpcloud.com/api/v2/ldapservers/ldapservers/{LDAP_ID}/sambadomains/{SAMBA_ID} \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **ldapserverId** | **string**| Unique identifier o f the LDAP server. | + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **ldapserverId** | **string**| Unique identifier of the LDAP server. | **id** | **string**| Unique identifier of the samba domain. | **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -71,7 +71,7 @@ Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ldapserverId** | **string**| Unique identifier o f the LDAP server. | + **ldapserverId** | **string**| Unique identifier of the LDAP server. | **id** | **string**| Unique identifier of the samba domain. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -95,13 +95,13 @@ Name | Type | Description | Notes > []SambaDomainOutput LdapserversSambaDomainsList(ctx, ldapserverId, optional) List Samba Domains -This endpoint returns all samba domains for an LDAP server. +This endpoint returns all samba domains for an LDAP server. ##### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/sambadomains \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **ldapserverId** | **string**| Unique identifier of the LDAP server. | **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -113,11 +113,11 @@ Name | Type | Description | Notes **ldapserverId** | **string**| Unique identifier of the LDAP server. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] - **fields** | **string**| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | [default to ] - **filter** | **string**| Supported operators are: eq, ne, gt, ge, lt, le, between, search | [default to ] + **fields** | [**[]string**](string.md)| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] - **sort** | **string**| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | [default to ] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | ### Return type @@ -138,13 +138,13 @@ Name | Type | Description | Notes > SambaDomainOutput LdapserversSambaDomainsPost(ctx, ldapserverId, optional) Create Samba Domain -This endpoint allows you to create a samba domain for an LDAP server. +This endpoint allows you to create a samba domain for an LDAP server. ##### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/sambadomains \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"sid\":\"{SID_ID}\", \"name\":\"{WORKGROUP_NAME}\" }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **ldapserverId** | **string**| Unique identifier of the LDAP server. | **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -177,14 +177,14 @@ Name | Type | Description | Notes > SambaDomainOutput LdapserversSambaDomainsPut(ctx, ldapserverId, id, optional) Update Samba Domain -This endpoint allows you to update the samba domain information for an LDAP server. +This endpoint allows you to update the samba domain information for an LDAP server. ##### Sample Request ``` curl -X PUT https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/sambadomains/{SAMBA_ID} \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"sid\":\"{SID_ID}\", \"name\":\"{WORKGROUP_NAME}\" }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **ldapserverId** | **string**| Unique identifier o f the LDAP server. | + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **ldapserverId** | **string**| Unique identifier of the LDAP server. | **id** | **string**| Unique identifier of the samba domain. | **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -193,7 +193,7 @@ Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ldapserverId** | **string**| Unique identifier o f the LDAP server. | + **ldapserverId** | **string**| Unique identifier of the LDAP server. | **id** | **string**| Unique identifier of the samba domain. | **body** | [**SambaDomainInput**](SambaDomainInput.md)| | **contentType** | **string**| | [default to application/json] diff --git a/v2/docs/SystemGraphManagementReq.md b/v2/docs/SystemGraphManagementReq.md new file mode 100644 index 0000000..99c07e2 --- /dev/null +++ b/v2/docs/SystemGraphManagementReq.md @@ -0,0 +1,13 @@ +# SystemGraphManagementReq + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | [***SystemGraphManagementReqAttributes**](SystemGraphManagementReq_attributes.md) | | [optional] [default to null] +**Op** | **string** | How to modify the graph connection. | [default to null] +**Type_** | **string** | | [default to null] +**Id** | **string** | The ObjectID of graph object being added or removed as an association. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/v2/docs/SystemGraphManagementReqAttributes.md b/v2/docs/SystemGraphManagementReqAttributes.md new file mode 100644 index 0000000..2d8cd56 --- /dev/null +++ b/v2/docs/SystemGraphManagementReqAttributes.md @@ -0,0 +1,10 @@ +# SystemGraphManagementReqAttributes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Sudo** | [***SystemGraphManagementReqAttributesSudo**](SystemGraphManagementReq_attributes_sudo.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/v2/docs/SystemGraphManagementReqAttributesSudo.md b/v2/docs/SystemGraphManagementReqAttributesSudo.md new file mode 100644 index 0000000..14cd7ff --- /dev/null +++ b/v2/docs/SystemGraphManagementReqAttributesSudo.md @@ -0,0 +1,11 @@ +# SystemGraphManagementReqAttributesSudo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | | [optional] [default to null] +**WithoutPassword** | **bool** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/v2/docs/SystemGroupAssociationsApi.md b/v2/docs/SystemGroupAssociationsApi.md new file mode 100644 index 0000000..0daf682 --- /dev/null +++ b/v2/docs/SystemGroupAssociationsApi.md @@ -0,0 +1,267 @@ +# \SystemGroupAssociationsApi + +All URIs are relative to *https://console.jumpcloud.com/api/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GraphSystemGroupAssociationsList**](SystemGroupAssociationsApi.md#GraphSystemGroupAssociationsList) | **Get** /systemgroups/{group_id}/associations | List the associations of a System Group +[**GraphSystemGroupAssociationsPost**](SystemGroupAssociationsApi.md#GraphSystemGroupAssociationsPost) | **Post** /systemgroups/{group_id}/associations | Manage the associations of a System Group +[**GraphSystemGroupTraverseCommand**](SystemGroupAssociationsApi.md#GraphSystemGroupTraverseCommand) | **Get** /systemgroups/{group_id}/commands | List the Commands bound to a System Group +[**GraphSystemGroupTraversePolicy**](SystemGroupAssociationsApi.md#GraphSystemGroupTraversePolicy) | **Get** /systemgroups/{group_id}/policies | List the Policies bound to a System Group +[**GraphSystemGroupTraverseUser**](SystemGroupAssociationsApi.md#GraphSystemGroupTraverseUser) | **Get** /systemgroups/{group_id}/users | List the Users bound to a System Group +[**GraphSystemGroupTraverseUserGroup**](SystemGroupAssociationsApi.md#GraphSystemGroupTraverseUserGroup) | **Get** /systemgroups/{group_id}/usergroups | List the User Groups bound to a System Group + + +# **GraphSystemGroupAssociationsList** +> []GraphConnection GraphSystemGroupAssociationsList(ctx, groupId, contentType, accept, targets, optional) +List the associations of a System Group + +This endpoint returns the _direct_ associations of a System Group. A direct association can be a non-homogenous relationship between 2 different objects. for example System Groups and Users. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/associations?targets=user \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the System Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **targets** | [**[]string**](string.md)| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the System Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **targets** | [**[]string**](string.md)| | + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + +### Return type + +[**[]GraphConnection**](GraphConnection.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphSystemGroupAssociationsPost** +> GraphSystemGroupAssociationsPost(ctx, groupId, contentType, accept, optional) +Manage the associations of a System Group + +This endpoint allows you to manage the _direct_ associations of a System Group. A direct association can be a non-homogenous relationship between 2 different objects. for example System Groups and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/associations \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user\", \"id\": \"{UserID}\" }' ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the System Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the System Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **body** | [**SystemGroupGraphManagementReq**](SystemGroupGraphManagementReq.md)| | + +### Return type + + (empty response body) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphSystemGroupTraverseCommand** +> []GraphObjectWithPaths GraphSystemGroupTraverseCommand(ctx, groupId, contentType, accept, optional) +List the Commands bound to a System Group + +This endpoint will return all Commands bound to a System Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System Group to the corresponding Command; this array represents all grouping and/or associations that would have to be removed to deprovision the Command from this System Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/commands \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the System Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the System Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + +### Return type + +[**[]GraphObjectWithPaths**](GraphObjectWithPaths.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphSystemGroupTraversePolicy** +> []GraphObjectWithPaths GraphSystemGroupTraversePolicy(ctx, groupId, contentType, accept, optional) +List the Policies bound to a System Group + +This endpoint will return all Policies bound to a System Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System Group to the corresponding Policy; this array represents all grouping and/or associations that would have to be removed to deprovision the Policy from this System Group. See `/members` and `/associations` endpoints to manage those collections. This endpoint is not public yet as we haven't finished the code. ##### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/policies \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the System Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the System Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + +### Return type + +[**[]GraphObjectWithPaths**](GraphObjectWithPaths.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphSystemGroupTraverseUser** +> []GraphObjectWithPaths GraphSystemGroupTraverseUser(ctx, groupId, contentType, accept, optional) +List the Users bound to a System Group + +This endpoint will return all Users bound to a System Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System Group to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this System Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/users \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the System Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the System Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + +### Return type + +[**[]GraphObjectWithPaths**](GraphObjectWithPaths.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphSystemGroupTraverseUserGroup** +> []GraphObjectWithPaths GraphSystemGroupTraverseUserGroup(ctx, groupId, contentType, accept, optional) +List the User Groups bound to a System Group + +This endpoint will return all User Groups bound to a System Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System Group to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this System Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/usergroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the System Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the System Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + +### Return type + +[**[]GraphObjectWithPaths**](GraphObjectWithPaths.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/v2/docs/SystemGroupMembersMembershipApi.md b/v2/docs/SystemGroupMembersMembershipApi.md new file mode 100644 index 0000000..3a02cd7 --- /dev/null +++ b/v2/docs/SystemGroupMembersMembershipApi.md @@ -0,0 +1,185 @@ +# \SystemGroupMembersMembershipApi + +All URIs are relative to *https://console.jumpcloud.com/api/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GraphSystemGroupMemberOf**](SystemGroupMembersMembershipApi.md#GraphSystemGroupMemberOf) | **Get** /systemgroups/{group_id}/memberof | List the System Group's parents +[**GraphSystemGroupMembersList**](SystemGroupMembersMembershipApi.md#GraphSystemGroupMembersList) | **Get** /systemgroups/{group_id}/members | List the members of a System Group +[**GraphSystemGroupMembersPost**](SystemGroupMembersMembershipApi.md#GraphSystemGroupMembersPost) | **Post** /systemgroups/{group_id}/members | Manage the members of a System Group +[**GraphSystemGroupMembership**](SystemGroupMembersMembershipApi.md#GraphSystemGroupMembership) | **Get** /systemgroups/{group_id}/membership | List the System Group's membership + + +# **GraphSystemGroupMemberOf** +> []GraphObjectWithPaths GraphSystemGroupMemberOf(ctx, groupId, contentType, accept, optional) +List the System Group's parents + +This endpoint returns all System Groups a System Group is a member of. This endpoint is not yet public as we haven't completed the code yet. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the System Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the System Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | + +### Return type + +[**[]GraphObjectWithPaths**](GraphObjectWithPaths.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphSystemGroupMembersList** +> []GraphConnection GraphSystemGroupMembersList(ctx, groupId, contentType, accept, optional) +List the members of a System Group + +This endpoint returns the system members of a System Group. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID}/members \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the System Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the System Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + +### Return type + +[**[]GraphConnection**](GraphConnection.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphSystemGroupMembersPost** +> GraphSystemGroupMembersPost(ctx, groupId, contentType, accept, optional) +Manage the members of a System Group + +This endpoint allows you to manage the system members of a System Group. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID}/members \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY' \\ -d '{ \"op\": \"add\", \"type\": \"system\", \"id\": \"{System_ID\" }' ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the System Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the System Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **body** | [**SystemGroupMembersReq**](SystemGroupMembersReq.md)| | + **date** | **string**| Current date header for the System Context API | + **authorization** | **string**| Authorization header for the System Context API | + +### Return type + + (empty response body) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphSystemGroupMembership** +> []GraphObjectWithPaths GraphSystemGroupMembership(ctx, groupId, contentType, accept, optional) +List the System Group's membership + +This endpoint returns all Systems that are a member of this System Group. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID/membership \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the System Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the System Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | + +### Return type + +[**[]GraphObjectWithPaths**](GraphObjectWithPaths.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/v2/docs/SystemGroupsApi.md b/v2/docs/SystemGroupsApi.md index a109fb9..36d4cc2 100644 --- a/v2/docs/SystemGroupsApi.md +++ b/v2/docs/SystemGroupsApi.md @@ -10,9 +10,9 @@ Method | HTTP request | Description [**GraphSystemGroupMembersList**](SystemGroupsApi.md#GraphSystemGroupMembersList) | **Get** /systemgroups/{group_id}/members | List the members of a System Group [**GraphSystemGroupMembersPost**](SystemGroupsApi.md#GraphSystemGroupMembersPost) | **Post** /systemgroups/{group_id}/members | Manage the members of a System Group [**GraphSystemGroupMembership**](SystemGroupsApi.md#GraphSystemGroupMembership) | **Get** /systemgroups/{group_id}/membership | List the System Group's membership -[**GraphSystemGroupTraversePolicy**](SystemGroupsApi.md#GraphSystemGroupTraversePolicy) | **Get** /systemgroups/{group_id}/policies | List the Policies associated with a System Group -[**GraphSystemGroupTraverseUser**](SystemGroupsApi.md#GraphSystemGroupTraverseUser) | **Get** /systemgroups/{group_id}/users | List the Users associated with a System Group -[**GraphSystemGroupTraverseUserGroup**](SystemGroupsApi.md#GraphSystemGroupTraverseUserGroup) | **Get** /systemgroups/{group_id}/usergroups | List the User Groups associated with a System Group +[**GraphSystemGroupTraversePolicy**](SystemGroupsApi.md#GraphSystemGroupTraversePolicy) | **Get** /systemgroups/{group_id}/policies | List the Policies bound to a System Group +[**GraphSystemGroupTraverseUser**](SystemGroupsApi.md#GraphSystemGroupTraverseUser) | **Get** /systemgroups/{group_id}/users | List the Users bound to a System Group +[**GraphSystemGroupTraverseUserGroup**](SystemGroupsApi.md#GraphSystemGroupTraverseUserGroup) | **Get** /systemgroups/{group_id}/usergroups | List the User Groups bound to a System Group [**GroupsSystemDelete**](SystemGroupsApi.md#GroupsSystemDelete) | **Delete** /systemgroups/{id} | Delete a System Group [**GroupsSystemGet**](SystemGroupsApi.md#GroupsSystemGet) | **Get** /systemgroups/{id} | View an individual System Group details [**GroupsSystemList**](SystemGroupsApi.md#GroupsSystemList) | **Get** /systemgroups | List all System Groups @@ -22,20 +22,20 @@ Method | HTTP request | Description # **GraphSystemGroupAssociationsList** -> []GraphConnection GraphSystemGroupAssociationsList(ctx, groupId, targets, contentType, accept, optional) +> []GraphConnection GraphSystemGroupAssociationsList(ctx, groupId, contentType, accept, targets, optional) List the associations of a System Group -This endpoint returns the _direct_ associations of a System Group. A direct association can be a non-homogenous relationship between 2 different objects. for example System Groups and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/associations?targets=user ``` +This endpoint returns the _direct_ associations of a System Group. A direct association can be a non-homogenous relationship between 2 different objects. for example System Groups and Users. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/associations?targets=user \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the System Group. | - **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **targets** | [**[]string**](string.md)| | **optional** | **map[string]interface{}** | optional parameters | nil if no parameters ### Optional Parameters @@ -44,9 +44,9 @@ Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **groupId** | **string**| ObjectID of the System Group. | - **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **targets** | [**[]string**](string.md)| | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] @@ -69,13 +69,13 @@ Name | Type | Description | Notes > GraphSystemGroupAssociationsPost(ctx, groupId, contentType, accept, optional) Manage the associations of a System Group -This endpoint allows you to manage the _direct_ associations of a System Group. A direct association can be a non-homogenous relationship between 2 different objects. for example System Groups and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/associations ``` +This endpoint allows you to manage the _direct_ associations of a System Group. A direct association can be a non-homogenous relationship between 2 different objects. for example System Groups and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/associations \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user\", \"id\": \"{UserID}\" }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the System Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -116,7 +116,7 @@ This endpoint returns all System Groups a System Group is a member of. This end Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the System Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -130,8 +130,10 @@ Name | Type | Description | Notes **groupId** | **string**| ObjectID of the System Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | ### Return type @@ -152,13 +154,13 @@ Name | Type | Description | Notes > []GraphConnection GraphSystemGroupMembersList(ctx, groupId, contentType, accept, optional) List the members of a System Group -This endpoint returns the system members of a System Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/members ``` +This endpoint returns the system members of a System Group. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID}/members \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the System Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -194,13 +196,13 @@ Name | Type | Description | Notes > GraphSystemGroupMembersPost(ctx, groupId, contentType, accept, optional) Manage the members of a System Group -This endpoint allows you to manage the system members of a System Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/members ``` +This endpoint allows you to manage the system members of a System Group. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID}/members \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY' \\ -d '{ \"op\": \"add\", \"type\": \"system\", \"id\": \"{System_ID\" }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the System Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -237,13 +239,13 @@ Name | Type | Description | Notes > []GraphObjectWithPaths GraphSystemGroupMembership(ctx, groupId, contentType, accept, optional) List the System Group's membership -This endpoint returns all Systems that are a member of this System Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/membership ``` +This endpoint returns all Systems that are a member of this System Group. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID/membership \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the System Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -259,6 +261,8 @@ Name | Type | Description | Notes **accept** | **string**| | [default to application/json] **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | ### Return type @@ -277,15 +281,15 @@ Name | Type | Description | Notes # **GraphSystemGroupTraversePolicy** > []GraphObjectWithPaths GraphSystemGroupTraversePolicy(ctx, groupId, contentType, accept, optional) -List the Policies associated with a System Group +List the Policies bound to a System Group -This endpoint will return Policies associated with a System Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this System Group to the corresponding Policy; this array represents all grouping and/or associations that would have to be removed to deprovision the Policy from this System Group. See `/members` and `/associations` endpoints to manage those collections. This endpoint is not public yet as we haven't finished the code. +This endpoint will return all Policies bound to a System Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System Group to the corresponding Policy; this array represents all grouping and/or associations that would have to be removed to deprovision the Policy from this System Group. See `/members` and `/associations` endpoints to manage those collections. This endpoint is not public yet as we haven't finished the code. ##### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/policies \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the System Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -319,15 +323,15 @@ Name | Type | Description | Notes # **GraphSystemGroupTraverseUser** > []GraphObjectWithPaths GraphSystemGroupTraverseUser(ctx, groupId, contentType, accept, optional) -List the Users associated with a System Group +List the Users bound to a System Group -This endpoint will return Users associated with a System Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this System Group to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this System Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/users ``` +This endpoint will return all Users bound to a System Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System Group to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this System Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/users \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the System Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -361,15 +365,15 @@ Name | Type | Description | Notes # **GraphSystemGroupTraverseUserGroup** > []GraphObjectWithPaths GraphSystemGroupTraverseUserGroup(ctx, groupId, contentType, accept, optional) -List the User Groups associated with a System Group +List the User Groups bound to a System Group -This endpoint will return User Groups associated with a System Group. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this System Group to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this System Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/usergroups ``` +This endpoint will return all User Groups bound to a System Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System Group to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this System Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/usergroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the System Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -405,13 +409,13 @@ Name | Type | Description | Notes > GroupsSystemDelete(ctx, id, contentType, accept) Delete a System Group -This endpoint allows you to delete a System Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{id} ``` +This endpoint allows you to delete a System Group. #### Sample Request ``` curl -X DELETE https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID} \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **id** | **string**| ObjectID of the System Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -435,13 +439,13 @@ Name | Type | Description | Notes > SystemGroup GroupsSystemGet(ctx, id, contentType, accept) View an individual System Group details -This endpoint returns the details of a System Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{id} ``` +This endpoint returns the details of a System Group. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID} \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **id** | **string**| ObjectID of the System Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -465,13 +469,13 @@ Name | Type | Description | Notes > []SystemGroup GroupsSystemList(ctx, contentType, accept, optional) List all System Groups -This endpoint returns all System Groups. Available filter fields: - `name` - `disabled` - `type` #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups ``` +This endpoint returns all System Groups. Available filter fields: - `name` - `disabled` - `type` #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -483,11 +487,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] - **fields** | **string**| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | [default to ] - **filter** | **string**| Supported operators are: eq, ne, gt, ge, lt, le, between, search | [default to ] + **fields** | [**[]string**](string.md)| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] - **sort** | **string**| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | [default to ] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | ### Return type @@ -514,7 +518,7 @@ We have hidden PATCH on the systemgroups and usergroups for now; we don't have t Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **id** | **string**| ObjectID of the System Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -549,13 +553,13 @@ Name | Type | Description | Notes > SystemGroup GroupsSystemPost(ctx, contentType, accept, optional) Create a new System Group -This endpoint allows you to create a new System Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups ``` +This endpoint allows you to create a new System Group. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/systemgroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"name\": \"{Group_Name}\" }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -588,13 +592,13 @@ Name | Type | Description | Notes > SystemGroup GroupsSystemPut(ctx, id, contentType, accept, optional) Update a System Group -This enpoint allows you to do a full update of the System Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{id} ``` +This enpoint allows you to do a full update of the System Group. #### Sample Request ``` curl -X PUT https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID} \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"name\": \"Name_Update\" }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **id** | **string**| ObjectID of the System Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] diff --git a/v2/docs/SystemsApi.md b/v2/docs/SystemsApi.md index e0761d8..bc4ec48 100644 --- a/v2/docs/SystemsApi.md +++ b/v2/docs/SystemsApi.md @@ -7,25 +7,27 @@ Method | HTTP request | Description [**GraphSystemAssociationsList**](SystemsApi.md#GraphSystemAssociationsList) | **Get** /systems/{system_id}/associations | List the associations of a System [**GraphSystemAssociationsPost**](SystemsApi.md#GraphSystemAssociationsPost) | **Post** /systems/{system_id}/associations | Manage associations of a System [**GraphSystemMemberOf**](SystemsApi.md#GraphSystemMemberOf) | **Get** /systems/{system_id}/memberof | List the parent Groups of a System -[**GraphSystemTraversePolicy**](SystemsApi.md#GraphSystemTraversePolicy) | **Get** /systems/{system_id}/policies | List the Policies associated with a System -[**GraphSystemTraverseUser**](SystemsApi.md#GraphSystemTraverseUser) | **Get** /systems/{system_id}/users | List the Users associated with a System +[**GraphSystemTraverseCommand**](SystemsApi.md#GraphSystemTraverseCommand) | **Get** /systems/{system_id}/commands | List the Commands bound to a System +[**GraphSystemTraversePolicy**](SystemsApi.md#GraphSystemTraversePolicy) | **Get** /systems/{system_id}/policies | List the Policies bound to a System +[**GraphSystemTraverseUser**](SystemsApi.md#GraphSystemTraverseUser) | **Get** /systems/{system_id}/users | List the Users bound to a System +[**GraphSystemTraverseUserGroup**](SystemsApi.md#GraphSystemTraverseUserGroup) | **Get** /systems/{system_id}/usergroups | List the User Groups bound to a System # **GraphSystemAssociationsList** -> []GraphConnection GraphSystemAssociationsList(ctx, systemId, targets, contentType, accept, optional) +> []GraphConnection GraphSystemAssociationsList(ctx, systemId, contentType, accept, targets, optional) List the associations of a System -This endpoint returns the _direct_ associations of a System. A direct association can be a non-homogenous relationship between 2 different objects. for example Systems and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systems/{system_id}/associations?targets=user ``` +This endpoint returns the _direct_ associations of a System. A direct association can be a non-homogenous relationship between 2 different objects. for example Systems and Users. #### Sample Request ``` 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}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **systemId** | **string**| ObjectID of the System. | - **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **targets** | [**[]string**](string.md)| | **optional** | **map[string]interface{}** | optional parameters | nil if no parameters ### Optional Parameters @@ -34,9 +36,9 @@ Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **systemId** | **string**| ObjectID of the System. | - **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **targets** | [**[]string**](string.md)| | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] **date** | **string**| Current date header for the System Context API | @@ -61,13 +63,13 @@ Name | Type | Description | Notes > GraphSystemAssociationsPost(ctx, systemId, contentType, accept, optional) Manage associations of a System -This endpoint allows you to manage the _direct_ associations of a System. A direct association can be a non-homogenous relationship between 2 different objects. for example Systems and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systems/{system_id}/associations ``` +This endpoint allows you to manage the _direct_ associations of a System. A direct association can be a non-homogenous relationship between 2 different objects. for example Systems and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/systems/{System_ID}/associations \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user\", \"id\": \"{User_ID}\" }' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **systemId** | **string**| ObjectID of the System. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -81,7 +83,7 @@ Name | Type | Description | Notes **systemId** | **string**| ObjectID of the System. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] - **body** | [**GraphManagementReq**](GraphManagementReq.md)| | + **body** | [**SystemGraphManagementReq**](SystemGraphManagementReq.md)| | **date** | **string**| Current date header for the System Context API | **authorization** | **string**| Authorization header for the System Context API | @@ -104,13 +106,13 @@ Name | Type | Description | Notes > []GraphObjectWithPaths GraphSystemMemberOf(ctx, systemId, contentType, accept, optional) List the parent Groups of a System -This endpoint returns all the System Groups a System is a member of. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systems/{system_id}/memberof ``` +This endpoint returns all the System Groups a System is a member of. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systems/{System_ID}/memberof \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **systemId** | **string**| ObjectID of the System. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -124,10 +126,54 @@ Name | Type | Description | Notes **systemId** | **string**| ObjectID of the System. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] **date** | **string**| Current date header for the System Context API | **authorization** | **string**| Authorization header for the System Context API | + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | + +### Return type + +[**[]GraphObjectWithPaths**](GraphObjectWithPaths.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphSystemTraverseCommand** +> []GraphObjectWithPaths GraphSystemTraverseCommand(ctx, systemId, contentType, accept, optional) +List the Commands bound to a System + +This endpoint will return all Commands bound to a System, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System to the corresponding Command; this array represents all grouping and/or associations that would have to be removed to deprovision the Command from this System. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systems/{System_ID}/commands \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **systemId** | **string**| ObjectID of the System. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **string**| ObjectID of the System. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] ### Return type @@ -146,15 +192,15 @@ Name | Type | Description | Notes # **GraphSystemTraversePolicy** > []GraphObjectWithPaths GraphSystemTraversePolicy(ctx, systemId, contentType, accept, optional) -List the Policies associated with a System +List the Policies bound to a System -This endpoint will return Policies associated with a System. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this System to the corresponding Policy; this array represents all grouping and/or associations that would have to be removed to deprovision the Policy from this System. See `/members` and `/associations` endpoints to manage those collections. This endpoint is not yet public as we have finish the code. +This endpoint will return all Policies bound to a System, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System to the corresponding Policy; this array represents all grouping and/or associations that would have to be removed to deprovision the Policy from this System. See `/members` and `/associations` endpoints to manage those collections. This endpoint is not yet public as we have finish the code. ##### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/{System_ID}/policies \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **systemId** | **string**| ObjectID of the System. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -188,15 +234,59 @@ Name | Type | Description | Notes # **GraphSystemTraverseUser** > []GraphObjectWithPaths GraphSystemTraverseUser(ctx, systemId, contentType, accept, optional) -List the Users associated with a System +List the Users bound to a System + +This endpoint will return all Users bound to a System, either directly or indirectly essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this System. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systems/{System_ID}/users \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **systemId** | **string**| ObjectID of the System. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **systemId** | **string**| ObjectID of the System. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + **date** | **string**| Current date header for the System Context API | + **authorization** | **string**| Authorization header for the System Context API | + +### Return type + +[**[]GraphObjectWithPaths**](GraphObjectWithPaths.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphSystemTraverseUserGroup** +> []GraphObjectWithPaths GraphSystemTraverseUserGroup(ctx, systemId, contentType, accept, optional) +List the User Groups bound to a System -This endpoint will return Users associated with a System. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this System to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this System. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systems/{system_id}/users ``` +This endpoint will return all User Groups bound to a System, either directly or indirectly essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this System. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systems/{System_ID}/usergroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **systemId** | **string**| ObjectID of the System. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] diff --git a/v2/docs/UserGraphManagementReq.md b/v2/docs/UserGraphManagementReq.md new file mode 100644 index 0000000..898a7c6 --- /dev/null +++ b/v2/docs/UserGraphManagementReq.md @@ -0,0 +1,13 @@ +# UserGraphManagementReq + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | [***SystemGraphManagementReqAttributes**](SystemGraphManagementReq_attributes.md) | | [optional] [default to null] +**Op** | **string** | How to modify the graph connection. | [default to null] +**Type_** | **string** | | [default to null] +**Id** | **string** | The ObjectID of graph object being added or removed as an association. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/v2/docs/UserGroupAssociationsApi.md b/v2/docs/UserGroupAssociationsApi.md new file mode 100644 index 0000000..1aacdb9 --- /dev/null +++ b/v2/docs/UserGroupAssociationsApi.md @@ -0,0 +1,482 @@ +# \UserGroupAssociationsApi + +All URIs are relative to *https://console.jumpcloud.com/api/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GraphUserGroupAssociationsList**](UserGroupAssociationsApi.md#GraphUserGroupAssociationsList) | **Get** /usergroups/{group_id}/associations | List the associations of a User Group. +[**GraphUserGroupAssociationsPost**](UserGroupAssociationsApi.md#GraphUserGroupAssociationsPost) | **Post** /usergroups/{group_id}/associations | Manage the associations of a User Group +[**GraphUserGroupTraverseActiveDirectory**](UserGroupAssociationsApi.md#GraphUserGroupTraverseActiveDirectory) | **Get** /usergroups/{group_id}/activedirectories | List the Active Directories bound to a User Group +[**GraphUserGroupTraverseApplication**](UserGroupAssociationsApi.md#GraphUserGroupTraverseApplication) | **Get** /usergroups/{group_id}/applications | List the Applications bound to a User Group +[**GraphUserGroupTraverseDirectory**](UserGroupAssociationsApi.md#GraphUserGroupTraverseDirectory) | **Get** /usergroups/{group_id}/directories | List the Directories bound to a User Group +[**GraphUserGroupTraverseGSuite**](UserGroupAssociationsApi.md#GraphUserGroupTraverseGSuite) | **Get** /usergroups/{group_id}/gsuites | List the G Suite instances bound to a User Group +[**GraphUserGroupTraverseLdapServer**](UserGroupAssociationsApi.md#GraphUserGroupTraverseLdapServer) | **Get** /usergroups/{group_id}/ldapservers | List the LDAP Servers bound to a User Group +[**GraphUserGroupTraverseOffice365**](UserGroupAssociationsApi.md#GraphUserGroupTraverseOffice365) | **Get** /usergroups/{group_id}/office365s | List the Office 365 instances bound to a User Group +[**GraphUserGroupTraverseRadiusServer**](UserGroupAssociationsApi.md#GraphUserGroupTraverseRadiusServer) | **Get** /usergroups/{group_id}/radiusservers | List the RADIUS Servers bound to a User Group +[**GraphUserGroupTraverseSystem**](UserGroupAssociationsApi.md#GraphUserGroupTraverseSystem) | **Get** /usergroups/{group_id}/systems | List the Systems bound to a User Group +[**GraphUserGroupTraverseSystemGroup**](UserGroupAssociationsApi.md#GraphUserGroupTraverseSystemGroup) | **Get** /usergroups/{group_id}/systemgroups | List the System Groups bound to User Groups + + +# **GraphUserGroupAssociationsList** +> []GraphConnection GraphUserGroupAssociationsList(ctx, groupId, contentType, accept, targets, optional) +List the associations of a User Group. + +This endpoint returns the _direct_ associations of this User Group. A direct association can be a non-homogenous relationship between 2 different objects. for example User Groups and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/associations?targets=user ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **targets** | [**[]string**](string.md)| | + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **targets** | [**[]string**](string.md)| | + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + +### Return type + +[**[]GraphConnection**](GraphConnection.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphUserGroupAssociationsPost** +> GraphUserGroupAssociationsPost(ctx, groupId, contentType, accept, optional) +Manage the associations of a User Group + +This endpoint manages the _direct_ associations of this User Group. A direct association can be a non-homogenous relationship between 2 different objects. for example User Groups and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/associations ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **body** | [**UserGroupGraphManagementReq**](UserGroupGraphManagementReq.md)| | + +### Return type + + (empty response body) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphUserGroupTraverseActiveDirectory** +> []GraphObjectWithPaths GraphUserGroupTraverseActiveDirectory(ctx, groupId, contentType, accept, optional) +List the Active Directories bound to a User Group + +This endpoint will return all Active Directory Instances bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding Active Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Active Directory from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/activedirectories ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + +### Return type + +[**[]GraphObjectWithPaths**](GraphObjectWithPaths.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphUserGroupTraverseApplication** +> []GraphObjectWithPaths GraphUserGroupTraverseApplication(ctx, groupId, contentType, accept, optional) +List the Applications bound to a User Group + +This endpoint will return all Applications bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding Application; this array represents all grouping and/or associations that would have to be removed to deprovision the Application from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/applications ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + +### Return type + +[**[]GraphObjectWithPaths**](GraphObjectWithPaths.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphUserGroupTraverseDirectory** +> []GraphObjectWithPaths GraphUserGroupTraverseDirectory(ctx, groupId, contentType, accept, optional) +List the Directories bound to a User Group + +This endpoint will return all Directories bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Directories from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/directories ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + +### Return type + +[**[]GraphObjectWithPaths**](GraphObjectWithPaths.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphUserGroupTraverseGSuite** +> []GraphObjectWithPaths GraphUserGroupTraverseGSuite(ctx, groupId, contentType, accept, optional) +List the G Suite instances bound to a User Group + +This endpoint will return all Gsuite Instances bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding G Suite instance; this array represents all grouping and/or associations that would have to be removed to deprovision the G Suite instance from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/gsuites ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + +### Return type + +[**[]GraphObjectWithPaths**](GraphObjectWithPaths.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphUserGroupTraverseLdapServer** +> []GraphObjectWithPaths GraphUserGroupTraverseLdapServer(ctx, groupId, contentType, accept, optional) +List the LDAP Servers bound to a User Group + +This endpoint will return all LDAP Servers bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding LDAP Server; this array represents all grouping and/or associations that would have to be removed to deprovision the LDAP Server from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/ldapservers ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + +### Return type + +[**[]GraphObjectWithPaths**](GraphObjectWithPaths.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphUserGroupTraverseOffice365** +> []GraphObjectWithPaths GraphUserGroupTraverseOffice365(ctx, groupId, contentType, accept, optional) +List the Office 365 instances bound to a User Group + +This endpoint will return all Office 365 instances bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding Office 365 instance; this array represents all grouping and/or associations that would have to be removed to deprovision the Office 365 instance from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/office365s ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + +### Return type + +[**[]GraphObjectWithPaths**](GraphObjectWithPaths.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphUserGroupTraverseRadiusServer** +> []GraphObjectWithPaths GraphUserGroupTraverseRadiusServer(ctx, groupId, contentType, accept, optional) +List the RADIUS Servers bound to a User Group + +This endpoint will return all RADIUS servers bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding RADIUS Server; this array represents all grouping and/or associations that would have to be removed to deprovision the RADIUS Server from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/radiusservers ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + +### Return type + +[**[]GraphObjectWithPaths**](GraphObjectWithPaths.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphUserGroupTraverseSystem** +> []GraphObjectWithPaths GraphUserGroupTraverseSystem(ctx, groupId, contentType, accept, optional) +List the Systems bound to a User Group + +This endpoint will return all Systems bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/systems ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + +### Return type + +[**[]GraphObjectWithPaths**](GraphObjectWithPaths.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphUserGroupTraverseSystemGroup** +> []GraphObjectWithPaths GraphUserGroupTraverseSystemGroup(ctx, groupId, contentType, accept, optional) +List the System Groups bound to User Groups + +This endpoint will return all System Groups bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/systemsgroups ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + +### Return type + +[**[]GraphObjectWithPaths**](GraphObjectWithPaths.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/v2/docs/UserGroupMembersMembershipApi.md b/v2/docs/UserGroupMembersMembershipApi.md new file mode 100644 index 0000000..a2e5cdf --- /dev/null +++ b/v2/docs/UserGroupMembersMembershipApi.md @@ -0,0 +1,183 @@ +# \UserGroupMembersMembershipApi + +All URIs are relative to *https://console.jumpcloud.com/api/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GraphUserGroupMemberOf**](UserGroupMembersMembershipApi.md#GraphUserGroupMemberOf) | **Get** /usergroups/{group_id}/memberof | List the User Group's parents +[**GraphUserGroupMembersList**](UserGroupMembersMembershipApi.md#GraphUserGroupMembersList) | **Get** /usergroups/{group_id}/members | List the members of a User Group +[**GraphUserGroupMembersPost**](UserGroupMembersMembershipApi.md#GraphUserGroupMembersPost) | **Post** /usergroups/{group_id}/members | Manage the members of a User Group +[**GraphUserGroupMembership**](UserGroupMembersMembershipApi.md#GraphUserGroupMembership) | **Get** /usergroups/{group_id}/membership | List the User Group's membership + + +# **GraphUserGroupMemberOf** +> []GraphObjectWithPaths GraphUserGroupMemberOf(ctx, groupId, contentType, accept, optional) +List the User Group's parents + +This endpoint returns all User Groups a User Group is a member of. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/{group_id}/membersof ``` Not public yet, as the code is not finished, + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | + +### Return type + +[**[]GraphObjectWithPaths**](GraphObjectWithPaths.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphUserGroupMembersList** +> []GraphConnection GraphUserGroupMembersList(ctx, groupId, contentType, accept, optional) +List the members of a User Group + +This endpoint returns the user members of a User Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/{group_id}/members ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + +### Return type + +[**[]GraphConnection**](GraphConnection.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphUserGroupMembersPost** +> GraphUserGroupMembersPost(ctx, groupId, contentType, accept, optional) +Manage the members of a User Group + +This endpoint allows you to manage the user members of a User Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/{group_id}/members ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **body** | [**UserGroupMembersReq**](UserGroupMembersReq.md)| | + +### Return type + + (empty response body) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphUserGroupMembership** +> []GraphObjectWithPaths GraphUserGroupMembership(ctx, groupId, contentType, accept, optional) +List the User Group's membership + +This endpoint returns all users members that are a member of this User Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/{group_id}/membership ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **groupId** | **string**| ObjectID of the User Group. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | + +### Return type + +[**[]GraphObjectWithPaths**](GraphObjectWithPaths.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/v2/docs/UserGroupData.md b/v2/docs/UserGroupPost.md similarity index 83% rename from v2/docs/UserGroupData.md rename to v2/docs/UserGroupPost.md index 58bdbeb..427cfd7 100644 --- a/v2/docs/UserGroupData.md +++ b/v2/docs/UserGroupPost.md @@ -1,9 +1,9 @@ -# UserGroupData +# UserGroupPost ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Attributes** | [***UserGroupDataAttributes**](UserGroupData_attributes.md) | | [optional] [default to null] +**Attributes** | [***UserGroupPostAttributes**](UserGroupPost_attributes.md) | | [optional] [default to null] **Name** | **string** | Display name of a User Group. | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/v2/docs/UserGroupDataAttributes.md b/v2/docs/UserGroupPostAttributes.md similarity index 69% rename from v2/docs/UserGroupDataAttributes.md rename to v2/docs/UserGroupPostAttributes.md index ea3d66d..9f9cb59 100644 --- a/v2/docs/UserGroupDataAttributes.md +++ b/v2/docs/UserGroupPostAttributes.md @@ -1,9 +1,9 @@ -# UserGroupDataAttributes +# UserGroupPostAttributes ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**PosixGroups** | [**[]UserGroupDataAttributesPosixGroups**](UserGroupData_attributes_posixGroups.md) | | [optional] [default to null] +**PosixGroups** | [**[]UserGroupPostAttributesPosixGroups**](UserGroupPost_attributes_posixGroups.md) | | [optional] [default to null] **SambaEnabled** | **bool** | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/v2/docs/UserGroupDataAttributesPosixGroups.md b/v2/docs/UserGroupPostAttributesPosixGroups.md similarity index 91% rename from v2/docs/UserGroupDataAttributesPosixGroups.md rename to v2/docs/UserGroupPostAttributesPosixGroups.md index 871e89e..f73943f 100644 --- a/v2/docs/UserGroupDataAttributesPosixGroups.md +++ b/v2/docs/UserGroupPostAttributesPosixGroups.md @@ -1,4 +1,4 @@ -# UserGroupDataAttributesPosixGroups +# UserGroupPostAttributesPosixGroups ## Properties Name | Type | Description | Notes diff --git a/v2/docs/UserGroupPut.md b/v2/docs/UserGroupPut.md new file mode 100644 index 0000000..886391f --- /dev/null +++ b/v2/docs/UserGroupPut.md @@ -0,0 +1,11 @@ +# UserGroupPut + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Attributes** | [***UserGroupPutAttributes**](UserGroupPut_attributes.md) | | [optional] [default to null] +**Name** | **string** | Display name of a User Group. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/v2/docs/UserGroupPutAttributes.md b/v2/docs/UserGroupPutAttributes.md new file mode 100644 index 0000000..753d4d1 --- /dev/null +++ b/v2/docs/UserGroupPutAttributes.md @@ -0,0 +1,10 @@ +# UserGroupPutAttributes + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SambaEnabled** | **bool** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/v2/docs/UserGroupsApi.md b/v2/docs/UserGroupsApi.md index 861acdc..3a4c18c 100644 --- a/v2/docs/UserGroupsApi.md +++ b/v2/docs/UserGroupsApi.md @@ -10,15 +10,15 @@ Method | HTTP request | Description [**GraphUserGroupMembersList**](UserGroupsApi.md#GraphUserGroupMembersList) | **Get** /usergroups/{group_id}/members | List the members of a User Group [**GraphUserGroupMembersPost**](UserGroupsApi.md#GraphUserGroupMembersPost) | **Post** /usergroups/{group_id}/members | Manage the members of a User Group [**GraphUserGroupMembership**](UserGroupsApi.md#GraphUserGroupMembership) | **Get** /usergroups/{group_id}/membership | List the User Group's membership -[**GraphUserGroupTraverseActiveDirectory**](UserGroupsApi.md#GraphUserGroupTraverseActiveDirectory) | **Get** /usergroups/{group_id}/activedirectories | List the Active Directories associated with a User Group -[**GraphUserGroupTraverseApplication**](UserGroupsApi.md#GraphUserGroupTraverseApplication) | **Get** /usergroups/{group_id}/applications | List the Applications associated with a User Group -[**GraphUserGroupTraverseDirectory**](UserGroupsApi.md#GraphUserGroupTraverseDirectory) | **Get** /usergroups/{group_id}/directories | List the Directories associated with a User Group -[**GraphUserGroupTraverseGSuite**](UserGroupsApi.md#GraphUserGroupTraverseGSuite) | **Get** /usergroups/{group_id}/gsuites | List the G Suite instances associated with a User Group -[**GraphUserGroupTraverseLdapServer**](UserGroupsApi.md#GraphUserGroupTraverseLdapServer) | **Get** /usergroups/{group_id}/ldapservers | List the LDAP Servers associated with a User Group -[**GraphUserGroupTraverseOffice365**](UserGroupsApi.md#GraphUserGroupTraverseOffice365) | **Get** /usergroups/{group_id}/office365s | List the Office 365 instances associated with a User Group -[**GraphUserGroupTraverseRadiusServer**](UserGroupsApi.md#GraphUserGroupTraverseRadiusServer) | **Get** /usergroups/{group_id}/radiusservers | List the RADIUS Servers associated with a User Group -[**GraphUserGroupTraverseSystem**](UserGroupsApi.md#GraphUserGroupTraverseSystem) | **Get** /usergroups/{group_id}/systems | List the Systems associated with a User Group -[**GraphUserGroupTraverseSystemGroup**](UserGroupsApi.md#GraphUserGroupTraverseSystemGroup) | **Get** /usergroups/{group_id}/systemgroups | List the System Groups associated with User Groups +[**GraphUserGroupTraverseActiveDirectory**](UserGroupsApi.md#GraphUserGroupTraverseActiveDirectory) | **Get** /usergroups/{group_id}/activedirectories | List the Active Directories bound to a User Group +[**GraphUserGroupTraverseApplication**](UserGroupsApi.md#GraphUserGroupTraverseApplication) | **Get** /usergroups/{group_id}/applications | List the Applications bound to a User Group +[**GraphUserGroupTraverseDirectory**](UserGroupsApi.md#GraphUserGroupTraverseDirectory) | **Get** /usergroups/{group_id}/directories | List the Directories bound to a User Group +[**GraphUserGroupTraverseGSuite**](UserGroupsApi.md#GraphUserGroupTraverseGSuite) | **Get** /usergroups/{group_id}/gsuites | List the G Suite instances bound to a User Group +[**GraphUserGroupTraverseLdapServer**](UserGroupsApi.md#GraphUserGroupTraverseLdapServer) | **Get** /usergroups/{group_id}/ldapservers | List the LDAP Servers bound to a User Group +[**GraphUserGroupTraverseOffice365**](UserGroupsApi.md#GraphUserGroupTraverseOffice365) | **Get** /usergroups/{group_id}/office365s | List the Office 365 instances bound to a User Group +[**GraphUserGroupTraverseRadiusServer**](UserGroupsApi.md#GraphUserGroupTraverseRadiusServer) | **Get** /usergroups/{group_id}/radiusservers | List the RADIUS Servers bound to a User Group +[**GraphUserGroupTraverseSystem**](UserGroupsApi.md#GraphUserGroupTraverseSystem) | **Get** /usergroups/{group_id}/systems | List the Systems bound to a User Group +[**GraphUserGroupTraverseSystemGroup**](UserGroupsApi.md#GraphUserGroupTraverseSystemGroup) | **Get** /usergroups/{group_id}/systemgroups | List the System Groups bound to User Groups [**GroupsUserDelete**](UserGroupsApi.md#GroupsUserDelete) | **Delete** /usergroups/{id} | Delete a User Group [**GroupsUserGet**](UserGroupsApi.md#GroupsUserGet) | **Get** /usergroups/{id} | View an indvidual User Group details [**GroupsUserList**](UserGroupsApi.md#GroupsUserList) | **Get** /usergroups | List all User Groups @@ -28,7 +28,7 @@ Method | HTTP request | Description # **GraphUserGroupAssociationsList** -> []GraphConnection GraphUserGroupAssociationsList(ctx, groupId, targets, contentType, accept, optional) +> []GraphConnection GraphUserGroupAssociationsList(ctx, groupId, contentType, accept, targets, optional) List the associations of a User Group. This endpoint returns the _direct_ associations of this User Group. A direct association can be a non-homogenous relationship between 2 different objects. for example User Groups and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/associations?targets=user ``` @@ -37,11 +37,11 @@ This endpoint returns the _direct_ associations of this User Group. A direct as Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | - **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **targets** | [**[]string**](string.md)| | **optional** | **map[string]interface{}** | optional parameters | nil if no parameters ### Optional Parameters @@ -50,9 +50,9 @@ Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **groupId** | **string**| ObjectID of the User Group. | - **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **targets** | [**[]string**](string.md)| | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] @@ -81,7 +81,7 @@ This endpoint manages the _direct_ associations of this User Group. A direct as Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -122,7 +122,7 @@ This endpoint returns all User Groups a User Group is a member of. #### Sample Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -136,8 +136,10 @@ Name | Type | Description | Notes **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | ### Return type @@ -164,7 +166,7 @@ This endpoint returns the user members of a User Group. #### Sample Request ``` Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -206,7 +208,7 @@ This endpoint allows you to manage the user members of a User Group. #### Sampl Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -247,7 +249,7 @@ This endpoint returns all users members that are a member of this User Group. # Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -261,8 +263,10 @@ Name | Type | Description | Notes **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | ### Return type @@ -281,15 +285,15 @@ Name | Type | Description | Notes # **GraphUserGroupTraverseActiveDirectory** > []GraphObjectWithPaths GraphUserGroupTraverseActiveDirectory(ctx, groupId, contentType, accept, optional) -List the Active Directories associated with a User Group +List the Active Directories bound to a User Group -This endpoint will return the Active Directories associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding Active Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Active Directory from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/activedirectories ``` +This endpoint will return all Active Directory Instances bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding Active Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Active Directory from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/activedirectories ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -323,15 +327,15 @@ Name | Type | Description | Notes # **GraphUserGroupTraverseApplication** > []GraphObjectWithPaths GraphUserGroupTraverseApplication(ctx, groupId, contentType, accept, optional) -List the Applications associated with a User Group +List the Applications bound to a User Group -This endpoint will return Applications associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding Application; this array represents all grouping and/or associations that would have to be removed to deprovision the Application from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/applications ``` +This endpoint will return all Applications bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding Application; this array represents all grouping and/or associations that would have to be removed to deprovision the Application from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/applications ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -365,15 +369,15 @@ Name | Type | Description | Notes # **GraphUserGroupTraverseDirectory** > []GraphObjectWithPaths GraphUserGroupTraverseDirectory(ctx, groupId, contentType, accept, optional) -List the Directories associated with a User Group +List the Directories bound to a User Group -This endpoint will return Directories associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Directories from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/directories ``` +This endpoint will return all Directories bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Directories from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/directories ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -407,15 +411,15 @@ Name | Type | Description | Notes # **GraphUserGroupTraverseGSuite** > []GraphObjectWithPaths GraphUserGroupTraverseGSuite(ctx, groupId, contentType, accept, optional) -List the G Suite instances associated with a User Group +List the G Suite instances bound to a User Group -This endpoint will return the G Suite instances associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding G Suite instance; this array represents all grouping and/or associations that would have to be removed to deprovision the G Suite instance from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/gsuites ``` +This endpoint will return all Gsuite Instances bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding G Suite instance; this array represents all grouping and/or associations that would have to be removed to deprovision the G Suite instance from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/gsuites ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -449,15 +453,15 @@ Name | Type | Description | Notes # **GraphUserGroupTraverseLdapServer** > []GraphObjectWithPaths GraphUserGroupTraverseLdapServer(ctx, groupId, contentType, accept, optional) -List the LDAP Servers associated with a User Group +List the LDAP Servers bound to a User Group -This endpoint will return the LDAP Servers associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding LDAP Server; this array represents all grouping and/or associations that would have to be removed to deprovision the LDAP Server from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/ldapservers ``` +This endpoint will return all LDAP Servers bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding LDAP Server; this array represents all grouping and/or associations that would have to be removed to deprovision the LDAP Server from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/ldapservers ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -491,15 +495,15 @@ Name | Type | Description | Notes # **GraphUserGroupTraverseOffice365** > []GraphObjectWithPaths GraphUserGroupTraverseOffice365(ctx, groupId, contentType, accept, optional) -List the Office 365 instances associated with a User Group +List the Office 365 instances bound to a User Group -This endpoint will return the Office 365 instances associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding Office 365 instance; this array represents all grouping and/or associations that would have to be removed to deprovision the Office 365 instance from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/office365s ``` +This endpoint will return all Office 365 instances bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding Office 365 instance; this array represents all grouping and/or associations that would have to be removed to deprovision the Office 365 instance from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/office365s ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -533,15 +537,15 @@ Name | Type | Description | Notes # **GraphUserGroupTraverseRadiusServer** > []GraphObjectWithPaths GraphUserGroupTraverseRadiusServer(ctx, groupId, contentType, accept, optional) -List the RADIUS Servers associated with a User Group +List the RADIUS Servers bound to a User Group -This endpoint will return a RADIUS Servers associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding RADIUS Server; this array represents all grouping and/or associations that would have to be removed to deprovision the RADIUS Server from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/radiusservers ``` +This endpoint will return all RADIUS servers bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding RADIUS Server; this array represents all grouping and/or associations that would have to be removed to deprovision the RADIUS Server from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/radiusservers ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -575,15 +579,15 @@ Name | Type | Description | Notes # **GraphUserGroupTraverseSystem** > []GraphObjectWithPaths GraphUserGroupTraverseSystem(ctx, groupId, contentType, accept, optional) -List the Systems associated with a User Group +List the Systems bound to a User Group -This endpoint will return Systems associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/systems ``` +This endpoint will return all Systems bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/systems ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -617,15 +621,15 @@ Name | Type | Description | Notes # **GraphUserGroupTraverseSystemGroup** > []GraphObjectWithPaths GraphUserGroupTraverseSystemGroup(ctx, groupId, contentType, accept, optional) -List the System Groups associated with User Groups +List the System Groups bound to User Groups -This endpoint will return System Groups associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/systemsgroups ``` +This endpoint will return all System Groups bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/systemsgroups ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **groupId** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -667,7 +671,7 @@ This endpoint allows you to delete a User Group. #### Sample Request ``` https: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **id** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -697,7 +701,7 @@ This endpoint allows you to view the details of a User Group. #### Sample Reque Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **id** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -727,7 +731,7 @@ This endpoint returns all User Groups. Available filter fields: - `name` - Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -739,11 +743,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] - **fields** | **string**| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | [default to ] - **filter** | **string**| Supported operators are: eq, ne, gt, ge, lt, le, between, search | [default to ] + **fields** | [**[]string**](string.md)| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] - **sort** | **string**| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | [default to ] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | ### Return type @@ -770,7 +774,7 @@ We have hidden PATCH on the systemgroups and usergroups for now; we don't have t Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **id** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -784,7 +788,7 @@ Name | Type | Description | Notes **id** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] - **body** | [**UserGroupData**](UserGroupData.md)| | + **body** | [**UserGroupPost**](UserGroupPost.md)| | ### Return type @@ -811,7 +815,7 @@ This endpoint allows you to create a new User Group. #### Sample Request ``` ht Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -823,7 +827,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] - **body** | [**UserGroupData**](UserGroupData.md)| | + **body** | [**UserGroupPost**](UserGroupPost.md)| | ### Return type @@ -850,7 +854,7 @@ This enpoint allows you to do a full update of the User Group. #### Sample Requ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **id** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -864,7 +868,7 @@ Name | Type | Description | Notes **id** | **string**| ObjectID of the User Group. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] - **body** | [**UserGroupData**](UserGroupData.md)| | + **body** | [**UserGroupPut**](UserGroupPut.md)| | ### Return type diff --git a/v2/docs/UsersApi.md b/v2/docs/UsersApi.md index 2833e70..af74ddd 100644 --- a/v2/docs/UsersApi.md +++ b/v2/docs/UsersApi.md @@ -7,17 +7,18 @@ Method | HTTP request | Description [**GraphUserAssociationsList**](UsersApi.md#GraphUserAssociationsList) | **Get** /users/{user_id}/associations | List the associations of a User [**GraphUserAssociationsPost**](UsersApi.md#GraphUserAssociationsPost) | **Post** /users/{user_id}/associations | Manage the associations of a User [**GraphUserMemberOf**](UsersApi.md#GraphUserMemberOf) | **Get** /users/{user_id}/memberof | List the parent Groups of a User -[**GraphUserTraverseApplication**](UsersApi.md#GraphUserTraverseApplication) | **Get** /users/{user_id}/applications | List the Applications associated with a User -[**GraphUserTraverseDirectory**](UsersApi.md#GraphUserTraverseDirectory) | **Get** /users/{user_id}/directories | List the Directories associated with a User -[**GraphUserTraverseGSuite**](UsersApi.md#GraphUserTraverseGSuite) | **Get** /users/{user_id}/gsuites | List the G Suite instances associated with a User -[**GraphUserTraverseLdapServer**](UsersApi.md#GraphUserTraverseLdapServer) | **Get** /users/{user_id}/ldapservers | List the LDAP servers associated with a User -[**GraphUserTraverseOffice365**](UsersApi.md#GraphUserTraverseOffice365) | **Get** /users/{user_id}/office365s | List the Office 365 instances associated with User -[**GraphUserTraverseRadiusServer**](UsersApi.md#GraphUserTraverseRadiusServer) | **Get** /users/{user_id}/radiusservers | List the RADIUS Servers associated with a User -[**GraphUserTraverseSystem**](UsersApi.md#GraphUserTraverseSystem) | **Get** /users/{user_id}/systems | List the Systems associated with a User +[**GraphUserTraverseApplication**](UsersApi.md#GraphUserTraverseApplication) | **Get** /users/{user_id}/applications | List the Applications bound to a User +[**GraphUserTraverseDirectory**](UsersApi.md#GraphUserTraverseDirectory) | **Get** /users/{user_id}/directories | List the Directories bound to a User +[**GraphUserTraverseGSuite**](UsersApi.md#GraphUserTraverseGSuite) | **Get** /users/{user_id}/gsuites | List the G Suite instances bound to a User +[**GraphUserTraverseLdapServer**](UsersApi.md#GraphUserTraverseLdapServer) | **Get** /users/{user_id}/ldapservers | List the LDAP servers bound to a User +[**GraphUserTraverseOffice365**](UsersApi.md#GraphUserTraverseOffice365) | **Get** /users/{user_id}/office365s | List the Office 365 instances bound to a User +[**GraphUserTraverseRadiusServer**](UsersApi.md#GraphUserTraverseRadiusServer) | **Get** /users/{user_id}/radiusservers | List the RADIUS Servers bound to a User +[**GraphUserTraverseSystem**](UsersApi.md#GraphUserTraverseSystem) | **Get** /users/{user_id}/systems | List the Systems bound to a User +[**GraphUserTraverseSystemGroup**](UsersApi.md#GraphUserTraverseSystemGroup) | **Get** /users/{user_id}/systemgroups | List the System Groups bound to a User # **GraphUserAssociationsList** -> []GraphConnection GraphUserAssociationsList(ctx, userId, targets, contentType, accept, optional) +> []GraphConnection GraphUserAssociationsList(ctx, userId, contentType, accept, targets, optional) List the associations of a User This endpoint returns the _direct_ associations of a User. A direct association can be a non-homogenous relationship between 2 different objects. for example Users and Systems. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/associations?targets=user_group ``` @@ -26,11 +27,11 @@ This endpoint returns the _direct_ associations of a User. A direct association Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **userId** | **string**| ObjectID of the User. | - **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **targets** | [**[]string**](string.md)| | **optional** | **map[string]interface{}** | optional parameters | nil if no parameters ### Optional Parameters @@ -39,9 +40,9 @@ Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **userId** | **string**| ObjectID of the User. | - **targets** | [**[]string**](string.md)| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **targets** | [**[]string**](string.md)| | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] @@ -70,7 +71,7 @@ This endpoint allows you to manage the _direct_ associations of a User. A direc Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **userId** | **string**| ObjectID of the User. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -84,7 +85,7 @@ Name | Type | Description | Notes **userId** | **string**| ObjectID of the User. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] - **body** | [**GraphManagementReq**](GraphManagementReq.md)| | + **body** | [**UserGraphManagementReq**](UserGraphManagementReq.md)| | ### Return type @@ -111,7 +112,7 @@ This endpoint returns all the User Groups a User is a member of. #### Sample Re Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **userId** | **string**| ObjectID of the User. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -125,8 +126,10 @@ Name | Type | Description | Notes **userId** | **string**| ObjectID of the User. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | ### Return type @@ -145,15 +148,15 @@ Name | Type | Description | Notes # **GraphUserTraverseApplication** > []GraphObjectWithPaths GraphUserTraverseApplication(ctx, userId, contentType, accept, optional) -List the Applications associated with a User +List the Applications bound to a User -This endpoint will return Applications associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding Application; this array represents all grouping and/or associations that would have to be removed to deprovision the Application from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/applications ``` +This endpoint will return all Applications bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding Application; this array represents all grouping and/or associations that would have to be removed to deprovision the Application from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/applications ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **userId** | **string**| ObjectID of the User. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -187,15 +190,15 @@ Name | Type | Description | Notes # **GraphUserTraverseDirectory** > []GraphObjectWithPaths GraphUserTraverseDirectory(ctx, userId, contentType, accept, optional) -List the Directories associated with a User +List the Directories bound to a User -This endpoint will return Directories associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Directory from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/directories ``` +This endpoint will return all Directories bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Directory from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/directories ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **userId** | **string**| ObjectID of the User. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -229,15 +232,15 @@ Name | Type | Description | Notes # **GraphUserTraverseGSuite** > []GraphObjectWithPaths GraphUserTraverseGSuite(ctx, userId, contentType, accept, optional) -List the G Suite instances associated with a User +List the G Suite instances bound to a User -This endpoint will return G Suite instances associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding G Suite instance; this array represents all grouping and/or associations that would have to be removed to deprovision the G Suite instance from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/gsuites ``` +This endpoint will return all G-Suite Instances bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding G Suite instance; this array represents all grouping and/or associations that would have to be removed to deprovision the G Suite instance from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/gsuites ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **userId** | **string**| ObjectID of the User. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -271,15 +274,15 @@ Name | Type | Description | Notes # **GraphUserTraverseLdapServer** > []GraphObjectWithPaths GraphUserTraverseLdapServer(ctx, userId, contentType, accept, optional) -List the LDAP servers associated with a User +List the LDAP servers bound to a User -This endpoint will return LDAP Servers associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding LDAP Server; this array represents all grouping and/or associations that would have to be removed to deprovision the LDAP Server from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/ldapservers ``` +This endpoint will return all LDAP Servers bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding LDAP Server; this array represents all grouping and/or associations that would have to be removed to deprovision the LDAP Server from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/ldapservers ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **userId** | **string**| ObjectID of the User. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -313,15 +316,15 @@ Name | Type | Description | Notes # **GraphUserTraverseOffice365** > []GraphObjectWithPaths GraphUserTraverseOffice365(ctx, userId, contentType, accept, optional) -List the Office 365 instances associated with User +List the Office 365 instances bound to a User -This endpoint will return Office 365 instances associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding Office 365 instance; this array represents all grouping and/or associations that would have to be removed to deprovision the Office 365 instance from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/office365s ``` +This endpoint will return all Office 365 Instances bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding Office 365 instance; this array represents all grouping and/or associations that would have to be removed to deprovision the Office 365 instance from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/office365s ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **userId** | **string**| ObjectID of the User. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -355,15 +358,15 @@ Name | Type | Description | Notes # **GraphUserTraverseRadiusServer** > []GraphObjectWithPaths GraphUserTraverseRadiusServer(ctx, userId, contentType, accept, optional) -List the RADIUS Servers associated with a User +List the RADIUS Servers bound to a User -This endpoint will return RADIUS Servers associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding RADIUS Server; this array represents all grouping and/or associations that would have to be removed to deprovision the RADIUS Server from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/radiusservers ``` +This endpoint will return all RADIUS Servers bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding RADIUS Server; this array represents all grouping and/or associations that would have to be removed to deprovision the RADIUS Server from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/radiusservers ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **userId** | **string**| ObjectID of the User. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -397,15 +400,57 @@ Name | Type | Description | Notes # **GraphUserTraverseSystem** > []GraphObjectWithPaths GraphUserTraverseSystem(ctx, userId, contentType, accept, optional) -List the Systems associated with a User +List the Systems bound to a User + +This endpoint will return all Systems bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/systems ``` + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **userId** | **string**| ObjectID of the User. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **string**| ObjectID of the User. | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **limit** | **int32**| The number of records to return at once. | [default to 10] + **skip** | **int32**| The offset into the records to return. | [default to 0] + +### Return type + +[**[]GraphObjectWithPaths**](GraphObjectWithPaths.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GraphUserTraverseSystemGroup** +> []GraphObjectWithPaths GraphUserTraverseSystemGroup(ctx, userId, contentType, accept, optional) +List the System Groups bound to a User -This endpoint will return Systems associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/systems ``` +This endpoint will return all System Groups bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/systemgroups ``` ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **userId** | **string**| ObjectID of the User. | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] diff --git a/v2/docs/WorkdayFields.md b/v2/docs/WorkdayFields.md new file mode 100644 index 0000000..ffaf69a --- /dev/null +++ b/v2/docs/WorkdayFields.md @@ -0,0 +1,11 @@ +# WorkdayFields + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ReportUrl** | **string** | | [optional] [default to null] +**Name** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/v2/docs/WorkdayApi.md b/v2/docs/WorkdayImportApi.md similarity index 52% rename from v2/docs/WorkdayApi.md rename to v2/docs/WorkdayImportApi.md index a8247b1..9f795ff 100644 --- a/v2/docs/WorkdayApi.md +++ b/v2/docs/WorkdayImportApi.md @@ -1,30 +1,33 @@ -# \WorkdayApi +# \WorkdayImportApi All URIs are relative to *https://console.jumpcloud.com/api/v2* Method | HTTP request | Description ------------- | ------------- | ------------- -[**WorkdaysDelete**](WorkdayApi.md#WorkdaysDelete) | **Delete** /workdays/{id} | Delete Workday -[**WorkdaysGet**](WorkdayApi.md#WorkdaysGet) | **Get** /workdays/{id} | Get Workday -[**WorkdaysList**](WorkdayApi.md#WorkdaysList) | **Get** /workdays | List Workdays -[**WorkdaysPost**](WorkdayApi.md#WorkdaysPost) | **Post** /workdays | Create new Workday -[**WorkdaysPut**](WorkdayApi.md#WorkdaysPut) | **Put** /workdays/{id} | Update Workday -[**WorkdaysReport**](WorkdayApi.md#WorkdaysReport) | **Get** /workdays/{id}/report | Get Workday Report Results -[**WorkdaysSettings**](WorkdayApi.md#WorkdaysSettings) | **Get** /workdays/settings | Get Workday Settings +[**WorkdaysAuthorize**](WorkdayImportApi.md#WorkdaysAuthorize) | **Post** /workdays/{workday_id}/auth | Authorize Workday +[**WorkdaysDeauthorize**](WorkdayImportApi.md#WorkdaysDeauthorize) | **Delete** /workdays/{workday_id}/auth | Deauthorize Workday +[**WorkdaysDelete**](WorkdayImportApi.md#WorkdaysDelete) | **Delete** /workdays/{id} | Delete Workday +[**WorkdaysGet**](WorkdayImportApi.md#WorkdaysGet) | **Get** /workdays/{id} | Get Workday +[**WorkdaysImport**](WorkdayImportApi.md#WorkdaysImport) | **Post** /workdays/{workday_id}/import/ | Workday Import +[**WorkdaysList**](WorkdayImportApi.md#WorkdaysList) | **Get** /workdays | List Workdays +[**WorkdaysPost**](WorkdayImportApi.md#WorkdaysPost) | **Post** /workdays | Create new Workday +[**WorkdaysPut**](WorkdayImportApi.md#WorkdaysPut) | **Put** /workdays/{id} | Update Workday +[**WorkdaysSettings**](WorkdayImportApi.md#WorkdaysSettings) | **Get** /workdays/settings | Get Workday Settings +[**WorkdaysWorkers**](WorkdayImportApi.md#WorkdaysWorkers) | **Get** /workdays/{workday_id}/workers | List Workday Workers -# **WorkdaysDelete** -> WorkdaysDelete(ctx, id, contentType, accept, optional) -Delete Workday +# **WorkdaysAuthorize** +> WorkdaysAuthorize(ctx, workdayId, contentType, accept, optional) +Authorize Workday -This endpoint allows you to delete a workday +Adds an authorization method to a workday instance ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **id** | **string**| | + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **workdayId** | **string**| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -34,10 +37,40 @@ Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **string**| | + **workdayId** | **string**| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] - **body** | [**WorkdayRequest**](WorkdayRequest.md)| | + **body** | [**AuthInputObject**](AuthInputObject.md)| | + +### Return type + + (empty response body) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **WorkdaysDeauthorize** +> WorkdaysDeauthorize(ctx, workdayId, contentType, accept) +Deauthorize Workday + +Removes any and all authorization methods from the workday instance + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **workdayId** | **string**| | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] ### Return type @@ -54,15 +87,47 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **WorkdaysDelete** +> interface{} WorkdaysDelete(ctx, id, contentType, accept) +Delete Workday + +This endpoint allows you to delete an instance of Workday. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **id** | **string**| | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + +### Return type + +[**interface{}**](interface{}.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **WorkdaysGet** > WorkdayOutput WorkdaysGet(ctx, id, contentType, accept) Get Workday +This endpoint will return all the available information about an instance of Workday. + ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **id** | **string**| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -82,15 +147,58 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **WorkdaysImport** +> JobId WorkdaysImport(ctx, workdayId, contentType, accept, optional) +Workday Import + +Still in development. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **workdayId** | **string**| | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **optional** | **map[string]interface{}** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a map[string]interface{}. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **workdayId** | **string**| | + **contentType** | **string**| | [default to application/json] + **accept** | **string**| | [default to application/json] + **body** | [**[]WorkdayWorker**](workday-worker.md)| | + +### Return type + +[**JobId**](job-id.md) + +### Authorization + +[x-api-key](../README.md#x-api-key) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **WorkdaysList** > []WorkdayOutput WorkdaysList(ctx, contentType, accept, optional) List Workdays +This endpoint will return all the available information about all your instances of Workday. + ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -102,11 +210,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] - **fields** | **string**| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | [default to ] - **filter** | **string**| Supported operators are: eq, ne, gt, ge, lt, le, between, search | [default to ] + **fields** | [**[]string**](string.md)| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | **limit** | **int32**| The number of records to return at once. | [default to 10] **skip** | **int32**| The offset into the records to return. | [default to 0] - **sort** | **string**| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | [default to ] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | ### Return type @@ -127,13 +235,13 @@ Name | Type | Description | Notes > WorkdayOutput WorkdaysPost(ctx, contentType, accept, optional) Create new Workday -This endpoint allows you to create a new workday object +This endpoint allows you to create a new workday instance. You must supply a username and password for Basic Authentication that is the same as your WorkDay Integrator System User. Failure to provide these credentials will result in the request being rejected. ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -145,7 +253,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] - **body** | [**Body**](Body.md)| | + **body** | [**WorkdayInput**](WorkdayInput.md)| | ### Return type @@ -166,13 +274,13 @@ Name | Type | Description | Notes > WorkdayOutput WorkdaysPut(ctx, id, contentType, accept, optional) Update Workday -This endpoint allows you to update the name and report_url for a Workday Authentication Edit +This endpoint allows you to update the name and Custom Report URL for a Workday Instance. ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **id** | **string**| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] @@ -186,7 +294,7 @@ Name | Type | Description | Notes **id** | **string**| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] - **body** | [**WorkdayInput**](WorkdayInput.md)| | + **body** | [**WorkdayFields**](WorkdayFields.md)| | ### Return type @@ -203,16 +311,17 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **WorkdaysReport** -> WorkdayReportResult WorkdaysReport(ctx, id, contentType, accept, optional) -Get Workday Report Results +# **WorkdaysSettings** +> WorkdaysSettings(ctx, contentType, accept, optional) +Get Workday Settings + +This endpoint allows you to obtain all settings needed for creating a workday instance, specifically the URL to initiate Basic Authentication with WorkDay. ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication - **id** | **string**| | + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -222,17 +331,13 @@ Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **string**| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] - **fields** | **string**| The comma separated fields included in the returned records. If omitted the default list of fields will be returned. | [default to ] - **filter** | **string**| Supported operators are: eq, ne, gt, ge, lt, le, between, search | [default to ] - **sort** | **string**| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | [default to ] - **skip** | **int32**| The offset into the records to return. | [default to 0] + **state** | **string**| | ### Return type -[**WorkdayReportResult**](workday-report-result.md) + (empty response body) ### Authorization @@ -245,17 +350,18 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **WorkdaysSettings** -> InlineResponse200 WorkdaysSettings(ctx, contentType, accept, optional) -Get Workday Settings +# **WorkdaysWorkers** +> []WorkdayWorker WorkdaysWorkers(ctx, workdayId, contentType, accept, optional) +List Workday Workers -This endpoint allows you to obtain all settings needed for creating a workday instance, namely the URL to initiate an OAuth negotiation +This endpoint will return all of the data available in your WorkDay Custom Report that has been associated with your WorkDay Instance. ### Required Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **ctx** | **context.Context** | context containing the authentication | nil if no authentication + **ctx** | **context.Context** | context for logging, tracing, authentication, etc. + **workdayId** | **string**| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] **optional** | **map[string]interface{}** | optional parameters | nil if no parameters @@ -265,13 +371,17 @@ Optional parameters are passed through a map[string]interface{}. Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **workdayId** | **string**| | **contentType** | **string**| | [default to application/json] **accept** | **string**| | [default to application/json] - **state** | **string**| | + **filter** | [**[]string**](string.md)| Supported operators are: eq, ne, gt, ge, lt, le, between, search, in | + **skip** | **int32**| The offset into the records to return. | [default to 0] + **sort** | [**[]string**](string.md)| The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. | + **limit** | **int32**| The number of records to return at once. | [default to 10] ### Return type -[**InlineResponse200**](inline_response_200.md) +[**[]WorkdayWorker**](workday-worker.md) ### Authorization diff --git a/v2/docs/WorkdayInput.md b/v2/docs/WorkdayInput.md index 756cce8..c317684 100644 --- a/v2/docs/WorkdayInput.md +++ b/v2/docs/WorkdayInput.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ReportUrl** | **string** | | [optional] [default to null] **Name** | **string** | | [optional] [default to null] -**Oauth** | [***OauthCodeInput**](oauth-code-input.md) | | [optional] [default to null] +**Auth** | [***AuthInput**](auth-input.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/v2/docs/WorkdayOutput.md b/v2/docs/WorkdayOutput.md index a015877..89efb55 100644 --- a/v2/docs/WorkdayOutput.md +++ b/v2/docs/WorkdayOutput.md @@ -3,10 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Id** | **string** | | [default to null] -**Name** | **string** | | [default to null] -**ReportUrl** | **string** | | [default to null] -**LastImport** | **string** | | [default to null] +**Id** | **string** | | [optional] [default to null] +**Name** | **string** | | [optional] [default to null] +**ReportUrl** | **string** | | [optional] [default to null] +**LastImport** | **string** | | [optional] [default to null] +**Auth** | [***WorkdayoutputAuth**](workdayoutput_auth.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/v2/docs/WorkdayWorker.md b/v2/docs/WorkdayWorker.md new file mode 100644 index 0000000..5345bbf --- /dev/null +++ b/v2/docs/WorkdayWorker.md @@ -0,0 +1,14 @@ +# WorkdayWorker + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | | [optional] [default to null] +**FirstName** | **string** | | [optional] [default to null] +**LastName** | **string** | | [optional] [default to null] +**Email** | **string** | | [optional] [default to null] +**Attributes** | [***interface{}**](interface{}.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/v2/docs/Workdayimportresult.md b/v2/docs/Workdayimportresult.md new file mode 100644 index 0000000..52992f0 --- /dev/null +++ b/v2/docs/Workdayimportresult.md @@ -0,0 +1,11 @@ +# Workdayimportresult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Success** | **bool** | | [optional] [default to null] +**Result** | [***WorkdayimportresultResult**](workdayimportresult_result.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/v2/docs/WorkdayimportresultResult.md b/v2/docs/WorkdayimportresultResult.md new file mode 100644 index 0000000..23128d2 --- /dev/null +++ b/v2/docs/WorkdayimportresultResult.md @@ -0,0 +1,10 @@ +# WorkdayimportresultResult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Msg** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/v2/docs/WorkdayoutputAuth.md b/v2/docs/WorkdayoutputAuth.md new file mode 100644 index 0000000..3e85954 --- /dev/null +++ b/v2/docs/WorkdayoutputAuth.md @@ -0,0 +1,11 @@ +# WorkdayoutputAuth + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Basic** | [***AuthInfo**](auth-info.md) | | [optional] [default to null] +**Oauth** | [***AuthInfo**](auth-info.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/v2/g_suite_api.go b/v2/g_suite_api.go index b05be8c..195dd57 100644 --- a/v2/g_suite_api.go +++ b/v2/g_suite_api.go @@ -1,16 +1,16 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 import ( + "io/ioutil" "net/url" "net/http" "strings" @@ -28,8 +28,8 @@ type GSuiteApiService service /* GSuiteApiService List the associations of a G Suite instance - This endpoint returns the _direct_ associations of this G Suite instance. A direct association can be a non-homogenous relationship between 2 different objects. for example G Suite and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/gsuites/{gsuite_id}/associations?targets=user ``` - * @param ctx context.Context Authentication Context + This endpoint returns the _direct_ associations of this G Suite instance. A direct association can be a non-homogenous relationship between 2 different objects. for example G Suite and Users. #### Sample Request ``` curl -X GET 'https://console.jumpcloud.com/api/v2/gsuites/{Gsuite_ID}/associations?targets=user_group \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param gsuiteId ObjectID of the G Suite instance. @param targets @param contentType @@ -107,17 +107,18 @@ func (a *GSuiteApiService) GraphGSuiteAssociationsList(ctx context.Context, gsui return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -125,8 +126,8 @@ func (a *GSuiteApiService) GraphGSuiteAssociationsList(ctx context.Context, gsui } /* GSuiteApiService Manage the associations of a G Suite instance - This endpoint returns the _direct_ associations of this G Suite instance. A direct association can be a non-homogenous relationship between 2 different objects. for example G Suite and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/gsuites/{gsuite_id}/associations ``` - * @param ctx context.Context Authentication Context + This endpoint returns the _direct_ associations of this G Suite instance. A direct association can be a non-homogenous relationship between 2 different objects. for example G Suite and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/gsuites/{Gsuite_ID}/associations \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user_group\", \"id\": \"{Group_ID}\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param gsuiteId ObjectID of the G Suite instance. @param optional (nil or map[string]interface{}) with one or more of: @param "body" (GraphManagementReq) @@ -188,21 +189,22 @@ func (a *GSuiteApiService) GraphGSuiteAssociationsPost(ctx context.Context, gsui return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } -/* GSuiteApiService List the Users associated with a G Suite instance - This endpoint will return Users associated with a G Suite instance. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this G Suite instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this G Suite instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/gsuites/{gsuite_id}/users ``` - * @param ctx context.Context Authentication Context +/* GSuiteApiService List the Users bound to a G Suite instance + This endpoint will return all Users bound to a G Suite instance, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this G Suite instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this G Suite instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/gsuites/{Gsuite_ID}/users \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param gsuiteId ObjectID of the G Suite instance. @param contentType @param accept @@ -278,26 +280,27 @@ func (a *GSuiteApiService) GraphGSuiteTraverseUser(ctx context.Context, gsuiteId return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GSuiteApiService List the User Groups associated with a G Suite instance - This endpoint will return User Groups associated with a G Suite instance. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this G Suite instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this G Suite instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/gsuites/{gsuite_id}/usersgroups ``` - * @param ctx context.Context Authentication Context +/* GSuiteApiService List the User Groups bound to a G Suite instance + This endpoint will return all User Groups bound to an G Suite instance, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this G Suite instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this G Suite instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/gsuites/{GSuite_ID}/usergroups \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param gsuiteId ObjectID of the G Suite instance. @param contentType @param accept @@ -373,17 +376,18 @@ func (a *GSuiteApiService) GraphGSuiteTraverseUserGroup(ctx context.Context, gsu return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } diff --git a/v2/git_push.sh b/v2/git_push.sh index ed37461..ae01b18 100644 --- a/v2/git_push.sh +++ b/v2/git_push.sh @@ -36,7 +36,7 @@ git_remote=`git remote` if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git else git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git diff --git a/v2/graph_api.go b/v2/graph_api.go index 6ae7d1e..83eb1d4 100644 --- a/v2/graph_api.go +++ b/v2/graph_api.go @@ -1,16 +1,16 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 import ( + "io/ioutil" "net/url" "net/http" "strings" @@ -28,8 +28,8 @@ type GraphApiService service /* GraphApiService List the associations of an Active Directory instance - This endpoint returns the direct associations of this Active Directory instance. A direct association can be a non-homogenous relationship between 2 different objects. For example Active Directory and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/activedirectories/{activedirectory_id}/associations?targets=user ``` - * @param ctx context.Context Authentication Context + This endpoint returns the direct associations of this Active Directory instance. A direct association can be a non-homogenous relationship between 2 different objects. For example Active Directory and Users. #### Sample Request ``` curl -X GET 'https://console.jumpcloud.com/api/v2/activedirectories/{ActiveDirectory_ID}/associations?targets=user \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param activedirectoryId @param targets @param contentType @@ -107,17 +107,18 @@ func (a *GraphApiService) GraphActiveDirectoryAssociationsList(ctx context.Conte return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -125,8 +126,8 @@ func (a *GraphApiService) GraphActiveDirectoryAssociationsList(ctx context.Conte } /* GraphApiService Manage the associations of an Active Directory instance - This endpoint allows you to manage the _direct_ associations of an Active Directory instance. A direct association can be a non-homogenous relationship between 2 different objects. For example Active Directory and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/activedirectories/{activedirectory_id}/associations ``` - * @param ctx context.Context Authentication Context + This endpoint allows you to manage the _direct_ associations of an Active Directory instance. A direct association can be a non-homogenous relationship between 2 different objects. For example Active Directory and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/activedirectories/{AD_Instance_ID}/associations \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user\", \"id\": \"{User_ID}\" } ' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param activedirectoryId @param contentType @param accept @@ -192,21 +193,22 @@ func (a *GraphApiService) GraphActiveDirectoryAssociationsPost(ctx context.Conte return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } -/* GraphApiService List the User Groups associated with an Active Directory instance - This endpoint will return User Groups associated with an Active Directory instance. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Active Directory instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this Active Directory instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/activedirectories/{activedirectory_id}/usersgroups ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the User Groups bound to an Active Directory instance + This endpoint will return all Users Groups bound to an Active Directory instance, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Active Directory instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this Active Directory instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/activedirectories/{ActiveDirectory_ID}/usergroups \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param activedirectoryId ObjectID of the Active Directory instance. @param contentType @param accept @@ -282,17 +284,18 @@ func (a *GraphApiService) GraphActiveDirectoryTraverseUserGroup(ctx context.Cont return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -300,8 +303,8 @@ func (a *GraphApiService) GraphActiveDirectoryTraverseUserGroup(ctx context.Cont } /* GraphApiService List the associations of an Application - This endpoint will return the _direct_ associations of an Application. A direct association can be a non-homogenous relationship between 2 different objects. for example Applications and User Groups. #### Sample Request ``` https://console.jumpcloud.com/api/v2/applications/{application_id}/associations?targets=user_group ``` - * @param ctx context.Context Authentication Context + This endpoint will return the _direct_ associations of an Application. A direct association can be a non-homogenous relationship between 2 different objects. for example Applications and User Groups. #### Sample Request ``` curl -X GET 'https://console.jumpcloud.com/api/v2/applications/{Application_ID}/associations?targets=user_group \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param applicationId ObjectID of the Application. @param targets @param contentType @@ -379,17 +382,18 @@ func (a *GraphApiService) GraphApplicationAssociationsList(ctx context.Context, return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -397,8 +401,8 @@ func (a *GraphApiService) GraphApplicationAssociationsList(ctx context.Context, } /* GraphApiService Manage the associations of an Application - This endpoint allows you to manage the _direct_ associations of an Application. A direct association can be a non-homogenous relationship between 2 different objects. for example Application and User Groups. #### Sample Request ``` https://console.jumpcloud.com/api/v2/applications/{application_id}/associations ``` - * @param ctx context.Context Authentication Context + This endpoint allows you to manage the _direct_ associations of an Application. A direct association can be a non-homogenous relationship between 2 different objects. for example Application and User Groups. #### Sample Request ``` curl -X POST 'https://console.jumpcloud.com/api/v2/applications/{Application_ID}/associations' \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user_group\", \"id\": \"{Group_ID}\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param applicationId ObjectID of the Application. @param contentType @param accept @@ -464,21 +468,22 @@ func (a *GraphApiService) GraphApplicationAssociationsPost(ctx context.Context, return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } -/* GraphApiService List the Users associated with an Application - This endpoint will return Users associated with an Application. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Application to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this Application. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/applications/{application_id}/users ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the Users bound to an Application + This endpoint will return all Users bound to an Application, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Application to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this Application. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/applications/{Application_ID}/users \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param applicationId ObjectID of the Application. @param contentType @param accept @@ -554,26 +559,27 @@ func (a *GraphApiService) GraphApplicationTraverseUser(ctx context.Context, appl return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the User Groups associated with an Application - This endpoint will return User Groups associated with an Application. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Application to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this Application. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/applications/{application_id}/usergroups ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the User Groups bound to an Application + This endpoint will return all Users Groups bound to an Application, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Application to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this Application. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/applications/{Application_ID}/usergroups \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param applicationId ObjectID of the Application. @param contentType @param accept @@ -649,17 +655,18 @@ func (a *GraphApiService) GraphApplicationTraverseUserGroup(ctx context.Context, return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -667,8 +674,8 @@ func (a *GraphApiService) GraphApplicationTraverseUserGroup(ctx context.Context, } /* GraphApiService List the associations of a Command - This endpoint will return the _direct_ associations of this Command. A direct association can be a non-homogenous relationship between 2 different objects. for example Commands and User Groups. #### Sample Request ``` https://console.jumpcloud.com/api/v2/commands/{command_id}/associations?targets=user_group ``` - * @param ctx context.Context Authentication Context + This endpoint will return the _direct_ associations of this Command. A direct association can be a non-homogenous relationship between 2 different objects. for example Commands and User Groups. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/commands/{Command_ID}/associations?targets=system_group \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param commandId ObjectID of the Command. @param targets @param contentType @@ -746,17 +753,18 @@ func (a *GraphApiService) GraphCommandAssociationsList(ctx context.Context, comm return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -764,8 +772,8 @@ func (a *GraphApiService) GraphCommandAssociationsList(ctx context.Context, comm } /* GraphApiService Manage the associations of a Command - This endpoint will allow you to manage the _direct_ associations of this Command. A direct association can be a non-homogenous relationship between 2 different objects. for example Commands and User Groups. #### Sample Request ``` https://console.jumpcloud.com/api/v2/commands/{command_id}/associations - * @param ctx context.Context Authentication Context + This endpoint will allow you to manage the _direct_ associations of this Command. A direct association can be a non-homogenous relationship between 2 different objects. for example Commands and User Groups. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/commands/{Command_ID}/associations \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"system_group\", \"id\": \"Group_ID\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param commandId ObjectID of the Command. @param contentType @param accept @@ -831,21 +839,22 @@ func (a *GraphApiService) GraphCommandAssociationsPost(ctx context.Context, comm return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } -/* GraphApiService List the Systems associated with a Command - This endpoint will return Systems associated with a Command. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Command to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this Command. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/commands/{command_id}/systems ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the Systems bound to a Command + This endpoint will return all Systems bound to a Command, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Command to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this Command. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/commands/{Command_ID}/systems \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param commandId ObjectID of the Command. @param contentType @param accept @@ -921,26 +930,27 @@ func (a *GraphApiService) GraphCommandTraverseSystem(ctx context.Context, comman return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the System Groups associated with a Command - This endpoint will return System Groups associated with a Command. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Command to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this Command. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/commands/{command_id}/systemsgroups ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the System Groups bound to a Command + This endpoint will return all System Groups bound to a Command, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Command to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this Command. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/commands/{Command_ID}/systemgroups \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param commandId ObjectID of the Command. @param contentType @param accept @@ -1016,17 +1026,18 @@ func (a *GraphApiService) GraphCommandTraverseSystemGroup(ctx context.Context, c return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -1034,8 +1045,8 @@ func (a *GraphApiService) GraphCommandTraverseSystemGroup(ctx context.Context, c } /* GraphApiService List the associations of a G Suite instance - This endpoint returns the _direct_ associations of this G Suite instance. A direct association can be a non-homogenous relationship between 2 different objects. for example G Suite and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/gsuites/{gsuite_id}/associations?targets=user ``` - * @param ctx context.Context Authentication Context + This endpoint returns the _direct_ associations of this G Suite instance. A direct association can be a non-homogenous relationship between 2 different objects. for example G Suite and Users. #### Sample Request ``` curl -X GET 'https://console.jumpcloud.com/api/v2/gsuites/{Gsuite_ID}/associations?targets=user_group \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param gsuiteId ObjectID of the G Suite instance. @param targets @param contentType @@ -1113,17 +1124,18 @@ func (a *GraphApiService) GraphGSuiteAssociationsList(ctx context.Context, gsuit return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -1131,8 +1143,8 @@ func (a *GraphApiService) GraphGSuiteAssociationsList(ctx context.Context, gsuit } /* GraphApiService Manage the associations of a G Suite instance - This endpoint returns the _direct_ associations of this G Suite instance. A direct association can be a non-homogenous relationship between 2 different objects. for example G Suite and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/gsuites/{gsuite_id}/associations ``` - * @param ctx context.Context Authentication Context + This endpoint returns the _direct_ associations of this G Suite instance. A direct association can be a non-homogenous relationship between 2 different objects. for example G Suite and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/gsuites/{Gsuite_ID}/associations \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user_group\", \"id\": \"{Group_ID}\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param gsuiteId ObjectID of the G Suite instance. @param optional (nil or map[string]interface{}) with one or more of: @param "body" (GraphManagementReq) @@ -1194,21 +1206,22 @@ func (a *GraphApiService) GraphGSuiteAssociationsPost(ctx context.Context, gsuit return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } -/* GraphApiService List the Users associated with a G Suite instance - This endpoint will return Users associated with a G Suite instance. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this G Suite instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this G Suite instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/gsuites/{gsuite_id}/users ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the Users bound to a G Suite instance + This endpoint will return all Users bound to a G Suite instance, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this G Suite instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this G Suite instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/gsuites/{Gsuite_ID}/users \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param gsuiteId ObjectID of the G Suite instance. @param contentType @param accept @@ -1284,26 +1297,27 @@ func (a *GraphApiService) GraphGSuiteTraverseUser(ctx context.Context, gsuiteId return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the User Groups associated with a G Suite instance - This endpoint will return User Groups associated with a G Suite instance. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this G Suite instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this G Suite instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/gsuites/{gsuite_id}/usersgroups ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the User Groups bound to a G Suite instance + This endpoint will return all User Groups bound to an G Suite instance, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this G Suite instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this G Suite instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/gsuites/{GSuite_ID}/usergroups \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param gsuiteId ObjectID of the G Suite instance. @param contentType @param accept @@ -1379,17 +1393,18 @@ func (a *GraphApiService) GraphGSuiteTraverseUserGroup(ctx context.Context, gsui return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -1397,8 +1412,8 @@ func (a *GraphApiService) GraphGSuiteTraverseUserGroup(ctx context.Context, gsui } /* GraphApiService List the associations of a LDAP Server - This endpoint returns the _direct_ associations of this LDAP Server. A direct association can be a non-homogenous relationship between 2 different objects. for example LDAP and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/ldapservers/{ldapserver_id}/associations?targets=user ``` - * @param ctx context.Context Authentication Context + This endpoint returns the _direct_ associations of this LDAP Server. A direct association can be a non-homogenous relationship between 2 different objects. for example LDAP and Users. #### Sample Request ``` curl -X GET 'https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/associations?targets=user_group \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param ldapserverId ObjectID of the LDAP Server. @param targets @param contentType @@ -1476,17 +1491,18 @@ func (a *GraphApiService) GraphLdapServerAssociationsList(ctx context.Context, l return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -1494,8 +1510,8 @@ func (a *GraphApiService) GraphLdapServerAssociationsList(ctx context.Context, l } /* GraphApiService Manage the associations of a LDAP Server - This endpoint allows you to manage the _direct_ associations of a LDAP Server. A direct association can be a non-homogenous relationship between 2 different objects. for example LDAP and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/ldapservers/{ldapserver_id}/associations ``` - * @param ctx context.Context Authentication Context + This endpoint allows you to manage the _direct_ associations of a LDAP Server. A direct association can be a non-homogenous relationship between 2 different objects. for example LDAP and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/associations \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user\", \"id\": \"{User_ID}\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param ldapserverId ObjectID of the LDAP Server. @param contentType @param accept @@ -1561,21 +1577,22 @@ func (a *GraphApiService) GraphLdapServerAssociationsPost(ctx context.Context, l return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } -/* GraphApiService List the Users associated with a LDAP Server - This endpoint will return Users associated with an LDAP server instance. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this LDAP server instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this LDAP server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/ldapservers/{ldapserver_id}/users ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the Users bound to a LDAP Server + This endpoint will return all Users bound to an LDAP Server, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this LDAP server instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this LDAP server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/users \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param ldapserverId ObjectID of the LDAP Server. @param contentType @param accept @@ -1651,26 +1668,27 @@ func (a *GraphApiService) GraphLdapServerTraverseUser(ctx context.Context, ldaps return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the User Groups associated with a LDAP Server - This endpoint will return User Groups associated with a LDAP server instance. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this LDAP server instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this LDAP server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/ldapservers/{ldapserver_id}/usersgroups ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the User Groups bound to a LDAP Server + This endpoint will return all Users Groups bound to a LDAP Server, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this LDAP server instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this LDAP server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/usergroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param ldapserverId ObjectID of the LDAP Server. @param contentType @param accept @@ -1746,17 +1764,18 @@ func (a *GraphApiService) GraphLdapServerTraverseUserGroup(ctx context.Context, return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -1764,8 +1783,8 @@ func (a *GraphApiService) GraphLdapServerTraverseUserGroup(ctx context.Context, } /* GraphApiService List the associations of an Office 365 instance - This endpoint returns _direct_ associations of an Office 365 instance. A direct association can be a non-homogenous relationship between 2 different objects. for example Office 365 and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/office365s/{office365_id}/associations?targets=user ``` - * @param ctx context.Context Authentication Context + This endpoint returns _direct_ associations of an Office 365 instance. A direct association can be a non-homogenous relationship between 2 different objects. for example Office 365 and Users. #### Sample Request ``` curl -X GET 'https://console.jumpcloud.com/api/v2/office365s/{O365_ID}/associations?targets=user_group \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param office365Id ObjectID of the Office 365 instance. @param targets @param contentType @@ -1843,17 +1862,18 @@ func (a *GraphApiService) GraphOffice365AssociationsList(ctx context.Context, of return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -1861,8 +1881,8 @@ func (a *GraphApiService) GraphOffice365AssociationsList(ctx context.Context, of } /* GraphApiService Manage the associations of an Office 365 instance - This endpoint allows you to manage the _direct_ associations of a Office 365 instance. A direct association can be a non-homogenous relationship between 2 different objects. for example Office 365 and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/office365s/{office365_id}/associations ``` - * @param ctx context.Context Authentication Context + This endpoint allows you to manage the _direct_ associations of a Office 365 instance. A direct association can be a non-homogenous relationship between 2 different objects. for example Office 365 and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/office365s/{O365_ID}/associations \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user_group\", \"id\": \"{Group_ID}\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param office365Id ObjectID of the Office 365 instance. @param contentType @param accept @@ -1928,21 +1948,22 @@ func (a *GraphApiService) GraphOffice365AssociationsPost(ctx context.Context, of return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } -/* GraphApiService List the Users associated with an Office 365 instance - This endpoint will return Users associated with an Office 365 instance. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Office 365 instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this Office 365 instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/office365s/{office365_id}/users ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the Users bound to an Office 365 instance + This endpoint will return all Users bound to an Office 365 instance, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Office 365 instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this Office 365 instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/office365s/{O365_ID}/users \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param office365Id ObjectID of the Office 365 suite. @param contentType @param accept @@ -2018,26 +2039,27 @@ func (a *GraphApiService) GraphOffice365TraverseUser(ctx context.Context, office return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the User Groups associated with an Office 365 instance - This endpoint will return User Groups associated with an Office 365 instance. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Office 365 instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this Office 365 instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/office365s/{office365_id}/usergroups ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the User Groups bound to an Office 365 instance + This endpoint will return all Users Groups bound to an Office 365 instance, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Office 365 instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this Office 365 instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/office365s/{O365_ID/usergroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param office365Id ObjectID of the Office 365 suite. @param contentType @param accept @@ -2113,17 +2135,18 @@ func (a *GraphApiService) GraphOffice365TraverseUserGroup(ctx context.Context, o return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -2131,9 +2154,9 @@ func (a *GraphApiService) GraphOffice365TraverseUserGroup(ctx context.Context, o } /* GraphApiService List the associations of a Policy - This endpoint returns the _direct_ associations of a Policy. A direct association can be a non-homogenous relationship between 2 different objects. for example Policies and Systems. #### Sample Request ``` https://console.jumpcloud.com/api/v2/policies/{policy_id}/associations?targets=system ``` - * @param ctx context.Context Authentication Context - @param policyId ObjectID of the Policy. + This endpoint returns the _direct_ associations of a Policy. A direct association can be a non-homogenous relationship between 2 different objects. for example Policies and Systems. #### Sample Request ``` curl -X GET 'https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/associations?targets=system_group \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param policyId @param targets @param contentType @param accept @@ -2210,17 +2233,18 @@ func (a *GraphApiService) GraphPolicyAssociationsList(ctx context.Context, polic return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -2228,9 +2252,9 @@ func (a *GraphApiService) GraphPolicyAssociationsList(ctx context.Context, polic } /* GraphApiService Manage the associations of a Policy - This endpoint allows you to manage the _direct_ associations of a Policy. A direct association can be a non-homogenous relationship between 2 different objects. for example Policies and Systems. #### Sample Request ``` https://console.jumpcloud.com/api/v2/policies/{policy_id}/associations ``` - * @param ctx context.Context Authentication Context - @param policyId ObjectID of the Policy. + This endpoint allows you to manage the _direct_ associations of a Policy. A direct association can be a non-homogenous relationship between 2 different objects. for example Policies and Systems. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/associations/ \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"system_group\", \"id\": \"{Group_ID}\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param policyId @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: @@ -2295,21 +2319,22 @@ func (a *GraphApiService) GraphPolicyAssociationsPost(ctx context.Context, polic return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } -/* GraphApiService List the Systems associated with a Policy - This endpoint will return Systems associated with a Policy. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Policy to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this Policy. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/policies/{policy_id}/systems ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the Systems bound to a Policy + This endpoint will return all Systems bound to a Policy, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Policy to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this Policy. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/systems \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param policyId ObjectID of the Command. @param contentType @param accept @@ -2385,26 +2410,27 @@ func (a *GraphApiService) GraphPolicyTraverseSystem(ctx context.Context, policyI return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the System Groups associated with a Policy - This endpoint will return System Groups associated with a Policy. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Policy to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this Policy. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/policies/{policy_id}/systemsgroups ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the System Groups bound to a Policy + This endpoint will return all Systems Groups bound to a Policy, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Policy to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this Policy. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/systemgroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param policyId ObjectID of the Command. @param contentType @param accept @@ -2480,26 +2506,27 @@ func (a *GraphApiService) GraphPolicyTraverseSystemGroup(ctx context.Context, po return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the associations of a Radius Server - This endpoint returns the _direct_ associations of a Radius Server. A direct association can be a non-homogenous relationship between 2 different objects. for example Radius Servers and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/radiusservers/{radiusserver_id}/associations?targets=user ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the associations of a RADIUS Server + This endpoint returns the _direct_ associations of a Radius Server. A direct association can be a non-homogenous relationship between 2 different objects. for example Radius Servers and Users. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/radiusservers/{RADIUS_ID}/associations?targets=user_group \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param radiusserverId ObjectID of the Radius Server. @param targets @param contentType @@ -2577,26 +2604,27 @@ func (a *GraphApiService) GraphRadiusServerAssociationsList(ctx context.Context, return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService Manage the associations of a Radius Server - This endpoint allows you to manage the _direct_ associations of a Radius Server. A direct association can be a non-homogenous relationship between 2 different objects. for example Radius Servers and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/radiusservers/{radiusserver_id}/associations - * @param ctx context.Context Authentication Context +/* GraphApiService Manage the associations of a RADIUS Server + This endpoint allows you to manage the _direct_ associations of a Radius Server. A direct association can be a non-homogenous relationship between 2 different objects. for example Radius Servers and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/radiusservers/{RADIUS_ID}/associations \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"type\":\"user\", \"id\":\"{USER_ID}\", \"op\":\"add\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param radiusserverId ObjectID of the Radius Server. @param contentType @param accept @@ -2662,21 +2690,22 @@ func (a *GraphApiService) GraphRadiusServerAssociationsPost(ctx context.Context, return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } -/* GraphApiService List the Users associated with a Radius Server - This endpoint will return Users associated with a RADIUS server instance. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this RADIUS server instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this RADIUS server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/radiusservers/{radiusserver_id}/users - * @param ctx context.Context Authentication Context +/* GraphApiService List the Users bound to a RADIUS Server + This endpoint will return all Users bound to a RADIUS Server, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this RADIUS server instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this RADIUS server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/users \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param radiusserverId ObjectID of the Radius Server. @param contentType @param accept @@ -2752,26 +2781,27 @@ func (a *GraphApiService) GraphRadiusServerTraverseUser(ctx context.Context, rad return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the User Groups associated with a Radius Server - This endpoint will return User Groups associated with a RADIUS server instance. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this RADIUS server instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this RADIUS server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/radiusservers/{radiusserver_id}/usergroups - * @param ctx context.Context Authentication Context +/* GraphApiService List the User Groups bound to a RADIUS Server + This endpoint will return all Users Groups bound to a RADIUS Server, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this RADIUS server instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this RADIUS server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/radiusservers/{RADIUS_ID}/usergroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param radiusserverId ObjectID of the Radius Server. @param contentType @param accept @@ -2847,17 +2877,18 @@ func (a *GraphApiService) GraphRadiusServerTraverseUserGroup(ctx context.Context return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -2865,19 +2896,19 @@ func (a *GraphApiService) GraphRadiusServerTraverseUserGroup(ctx context.Context } /* GraphApiService List the associations of a System - This endpoint returns the _direct_ associations of a System. A direct association can be a non-homogenous relationship between 2 different objects. for example Systems and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systems/{system_id}/associations?targets=user ``` - * @param ctx context.Context Authentication Context + This endpoint returns the _direct_ associations of a System. A direct association can be a non-homogenous relationship between 2 different objects. for example Systems and Users. #### Sample Request ``` 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}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param systemId ObjectID of the System. - @param targets @param contentType @param accept + @param targets @param optional (nil or map[string]interface{}) with one or more of: @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. @param "date" (string) Current date header for the System Context API @param "authorization" (string) Authorization header for the System Context API @return []GraphConnection*/ -func (a *GraphApiService) GraphSystemAssociationsList(ctx context.Context, systemId string, targets []string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphConnection, *http.Response, error) { +func (a *GraphApiService) GraphSystemAssociationsList(ctx context.Context, systemId string, contentType string, accept string, targets []string, localVarOptionals map[string]interface{}) ([]GraphConnection, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -2907,13 +2938,13 @@ func (a *GraphApiService) GraphSystemAssociationsList(ctx context.Context, syste return successPayload, nil, err } - localVarQueryParams.Add("targets", parameterToString(targets, "csv")) if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) } if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } + localVarQueryParams.Add("targets", parameterToString(targets, "csv")) // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -2958,17 +2989,18 @@ func (a *GraphApiService) GraphSystemAssociationsList(ctx context.Context, syste return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -2976,13 +3008,13 @@ func (a *GraphApiService) GraphSystemAssociationsList(ctx context.Context, syste } /* GraphApiService Manage associations of a System - This endpoint allows you to manage the _direct_ associations of a System. A direct association can be a non-homogenous relationship between 2 different objects. for example Systems and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systems/{system_id}/associations ``` - * @param ctx context.Context Authentication Context + This endpoint allows you to manage the _direct_ associations of a System. A direct association can be a non-homogenous relationship between 2 different objects. for example Systems and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/systems/{System_ID}/associations \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user\", \"id\": \"{User_ID}\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param systemId ObjectID of the System. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: - @param "body" (GraphManagementReq) + @param "body" (SystemGraphManagementReq) @param "date" (string) Current date header for the System Context API @param "authorization" (string) Authorization header for the System Context API @return */ @@ -3037,7 +3069,7 @@ func (a *GraphApiService) GraphSystemAssociationsPost(ctx context.Context, syste localVarHeaderParams["Authorization"] = parameterToString(localVarTempParam, "") } // body params - if localVarTempParam, localVarOk := localVarOptionals["body"].(GraphManagementReq); localVarOk { + if localVarTempParam, localVarOk := localVarOptionals["body"].(SystemGraphManagementReq); localVarOk { localVarPostBody = &localVarTempParam } if ctx != nil { @@ -3057,30 +3089,31 @@ func (a *GraphApiService) GraphSystemAssociationsPost(ctx context.Context, syste return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } /* GraphApiService List the associations of a System Group - This endpoint returns the _direct_ associations of a System Group. A direct association can be a non-homogenous relationship between 2 different objects. for example System Groups and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/associations?targets=user ``` - * @param ctx context.Context Authentication Context + This endpoint returns the _direct_ associations of a System Group. A direct association can be a non-homogenous relationship between 2 different objects. for example System Groups and Users. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/associations?targets=user \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the System Group. - @param targets @param contentType @param accept + @param targets @param optional (nil or map[string]interface{}) with one or more of: @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. @return []GraphConnection*/ -func (a *GraphApiService) GraphSystemGroupAssociationsList(ctx context.Context, groupId string, targets []string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphConnection, *http.Response, error) { +func (a *GraphApiService) GraphSystemGroupAssociationsList(ctx context.Context, groupId string, contentType string, accept string, targets []string, localVarOptionals map[string]interface{}) ([]GraphConnection, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -3104,13 +3137,13 @@ func (a *GraphApiService) GraphSystemGroupAssociationsList(ctx context.Context, return successPayload, nil, err } - localVarQueryParams.Add("targets", parameterToString(targets, "csv")) if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) } if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } + localVarQueryParams.Add("targets", parameterToString(targets, "csv")) // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -3149,17 +3182,18 @@ func (a *GraphApiService) GraphSystemGroupAssociationsList(ctx context.Context, return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -3167,8 +3201,8 @@ func (a *GraphApiService) GraphSystemGroupAssociationsList(ctx context.Context, } /* GraphApiService Manage the associations of a System Group - This endpoint allows you to manage the _direct_ associations of a System Group. A direct association can be a non-homogenous relationship between 2 different objects. for example System Groups and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/associations ``` - * @param ctx context.Context Authentication Context + This endpoint allows you to manage the _direct_ associations of a System Group. A direct association can be a non-homogenous relationship between 2 different objects. for example System Groups and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/associations \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user\", \"id\": \"{UserID}\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the System Group. @param contentType @param accept @@ -3234,27 +3268,30 @@ func (a *GraphApiService) GraphSystemGroupAssociationsPost(ctx context.Context, return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } /* GraphApiService List the System Group's parents This endpoint returns all System Groups a System Group is a member of. This endpoint is not yet public as we haven't completed the code yet. - * @param ctx context.Context Authentication Context + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the System Group. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. @return []GraphObjectWithPaths*/ func (a *GraphApiService) GraphSystemGroupMemberOf(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { var ( @@ -3280,12 +3317,18 @@ func (a *GraphApiService) GraphSystemGroupMemberOf(ctx context.Context, groupId return successPayload, nil, err } + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) + } if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) } if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) + } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -3324,17 +3367,18 @@ func (a *GraphApiService) GraphSystemGroupMemberOf(ctx context.Context, groupId return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -3342,8 +3386,8 @@ func (a *GraphApiService) GraphSystemGroupMemberOf(ctx context.Context, groupId } /* GraphApiService List the members of a System Group - This endpoint returns the system members of a System Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/members ``` - * @param ctx context.Context Authentication Context + This endpoint returns the system members of a System Group. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID}/members \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the System Group. @param contentType @param accept @@ -3419,17 +3463,18 @@ func (a *GraphApiService) GraphSystemGroupMembersList(ctx context.Context, group return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -3437,8 +3482,8 @@ func (a *GraphApiService) GraphSystemGroupMembersList(ctx context.Context, group } /* GraphApiService Manage the members of a System Group - This endpoint allows you to manage the system members of a System Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/members ``` - * @param ctx context.Context Authentication Context + This endpoint allows you to manage the system members of a System Group. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID}/members \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY' \\ -d '{ \"op\": \"add\", \"type\": \"system\", \"id\": \"{System_ID\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the System Group. @param contentType @param accept @@ -3518,27 +3563,30 @@ func (a *GraphApiService) GraphSystemGroupMembersPost(ctx context.Context, group return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } /* GraphApiService List the System Group's membership - This endpoint returns all Systems that are a member of this System Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/membership ``` - * @param ctx context.Context Authentication Context + This endpoint returns all Systems that are a member of this System Group. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID/membership \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the System Group. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in @return []GraphObjectWithPaths*/ func (a *GraphApiService) GraphSystemGroupMembership(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { var ( @@ -3570,6 +3618,12 @@ func (a *GraphApiService) GraphSystemGroupMembership(ctx context.Context, groupI if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) + } + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) + } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -3608,26 +3662,27 @@ func (a *GraphApiService) GraphSystemGroupMembership(ctx context.Context, groupI return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the Policies associated with a System Group - This endpoint will return Policies associated with a System Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this System Group to the corresponding Policy; this array represents all grouping and/or associations that would have to be removed to deprovision the Policy from this System Group. See `/members` and `/associations` endpoints to manage those collections. This endpoint is not public yet as we haven't finished the code. - * @param ctx context.Context Authentication Context +/* GraphApiService List the Commands bound to a System Group + This endpoint will return all Commands bound to a System Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System Group to the corresponding Command; this array represents all grouping and/or associations that would have to be removed to deprovision the Command from this System Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/commands \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the System Group. @param contentType @param accept @@ -3635,7 +3690,7 @@ func (a *GraphApiService) GraphSystemGroupMembership(ctx context.Context, groupI @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. @return []GraphObjectWithPaths*/ -func (a *GraphApiService) GraphSystemGroupTraversePolicy(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { +func (a *GraphApiService) GraphSystemGroupTraverseCommand(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -3645,7 +3700,7 @@ func (a *GraphApiService) GraphSystemGroupTraversePolicy(ctx context.Context, gr ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/systemgroups/{group_id}/policies" + localVarPath := a.client.cfg.BasePath + "/systemgroups/{group_id}/commands" localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) localVarHeaderParams := make(map[string]string) @@ -3703,26 +3758,27 @@ func (a *GraphApiService) GraphSystemGroupTraversePolicy(ctx context.Context, gr return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the Users associated with a System Group - This endpoint will return Users associated with a System Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this System Group to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this System Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/users ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the Policies bound to a System Group + This endpoint will return all Policies bound to a System Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System Group to the corresponding Policy; this array represents all grouping and/or associations that would have to be removed to deprovision the Policy from this System Group. See `/members` and `/associations` endpoints to manage those collections. This endpoint is not public yet as we haven't finished the code. ##### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/policies \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the System Group. @param contentType @param accept @@ -3730,7 +3786,7 @@ func (a *GraphApiService) GraphSystemGroupTraversePolicy(ctx context.Context, gr @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. @return []GraphObjectWithPaths*/ -func (a *GraphApiService) GraphSystemGroupTraverseUser(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { +func (a *GraphApiService) GraphSystemGroupTraversePolicy(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -3740,7 +3796,7 @@ func (a *GraphApiService) GraphSystemGroupTraverseUser(ctx context.Context, grou ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/systemgroups/{group_id}/users" + localVarPath := a.client.cfg.BasePath + "/systemgroups/{group_id}/policies" localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) localVarHeaderParams := make(map[string]string) @@ -3798,26 +3854,27 @@ func (a *GraphApiService) GraphSystemGroupTraverseUser(ctx context.Context, grou return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the User Groups associated with a System Group - This endpoint will return User Groups associated with a System Group. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this System Group to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this System Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/usergroups ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the Users bound to a System Group + This endpoint will return all Users bound to a System Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System Group to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this System Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/users \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the System Group. @param contentType @param accept @@ -3825,7 +3882,7 @@ func (a *GraphApiService) GraphSystemGroupTraverseUser(ctx context.Context, grou @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. @return []GraphObjectWithPaths*/ -func (a *GraphApiService) GraphSystemGroupTraverseUserGroup(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { +func (a *GraphApiService) GraphSystemGroupTraverseUser(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -3835,7 +3892,7 @@ func (a *GraphApiService) GraphSystemGroupTraverseUserGroup(ctx context.Context, ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/systemgroups/{group_id}/usergroups" + localVarPath := a.client.cfg.BasePath + "/systemgroups/{group_id}/users" localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) localVarHeaderParams := make(map[string]string) @@ -3893,36 +3950,35 @@ func (a *GraphApiService) GraphSystemGroupTraverseUserGroup(ctx context.Context, return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the parent Groups of a System - This endpoint returns all the System Groups a System is a member of. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systems/{system_id}/memberof ``` - * @param ctx context.Context Authentication Context - @param systemId ObjectID of the System. +/* GraphApiService List the User Groups bound to a System Group + This endpoint will return all User Groups bound to a System Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System Group to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this System Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/usergroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the System Group. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. - @param "date" (string) Current date header for the System Context API - @param "authorization" (string) Authorization header for the System Context API @return []GraphObjectWithPaths*/ -func (a *GraphApiService) GraphSystemMemberOf(ctx context.Context, systemId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { +func (a *GraphApiService) GraphSystemGroupTraverseUserGroup(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -3932,8 +3988,8 @@ func (a *GraphApiService) GraphSystemMemberOf(ctx context.Context, systemId stri ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/systems/{system_id}/memberof" - localVarPath = strings.Replace(localVarPath, "{"+"system_id"+"}", fmt.Sprintf("%v", systemId), -1) + localVarPath := a.client.cfg.BasePath + "/systemgroups/{group_id}/usergroups" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -3945,12 +4001,6 @@ func (a *GraphApiService) GraphSystemMemberOf(ctx context.Context, systemId stri if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { return successPayload, nil, err } - if err := typeCheckParameter(localVarOptionals["date"], "string", "date"); err != nil { - return successPayload, nil, err - } - if err := typeCheckParameter(localVarOptionals["authorization"], "string", "authorization"); err != nil { - return successPayload, nil, err - } if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) @@ -3979,12 +4029,6 @@ func (a *GraphApiService) GraphSystemMemberOf(ctx context.Context, systemId stri } localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") localVarHeaderParams["Accept"] = parameterToString(accept, "") - if localVarTempParam, localVarOk := localVarOptionals["date"].(string); localVarOk { - localVarHeaderParams["Date"] = parameterToString(localVarTempParam, "") - } - if localVarTempParam, localVarOk := localVarOptionals["authorization"].(string); localVarOk { - localVarHeaderParams["Authorization"] = parameterToString(localVarTempParam, "") - } if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -4002,34 +4046,39 @@ func (a *GraphApiService) GraphSystemMemberOf(ctx context.Context, systemId stri return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the Policies associated with a System - This endpoint will return Policies associated with a System. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this System to the corresponding Policy; this array represents all grouping and/or associations that would have to be removed to deprovision the Policy from this System. See `/members` and `/associations` endpoints to manage those collections. This endpoint is not yet public as we have finish the code. - * @param ctx context.Context Authentication Context +/* GraphApiService List the parent Groups of a System + This endpoint returns all the System Groups a System is a member of. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systems/{System_ID}/memberof \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param systemId ObjectID of the System. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. + @param "date" (string) Current date header for the System Context API + @param "authorization" (string) Authorization header for the System Context API + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. @return []GraphObjectWithPaths*/ -func (a *GraphApiService) GraphSystemTraversePolicy(ctx context.Context, systemId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { +func (a *GraphApiService) GraphSystemMemberOf(ctx context.Context, systemId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -4039,7 +4088,7 @@ func (a *GraphApiService) GraphSystemTraversePolicy(ctx context.Context, systemI ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/systems/{system_id}/policies" + localVarPath := a.client.cfg.BasePath + "/systems/{system_id}/memberof" localVarPath = strings.Replace(localVarPath, "{"+"system_id"+"}", fmt.Sprintf("%v", systemId), -1) localVarHeaderParams := make(map[string]string) @@ -4052,13 +4101,25 @@ func (a *GraphApiService) GraphSystemTraversePolicy(ctx context.Context, systemI if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { return successPayload, nil, err } + if err := typeCheckParameter(localVarOptionals["date"], "string", "date"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["authorization"], "string", "authorization"); err != nil { + return successPayload, nil, err + } + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) + } if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) } if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) + } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -4080,6 +4141,12 @@ func (a *GraphApiService) GraphSystemTraversePolicy(ctx context.Context, systemI } localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") localVarHeaderParams["Accept"] = parameterToString(accept, "") + if localVarTempParam, localVarOk := localVarOptionals["date"].(string); localVarOk { + localVarHeaderParams["Date"] = parameterToString(localVarTempParam, "") + } + if localVarTempParam, localVarOk := localVarOptionals["authorization"].(string); localVarOk { + localVarHeaderParams["Authorization"] = parameterToString(localVarTempParam, "") + } if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -4097,36 +4164,35 @@ func (a *GraphApiService) GraphSystemTraversePolicy(ctx context.Context, systemI return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the Users associated with a System - This endpoint will return Users associated with a System. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this System to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this System. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systems/{system_id}/users ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the Commands bound to a System + This endpoint will return all Commands bound to a System, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System to the corresponding Command; this array represents all grouping and/or associations that would have to be removed to deprovision the Command from this System. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systems/{System_ID}/commands \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param systemId ObjectID of the System. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. - @param "date" (string) Current date header for the System Context API - @param "authorization" (string) Authorization header for the System Context API @return []GraphObjectWithPaths*/ -func (a *GraphApiService) GraphSystemTraverseUser(ctx context.Context, systemId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { +func (a *GraphApiService) GraphSystemTraverseCommand(ctx context.Context, systemId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -4136,7 +4202,7 @@ func (a *GraphApiService) GraphSystemTraverseUser(ctx context.Context, systemId ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/systems/{system_id}/users" + localVarPath := a.client.cfg.BasePath + "/systems/{system_id}/commands" localVarPath = strings.Replace(localVarPath, "{"+"system_id"+"}", fmt.Sprintf("%v", systemId), -1) localVarHeaderParams := make(map[string]string) @@ -4149,12 +4215,6 @@ func (a *GraphApiService) GraphSystemTraverseUser(ctx context.Context, systemId if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { return successPayload, nil, err } - if err := typeCheckParameter(localVarOptionals["date"], "string", "date"); err != nil { - return successPayload, nil, err - } - if err := typeCheckParameter(localVarOptionals["authorization"], "string", "authorization"); err != nil { - return successPayload, nil, err - } if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) @@ -4183,12 +4243,6 @@ func (a *GraphApiService) GraphSystemTraverseUser(ctx context.Context, systemId } localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") localVarHeaderParams["Accept"] = parameterToString(accept, "") - if localVarTempParam, localVarOk := localVarOptionals["date"].(string); localVarOk { - localVarHeaderParams["Date"] = parameterToString(localVarTempParam, "") - } - if localVarTempParam, localVarOk := localVarOptionals["authorization"].(string); localVarOk { - localVarHeaderParams["Authorization"] = parameterToString(localVarTempParam, "") - } if ctx != nil { // API Key Authentication if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { @@ -4206,46 +4260,46 @@ func (a *GraphApiService) GraphSystemTraverseUser(ctx context.Context, systemId return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the associations of a User - This endpoint returns the _direct_ associations of a User. A direct association can be a non-homogenous relationship between 2 different objects. for example Users and Systems. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/associations?targets=user_group ``` - * @param ctx context.Context Authentication Context - @param userId ObjectID of the User. - @param targets +/* GraphApiService List the Policies bound to a System + This endpoint will return all Policies bound to a System, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System to the corresponding Policy; this array represents all grouping and/or associations that would have to be removed to deprovision the Policy from this System. See `/members` and `/associations` endpoints to manage those collections. This endpoint is not yet public as we have finish the code. ##### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/{System_ID}/policies \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param systemId ObjectID of the System. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. - @return []GraphConnection*/ -func (a *GraphApiService) GraphUserAssociationsList(ctx context.Context, userId string, targets []string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphConnection, *http.Response, error) { + @return []GraphObjectWithPaths*/ +func (a *GraphApiService) GraphSystemTraversePolicy(ctx context.Context, systemId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - successPayload []GraphConnection + successPayload []GraphObjectWithPaths ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/users/{user_id}/associations" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", fmt.Sprintf("%v", userId), -1) + localVarPath := a.client.cfg.BasePath + "/systems/{system_id}/policies" + localVarPath = strings.Replace(localVarPath, "{"+"system_id"+"}", fmt.Sprintf("%v", systemId), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -4258,7 +4312,6 @@ func (a *GraphApiService) GraphUserAssociationsList(ctx context.Context, userId return successPayload, nil, err } - localVarQueryParams.Add("targets", parameterToString(targets, "csv")) if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) } @@ -4303,56 +4356,375 @@ func (a *GraphApiService) GraphUserAssociationsList(ctx context.Context, userId return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService Manage the associations of a User - This endpoint allows you to manage the _direct_ associations of a User. A direct association can be a non-homogenous relationship between 2 different objects. for example Users and Systems. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/associations ``` - * @param ctx context.Context Authentication Context - @param userId ObjectID of the User. +/* GraphApiService List the Users bound to a System + This endpoint will return all Users bound to a System, either directly or indirectly essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this System. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systems/{System_ID}/users \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param systemId ObjectID of the System. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: - @param "body" (GraphManagementReq) - @return */ -func (a *GraphApiService) GraphUserAssociationsPost(ctx context.Context, userId string, contentType string, accept string, localVarOptionals map[string]interface{}) ( *http.Response, error) { + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @param "date" (string) Current date header for the System Context API + @param "authorization" (string) Authorization header for the System Context API + @return []GraphObjectWithPaths*/ +func (a *GraphApiService) GraphSystemTraverseUser(ctx context.Context, systemId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Post") + localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte + successPayload []GraphObjectWithPaths ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/users/{user_id}/associations" - localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", fmt.Sprintf("%v", userId), -1) + localVarPath := a.client.cfg.BasePath + "/systems/{system_id}/users" + localVarPath = strings.Replace(localVarPath, "{"+"system_id"+"}", fmt.Sprintf("%v", systemId), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHttpContentTypes := []string{ "application/json", } - - // set Content-Type header - localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) - if localVarHttpContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHttpContentType + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["date"], "string", "date"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["authorization"], "string", "authorization"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if localVarTempParam, localVarOk := localVarOptionals["date"].(string); localVarOk { + localVarHeaderParams["Date"] = parameterToString(localVarTempParam, "") + } + if localVarTempParam, localVarOk := localVarOptionals["authorization"].(string); localVarOk { + localVarHeaderParams["Authorization"] = parameterToString(localVarTempParam, "") + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* GraphApiService List the User Groups bound to a System + This endpoint will return all User Groups bound to a System, either directly or indirectly essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this System. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systems/{System_ID}/usergroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param systemId ObjectID of the System. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @param "date" (string) Current date header for the System Context API + @param "authorization" (string) Authorization header for the System Context API + @return []GraphObjectWithPaths*/ +func (a *GraphApiService) GraphSystemTraverseUserGroup(ctx context.Context, systemId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphObjectWithPaths + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/systems/{system_id}/usergroups" + localVarPath = strings.Replace(localVarPath, "{"+"system_id"+"}", fmt.Sprintf("%v", systemId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["date"], "string", "date"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["authorization"], "string", "authorization"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if localVarTempParam, localVarOk := localVarOptionals["date"].(string); localVarOk { + localVarHeaderParams["Date"] = parameterToString(localVarTempParam, "") + } + if localVarTempParam, localVarOk := localVarOptionals["authorization"].(string); localVarOk { + localVarHeaderParams["Authorization"] = parameterToString(localVarTempParam, "") + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* GraphApiService List the associations of a User + This endpoint returns the _direct_ associations of a User. A direct association can be a non-homogenous relationship between 2 different objects. for example Users and Systems. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/associations?targets=user_group ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param userId ObjectID of the User. + @param contentType + @param accept + @param targets + @param optional (nil or map[string]interface{}) with one or more of: + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @return []GraphConnection*/ +func (a *GraphApiService) GraphUserAssociationsList(ctx context.Context, userId string, contentType string, accept string, targets []string, localVarOptionals map[string]interface{}) ([]GraphConnection, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphConnection + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/users/{user_id}/associations" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", fmt.Sprintf("%v", userId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + localVarQueryParams.Add("targets", parameterToString(targets, "csv")) + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* GraphApiService Manage the associations of a User + This endpoint allows you to manage the _direct_ associations of a User. A direct association can be a non-homogenous relationship between 2 different objects. for example Users and Systems. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/associations ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param userId ObjectID of the User. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "body" (UserGraphManagementReq) + @return */ +func (a *GraphApiService) GraphUserAssociationsPost(ctx context.Context, userId string, contentType string, accept string, localVarOptionals map[string]interface{}) ( *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/users/{user_id}/associations" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", fmt.Sprintf("%v", userId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType } // to determine the Accept header @@ -4368,7 +4740,7 @@ func (a *GraphApiService) GraphUserAssociationsPost(ctx context.Context, userId localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") localVarHeaderParams["Accept"] = parameterToString(accept, "") // body params - if localVarTempParam, localVarOk := localVarOptionals["body"].(GraphManagementReq); localVarOk { + if localVarTempParam, localVarOk := localVarOptionals["body"].(UserGraphManagementReq); localVarOk { localVarPostBody = &localVarTempParam } if ctx != nil { @@ -4388,30 +4760,31 @@ func (a *GraphApiService) GraphUserAssociationsPost(ctx context.Context, userId return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } /* GraphApiService List the associations of a User Group. This endpoint returns the _direct_ associations of this User Group. A direct association can be a non-homogenous relationship between 2 different objects. for example User Groups and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/associations?targets=user ``` - * @param ctx context.Context Authentication Context + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. - @param targets @param contentType @param accept + @param targets @param optional (nil or map[string]interface{}) with one or more of: @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. @return []GraphConnection*/ -func (a *GraphApiService) GraphUserGroupAssociationsList(ctx context.Context, groupId string, targets []string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphConnection, *http.Response, error) { +func (a *GraphApiService) GraphUserGroupAssociationsList(ctx context.Context, groupId string, contentType string, accept string, targets []string, localVarOptionals map[string]interface{}) ([]GraphConnection, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -4435,13 +4808,13 @@ func (a *GraphApiService) GraphUserGroupAssociationsList(ctx context.Context, gr return successPayload, nil, err } - localVarQueryParams.Add("targets", parameterToString(targets, "csv")) if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) } if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } + localVarQueryParams.Add("targets", parameterToString(targets, "csv")) // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -4480,17 +4853,18 @@ func (a *GraphApiService) GraphUserGroupAssociationsList(ctx context.Context, gr return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -4499,7 +4873,7 @@ func (a *GraphApiService) GraphUserGroupAssociationsList(ctx context.Context, gr /* GraphApiService Manage the associations of a User Group This endpoint manages the _direct_ associations of this User Group. A direct association can be a non-homogenous relationship between 2 different objects. for example User Groups and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/associations ``` - * @param ctx context.Context Authentication Context + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @@ -4565,27 +4939,30 @@ func (a *GraphApiService) GraphUserGroupAssociationsPost(ctx context.Context, gr return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } /* GraphApiService List the User Group's parents This endpoint returns all User Groups a User Group is a member of. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/{group_id}/membersof ``` Not public yet, as the code is not finished, - * @param ctx context.Context Authentication Context + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. @return []GraphObjectWithPaths*/ func (a *GraphApiService) GraphUserGroupMemberOf(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { var ( @@ -4611,12 +4988,18 @@ func (a *GraphApiService) GraphUserGroupMemberOf(ctx context.Context, groupId st return successPayload, nil, err } + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) + } if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) } if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) + } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -4655,17 +5038,18 @@ func (a *GraphApiService) GraphUserGroupMemberOf(ctx context.Context, groupId st return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -4674,7 +5058,7 @@ func (a *GraphApiService) GraphUserGroupMemberOf(ctx context.Context, groupId st /* GraphApiService List the members of a User Group This endpoint returns the user members of a User Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/{group_id}/members ``` - * @param ctx context.Context Authentication Context + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @@ -4750,17 +5134,18 @@ func (a *GraphApiService) GraphUserGroupMembersList(ctx context.Context, groupId return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -4769,7 +5154,7 @@ func (a *GraphApiService) GraphUserGroupMembersList(ctx context.Context, groupId /* GraphApiService Manage the members of a User Group This endpoint allows you to manage the user members of a User Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/{group_id}/members ``` - * @param ctx context.Context Authentication Context + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @@ -4835,27 +5220,30 @@ func (a *GraphApiService) GraphUserGroupMembersPost(ctx context.Context, groupId return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } /* GraphApiService List the User Group's membership This endpoint returns all users members that are a member of this User Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/{group_id}/membership ``` - * @param ctx context.Context Authentication Context + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. @return []GraphObjectWithPaths*/ func (a *GraphApiService) GraphUserGroupMembership(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { var ( @@ -4881,12 +5269,18 @@ func (a *GraphApiService) GraphUserGroupMembership(ctx context.Context, groupId return successPayload, nil, err } + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) + } if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) } if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) + } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -4925,26 +5319,27 @@ func (a *GraphApiService) GraphUserGroupMembership(ctx context.Context, groupId return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the Active Directories associated with a User Group - This endpoint will return the Active Directories associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding Active Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Active Directory from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/activedirectories ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the Active Directories bound to a User Group + This endpoint will return all Active Directory Instances bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding Active Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Active Directory from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/activedirectories ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @@ -5020,26 +5415,27 @@ func (a *GraphApiService) GraphUserGroupTraverseActiveDirectory(ctx context.Cont return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the Applications associated with a User Group - This endpoint will return Applications associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding Application; this array represents all grouping and/or associations that would have to be removed to deprovision the Application from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/applications ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the Applications bound to a User Group + This endpoint will return all Applications bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding Application; this array represents all grouping and/or associations that would have to be removed to deprovision the Application from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/applications ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @@ -5115,26 +5511,27 @@ func (a *GraphApiService) GraphUserGroupTraverseApplication(ctx context.Context, return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the Directories associated with a User Group - This endpoint will return Directories associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Directories from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/directories ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the Directories bound to a User Group + This endpoint will return all Directories bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Directories from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/directories ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @@ -5210,26 +5607,27 @@ func (a *GraphApiService) GraphUserGroupTraverseDirectory(ctx context.Context, g return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the G Suite instances associated with a User Group - This endpoint will return the G Suite instances associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding G Suite instance; this array represents all grouping and/or associations that would have to be removed to deprovision the G Suite instance from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/gsuites ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the G Suite instances bound to a User Group + This endpoint will return all Gsuite Instances bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding G Suite instance; this array represents all grouping and/or associations that would have to be removed to deprovision the G Suite instance from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/gsuites ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @@ -5305,26 +5703,27 @@ func (a *GraphApiService) GraphUserGroupTraverseGSuite(ctx context.Context, grou return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the LDAP Servers associated with a User Group - This endpoint will return the LDAP Servers associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding LDAP Server; this array represents all grouping and/or associations that would have to be removed to deprovision the LDAP Server from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/ldapservers ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the LDAP Servers bound to a User Group + This endpoint will return all LDAP Servers bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding LDAP Server; this array represents all grouping and/or associations that would have to be removed to deprovision the LDAP Server from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/ldapservers ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @@ -5400,26 +5799,27 @@ func (a *GraphApiService) GraphUserGroupTraverseLdapServer(ctx context.Context, return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the Office 365 instances associated with a User Group - This endpoint will return the Office 365 instances associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding Office 365 instance; this array represents all grouping and/or associations that would have to be removed to deprovision the Office 365 instance from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/office365s ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the Office 365 instances bound to a User Group + This endpoint will return all Office 365 instances bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding Office 365 instance; this array represents all grouping and/or associations that would have to be removed to deprovision the Office 365 instance from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/office365s ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @@ -5495,26 +5895,27 @@ func (a *GraphApiService) GraphUserGroupTraverseOffice365(ctx context.Context, g return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the RADIUS Servers associated with a User Group - This endpoint will return a RADIUS Servers associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding RADIUS Server; this array represents all grouping and/or associations that would have to be removed to deprovision the RADIUS Server from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/radiusservers ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the RADIUS Servers bound to a User Group + This endpoint will return all RADIUS servers bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding RADIUS Server; this array represents all grouping and/or associations that would have to be removed to deprovision the RADIUS Server from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/radiusservers ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @@ -5590,26 +5991,27 @@ func (a *GraphApiService) GraphUserGroupTraverseRadiusServer(ctx context.Context return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the Systems associated with a User Group - This endpoint will return Systems associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/systems ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the Systems bound to a User Group + This endpoint will return all Systems bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/systems ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @@ -5685,26 +6087,27 @@ func (a *GraphApiService) GraphUserGroupTraverseSystem(ctx context.Context, grou return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the System Groups associated with User Groups - This endpoint will return System Groups associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/systemsgroups ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the System Groups bound to User Groups + This endpoint will return all System Groups bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/systemsgroups ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @@ -5780,17 +6183,18 @@ func (a *GraphApiService) GraphUserGroupTraverseSystemGroup(ctx context.Context, return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -5799,13 +6203,15 @@ func (a *GraphApiService) GraphUserGroupTraverseSystemGroup(ctx context.Context, /* GraphApiService List the parent Groups of a User This endpoint returns all the User Groups a User is a member of. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/memberof ``` - * @param ctx context.Context Authentication Context + * @param ctx context.Context for authentication, logging, tracing, etc. @param userId ObjectID of the User. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. @return []GraphObjectWithPaths*/ func (a *GraphApiService) GraphUserMemberOf(ctx context.Context, userId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { var ( @@ -5831,12 +6237,18 @@ func (a *GraphApiService) GraphUserMemberOf(ctx context.Context, userId string, return successPayload, nil, err } + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) + } if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) } if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) + } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -5875,26 +6287,27 @@ func (a *GraphApiService) GraphUserMemberOf(ctx context.Context, userId string, return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the Applications associated with a User - This endpoint will return Applications associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding Application; this array represents all grouping and/or associations that would have to be removed to deprovision the Application from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/applications ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the Applications bound to a User + This endpoint will return all Applications bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding Application; this array represents all grouping and/or associations that would have to be removed to deprovision the Application from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/applications ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param userId ObjectID of the User. @param contentType @param accept @@ -5970,26 +6383,27 @@ func (a *GraphApiService) GraphUserTraverseApplication(ctx context.Context, user return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the Directories associated with a User - This endpoint will return Directories associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Directory from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/directories ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the Directories bound to a User + This endpoint will return all Directories bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Directory from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/directories ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param userId ObjectID of the User. @param contentType @param accept @@ -6065,26 +6479,27 @@ func (a *GraphApiService) GraphUserTraverseDirectory(ctx context.Context, userId return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the G Suite instances associated with a User - This endpoint will return G Suite instances associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding G Suite instance; this array represents all grouping and/or associations that would have to be removed to deprovision the G Suite instance from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/gsuites ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the G Suite instances bound to a User + This endpoint will return all G-Suite Instances bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding G Suite instance; this array represents all grouping and/or associations that would have to be removed to deprovision the G Suite instance from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/gsuites ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param userId ObjectID of the User. @param contentType @param accept @@ -6160,26 +6575,27 @@ func (a *GraphApiService) GraphUserTraverseGSuite(ctx context.Context, userId st return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the LDAP servers associated with a User - This endpoint will return LDAP Servers associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding LDAP Server; this array represents all grouping and/or associations that would have to be removed to deprovision the LDAP Server from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/ldapservers ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the LDAP servers bound to a User + This endpoint will return all LDAP Servers bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding LDAP Server; this array represents all grouping and/or associations that would have to be removed to deprovision the LDAP Server from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/ldapservers ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param userId ObjectID of the User. @param contentType @param accept @@ -6255,26 +6671,27 @@ func (a *GraphApiService) GraphUserTraverseLdapServer(ctx context.Context, userI return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the Office 365 instances associated with User - This endpoint will return Office 365 instances associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding Office 365 instance; this array represents all grouping and/or associations that would have to be removed to deprovision the Office 365 instance from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/office365s ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the Office 365 instances bound to a User + This endpoint will return all Office 365 Instances bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding Office 365 instance; this array represents all grouping and/or associations that would have to be removed to deprovision the Office 365 instance from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/office365s ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param userId ObjectID of the User. @param contentType @param accept @@ -6350,26 +6767,27 @@ func (a *GraphApiService) GraphUserTraverseOffice365(ctx context.Context, userId return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the RADIUS Servers associated with a User - This endpoint will return RADIUS Servers associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding RADIUS Server; this array represents all grouping and/or associations that would have to be removed to deprovision the RADIUS Server from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/radiusservers ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the RADIUS Servers bound to a User + This endpoint will return all RADIUS Servers bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding RADIUS Server; this array represents all grouping and/or associations that would have to be removed to deprovision the RADIUS Server from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/radiusservers ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param userId ObjectID of the User. @param contentType @param accept @@ -6445,26 +6863,27 @@ func (a *GraphApiService) GraphUserTraverseRadiusServer(ctx context.Context, use return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* GraphApiService List the Systems associated with a User - This endpoint will return Systems associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/systems ``` - * @param ctx context.Context Authentication Context +/* GraphApiService List the Systems bound to a User + This endpoint will return all Systems bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/systems ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param userId ObjectID of the User. @param contentType @param accept @@ -6540,17 +6959,114 @@ func (a *GraphApiService) GraphUserTraverseSystem(ctx context.Context, userId st return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* GraphApiService List the System Groups bound to a User + This endpoint will return all System Groups bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/systemgroups ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param userId ObjectID of the User. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @return []GraphObjectWithPaths*/ +func (a *GraphApiService) GraphUserTraverseSystemGroup(ctx context.Context, userId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphObjectWithPaths + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/users/{user_id}/systemgroups" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", fmt.Sprintf("%v", userId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } diff --git a/v2/graph_connection.go b/v2/graph_connection.go index de981f2..b1e61cc 100644 --- a/v2/graph_connection.go +++ b/v2/graph_connection.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/graph_management_req.go b/v2/graph_management_req.go index c5a2b61..bc7cdd3 100644 --- a/v2/graph_management_req.go +++ b/v2/graph_management_req.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/graph_object.go b/v2/graph_object.go index 6f734b3..d79d6cf 100644 --- a/v2/graph_object.go +++ b/v2/graph_object.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/graph_object_with_paths.go b/v2/graph_object_with_paths.go index d7131ce..74f2ac0 100644 --- a/v2/graph_object_with_paths.go +++ b/v2/graph_object_with_paths.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/graph_type.go b/v2/graph_type.go index 670323d..5515425 100644 --- a/v2/graph_type.go +++ b/v2/graph_type.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/group.go b/v2/group.go index ecb5ce2..5078212 100644 --- a/v2/group.go +++ b/v2/group.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/group_type.go b/v2/group_type.go index 5cb6f76..3a09b56 100644 --- a/v2/group_type.go +++ b/v2/group_type.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/groups_api.go b/v2/groups_api.go index e93c1ee..383aaf1 100644 --- a/v2/groups_api.go +++ b/v2/groups_api.go @@ -1,16 +1,16 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 import ( + "io/ioutil" "net/url" "net/http" "strings" @@ -27,16 +27,16 @@ type GroupsApiService service /* GroupsApiService List All Groups - This endpoint returns all Groups that exist in your organization. #### Available filter fields: - `name` - `disabled` - `type` #### Sample Request ``` https://console.jumpcloud.com/api/v2/groups ``` - * @param ctx context.Context Authentication Context + This endpoint returns all Groups that exist in your organization. #### Available filter fields: - `name` - `disabled` - `type` #### Sample Request ``` curl -X GET \\ https://console.jumpcloud.com/api/v2/groups \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: - @param "fields" (string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. - @param "filter" (string) Supported operators are: eq, ne, gt, ge, lt, le, between, search + @param "fields" ([]string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. - @param "sort" (string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. @return []Group*/ func (a *GroupsApiService) GroupsList(ctx context.Context, contentType string, accept string, localVarOptionals map[string]interface{}) ([]Group, *http.Response, error) { var ( @@ -54,27 +54,18 @@ func (a *GroupsApiService) GroupsList(ctx context.Context, contentType string, a localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if err := typeCheckParameter(localVarOptionals["fields"], "string", "fields"); err != nil { - return successPayload, nil, err - } - if err := typeCheckParameter(localVarOptionals["filter"], "string", "filter"); err != nil { - return successPayload, nil, err - } if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { return successPayload, nil, err } if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { return successPayload, nil, err } - if err := typeCheckParameter(localVarOptionals["sort"], "string", "sort"); err != nil { - return successPayload, nil, err - } - if localVarTempParam, localVarOk := localVarOptionals["fields"].(string); localVarOk { - localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["fields"].([]string); localVarOk { + localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "csv")) } - if localVarTempParam, localVarOk := localVarOptionals["filter"].(string); localVarOk { - localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) } if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) @@ -82,8 +73,8 @@ func (a *GroupsApiService) GroupsList(ctx context.Context, contentType string, a if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } - if localVarTempParam, localVarOk := localVarOptionals["sort"].(string); localVarOk { - localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -123,17 +114,18 @@ func (a *GroupsApiService) GroupsList(ctx context.Context, contentType string, a return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } diff --git a/v2/job_details.go b/v2/job_details.go new file mode 100644 index 0000000..ecbad38 --- /dev/null +++ b/v2/job_details.go @@ -0,0 +1,21 @@ +/* + * JumpCloud APIs + * + * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. + * + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package v2 + +type JobDetails struct { + + Status string `json:"status,omitempty"` + + TotalWorkCount int32 `json:"totalWorkCount,omitempty"` + + WorkCompletedCount int32 `json:"workCompletedCount,omitempty"` + + Meta *interface{} `json:"meta,omitempty"` +} diff --git a/v2/workdays_oauth.go b/v2/job_id.go similarity index 67% rename from v2/workdays_oauth.go rename to v2/job_id.go index 2d06f31..8841553 100644 --- a/v2/workdays_oauth.go +++ b/v2/job_id.go @@ -1,16 +1,15 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 -type WorkdaysOauth struct { +type JobId struct { - Code string `json:"code"` + JobId string `json:"jobId,omitempty"` } diff --git a/v2/job_workresult.go b/v2/job_workresult.go new file mode 100644 index 0000000..79dfbaf --- /dev/null +++ b/v2/job_workresult.go @@ -0,0 +1,19 @@ +/* + * JumpCloud APIs + * + * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. + * + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package v2 + +type JobWorkresult struct { + + Status string `json:"status,omitempty"` + + StatusMessage string `json:"statusMessage,omitempty"` + + Meta *interface{} `json:"meta,omitempty"` +} diff --git a/v2/ldap_server_input.go b/v2/ldap_server_input.go index 153ae8c..35e92d2 100644 --- a/v2/ldap_server_input.go +++ b/v2/ldap_server_input.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/ldap_server_output.go b/v2/ldap_server_output.go index 6f1217c..502de25 100644 --- a/v2/ldap_server_output.go +++ b/v2/ldap_server_output.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/ldap_servers_api.go b/v2/ldap_servers_api.go index 020c3ba..683d666 100644 --- a/v2/ldap_servers_api.go +++ b/v2/ldap_servers_api.go @@ -1,16 +1,16 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 import ( + "io/ioutil" "net/url" "net/http" "strings" @@ -28,8 +28,8 @@ type LDAPServersApiService service /* LDAPServersApiService List the associations of a LDAP Server - This endpoint returns the _direct_ associations of this LDAP Server. A direct association can be a non-homogenous relationship between 2 different objects. for example LDAP and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/ldapservers/{ldapserver_id}/associations?targets=user ``` - * @param ctx context.Context Authentication Context + This endpoint returns the _direct_ associations of this LDAP Server. A direct association can be a non-homogenous relationship between 2 different objects. for example LDAP and Users. #### Sample Request ``` curl -X GET 'https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/associations?targets=user_group \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param ldapserverId ObjectID of the LDAP Server. @param targets @param contentType @@ -107,17 +107,18 @@ func (a *LDAPServersApiService) GraphLdapServerAssociationsList(ctx context.Cont return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -125,8 +126,8 @@ func (a *LDAPServersApiService) GraphLdapServerAssociationsList(ctx context.Cont } /* LDAPServersApiService Manage the associations of a LDAP Server - This endpoint allows you to manage the _direct_ associations of a LDAP Server. A direct association can be a non-homogenous relationship between 2 different objects. for example LDAP and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/ldapservers/{ldapserver_id}/associations ``` - * @param ctx context.Context Authentication Context + This endpoint allows you to manage the _direct_ associations of a LDAP Server. A direct association can be a non-homogenous relationship between 2 different objects. for example LDAP and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/associations \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user\", \"id\": \"{User_ID}\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param ldapserverId ObjectID of the LDAP Server. @param contentType @param accept @@ -192,21 +193,22 @@ func (a *LDAPServersApiService) GraphLdapServerAssociationsPost(ctx context.Cont return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } -/* LDAPServersApiService List the Users associated with a LDAP Server - This endpoint will return Users associated with an LDAP server instance. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this LDAP server instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this LDAP server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/ldapservers/{ldapserver_id}/users ``` - * @param ctx context.Context Authentication Context +/* LDAPServersApiService List the Users bound to a LDAP Server + This endpoint will return all Users bound to an LDAP Server, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this LDAP server instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this LDAP server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/users \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param ldapserverId ObjectID of the LDAP Server. @param contentType @param accept @@ -282,26 +284,27 @@ func (a *LDAPServersApiService) GraphLdapServerTraverseUser(ctx context.Context, return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* LDAPServersApiService List the User Groups associated with a LDAP Server - This endpoint will return User Groups associated with a LDAP server instance. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this LDAP server instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this LDAP server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/ldapservers/{ldapserver_id}/usersgroups ``` - * @param ctx context.Context Authentication Context +/* LDAPServersApiService List the User Groups bound to a LDAP Server + This endpoint will return all Users Groups bound to a LDAP Server, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this LDAP server instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this LDAP server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/usergroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param ldapserverId ObjectID of the LDAP Server. @param contentType @param accept @@ -377,17 +380,18 @@ func (a *LDAPServersApiService) GraphLdapServerTraverseUserGroup(ctx context.Con return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -395,8 +399,8 @@ func (a *LDAPServersApiService) GraphLdapServerTraverseUserGroup(ctx context.Con } /* LDAPServersApiService Get LDAP Server - This endpoint returns a specific LDAP server. - * @param ctx context.Context Authentication Context + This endpoint returns a specific LDAP server. ##### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID} \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param id Unique identifier of the LDAP server. @param contentType @param accept @@ -457,17 +461,18 @@ func (a *LDAPServersApiService) LdapserversGet(ctx context.Context, id string, c return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -475,15 +480,16 @@ func (a *LDAPServersApiService) LdapserversGet(ctx context.Context, id string, c } /* LDAPServersApiService List LDAP Servers - * @param ctx context.Context Authentication Context + This endpoint returns the object IDs of your LDAP servers. ##### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/ldapservers/ \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' + * @param ctx context.Context for authentication, logging, tracing, etc. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: - @param "fields" (string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. - @param "filter" (string) Supported operators are: eq, ne, gt, ge, lt, le, between, search + @param "fields" ([]string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. - @param "sort" (string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. @return []LdapServerOutput*/ func (a *LDAPServersApiService) LdapserversList(ctx context.Context, contentType string, accept string, localVarOptionals map[string]interface{}) ([]LdapServerOutput, *http.Response, error) { var ( @@ -501,27 +507,18 @@ func (a *LDAPServersApiService) LdapserversList(ctx context.Context, contentType localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if err := typeCheckParameter(localVarOptionals["fields"], "string", "fields"); err != nil { - return successPayload, nil, err - } - if err := typeCheckParameter(localVarOptionals["filter"], "string", "filter"); err != nil { - return successPayload, nil, err - } if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { return successPayload, nil, err } if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { return successPayload, nil, err } - if err := typeCheckParameter(localVarOptionals["sort"], "string", "sort"); err != nil { - return successPayload, nil, err - } - if localVarTempParam, localVarOk := localVarOptionals["fields"].(string); localVarOk { - localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["fields"].([]string); localVarOk { + localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "csv")) } - if localVarTempParam, localVarOk := localVarOptionals["filter"].(string); localVarOk { - localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) } if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) @@ -529,8 +526,8 @@ func (a *LDAPServersApiService) LdapserversList(ctx context.Context, contentType if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } - if localVarTempParam, localVarOk := localVarOptionals["sort"].(string); localVarOk { - localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -570,17 +567,18 @@ func (a *LDAPServersApiService) LdapserversList(ctx context.Context, contentType return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } diff --git a/v2/model_error.go b/v2/model_error.go index 3f25a5f..92734d5 100644 --- a/v2/model_error.go +++ b/v2/model_error.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/oauth_code_input.go b/v2/oauth_code_input.go index 042420c..6f16f4a 100644 --- a/v2/oauth_code_input.go +++ b/v2/oauth_code_input.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/office365_api.go b/v2/office365_api.go index 774ef03..7362036 100644 --- a/v2/office365_api.go +++ b/v2/office365_api.go @@ -1,16 +1,16 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 import ( + "io/ioutil" "net/url" "net/http" "strings" @@ -28,8 +28,8 @@ type Office365ApiService service /* Office365ApiService List the associations of an Office 365 instance - This endpoint returns _direct_ associations of an Office 365 instance. A direct association can be a non-homogenous relationship between 2 different objects. for example Office 365 and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/office365s/{office365_id}/associations?targets=user ``` - * @param ctx context.Context Authentication Context + This endpoint returns _direct_ associations of an Office 365 instance. A direct association can be a non-homogenous relationship between 2 different objects. for example Office 365 and Users. #### Sample Request ``` curl -X GET 'https://console.jumpcloud.com/api/v2/office365s/{O365_ID}/associations?targets=user_group \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param office365Id ObjectID of the Office 365 instance. @param targets @param contentType @@ -107,17 +107,18 @@ func (a *Office365ApiService) GraphOffice365AssociationsList(ctx context.Context return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -125,8 +126,8 @@ func (a *Office365ApiService) GraphOffice365AssociationsList(ctx context.Context } /* Office365ApiService Manage the associations of an Office 365 instance - This endpoint allows you to manage the _direct_ associations of a Office 365 instance. A direct association can be a non-homogenous relationship between 2 different objects. for example Office 365 and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/office365s/{office365_id}/associations ``` - * @param ctx context.Context Authentication Context + This endpoint allows you to manage the _direct_ associations of a Office 365 instance. A direct association can be a non-homogenous relationship between 2 different objects. for example Office 365 and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/office365s/{O365_ID}/associations \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user_group\", \"id\": \"{Group_ID}\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param office365Id ObjectID of the Office 365 instance. @param contentType @param accept @@ -192,21 +193,22 @@ func (a *Office365ApiService) GraphOffice365AssociationsPost(ctx context.Context return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } -/* Office365ApiService List the Users associated with an Office 365 instance - This endpoint will return Users associated with an Office 365 instance. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Office 365 instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this Office 365 instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/office365s/{office365_id}/users ``` - * @param ctx context.Context Authentication Context +/* Office365ApiService List the Users bound to an Office 365 instance + This endpoint will return all Users bound to an Office 365 instance, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Office 365 instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this Office 365 instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/office365s/{O365_ID}/users \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param office365Id ObjectID of the Office 365 suite. @param contentType @param accept @@ -282,26 +284,27 @@ func (a *Office365ApiService) GraphOffice365TraverseUser(ctx context.Context, of return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* Office365ApiService List the User Groups associated with an Office 365 instance - This endpoint will return User Groups associated with an Office 365 instance. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Office 365 instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this Office 365 instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/office365s/{office365_id}/usergroups ``` - * @param ctx context.Context Authentication Context +/* Office365ApiService List the User Groups bound to an Office 365 instance + This endpoint will return all Users Groups bound to an Office 365 instance, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Office 365 instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this Office 365 instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/office365s/{O365_ID/usergroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param office365Id ObjectID of the Office 365 suite. @param contentType @param accept @@ -377,17 +380,18 @@ func (a *Office365ApiService) GraphOffice365TraverseUserGroup(ctx context.Contex return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } diff --git a/v2/policies_api.go b/v2/policies_api.go index 4247c72..c6c58e7 100644 --- a/v2/policies_api.go +++ b/v2/policies_api.go @@ -1,16 +1,16 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 import ( + "io/ioutil" "net/url" "net/http" "strings" @@ -28,9 +28,9 @@ type PoliciesApiService service /* PoliciesApiService List the associations of a Policy - This endpoint returns the _direct_ associations of a Policy. A direct association can be a non-homogenous relationship between 2 different objects. for example Policies and Systems. #### Sample Request ``` https://console.jumpcloud.com/api/v2/policies/{policy_id}/associations?targets=system ``` - * @param ctx context.Context Authentication Context - @param policyId ObjectID of the Policy. + This endpoint returns the _direct_ associations of a Policy. A direct association can be a non-homogenous relationship between 2 different objects. for example Policies and Systems. #### Sample Request ``` curl -X GET 'https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/associations?targets=system_group \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param policyId @param targets @param contentType @param accept @@ -107,17 +107,18 @@ func (a *PoliciesApiService) GraphPolicyAssociationsList(ctx context.Context, po return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -125,9 +126,9 @@ func (a *PoliciesApiService) GraphPolicyAssociationsList(ctx context.Context, po } /* PoliciesApiService Manage the associations of a Policy - This endpoint allows you to manage the _direct_ associations of a Policy. A direct association can be a non-homogenous relationship between 2 different objects. for example Policies and Systems. #### Sample Request ``` https://console.jumpcloud.com/api/v2/policies/{policy_id}/associations ``` - * @param ctx context.Context Authentication Context - @param policyId ObjectID of the Policy. + This endpoint allows you to manage the _direct_ associations of a Policy. A direct association can be a non-homogenous relationship between 2 different objects. for example Policies and Systems. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/associations/ \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"system_group\", \"id\": \"{Group_ID}\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param policyId @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: @@ -192,21 +193,22 @@ func (a *PoliciesApiService) GraphPolicyAssociationsPost(ctx context.Context, po return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } -/* PoliciesApiService List the Systems associated with a Policy - This endpoint will return Systems associated with a Policy. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Policy to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this Policy. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/policies/{policy_id}/systems ``` - * @param ctx context.Context Authentication Context +/* PoliciesApiService List the Systems bound to a Policy + This endpoint will return all Systems bound to a Policy, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Policy to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this Policy. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/systems \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param policyId ObjectID of the Command. @param contentType @param accept @@ -282,26 +284,27 @@ func (a *PoliciesApiService) GraphPolicyTraverseSystem(ctx context.Context, poli return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* PoliciesApiService List the System Groups associated with a Policy - This endpoint will return System Groups associated with a Policy. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this Policy to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this Policy. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/policies/{policy_id}/systemsgroups ``` - * @param ctx context.Context Authentication Context +/* PoliciesApiService List the System Groups bound to a Policy + This endpoint will return all Systems Groups bound to a Policy, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this Policy to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this Policy. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/systemgroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param policyId ObjectID of the Command. @param contentType @param accept @@ -377,17 +380,18 @@ func (a *PoliciesApiService) GraphPolicyTraverseSystemGroup(ctx context.Context, return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -395,8 +399,8 @@ func (a *PoliciesApiService) GraphPolicyTraverseSystemGroup(ctx context.Context, } /* PoliciesApiService Deletes a Policy - This endpoint allows you to delete a policy. - * @param ctx context.Context Authentication Context + This endpoint allows you to delete a policy. #### Sample Request ``` curl -X DELETE https://console.jumpcloud.com/api/v2/policies/5a837ecd232e110d4291e6b9 \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param id ObjectID of the Policy object. @param contentType @param accept @@ -456,21 +460,22 @@ func (a *PoliciesApiService) PoliciesDelete(ctx context.Context, id string, cont return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } /* PoliciesApiService Gets a specific Policy. - This endpoint returns a specific policy. - * @param ctx context.Context Authentication Context + This endpoint returns a specific policy. ###### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/policies/{PolicyID} \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param id ObjectID of the Policy object. @param contentType @param accept @@ -531,17 +536,18 @@ func (a *PoliciesApiService) PoliciesGet(ctx context.Context, id string, content return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -549,16 +555,16 @@ func (a *PoliciesApiService) PoliciesGet(ctx context.Context, id string, content } /* PoliciesApiService Lists all the Policies - This endpoint returns all policies. - * @param ctx context.Context Authentication Context + This endpoint returns all policies. ##### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/policies \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: - @param "fields" (string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. - @param "filter" (string) Supported operators are: eq, ne, gt, ge, lt, le, between, search + @param "fields" ([]string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. - @param "sort" (string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. @return []Policy*/ func (a *PoliciesApiService) PoliciesList(ctx context.Context, contentType string, accept string, localVarOptionals map[string]interface{}) ([]Policy, *http.Response, error) { var ( @@ -576,27 +582,18 @@ func (a *PoliciesApiService) PoliciesList(ctx context.Context, contentType strin localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if err := typeCheckParameter(localVarOptionals["fields"], "string", "fields"); err != nil { - return successPayload, nil, err - } - if err := typeCheckParameter(localVarOptionals["filter"], "string", "filter"); err != nil { - return successPayload, nil, err - } if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { return successPayload, nil, err } if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { return successPayload, nil, err } - if err := typeCheckParameter(localVarOptionals["sort"], "string", "sort"); err != nil { - return successPayload, nil, err - } - if localVarTempParam, localVarOk := localVarOptionals["fields"].(string); localVarOk { - localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["fields"].([]string); localVarOk { + localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "csv")) } - if localVarTempParam, localVarOk := localVarOptionals["filter"].(string); localVarOk { - localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) } if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) @@ -604,8 +601,8 @@ func (a *PoliciesApiService) PoliciesList(ctx context.Context, contentType strin if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } - if localVarTempParam, localVarOk := localVarOptionals["sort"].(string); localVarOk { - localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -645,17 +642,18 @@ func (a *PoliciesApiService) PoliciesList(ctx context.Context, contentType strin return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -663,8 +661,8 @@ func (a *PoliciesApiService) PoliciesList(ctx context.Context, contentType strin } /* PoliciesApiService Create a new Policy - This endpoint allows you to create a policy. - * @param ctx context.Context Authentication Context + This endpoint allows you to create a policy. Given the amount of configurable parameters required to create a Policy, we suggest you use the JumpCloud Admin Console to create new policies. ##### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/policies \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ {Policy_Parameters} }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: @@ -729,17 +727,18 @@ func (a *PoliciesApiService) PoliciesPost(ctx context.Context, contentType strin return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -747,8 +746,8 @@ func (a *PoliciesApiService) PoliciesPost(ctx context.Context, contentType strin } /* PoliciesApiService Update an existing Policy - This endpoint allows you to update a policy. - * @param ctx context.Context Authentication Context + This endpoint allows you to update a policy. Given the amount of configurable parameters required to update a Policy, we suggest you use the JumpCloud Admin Console to create new policies. ##### Sample Request ``` curl -X PUT https://console.jumpcloud.com/api/v2/policies/59fced45c9118022172547ff \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY' \\ -d '{ {Policy_Parameters} }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param id ObjectID of the Policy object. @param optional (nil or map[string]interface{}) with one or more of: @param "body" (PolicyRequest) @@ -811,17 +810,18 @@ func (a *PoliciesApiService) PoliciesPut(ctx context.Context, id string, localVa return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -829,7 +829,8 @@ func (a *PoliciesApiService) PoliciesPut(ctx context.Context, id string, localVa } /* PoliciesApiService Get a specific Policy Result. - * @param ctx context.Context Authentication Context + This endpoint will return the policy results for a specific policy. ##### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/policyresults/{Policy_ID} \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param id ObjectID of the Policy Result. @param contentType @param accept @@ -890,36 +891,39 @@ func (a *PoliciesApiService) PolicyresultsGet(ctx context.Context, id string, co return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* PoliciesApiService Lists all the policy results for an organization. - * @param ctx context.Context Authentication Context +/* PoliciesApiService Lists all the policy results of a given policy. + This endpoint returns all policies results for a specific policy. ##### Sample Results ``` curl -X GET https://console.jumpcloud.com/api/v2/policies/{Policy_ID}/policyresults \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param policyId @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: - @param "fields" (string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. - @param "filter" (string) Supported operators are: eq, ne, gt, ge, lt, le, between, search + @param "fields" ([]string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. - @param "sort" (string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. - @param "aggregate" (string) + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. + @param "aggregate" ([]string) @return []PolicyResult*/ -func (a *PoliciesApiService) PolicyresultsList(ctx context.Context, contentType string, accept string, localVarOptionals map[string]interface{}) ([]PolicyResult, *http.Response, error) { +func (a *PoliciesApiService) PolicyresultsList(ctx context.Context, policyId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]PolicyResult, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -929,36 +933,25 @@ func (a *PoliciesApiService) PolicyresultsList(ctx context.Context, contentType ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/policyresults" + localVarPath := a.client.cfg.BasePath + "/policies/{policy_id}/policyresults" + localVarPath = strings.Replace(localVarPath, "{"+"policy_id"+"}", fmt.Sprintf("%v", policyId), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if err := typeCheckParameter(localVarOptionals["fields"], "string", "fields"); err != nil { - return successPayload, nil, err - } - if err := typeCheckParameter(localVarOptionals["filter"], "string", "filter"); err != nil { - return successPayload, nil, err - } if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { return successPayload, nil, err } if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { return successPayload, nil, err } - if err := typeCheckParameter(localVarOptionals["sort"], "string", "sort"); err != nil { - return successPayload, nil, err - } - if err := typeCheckParameter(localVarOptionals["aggregate"], "string", "aggregate"); err != nil { - return successPayload, nil, err - } - if localVarTempParam, localVarOk := localVarOptionals["fields"].(string); localVarOk { - localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["fields"].([]string); localVarOk { + localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "csv")) } - if localVarTempParam, localVarOk := localVarOptionals["filter"].(string); localVarOk { - localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) } if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) @@ -966,11 +959,11 @@ func (a *PoliciesApiService) PolicyresultsList(ctx context.Context, contentType if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } - if localVarTempParam, localVarOk := localVarOptionals["sort"].(string); localVarOk { - localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) } - if localVarTempParam, localVarOk := localVarOptionals["aggregate"].(string); localVarOk { - localVarQueryParams.Add("aggregate", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["aggregate"].([]string); localVarOk { + localVarQueryParams.Add("aggregate", parameterToString(localVarTempParam, "csv")) } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -1010,37 +1003,38 @@ func (a *PoliciesApiService) PolicyresultsList(ctx context.Context, contentType return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* PoliciesApiService Lists all the policy results of a given policy. - * @param ctx context.Context Authentication Context - @param policyId +/* PoliciesApiService Lists all the policy results for an organization. + This endpoint returns all policies results for an Organization. ##### Sample Results ``` curl -X GET https://console.jumpcloud.com/api/v2/policyresults \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: - @param "fields" (string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. - @param "filter" (string) Supported operators are: eq, ne, gt, ge, lt, le, between, search + @param "fields" ([]string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. - @param "sort" (string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. - @param "aggregate" (string) + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. + @param "aggregate" ([]string) @return []PolicyResult*/ -func (a *PoliciesApiService) PolicyresultsList_1(ctx context.Context, policyId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]PolicyResult, *http.Response, error) { +func (a *PoliciesApiService) PolicyresultsList_1(ctx context.Context, contentType string, accept string, localVarOptionals map[string]interface{}) ([]PolicyResult, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -1050,37 +1044,24 @@ func (a *PoliciesApiService) PolicyresultsList_1(ctx context.Context, policyId s ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/policies/{policy_id}/policyresults" - localVarPath = strings.Replace(localVarPath, "{"+"policy_id"+"}", fmt.Sprintf("%v", policyId), -1) + localVarPath := a.client.cfg.BasePath + "/policyresults" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if err := typeCheckParameter(localVarOptionals["fields"], "string", "fields"); err != nil { - return successPayload, nil, err - } - if err := typeCheckParameter(localVarOptionals["filter"], "string", "filter"); err != nil { - return successPayload, nil, err - } if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { return successPayload, nil, err } if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { return successPayload, nil, err } - if err := typeCheckParameter(localVarOptionals["sort"], "string", "sort"); err != nil { - return successPayload, nil, err - } - if err := typeCheckParameter(localVarOptionals["aggregate"], "string", "aggregate"); err != nil { - return successPayload, nil, err - } - if localVarTempParam, localVarOk := localVarOptionals["fields"].(string); localVarOk { - localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["fields"].([]string); localVarOk { + localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "csv")) } - if localVarTempParam, localVarOk := localVarOptionals["filter"].(string); localVarOk { - localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) } if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) @@ -1088,11 +1069,11 @@ func (a *PoliciesApiService) PolicyresultsList_1(ctx context.Context, policyId s if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } - if localVarTempParam, localVarOk := localVarOptionals["sort"].(string); localVarOk { - localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) } - if localVarTempParam, localVarOk := localVarOptionals["aggregate"].(string); localVarOk { - localVarQueryParams.Add("aggregate", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["aggregate"].([]string); localVarOk { + localVarQueryParams.Add("aggregate", parameterToString(localVarTempParam, "csv")) } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -1132,17 +1113,18 @@ func (a *PoliciesApiService) PolicyresultsList_1(ctx context.Context, policyId s return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -1150,8 +1132,8 @@ func (a *PoliciesApiService) PolicyresultsList_1(ctx context.Context, policyId s } /* PoliciesApiService Get a specific Policy Template - This endpoint returns a specific policy template. - * @param ctx context.Context Authentication Context + This endpoint returns a specific policy template. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/policies/{Policy_ID}\\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param id ObjectID of the Policy Template. @param contentType @param accept @@ -1212,17 +1194,18 @@ func (a *PoliciesApiService) PolicytemplatesGet(ctx context.Context, id string, return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -1230,16 +1213,16 @@ func (a *PoliciesApiService) PolicytemplatesGet(ctx context.Context, id string, } /* PoliciesApiService Lists all of the Policy Templates - This endpoint returns all policy templates. - * @param ctx context.Context Authentication Context + This endpoint returns all policy templates. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/policytemplates \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: - @param "fields" (string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. - @param "filter" (string) Supported operators are: eq, ne, gt, ge, lt, le, between, search + @param "fields" ([]string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. - @param "sort" (string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. @return []PolicyTemplate*/ func (a *PoliciesApiService) PolicytemplatesList(ctx context.Context, contentType string, accept string, localVarOptionals map[string]interface{}) ([]PolicyTemplate, *http.Response, error) { var ( @@ -1257,27 +1240,18 @@ func (a *PoliciesApiService) PolicytemplatesList(ctx context.Context, contentTyp localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if err := typeCheckParameter(localVarOptionals["fields"], "string", "fields"); err != nil { - return successPayload, nil, err - } - if err := typeCheckParameter(localVarOptionals["filter"], "string", "filter"); err != nil { - return successPayload, nil, err - } if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { return successPayload, nil, err } if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { return successPayload, nil, err } - if err := typeCheckParameter(localVarOptionals["sort"], "string", "sort"); err != nil { - return successPayload, nil, err - } - if localVarTempParam, localVarOk := localVarOptionals["fields"].(string); localVarOk { - localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["fields"].([]string); localVarOk { + localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "csv")) } - if localVarTempParam, localVarOk := localVarOptionals["filter"].(string); localVarOk { - localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) } if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) @@ -1285,8 +1259,8 @@ func (a *PoliciesApiService) PolicytemplatesList(ctx context.Context, contentTyp if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } - if localVarTempParam, localVarOk := localVarOptionals["sort"].(string); localVarOk { - localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -1326,17 +1300,18 @@ func (a *PoliciesApiService) PolicytemplatesList(ctx context.Context, contentTyp return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } diff --git a/v2/policy.go b/v2/policy.go index 617d632..d59cabf 100644 --- a/v2/policy.go +++ b/v2/policy.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/policy_request.go b/v2/policy_request.go index b808c69..6f43842 100644 --- a/v2/policy_request.go +++ b/v2/policy_request.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/policy_request_template.go b/v2/policy_request_template.go index 72f5031..9a7955f 100644 --- a/v2/policy_request_template.go +++ b/v2/policy_request_template.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/policy_result.go b/v2/policy_result.go index 73a5358..ba6da69 100644 --- a/v2/policy_result.go +++ b/v2/policy_result.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/policy_template.go b/v2/policy_template.go index bbfb0f8..b4049ed 100644 --- a/v2/policy_template.go +++ b/v2/policy_template.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/policy_template_config_field.go b/v2/policy_template_config_field.go index 53d67b4..08e2f8f 100644 --- a/v2/policy_template_config_field.go +++ b/v2/policy_template_config_field.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/policy_template_with_details.go b/v2/policy_template_with_details.go index b68adf7..68eb66a 100644 --- a/v2/policy_template_with_details.go +++ b/v2/policy_template_with_details.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/policy_value.go b/v2/policy_value.go index faf3504..86c3e3f 100644 --- a/v2/policy_value.go +++ b/v2/policy_value.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/policy_with_details.go b/v2/policy_with_details.go index 638fb9b..7c27854 100644 --- a/v2/policy_with_details.go +++ b/v2/policy_with_details.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/policytemplates_api.go b/v2/policytemplates_api.go index 24b5d55..e890242 100644 --- a/v2/policytemplates_api.go +++ b/v2/policytemplates_api.go @@ -1,16 +1,16 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 import ( + "io/ioutil" "net/url" "net/http" "strings" @@ -28,8 +28,8 @@ type PolicytemplatesApiService service /* PolicytemplatesApiService Get a specific Policy Template - This endpoint returns a specific policy template. - * @param ctx context.Context Authentication Context + This endpoint returns a specific policy template. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/policies/{Policy_ID}\\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param id ObjectID of the Policy Template. @param contentType @param accept @@ -90,17 +90,18 @@ func (a *PolicytemplatesApiService) PolicytemplatesGet(ctx context.Context, id s return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -108,16 +109,16 @@ func (a *PolicytemplatesApiService) PolicytemplatesGet(ctx context.Context, id s } /* PolicytemplatesApiService Lists all of the Policy Templates - This endpoint returns all policy templates. - * @param ctx context.Context Authentication Context + This endpoint returns all policy templates. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/policytemplates \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: - @param "fields" (string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. - @param "filter" (string) Supported operators are: eq, ne, gt, ge, lt, le, between, search + @param "fields" ([]string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. - @param "sort" (string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. @return []PolicyTemplate*/ func (a *PolicytemplatesApiService) PolicytemplatesList(ctx context.Context, contentType string, accept string, localVarOptionals map[string]interface{}) ([]PolicyTemplate, *http.Response, error) { var ( @@ -135,27 +136,18 @@ func (a *PolicytemplatesApiService) PolicytemplatesList(ctx context.Context, con localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if err := typeCheckParameter(localVarOptionals["fields"], "string", "fields"); err != nil { - return successPayload, nil, err - } - if err := typeCheckParameter(localVarOptionals["filter"], "string", "filter"); err != nil { - return successPayload, nil, err - } if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { return successPayload, nil, err } if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { return successPayload, nil, err } - if err := typeCheckParameter(localVarOptionals["sort"], "string", "sort"); err != nil { - return successPayload, nil, err - } - if localVarTempParam, localVarOk := localVarOptionals["fields"].(string); localVarOk { - localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["fields"].([]string); localVarOk { + localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "csv")) } - if localVarTempParam, localVarOk := localVarOptionals["filter"].(string); localVarOk { - localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) } if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) @@ -163,8 +155,8 @@ func (a *PolicytemplatesApiService) PolicytemplatesList(ctx context.Context, con if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } - if localVarTempParam, localVarOk := localVarOptionals["sort"].(string); localVarOk { - localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -204,17 +196,18 @@ func (a *PolicytemplatesApiService) PolicytemplatesList(ctx context.Context, con return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } diff --git a/v2/radius_servers_api.go b/v2/radius_servers_api.go index 744d9d0..540e3fc 100644 --- a/v2/radius_servers_api.go +++ b/v2/radius_servers_api.go @@ -1,16 +1,16 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 import ( + "io/ioutil" "net/url" "net/http" "strings" @@ -27,9 +27,9 @@ var ( type RADIUSServersApiService service -/* RADIUSServersApiService List the associations of a Radius Server - This endpoint returns the _direct_ associations of a Radius Server. A direct association can be a non-homogenous relationship between 2 different objects. for example Radius Servers and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/radiusservers/{radiusserver_id}/associations?targets=user ``` - * @param ctx context.Context Authentication Context +/* RADIUSServersApiService List the associations of a RADIUS Server + This endpoint returns the _direct_ associations of a Radius Server. A direct association can be a non-homogenous relationship between 2 different objects. for example Radius Servers and Users. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/radiusservers/{RADIUS_ID}/associations?targets=user_group \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param radiusserverId ObjectID of the Radius Server. @param targets @param contentType @@ -107,26 +107,27 @@ func (a *RADIUSServersApiService) GraphRadiusServerAssociationsList(ctx context. return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* RADIUSServersApiService Manage the associations of a Radius Server - This endpoint allows you to manage the _direct_ associations of a Radius Server. A direct association can be a non-homogenous relationship between 2 different objects. for example Radius Servers and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/radiusservers/{radiusserver_id}/associations - * @param ctx context.Context Authentication Context +/* RADIUSServersApiService Manage the associations of a RADIUS Server + This endpoint allows you to manage the _direct_ associations of a Radius Server. A direct association can be a non-homogenous relationship between 2 different objects. for example Radius Servers and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/radiusservers/{RADIUS_ID}/associations \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"type\":\"user\", \"id\":\"{USER_ID}\", \"op\":\"add\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param radiusserverId ObjectID of the Radius Server. @param contentType @param accept @@ -192,21 +193,22 @@ func (a *RADIUSServersApiService) GraphRadiusServerAssociationsPost(ctx context. return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } -/* RADIUSServersApiService List the Users associated with a Radius Server - This endpoint will return Users associated with a RADIUS server instance. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this RADIUS server instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this RADIUS server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/radiusservers/{radiusserver_id}/users - * @param ctx context.Context Authentication Context +/* RADIUSServersApiService List the Users bound to a RADIUS Server + This endpoint will return all Users bound to a RADIUS Server, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this RADIUS server instance to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this RADIUS server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/users \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param radiusserverId ObjectID of the Radius Server. @param contentType @param accept @@ -282,26 +284,27 @@ func (a *RADIUSServersApiService) GraphRadiusServerTraverseUser(ctx context.Cont return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* RADIUSServersApiService List the User Groups associated with a Radius Server - This endpoint will return User Groups associated with a RADIUS server instance. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this RADIUS server instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this RADIUS server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/radiusservers/{radiusserver_id}/usergroups - * @param ctx context.Context Authentication Context +/* RADIUSServersApiService List the User Groups bound to a RADIUS Server + This endpoint will return all Users Groups bound to a RADIUS Server, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this RADIUS server instance to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this RADIUS server instance. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/radiusservers/{RADIUS_ID}/usergroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param radiusserverId ObjectID of the Radius Server. @param contentType @param accept @@ -377,17 +380,18 @@ func (a *RADIUSServersApiService) GraphRadiusServerTraverseUserGroup(ctx context return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } diff --git a/v2/samba_domain_input.go b/v2/samba_domain_input.go index ba378ed..c3126bc 100644 --- a/v2/samba_domain_input.go +++ b/v2/samba_domain_input.go @@ -1,18 +1,17 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 type SambaDomainInput struct { - // Name of this domain + // Name of this domain's WorkGroup Name string `json:"name"` // Security identifier of this domain diff --git a/v2/samba_domain_output.go b/v2/samba_domain_output.go index ab502e6..403ec09 100644 --- a/v2/samba_domain_output.go +++ b/v2/samba_domain_output.go @@ -1,18 +1,17 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 type SambaDomainOutput struct { - // Name of this domain + // Name of this domain's WorkGroup Name string `json:"name"` // Security identifier of this domain diff --git a/v2/samba_domains_api.go b/v2/samba_domains_api.go index fbb8b70..dba7c3c 100644 --- a/v2/samba_domains_api.go +++ b/v2/samba_domains_api.go @@ -1,16 +1,16 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 import ( + "io/ioutil" "net/url" "net/http" "strings" @@ -28,9 +28,9 @@ type SambaDomainsApiService service /* SambaDomainsApiService Delete Samba Domain - This endpoint allows you to delete a samba domain from an LDAP server. - * @param ctx context.Context Authentication Context - @param ldapserverId Unique identifier o f the LDAP server. + This endpoint allows you to delete a samba domain from an LDAP server. ##### Sample Request ``` curl -X DELETE https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/sambadomains/{SAMBA_ID} \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param ldapserverId Unique identifier of the LDAP server. @param id Unique identifier of the samba domain. @param optional (nil or map[string]interface{}) with one or more of: @param "contentType" (string) @@ -103,17 +103,18 @@ func (a *SambaDomainsApiService) LdapserversSambaDomainsDelete(ctx context.Conte return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -121,9 +122,9 @@ func (a *SambaDomainsApiService) LdapserversSambaDomainsDelete(ctx context.Conte } /* SambaDomainsApiService Get Samba Domain - This endpoint returns a specific samba domain for an LDAP server. - * @param ctx context.Context Authentication Context - @param ldapserverId Unique identifier o f the LDAP server. + This endpoint returns a specific samba domain for an LDAP server. ##### Sample Request ``` curl -X GET \\ https://console.jumpcloud.com/api/v2/ldapservers/ldapservers/{LDAP_ID}/sambadomains/{SAMBA_ID} \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param ldapserverId Unique identifier of the LDAP server. @param id Unique identifier of the samba domain. @param optional (nil or map[string]interface{}) with one or more of: @param "contentType" (string) @@ -196,17 +197,18 @@ func (a *SambaDomainsApiService) LdapserversSambaDomainsGet(ctx context.Context, return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -214,17 +216,17 @@ func (a *SambaDomainsApiService) LdapserversSambaDomainsGet(ctx context.Context, } /* SambaDomainsApiService List Samba Domains - This endpoint returns all samba domains for an LDAP server. - * @param ctx context.Context Authentication Context + This endpoint returns all samba domains for an LDAP server. ##### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/sambadomains \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param ldapserverId Unique identifier of the LDAP server. @param optional (nil or map[string]interface{}) with one or more of: @param "contentType" (string) @param "accept" (string) - @param "fields" (string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. - @param "filter" (string) Supported operators are: eq, ne, gt, ge, lt, le, between, search + @param "fields" ([]string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. - @param "sort" (string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. @return []SambaDomainOutput*/ func (a *SambaDomainsApiService) LdapserversSambaDomainsList(ctx context.Context, ldapserverId string, localVarOptionals map[string]interface{}) ([]SambaDomainOutput, *http.Response, error) { var ( @@ -249,27 +251,18 @@ func (a *SambaDomainsApiService) LdapserversSambaDomainsList(ctx context.Context if err := typeCheckParameter(localVarOptionals["accept"], "string", "accept"); err != nil { return successPayload, nil, err } - if err := typeCheckParameter(localVarOptionals["fields"], "string", "fields"); err != nil { - return successPayload, nil, err - } - if err := typeCheckParameter(localVarOptionals["filter"], "string", "filter"); err != nil { - return successPayload, nil, err - } if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { return successPayload, nil, err } if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { return successPayload, nil, err } - if err := typeCheckParameter(localVarOptionals["sort"], "string", "sort"); err != nil { - return successPayload, nil, err - } - if localVarTempParam, localVarOk := localVarOptionals["fields"].(string); localVarOk { - localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["fields"].([]string); localVarOk { + localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "csv")) } - if localVarTempParam, localVarOk := localVarOptionals["filter"].(string); localVarOk { - localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) } if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) @@ -277,8 +270,8 @@ func (a *SambaDomainsApiService) LdapserversSambaDomainsList(ctx context.Context if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } - if localVarTempParam, localVarOk := localVarOptionals["sort"].(string); localVarOk { - localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -322,17 +315,18 @@ func (a *SambaDomainsApiService) LdapserversSambaDomainsList(ctx context.Context return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -340,8 +334,8 @@ func (a *SambaDomainsApiService) LdapserversSambaDomainsList(ctx context.Context } /* SambaDomainsApiService Create Samba Domain - This endpoint allows you to create a samba domain for an LDAP server. - * @param ctx context.Context Authentication Context + This endpoint allows you to create a samba domain for an LDAP server. ##### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/sambadomains \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"sid\":\"{SID_ID}\", \"name\":\"{WORKGROUP_NAME}\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param ldapserverId Unique identifier of the LDAP server. @param optional (nil or map[string]interface{}) with one or more of: @param "body" (SambaDomainInput) @@ -418,17 +412,18 @@ func (a *SambaDomainsApiService) LdapserversSambaDomainsPost(ctx context.Context return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -436,9 +431,9 @@ func (a *SambaDomainsApiService) LdapserversSambaDomainsPost(ctx context.Context } /* SambaDomainsApiService Update Samba Domain - This endpoint allows you to update the samba domain information for an LDAP server. - * @param ctx context.Context Authentication Context - @param ldapserverId Unique identifier o f the LDAP server. + This endpoint allows you to update the samba domain information for an LDAP server. ##### Sample Request ``` curl -X PUT https://console.jumpcloud.com/api/v2/ldapservers/{LDAP_ID}/sambadomains/{SAMBA_ID} \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"sid\":\"{SID_ID}\", \"name\":\"{WORKGROUP_NAME}\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param ldapserverId Unique identifier of the LDAP server. @param id Unique identifier of the samba domain. @param optional (nil or map[string]interface{}) with one or more of: @param "body" (SambaDomainInput) @@ -516,17 +511,18 @@ func (a *SambaDomainsApiService) LdapserversSambaDomainsPut(ctx context.Context, return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } diff --git a/v2/system_graph_management_req.go b/v2/system_graph_management_req.go new file mode 100644 index 0000000..29c367e --- /dev/null +++ b/v2/system_graph_management_req.go @@ -0,0 +1,23 @@ +/* + * JumpCloud APIs + * + * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. + * + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package v2 + +type SystemGraphManagementReq struct { + + Attributes *SystemGraphManagementReqAttributes `json:"attributes,omitempty"` + + // How to modify the graph connection. + Op string `json:"op"` + + Type_ string `json:"type"` + + // The ObjectID of graph object being added or removed as an association. + Id string `json:"id"` +} diff --git a/v2/system_graph_management_req_attributes.go b/v2/system_graph_management_req_attributes.go new file mode 100644 index 0000000..5d2ac78 --- /dev/null +++ b/v2/system_graph_management_req_attributes.go @@ -0,0 +1,16 @@ +/* + * JumpCloud APIs + * + * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. + * + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package v2 + +// The graph connection's attributes +type SystemGraphManagementReqAttributes struct { + + Sudo *SystemGraphManagementReqAttributesSudo `json:"sudo,omitempty"` +} diff --git a/v2/system_graph_management_req_attributes_sudo.go b/v2/system_graph_management_req_attributes_sudo.go new file mode 100644 index 0000000..5b4e0b4 --- /dev/null +++ b/v2/system_graph_management_req_attributes_sudo.go @@ -0,0 +1,17 @@ +/* + * JumpCloud APIs + * + * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. + * + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package v2 + +type SystemGraphManagementReqAttributesSudo struct { + + Enabled bool `json:"enabled,omitempty"` + + WithoutPassword bool `json:"withoutPassword,omitempty"` +} diff --git a/v2/system_group.go b/v2/system_group.go index 924bd93..85231f9 100644 --- a/v2/system_group.go +++ b/v2/system_group.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/system_group_associations_api.go b/v2/system_group_associations_api.go new file mode 100644 index 0000000..97a969f --- /dev/null +++ b/v2/system_group_associations_api.go @@ -0,0 +1,592 @@ +/* + * JumpCloud APIs + * + * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. + * + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package v2 + +import ( + "io/ioutil" + "net/url" + "net/http" + "strings" + "golang.org/x/net/context" + "encoding/json" + "fmt" +) + +// Linger please +var ( + _ context.Context +) + +type SystemGroupAssociationsApiService service + + +/* SystemGroupAssociationsApiService List the associations of a System Group + This endpoint returns the _direct_ associations of a System Group. A direct association can be a non-homogenous relationship between 2 different objects. for example System Groups and Users. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/associations?targets=user \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the System Group. + @param contentType + @param accept + @param targets + @param optional (nil or map[string]interface{}) with one or more of: + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @return []GraphConnection*/ +func (a *SystemGroupAssociationsApiService) GraphSystemGroupAssociationsList(ctx context.Context, groupId string, contentType string, accept string, targets []string, localVarOptionals map[string]interface{}) ([]GraphConnection, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphConnection + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/systemgroups/{group_id}/associations" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + localVarQueryParams.Add("targets", parameterToString(targets, "csv")) + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* SystemGroupAssociationsApiService Manage the associations of a System Group + This endpoint allows you to manage the _direct_ associations of a System Group. A direct association can be a non-homogenous relationship between 2 different objects. for example System Groups and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/associations \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user\", \"id\": \"{UserID}\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the System Group. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "body" (SystemGroupGraphManagementReq) + @return */ +func (a *SystemGroupAssociationsApiService) GraphSystemGroupAssociationsPost(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ( *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/systemgroups/{group_id}/associations" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + // body params + if localVarTempParam, localVarOk := localVarOptionals["body"].(SystemGroupGraphManagementReq); localVarOk { + localVarPostBody = &localVarTempParam + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + return localVarHttpResponse, err +} + +/* SystemGroupAssociationsApiService List the Commands bound to a System Group + This endpoint will return all Commands bound to a System Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System Group to the corresponding Command; this array represents all grouping and/or associations that would have to be removed to deprovision the Command from this System Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/commands \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the System Group. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @return []GraphObjectWithPaths*/ +func (a *SystemGroupAssociationsApiService) GraphSystemGroupTraverseCommand(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphObjectWithPaths + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/systemgroups/{group_id}/commands" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* SystemGroupAssociationsApiService List the Policies bound to a System Group + This endpoint will return all Policies bound to a System Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System Group to the corresponding Policy; this array represents all grouping and/or associations that would have to be removed to deprovision the Policy from this System Group. See `/members` and `/associations` endpoints to manage those collections. This endpoint is not public yet as we haven't finished the code. ##### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/policies \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the System Group. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @return []GraphObjectWithPaths*/ +func (a *SystemGroupAssociationsApiService) GraphSystemGroupTraversePolicy(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphObjectWithPaths + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/systemgroups/{group_id}/policies" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* SystemGroupAssociationsApiService List the Users bound to a System Group + This endpoint will return all Users bound to a System Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System Group to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this System Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/users \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the System Group. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @return []GraphObjectWithPaths*/ +func (a *SystemGroupAssociationsApiService) GraphSystemGroupTraverseUser(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphObjectWithPaths + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/systemgroups/{group_id}/users" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* SystemGroupAssociationsApiService List the User Groups bound to a System Group + This endpoint will return all User Groups bound to a System Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System Group to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this System Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/usergroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the System Group. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @return []GraphObjectWithPaths*/ +func (a *SystemGroupAssociationsApiService) GraphSystemGroupTraverseUserGroup(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphObjectWithPaths + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/systemgroups/{group_id}/usergroups" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + diff --git a/v2/system_group_data.go b/v2/system_group_data.go index c147b83..7bd8c78 100644 --- a/v2/system_group_data.go +++ b/v2/system_group_data.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/system_group_graph_management_req.go b/v2/system_group_graph_management_req.go index f147b5f..6dc1e73 100644 --- a/v2/system_group_graph_management_req.go +++ b/v2/system_group_graph_management_req.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/system_group_members_membership_api.go b/v2/system_group_members_membership_api.go new file mode 100644 index 0000000..4ce0ed6 --- /dev/null +++ b/v2/system_group_members_membership_api.go @@ -0,0 +1,428 @@ +/* + * JumpCloud APIs + * + * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. + * + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package v2 + +import ( + "io/ioutil" + "net/url" + "net/http" + "strings" + "golang.org/x/net/context" + "encoding/json" + "fmt" +) + +// Linger please +var ( + _ context.Context +) + +type SystemGroupMembersMembershipApiService service + + +/* SystemGroupMembersMembershipApiService List the System Group's parents + This endpoint returns all System Groups a System Group is a member of. This endpoint is not yet public as we haven't completed the code yet. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the System Group. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. + @return []GraphObjectWithPaths*/ +func (a *SystemGroupMembersMembershipApiService) GraphSystemGroupMemberOf(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphObjectWithPaths + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/systemgroups/{group_id}/memberof" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) + } + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* SystemGroupMembersMembershipApiService List the members of a System Group + This endpoint returns the system members of a System Group. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID}/members \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the System Group. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @return []GraphConnection*/ +func (a *SystemGroupMembersMembershipApiService) GraphSystemGroupMembersList(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphConnection, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphConnection + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/systemgroups/{group_id}/members" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* SystemGroupMembersMembershipApiService Manage the members of a System Group + This endpoint allows you to manage the system members of a System Group. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID}/members \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY' \\ -d '{ \"op\": \"add\", \"type\": \"system\", \"id\": \"{System_ID\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the System Group. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "body" (SystemGroupMembersReq) + @param "date" (string) Current date header for the System Context API + @param "authorization" (string) Authorization header for the System Context API + @return */ +func (a *SystemGroupMembersMembershipApiService) GraphSystemGroupMembersPost(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ( *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/systemgroups/{group_id}/members" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["date"], "string", "date"); err != nil { + return nil, err + } + if err := typeCheckParameter(localVarOptionals["authorization"], "string", "authorization"); err != nil { + return nil, err + } + + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if localVarTempParam, localVarOk := localVarOptionals["date"].(string); localVarOk { + localVarHeaderParams["Date"] = parameterToString(localVarTempParam, "") + } + if localVarTempParam, localVarOk := localVarOptionals["authorization"].(string); localVarOk { + localVarHeaderParams["Authorization"] = parameterToString(localVarTempParam, "") + } + // body params + if localVarTempParam, localVarOk := localVarOptionals["body"].(SystemGroupMembersReq); localVarOk { + localVarPostBody = &localVarTempParam + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + return localVarHttpResponse, err +} + +/* SystemGroupMembersMembershipApiService List the System Group's membership + This endpoint returns all Systems that are a member of this System Group. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID/membership \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the System Group. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in + @return []GraphObjectWithPaths*/ +func (a *SystemGroupMembersMembershipApiService) GraphSystemGroupMembership(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphObjectWithPaths + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/systemgroups/{group_id}/membership" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) + } + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + diff --git a/v2/system_group_members_req.go b/v2/system_group_members_req.go index ad0f412..3c1f73d 100644 --- a/v2/system_group_members_req.go +++ b/v2/system_group_members_req.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/system_groups_api.go b/v2/system_groups_api.go index 0588d96..6a6b644 100644 --- a/v2/system_groups_api.go +++ b/v2/system_groups_api.go @@ -1,16 +1,16 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 import ( + "io/ioutil" "net/url" "net/http" "strings" @@ -28,17 +28,17 @@ type SystemGroupsApiService service /* SystemGroupsApiService List the associations of a System Group - This endpoint returns the _direct_ associations of a System Group. A direct association can be a non-homogenous relationship between 2 different objects. for example System Groups and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/associations?targets=user ``` - * @param ctx context.Context Authentication Context + This endpoint returns the _direct_ associations of a System Group. A direct association can be a non-homogenous relationship between 2 different objects. for example System Groups and Users. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/associations?targets=user \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the System Group. - @param targets @param contentType @param accept + @param targets @param optional (nil or map[string]interface{}) with one or more of: @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. @return []GraphConnection*/ -func (a *SystemGroupsApiService) GraphSystemGroupAssociationsList(ctx context.Context, groupId string, targets []string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphConnection, *http.Response, error) { +func (a *SystemGroupsApiService) GraphSystemGroupAssociationsList(ctx context.Context, groupId string, contentType string, accept string, targets []string, localVarOptionals map[string]interface{}) ([]GraphConnection, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -62,13 +62,13 @@ func (a *SystemGroupsApiService) GraphSystemGroupAssociationsList(ctx context.Co return successPayload, nil, err } - localVarQueryParams.Add("targets", parameterToString(targets, "csv")) if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) } if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } + localVarQueryParams.Add("targets", parameterToString(targets, "csv")) // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -107,17 +107,18 @@ func (a *SystemGroupsApiService) GraphSystemGroupAssociationsList(ctx context.Co return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -125,8 +126,8 @@ func (a *SystemGroupsApiService) GraphSystemGroupAssociationsList(ctx context.Co } /* SystemGroupsApiService Manage the associations of a System Group - This endpoint allows you to manage the _direct_ associations of a System Group. A direct association can be a non-homogenous relationship between 2 different objects. for example System Groups and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/associations ``` - * @param ctx context.Context Authentication Context + This endpoint allows you to manage the _direct_ associations of a System Group. A direct association can be a non-homogenous relationship between 2 different objects. for example System Groups and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/associations \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user\", \"id\": \"{UserID}\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the System Group. @param contentType @param accept @@ -192,27 +193,30 @@ func (a *SystemGroupsApiService) GraphSystemGroupAssociationsPost(ctx context.Co return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } /* SystemGroupsApiService List the System Group's parents This endpoint returns all System Groups a System Group is a member of. This endpoint is not yet public as we haven't completed the code yet. - * @param ctx context.Context Authentication Context + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the System Group. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. @return []GraphObjectWithPaths*/ func (a *SystemGroupsApiService) GraphSystemGroupMemberOf(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { var ( @@ -238,12 +242,18 @@ func (a *SystemGroupsApiService) GraphSystemGroupMemberOf(ctx context.Context, g return successPayload, nil, err } + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) + } if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) } if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) + } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -282,17 +292,18 @@ func (a *SystemGroupsApiService) GraphSystemGroupMemberOf(ctx context.Context, g return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -300,8 +311,8 @@ func (a *SystemGroupsApiService) GraphSystemGroupMemberOf(ctx context.Context, g } /* SystemGroupsApiService List the members of a System Group - This endpoint returns the system members of a System Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/members ``` - * @param ctx context.Context Authentication Context + This endpoint returns the system members of a System Group. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID}/members \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the System Group. @param contentType @param accept @@ -377,17 +388,18 @@ func (a *SystemGroupsApiService) GraphSystemGroupMembersList(ctx context.Context return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -395,8 +407,8 @@ func (a *SystemGroupsApiService) GraphSystemGroupMembersList(ctx context.Context } /* SystemGroupsApiService Manage the members of a System Group - This endpoint allows you to manage the system members of a System Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/members ``` - * @param ctx context.Context Authentication Context + This endpoint allows you to manage the system members of a System Group. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID}/members \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY' \\ -d '{ \"op\": \"add\", \"type\": \"system\", \"id\": \"{System_ID\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the System Group. @param contentType @param accept @@ -476,27 +488,30 @@ func (a *SystemGroupsApiService) GraphSystemGroupMembersPost(ctx context.Context return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } /* SystemGroupsApiService List the System Group's membership - This endpoint returns all Systems that are a member of this System Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/membership ``` - * @param ctx context.Context Authentication Context + This endpoint returns all Systems that are a member of this System Group. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID/membership \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the System Group. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in @return []GraphObjectWithPaths*/ func (a *SystemGroupsApiService) GraphSystemGroupMembership(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { var ( @@ -528,6 +543,12 @@ func (a *SystemGroupsApiService) GraphSystemGroupMembership(ctx context.Context, if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) + } + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) + } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -566,26 +587,27 @@ func (a *SystemGroupsApiService) GraphSystemGroupMembership(ctx context.Context, return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* SystemGroupsApiService List the Policies associated with a System Group - This endpoint will return Policies associated with a System Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this System Group to the corresponding Policy; this array represents all grouping and/or associations that would have to be removed to deprovision the Policy from this System Group. See `/members` and `/associations` endpoints to manage those collections. This endpoint is not public yet as we haven't finished the code. - * @param ctx context.Context Authentication Context +/* SystemGroupsApiService List the Policies bound to a System Group + This endpoint will return all Policies bound to a System Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System Group to the corresponding Policy; this array represents all grouping and/or associations that would have to be removed to deprovision the Policy from this System Group. See `/members` and `/associations` endpoints to manage those collections. This endpoint is not public yet as we haven't finished the code. ##### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/policies \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the System Group. @param contentType @param accept @@ -661,26 +683,27 @@ func (a *SystemGroupsApiService) GraphSystemGroupTraversePolicy(ctx context.Cont return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* SystemGroupsApiService List the Users associated with a System Group - This endpoint will return Users associated with a System Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this System Group to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this System Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/users ``` - * @param ctx context.Context Authentication Context +/* SystemGroupsApiService List the Users bound to a System Group + This endpoint will return all Users bound to a System Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System Group to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this System Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/users \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the System Group. @param contentType @param accept @@ -756,26 +779,27 @@ func (a *SystemGroupsApiService) GraphSystemGroupTraverseUser(ctx context.Contex return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* SystemGroupsApiService List the User Groups associated with a System Group - This endpoint will return User Groups associated with a System Group. Each element will contain the group's type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this System Group to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this System Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{group_id}/usergroups ``` - * @param ctx context.Context Authentication Context +/* SystemGroupsApiService List the User Groups bound to a System Group + This endpoint will return all User Groups bound to a System Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System Group to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this System Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{GroupID}/usergroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the System Group. @param contentType @param accept @@ -851,17 +875,18 @@ func (a *SystemGroupsApiService) GraphSystemGroupTraverseUserGroup(ctx context.C return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -869,8 +894,8 @@ func (a *SystemGroupsApiService) GraphSystemGroupTraverseUserGroup(ctx context.C } /* SystemGroupsApiService Delete a System Group - This endpoint allows you to delete a System Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{id} ``` - * @param ctx context.Context Authentication Context + This endpoint allows you to delete a System Group. #### Sample Request ``` curl -X DELETE https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID} \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param id ObjectID of the System Group. @param contentType @param accept @@ -930,21 +955,22 @@ func (a *SystemGroupsApiService) GroupsSystemDelete(ctx context.Context, id stri return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } /* SystemGroupsApiService View an individual System Group details - This endpoint returns the details of a System Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{id} ``` - * @param ctx context.Context Authentication Context + This endpoint returns the details of a System Group. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID} \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param id ObjectID of the System Group. @param contentType @param accept @@ -1005,17 +1031,18 @@ func (a *SystemGroupsApiService) GroupsSystemGet(ctx context.Context, id string, return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -1023,16 +1050,16 @@ func (a *SystemGroupsApiService) GroupsSystemGet(ctx context.Context, id string, } /* SystemGroupsApiService List all System Groups - This endpoint returns all System Groups. Available filter fields: - `name` - `disabled` - `type` #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups ``` - * @param ctx context.Context Authentication Context + This endpoint returns all System Groups. Available filter fields: - `name` - `disabled` - `type` #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systemgroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: - @param "fields" (string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. - @param "filter" (string) Supported operators are: eq, ne, gt, ge, lt, le, between, search + @param "fields" ([]string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. - @param "sort" (string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. @return []SystemGroup*/ func (a *SystemGroupsApiService) GroupsSystemList(ctx context.Context, contentType string, accept string, localVarOptionals map[string]interface{}) ([]SystemGroup, *http.Response, error) { var ( @@ -1050,27 +1077,18 @@ func (a *SystemGroupsApiService) GroupsSystemList(ctx context.Context, contentTy localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if err := typeCheckParameter(localVarOptionals["fields"], "string", "fields"); err != nil { - return successPayload, nil, err - } - if err := typeCheckParameter(localVarOptionals["filter"], "string", "filter"); err != nil { - return successPayload, nil, err - } if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { return successPayload, nil, err } if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { return successPayload, nil, err } - if err := typeCheckParameter(localVarOptionals["sort"], "string", "sort"); err != nil { - return successPayload, nil, err - } - if localVarTempParam, localVarOk := localVarOptionals["fields"].(string); localVarOk { - localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["fields"].([]string); localVarOk { + localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "csv")) } - if localVarTempParam, localVarOk := localVarOptionals["filter"].(string); localVarOk { - localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) } if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) @@ -1078,8 +1096,8 @@ func (a *SystemGroupsApiService) GroupsSystemList(ctx context.Context, contentTy if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } - if localVarTempParam, localVarOk := localVarOptionals["sort"].(string); localVarOk { - localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -1119,17 +1137,18 @@ func (a *SystemGroupsApiService) GroupsSystemList(ctx context.Context, contentTy return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -1138,7 +1157,7 @@ func (a *SystemGroupsApiService) GroupsSystemList(ctx context.Context, contentTy /* SystemGroupsApiService Partial update a System Group We have hidden PATCH on the systemgroups and usergroups for now; we don't have that implemented correctly yet, people should use PUT until we do a true PATCH operation. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{id} ``` - * @param ctx context.Context Authentication Context + * @param ctx context.Context for authentication, logging, tracing, etc. @param id ObjectID of the System Group. @param contentType @param accept @@ -1205,17 +1224,18 @@ func (a *SystemGroupsApiService) GroupsSystemPatch(ctx context.Context, id strin return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -1223,8 +1243,8 @@ func (a *SystemGroupsApiService) GroupsSystemPatch(ctx context.Context, id strin } /* SystemGroupsApiService Create a new System Group - This endpoint allows you to create a new System Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups ``` - * @param ctx context.Context Authentication Context + This endpoint allows you to create a new System Group. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/systemgroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"name\": \"{Group_Name}\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: @@ -1289,17 +1309,18 @@ func (a *SystemGroupsApiService) GroupsSystemPost(ctx context.Context, contentTy return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -1307,8 +1328,8 @@ func (a *SystemGroupsApiService) GroupsSystemPost(ctx context.Context, contentTy } /* SystemGroupsApiService Update a System Group - This enpoint allows you to do a full update of the System Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systemgroups/{id} ``` - * @param ctx context.Context Authentication Context + This enpoint allows you to do a full update of the System Group. #### Sample Request ``` curl -X PUT https://console.jumpcloud.com/api/v2/systemgroups/{Group_ID} \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"name\": \"Name_Update\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param id ObjectID of the System Group. @param contentType @param accept @@ -1375,17 +1396,18 @@ func (a *SystemGroupsApiService) GroupsSystemPut(ctx context.Context, id string, return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } diff --git a/v2/systems_api.go b/v2/systems_api.go index 2ac7a27..81e19e5 100644 --- a/v2/systems_api.go +++ b/v2/systems_api.go @@ -1,16 +1,16 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 import ( + "io/ioutil" "net/url" "net/http" "strings" @@ -28,19 +28,19 @@ type SystemsApiService service /* SystemsApiService List the associations of a System - This endpoint returns the _direct_ associations of a System. A direct association can be a non-homogenous relationship between 2 different objects. for example Systems and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systems/{system_id}/associations?targets=user ``` - * @param ctx context.Context Authentication Context + This endpoint returns the _direct_ associations of a System. A direct association can be a non-homogenous relationship between 2 different objects. for example Systems and Users. #### Sample Request ``` 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}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param systemId ObjectID of the System. - @param targets @param contentType @param accept + @param targets @param optional (nil or map[string]interface{}) with one or more of: @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. @param "date" (string) Current date header for the System Context API @param "authorization" (string) Authorization header for the System Context API @return []GraphConnection*/ -func (a *SystemsApiService) GraphSystemAssociationsList(ctx context.Context, systemId string, targets []string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphConnection, *http.Response, error) { +func (a *SystemsApiService) GraphSystemAssociationsList(ctx context.Context, systemId string, contentType string, accept string, targets []string, localVarOptionals map[string]interface{}) ([]GraphConnection, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -70,13 +70,13 @@ func (a *SystemsApiService) GraphSystemAssociationsList(ctx context.Context, sys return successPayload, nil, err } - localVarQueryParams.Add("targets", parameterToString(targets, "csv")) if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) } if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } + localVarQueryParams.Add("targets", parameterToString(targets, "csv")) // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -121,17 +121,18 @@ func (a *SystemsApiService) GraphSystemAssociationsList(ctx context.Context, sys return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -139,13 +140,13 @@ func (a *SystemsApiService) GraphSystemAssociationsList(ctx context.Context, sys } /* SystemsApiService Manage associations of a System - This endpoint allows you to manage the _direct_ associations of a System. A direct association can be a non-homogenous relationship between 2 different objects. for example Systems and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systems/{system_id}/associations ``` - * @param ctx context.Context Authentication Context + This endpoint allows you to manage the _direct_ associations of a System. A direct association can be a non-homogenous relationship between 2 different objects. for example Systems and Users. #### Sample Request ``` curl -X POST https://console.jumpcloud.com/api/v2/systems/{System_ID}/associations \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' \\ -d '{ \"op\": \"add\", \"type\": \"user\", \"id\": \"{User_ID}\" }' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param systemId ObjectID of the System. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: - @param "body" (GraphManagementReq) + @param "body" (SystemGraphManagementReq) @param "date" (string) Current date header for the System Context API @param "authorization" (string) Authorization header for the System Context API @return */ @@ -200,7 +201,7 @@ func (a *SystemsApiService) GraphSystemAssociationsPost(ctx context.Context, sys localVarHeaderParams["Authorization"] = parameterToString(localVarTempParam, "") } // body params - if localVarTempParam, localVarOk := localVarOptionals["body"].(GraphManagementReq); localVarOk { + if localVarTempParam, localVarOk := localVarOptionals["body"].(SystemGraphManagementReq); localVarOk { localVarPostBody = &localVarTempParam } if ctx != nil { @@ -220,29 +221,32 @@ func (a *SystemsApiService) GraphSystemAssociationsPost(ctx context.Context, sys return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } /* SystemsApiService List the parent Groups of a System - This endpoint returns all the System Groups a System is a member of. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systems/{system_id}/memberof ``` - * @param ctx context.Context Authentication Context + This endpoint returns all the System Groups a System is a member of. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systems/{System_ID}/memberof \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param systemId ObjectID of the System. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. @param "date" (string) Current date header for the System Context API @param "authorization" (string) Authorization header for the System Context API + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. @return []GraphObjectWithPaths*/ func (a *SystemsApiService) GraphSystemMemberOf(ctx context.Context, systemId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { var ( @@ -274,12 +278,18 @@ func (a *SystemsApiService) GraphSystemMemberOf(ctx context.Context, systemId st return successPayload, nil, err } + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) + } if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) } if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) + } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -324,26 +334,123 @@ func (a *SystemsApiService) GraphSystemMemberOf(ctx context.Context, systemId st return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* SystemsApiService List the Commands bound to a System + This endpoint will return all Commands bound to a System, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System to the corresponding Command; this array represents all grouping and/or associations that would have to be removed to deprovision the Command from this System. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systems/{System_ID}/commands \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param systemId ObjectID of the System. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @return []GraphObjectWithPaths*/ +func (a *SystemsApiService) GraphSystemTraverseCommand(ctx context.Context, systemId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphObjectWithPaths + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/systems/{system_id}/commands" + localVarPath = strings.Replace(localVarPath, "{"+"system_id"+"}", fmt.Sprintf("%v", systemId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* SystemsApiService List the Policies associated with a System - This endpoint will return Policies associated with a System. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this System to the corresponding Policy; this array represents all grouping and/or associations that would have to be removed to deprovision the Policy from this System. See `/members` and `/associations` endpoints to manage those collections. This endpoint is not yet public as we have finish the code. - * @param ctx context.Context Authentication Context +/* SystemsApiService List the Policies bound to a System + This endpoint will return all Policies bound to a System, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System to the corresponding Policy; this array represents all grouping and/or associations that would have to be removed to deprovision the Policy from this System. See `/members` and `/associations` endpoints to manage those collections. This endpoint is not yet public as we have finish the code. ##### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/{System_ID}/policies \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param systemId ObjectID of the System. @param contentType @param accept @@ -419,26 +526,27 @@ func (a *SystemsApiService) GraphSystemTraversePolicy(ctx context.Context, syste return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* SystemsApiService List the Users associated with a System - This endpoint will return Users associated with a System. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this System to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this System. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/systems/{system_id}/users ``` - * @param ctx context.Context Authentication Context +/* SystemsApiService List the Users bound to a System + This endpoint will return all Users bound to a System, either directly or indirectly essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System to the corresponding User; this array represents all grouping and/or associations that would have to be removed to deprovision the User from this System. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systems/{System_ID}/users \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param systemId ObjectID of the System. @param contentType @param accept @@ -528,17 +636,128 @@ func (a *SystemsApiService) GraphSystemTraverseUser(ctx context.Context, systemI return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* SystemsApiService List the User Groups bound to a System + This endpoint will return all User Groups bound to a System, either directly or indirectly essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this System to the corresponding User Group; this array represents all grouping and/or associations that would have to be removed to deprovision the User Group from this System. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/systems/{System_ID}/usergroups \\ -H 'Accept: application/json' \\ -H 'Content-Type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param systemId ObjectID of the System. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @param "date" (string) Current date header for the System Context API + @param "authorization" (string) Authorization header for the System Context API + @return []GraphObjectWithPaths*/ +func (a *SystemsApiService) GraphSystemTraverseUserGroup(ctx context.Context, systemId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphObjectWithPaths + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/systems/{system_id}/usergroups" + localVarPath = strings.Replace(localVarPath, "{"+"system_id"+"}", fmt.Sprintf("%v", systemId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["date"], "string", "date"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["authorization"], "string", "authorization"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if localVarTempParam, localVarOk := localVarOptionals["date"].(string); localVarOk { + localVarHeaderParams["Date"] = parameterToString(localVarTempParam, "") + } + if localVarTempParam, localVarOk := localVarOptionals["authorization"].(string); localVarOk { + localVarHeaderParams["Authorization"] = parameterToString(localVarTempParam, "") + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } diff --git a/v2/user_graph_management_req.go b/v2/user_graph_management_req.go new file mode 100644 index 0000000..cc78aea --- /dev/null +++ b/v2/user_graph_management_req.go @@ -0,0 +1,23 @@ +/* + * JumpCloud APIs + * + * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. + * + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package v2 + +type UserGraphManagementReq struct { + + Attributes *SystemGraphManagementReqAttributes `json:"attributes,omitempty"` + + // How to modify the graph connection. + Op string `json:"op"` + + Type_ string `json:"type"` + + // The ObjectID of graph object being added or removed as an association. + Id string `json:"id"` +} diff --git a/v2/user_group.go b/v2/user_group.go index 3f14f89..533fccf 100644 --- a/v2/user_group.go +++ b/v2/user_group.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/user_group_associations_api.go b/v2/user_group_associations_api.go new file mode 100644 index 0000000..ee42831 --- /dev/null +++ b/v2/user_group_associations_api.go @@ -0,0 +1,1072 @@ +/* + * JumpCloud APIs + * + * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. + * + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package v2 + +import ( + "io/ioutil" + "net/url" + "net/http" + "strings" + "golang.org/x/net/context" + "encoding/json" + "fmt" +) + +// Linger please +var ( + _ context.Context +) + +type UserGroupAssociationsApiService service + + +/* UserGroupAssociationsApiService List the associations of a User Group. + This endpoint returns the _direct_ associations of this User Group. A direct association can be a non-homogenous relationship between 2 different objects. for example User Groups and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/associations?targets=user ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the User Group. + @param contentType + @param accept + @param targets + @param optional (nil or map[string]interface{}) with one or more of: + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @return []GraphConnection*/ +func (a *UserGroupAssociationsApiService) GraphUserGroupAssociationsList(ctx context.Context, groupId string, contentType string, accept string, targets []string, localVarOptionals map[string]interface{}) ([]GraphConnection, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphConnection + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/usergroups/{group_id}/associations" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + localVarQueryParams.Add("targets", parameterToString(targets, "csv")) + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* UserGroupAssociationsApiService Manage the associations of a User Group + This endpoint manages the _direct_ associations of this User Group. A direct association can be a non-homogenous relationship between 2 different objects. for example User Groups and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/associations ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the User Group. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "body" (UserGroupGraphManagementReq) + @return */ +func (a *UserGroupAssociationsApiService) GraphUserGroupAssociationsPost(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ( *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/usergroups/{group_id}/associations" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + // body params + if localVarTempParam, localVarOk := localVarOptionals["body"].(UserGroupGraphManagementReq); localVarOk { + localVarPostBody = &localVarTempParam + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + return localVarHttpResponse, err +} + +/* UserGroupAssociationsApiService List the Active Directories bound to a User Group + This endpoint will return all Active Directory Instances bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding Active Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Active Directory from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/activedirectories ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the User Group. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @return []GraphObjectWithPaths*/ +func (a *UserGroupAssociationsApiService) GraphUserGroupTraverseActiveDirectory(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphObjectWithPaths + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/usergroups/{group_id}/activedirectories" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* UserGroupAssociationsApiService List the Applications bound to a User Group + This endpoint will return all Applications bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding Application; this array represents all grouping and/or associations that would have to be removed to deprovision the Application from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/applications ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the User Group. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @return []GraphObjectWithPaths*/ +func (a *UserGroupAssociationsApiService) GraphUserGroupTraverseApplication(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphObjectWithPaths + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/usergroups/{group_id}/applications" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* UserGroupAssociationsApiService List the Directories bound to a User Group + This endpoint will return all Directories bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Directories from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/directories ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the User Group. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @return []GraphObjectWithPaths*/ +func (a *UserGroupAssociationsApiService) GraphUserGroupTraverseDirectory(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphObjectWithPaths + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/usergroups/{group_id}/directories" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* UserGroupAssociationsApiService List the G Suite instances bound to a User Group + This endpoint will return all Gsuite Instances bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding G Suite instance; this array represents all grouping and/or associations that would have to be removed to deprovision the G Suite instance from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/gsuites ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the User Group. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @return []GraphObjectWithPaths*/ +func (a *UserGroupAssociationsApiService) GraphUserGroupTraverseGSuite(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphObjectWithPaths + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/usergroups/{group_id}/gsuites" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* UserGroupAssociationsApiService List the LDAP Servers bound to a User Group + This endpoint will return all LDAP Servers bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding LDAP Server; this array represents all grouping and/or associations that would have to be removed to deprovision the LDAP Server from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/ldapservers ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the User Group. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @return []GraphObjectWithPaths*/ +func (a *UserGroupAssociationsApiService) GraphUserGroupTraverseLdapServer(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphObjectWithPaths + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/usergroups/{group_id}/ldapservers" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* UserGroupAssociationsApiService List the Office 365 instances bound to a User Group + This endpoint will return all Office 365 instances bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding Office 365 instance; this array represents all grouping and/or associations that would have to be removed to deprovision the Office 365 instance from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/office365s ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the User Group. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @return []GraphObjectWithPaths*/ +func (a *UserGroupAssociationsApiService) GraphUserGroupTraverseOffice365(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphObjectWithPaths + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/usergroups/{group_id}/office365s" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* UserGroupAssociationsApiService List the RADIUS Servers bound to a User Group + This endpoint will return all RADIUS servers bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding RADIUS Server; this array represents all grouping and/or associations that would have to be removed to deprovision the RADIUS Server from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/radiusservers ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the User Group. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @return []GraphObjectWithPaths*/ +func (a *UserGroupAssociationsApiService) GraphUserGroupTraverseRadiusServer(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphObjectWithPaths + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/usergroups/{group_id}/radiusservers" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* UserGroupAssociationsApiService List the Systems bound to a User Group + This endpoint will return all Systems bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/systems ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the User Group. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @return []GraphObjectWithPaths*/ +func (a *UserGroupAssociationsApiService) GraphUserGroupTraverseSystem(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphObjectWithPaths + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/usergroups/{group_id}/systems" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* UserGroupAssociationsApiService List the System Groups bound to User Groups + This endpoint will return all System Groups bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/systemsgroups ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the User Group. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @return []GraphObjectWithPaths*/ +func (a *UserGroupAssociationsApiService) GraphUserGroupTraverseSystemGroup(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphObjectWithPaths + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/usergroups/{group_id}/systemgroups" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + diff --git a/v2/user_group_graph_management_req.go b/v2/user_group_graph_management_req.go index 8f4cff4..be638f8 100644 --- a/v2/user_group_graph_management_req.go +++ b/v2/user_group_graph_management_req.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/user_group_members_membership_api.go b/v2/user_group_members_membership_api.go new file mode 100644 index 0000000..3b57b79 --- /dev/null +++ b/v2/user_group_members_membership_api.go @@ -0,0 +1,414 @@ +/* + * JumpCloud APIs + * + * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. + * + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package v2 + +import ( + "io/ioutil" + "net/url" + "net/http" + "strings" + "golang.org/x/net/context" + "encoding/json" + "fmt" +) + +// Linger please +var ( + _ context.Context +) + +type UserGroupMembersMembershipApiService service + + +/* UserGroupMembersMembershipApiService List the User Group's parents + This endpoint returns all User Groups a User Group is a member of. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/{group_id}/membersof ``` Not public yet, as the code is not finished, + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the User Group. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. + @return []GraphObjectWithPaths*/ +func (a *UserGroupMembersMembershipApiService) GraphUserGroupMemberOf(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphObjectWithPaths + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/usergroups/{group_id}/memberof" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) + } + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* UserGroupMembersMembershipApiService List the members of a User Group + This endpoint returns the user members of a User Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/{group_id}/members ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the User Group. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @return []GraphConnection*/ +func (a *UserGroupMembersMembershipApiService) GraphUserGroupMembersList(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphConnection, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphConnection + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/usergroups/{group_id}/members" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* UserGroupMembersMembershipApiService Manage the members of a User Group + This endpoint allows you to manage the user members of a User Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/{group_id}/members ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the User Group. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "body" (UserGroupMembersReq) + @return */ +func (a *UserGroupMembersMembershipApiService) GraphUserGroupMembersPost(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ( *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/usergroups/{group_id}/members" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + // body params + if localVarTempParam, localVarOk := localVarOptionals["body"].(UserGroupMembersReq); localVarOk { + localVarPostBody = &localVarTempParam + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + return localVarHttpResponse, err +} + +/* UserGroupMembersMembershipApiService List the User Group's membership + This endpoint returns all users members that are a member of this User Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/{group_id}/membership ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param groupId ObjectID of the User Group. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. + @return []GraphObjectWithPaths*/ +func (a *UserGroupMembersMembershipApiService) GraphUserGroupMembership(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphObjectWithPaths + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/usergroups/{group_id}/membership" + localVarPath = strings.Replace(localVarPath, "{"+"group_id"+"}", fmt.Sprintf("%v", groupId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) + } + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + diff --git a/v2/user_group_members_req.go b/v2/user_group_members_req.go index a164302..96d0a85 100644 --- a/v2/user_group_members_req.go +++ b/v2/user_group_members_req.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/user_group_data.go b/v2/user_group_post.go similarity index 67% rename from v2/user_group_data.go rename to v2/user_group_post.go index e787c4c..ad1d244 100644 --- a/v2/user_group_data.go +++ b/v2/user_group_post.go @@ -1,18 +1,17 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 -type UserGroupData struct { +type UserGroupPost struct { - Attributes *UserGroupDataAttributes `json:"attributes,omitempty"` + Attributes *UserGroupPostAttributes `json:"attributes,omitempty"` // Display name of a User Group. Name string `json:"name"` diff --git a/v2/user_group_data_attributes.go b/v2/user_group_post_attributes.go similarity index 68% rename from v2/user_group_data_attributes.go rename to v2/user_group_post_attributes.go index 8b68b3c..690feaa 100644 --- a/v2/user_group_data_attributes.go +++ b/v2/user_group_post_attributes.go @@ -1,19 +1,18 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 // The group object's attributes. -type UserGroupDataAttributes struct { +type UserGroupPostAttributes struct { - PosixGroups []UserGroupDataAttributesPosixGroups `json:"posixGroups,omitempty"` + PosixGroups []UserGroupPostAttributesPosixGroups `json:"posixGroups,omitempty"` SambaEnabled bool `json:"sambaEnabled,omitempty"` } diff --git a/v2/user_group_data_attributes_posix_groups.go b/v2/user_group_post_attributes_posix_groups.go similarity index 72% rename from v2/user_group_data_attributes_posix_groups.go rename to v2/user_group_post_attributes_posix_groups.go index 068befe..27b03ec 100644 --- a/v2/user_group_data_attributes_posix_groups.go +++ b/v2/user_group_post_attributes_posix_groups.go @@ -1,16 +1,15 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 -type UserGroupDataAttributesPosixGroups struct { +type UserGroupPostAttributesPosixGroups struct { Id int32 `json:"id,omitempty"` diff --git a/v2/body.go b/v2/user_group_put.go similarity index 61% rename from v2/body.go rename to v2/user_group_put.go index c3031d2..eaa8745 100644 --- a/v2/body.go +++ b/v2/user_group_put.go @@ -1,20 +1,18 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 -type Body struct { +type UserGroupPut struct { - Name string `json:"name"` - - ReportUrl string `json:"reportUrl"` + Attributes *UserGroupPutAttributes `json:"attributes,omitempty"` - Oauth *WorkdaysOauth `json:"oauth,omitempty"` + // Display name of a User Group. + Name string `json:"name"` } diff --git a/v2/user_group_put_attributes.go b/v2/user_group_put_attributes.go new file mode 100644 index 0000000..2f3e942 --- /dev/null +++ b/v2/user_group_put_attributes.go @@ -0,0 +1,16 @@ +/* + * JumpCloud APIs + * + * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. + * + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package v2 + +// The group object's attributes. +type UserGroupPutAttributes struct { + + SambaEnabled bool `json:"sambaEnabled,omitempty"` +} diff --git a/v2/user_groups_api.go b/v2/user_groups_api.go index 25b5660..71fc13e 100644 --- a/v2/user_groups_api.go +++ b/v2/user_groups_api.go @@ -1,16 +1,16 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 import ( + "io/ioutil" "net/url" "net/http" "strings" @@ -29,16 +29,16 @@ type UserGroupsApiService service /* UserGroupsApiService List the associations of a User Group. This endpoint returns the _direct_ associations of this User Group. A direct association can be a non-homogenous relationship between 2 different objects. for example User Groups and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/associations?targets=user ``` - * @param ctx context.Context Authentication Context + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. - @param targets @param contentType @param accept + @param targets @param optional (nil or map[string]interface{}) with one or more of: @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. @return []GraphConnection*/ -func (a *UserGroupsApiService) GraphUserGroupAssociationsList(ctx context.Context, groupId string, targets []string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphConnection, *http.Response, error) { +func (a *UserGroupsApiService) GraphUserGroupAssociationsList(ctx context.Context, groupId string, contentType string, accept string, targets []string, localVarOptionals map[string]interface{}) ([]GraphConnection, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -62,13 +62,13 @@ func (a *UserGroupsApiService) GraphUserGroupAssociationsList(ctx context.Contex return successPayload, nil, err } - localVarQueryParams.Add("targets", parameterToString(targets, "csv")) if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) } if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } + localVarQueryParams.Add("targets", parameterToString(targets, "csv")) // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -107,17 +107,18 @@ func (a *UserGroupsApiService) GraphUserGroupAssociationsList(ctx context.Contex return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -126,7 +127,7 @@ func (a *UserGroupsApiService) GraphUserGroupAssociationsList(ctx context.Contex /* UserGroupsApiService Manage the associations of a User Group This endpoint manages the _direct_ associations of this User Group. A direct association can be a non-homogenous relationship between 2 different objects. for example User Groups and Users. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/associations ``` - * @param ctx context.Context Authentication Context + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @@ -192,27 +193,30 @@ func (a *UserGroupsApiService) GraphUserGroupAssociationsPost(ctx context.Contex return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } /* UserGroupsApiService List the User Group's parents This endpoint returns all User Groups a User Group is a member of. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/{group_id}/membersof ``` Not public yet, as the code is not finished, - * @param ctx context.Context Authentication Context + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. @return []GraphObjectWithPaths*/ func (a *UserGroupsApiService) GraphUserGroupMemberOf(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { var ( @@ -238,12 +242,18 @@ func (a *UserGroupsApiService) GraphUserGroupMemberOf(ctx context.Context, group return successPayload, nil, err } + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) + } if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) } if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) + } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -282,17 +292,18 @@ func (a *UserGroupsApiService) GraphUserGroupMemberOf(ctx context.Context, group return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -301,7 +312,7 @@ func (a *UserGroupsApiService) GraphUserGroupMemberOf(ctx context.Context, group /* UserGroupsApiService List the members of a User Group This endpoint returns the user members of a User Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/{group_id}/members ``` - * @param ctx context.Context Authentication Context + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @@ -377,17 +388,18 @@ func (a *UserGroupsApiService) GraphUserGroupMembersList(ctx context.Context, gr return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -396,7 +408,7 @@ func (a *UserGroupsApiService) GraphUserGroupMembersList(ctx context.Context, gr /* UserGroupsApiService Manage the members of a User Group This endpoint allows you to manage the user members of a User Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/{group_id}/members ``` - * @param ctx context.Context Authentication Context + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @@ -462,27 +474,30 @@ func (a *UserGroupsApiService) GraphUserGroupMembersPost(ctx context.Context, gr return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } /* UserGroupsApiService List the User Group's membership This endpoint returns all users members that are a member of this User Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/{group_id}/membership ``` - * @param ctx context.Context Authentication Context + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. @return []GraphObjectWithPaths*/ func (a *UserGroupsApiService) GraphUserGroupMembership(ctx context.Context, groupId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { var ( @@ -508,12 +523,18 @@ func (a *UserGroupsApiService) GraphUserGroupMembership(ctx context.Context, gro return successPayload, nil, err } + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) + } if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) } if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) + } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -552,26 +573,27 @@ func (a *UserGroupsApiService) GraphUserGroupMembership(ctx context.Context, gro return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* UserGroupsApiService List the Active Directories associated with a User Group - This endpoint will return the Active Directories associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding Active Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Active Directory from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/activedirectories ``` - * @param ctx context.Context Authentication Context +/* UserGroupsApiService List the Active Directories bound to a User Group + This endpoint will return all Active Directory Instances bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding Active Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Active Directory from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/activedirectories ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @@ -647,26 +669,27 @@ func (a *UserGroupsApiService) GraphUserGroupTraverseActiveDirectory(ctx context return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* UserGroupsApiService List the Applications associated with a User Group - This endpoint will return Applications associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding Application; this array represents all grouping and/or associations that would have to be removed to deprovision the Application from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/applications ``` - * @param ctx context.Context Authentication Context +/* UserGroupsApiService List the Applications bound to a User Group + This endpoint will return all Applications bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding Application; this array represents all grouping and/or associations that would have to be removed to deprovision the Application from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/applications ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @@ -742,26 +765,27 @@ func (a *UserGroupsApiService) GraphUserGroupTraverseApplication(ctx context.Con return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* UserGroupsApiService List the Directories associated with a User Group - This endpoint will return Directories associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Directories from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/directories ``` - * @param ctx context.Context Authentication Context +/* UserGroupsApiService List the Directories bound to a User Group + This endpoint will return all Directories bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Directories from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/directories ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @@ -837,26 +861,27 @@ func (a *UserGroupsApiService) GraphUserGroupTraverseDirectory(ctx context.Conte return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* UserGroupsApiService List the G Suite instances associated with a User Group - This endpoint will return the G Suite instances associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding G Suite instance; this array represents all grouping and/or associations that would have to be removed to deprovision the G Suite instance from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/gsuites ``` - * @param ctx context.Context Authentication Context +/* UserGroupsApiService List the G Suite instances bound to a User Group + This endpoint will return all Gsuite Instances bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding G Suite instance; this array represents all grouping and/or associations that would have to be removed to deprovision the G Suite instance from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/gsuites ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @@ -932,26 +957,27 @@ func (a *UserGroupsApiService) GraphUserGroupTraverseGSuite(ctx context.Context, return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* UserGroupsApiService List the LDAP Servers associated with a User Group - This endpoint will return the LDAP Servers associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding LDAP Server; this array represents all grouping and/or associations that would have to be removed to deprovision the LDAP Server from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/ldapservers ``` - * @param ctx context.Context Authentication Context +/* UserGroupsApiService List the LDAP Servers bound to a User Group + This endpoint will return all LDAP Servers bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding LDAP Server; this array represents all grouping and/or associations that would have to be removed to deprovision the LDAP Server from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/ldapservers ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @@ -1027,26 +1053,27 @@ func (a *UserGroupsApiService) GraphUserGroupTraverseLdapServer(ctx context.Cont return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* UserGroupsApiService List the Office 365 instances associated with a User Group - This endpoint will return the Office 365 instances associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding Office 365 instance; this array represents all grouping and/or associations that would have to be removed to deprovision the Office 365 instance from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/office365s ``` - * @param ctx context.Context Authentication Context +/* UserGroupsApiService List the Office 365 instances bound to a User Group + This endpoint will return all Office 365 instances bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding Office 365 instance; this array represents all grouping and/or associations that would have to be removed to deprovision the Office 365 instance from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/office365s ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @@ -1122,26 +1149,27 @@ func (a *UserGroupsApiService) GraphUserGroupTraverseOffice365(ctx context.Conte return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* UserGroupsApiService List the RADIUS Servers associated with a User Group - This endpoint will return a RADIUS Servers associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding RADIUS Server; this array represents all grouping and/or associations that would have to be removed to deprovision the RADIUS Server from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/radiusservers ``` - * @param ctx context.Context Authentication Context +/* UserGroupsApiService List the RADIUS Servers bound to a User Group + This endpoint will return all RADIUS servers bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding RADIUS Server; this array represents all grouping and/or associations that would have to be removed to deprovision the RADIUS Server from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/radiusservers ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @@ -1217,26 +1245,27 @@ func (a *UserGroupsApiService) GraphUserGroupTraverseRadiusServer(ctx context.Co return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* UserGroupsApiService List the Systems associated with a User Group - This endpoint will return Systems associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/systems ``` - * @param ctx context.Context Authentication Context +/* UserGroupsApiService List the Systems bound to a User Group + This endpoint will return all Systems bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/systems ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @@ -1312,26 +1341,27 @@ func (a *UserGroupsApiService) GraphUserGroupTraverseSystem(ctx context.Context, return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* UserGroupsApiService List the System Groups associated with User Groups - This endpoint will return System Groups associated with a User Group. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User Group to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/systemsgroups ``` - * @param ctx context.Context Authentication Context +/* UserGroupsApiService List the System Groups bound to User Groups + This endpoint will return all System Groups bound to a User Group, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User Group to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this User Group. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/group_id}/systemsgroups ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param groupId ObjectID of the User Group. @param contentType @param accept @@ -1407,17 +1437,18 @@ func (a *UserGroupsApiService) GraphUserGroupTraverseSystemGroup(ctx context.Con return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -1426,7 +1457,7 @@ func (a *UserGroupsApiService) GraphUserGroupTraverseSystemGroup(ctx context.Con /* UserGroupsApiService Delete a User Group This endpoint allows you to delete a User Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/{id} ``` - * @param ctx context.Context Authentication Context + * @param ctx context.Context for authentication, logging, tracing, etc. @param id ObjectID of the User Group. @param contentType @param accept @@ -1486,21 +1517,22 @@ func (a *UserGroupsApiService) GroupsUserDelete(ctx context.Context, id string, return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } /* UserGroupsApiService View an indvidual User Group details This endpoint allows you to view the details of a User Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/{id} ``` - * @param ctx context.Context Authentication Context + * @param ctx context.Context for authentication, logging, tracing, etc. @param id ObjectID of the User Group. @param contentType @param accept @@ -1561,17 +1593,18 @@ func (a *UserGroupsApiService) GroupsUserGet(ctx context.Context, id string, con return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -1580,15 +1613,15 @@ func (a *UserGroupsApiService) GroupsUserGet(ctx context.Context, id string, con /* UserGroupsApiService List all User Groups This endpoint returns all User Groups. Available filter fields: - `name` - `disabled` - `type` #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups ``` - * @param ctx context.Context Authentication Context + * @param ctx context.Context for authentication, logging, tracing, etc. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: - @param "fields" (string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. - @param "filter" (string) Supported operators are: eq, ne, gt, ge, lt, le, between, search + @param "fields" ([]string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. - @param "sort" (string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. @return []UserGroup*/ func (a *UserGroupsApiService) GroupsUserList(ctx context.Context, contentType string, accept string, localVarOptionals map[string]interface{}) ([]UserGroup, *http.Response, error) { var ( @@ -1606,27 +1639,18 @@ func (a *UserGroupsApiService) GroupsUserList(ctx context.Context, contentType s localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if err := typeCheckParameter(localVarOptionals["fields"], "string", "fields"); err != nil { - return successPayload, nil, err - } - if err := typeCheckParameter(localVarOptionals["filter"], "string", "filter"); err != nil { - return successPayload, nil, err - } if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { return successPayload, nil, err } if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { return successPayload, nil, err } - if err := typeCheckParameter(localVarOptionals["sort"], "string", "sort"); err != nil { - return successPayload, nil, err - } - if localVarTempParam, localVarOk := localVarOptionals["fields"].(string); localVarOk { - localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["fields"].([]string); localVarOk { + localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "csv")) } - if localVarTempParam, localVarOk := localVarOptionals["filter"].(string); localVarOk { - localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) } if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) @@ -1634,8 +1658,8 @@ func (a *UserGroupsApiService) GroupsUserList(ctx context.Context, contentType s if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } - if localVarTempParam, localVarOk := localVarOptionals["sort"].(string); localVarOk { - localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -1675,17 +1699,18 @@ func (a *UserGroupsApiService) GroupsUserList(ctx context.Context, contentType s return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -1694,12 +1719,12 @@ func (a *UserGroupsApiService) GroupsUserList(ctx context.Context, contentType s /* UserGroupsApiService Partial update a User Group We have hidden PATCH on the systemgroups and usergroups for now; we don't have that implemented correctly yet, people should use PUT until we do a true PATCH operation. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/{id} ``` - * @param ctx context.Context Authentication Context + * @param ctx context.Context for authentication, logging, tracing, etc. @param id ObjectID of the User Group. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: - @param "body" (UserGroupData) + @param "body" (UserGroupPost) @return UserGroup*/ func (a *UserGroupsApiService) GroupsUserPatch(ctx context.Context, id string, contentType string, accept string, localVarOptionals map[string]interface{}) (UserGroup, *http.Response, error) { var ( @@ -1741,7 +1766,7 @@ func (a *UserGroupsApiService) GroupsUserPatch(ctx context.Context, id string, c localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") localVarHeaderParams["Accept"] = parameterToString(accept, "") // body params - if localVarTempParam, localVarOk := localVarOptionals["body"].(UserGroupData); localVarOk { + if localVarTempParam, localVarOk := localVarOptionals["body"].(UserGroupPost); localVarOk { localVarPostBody = &localVarTempParam } if ctx != nil { @@ -1761,17 +1786,18 @@ func (a *UserGroupsApiService) GroupsUserPatch(ctx context.Context, id string, c return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -1780,11 +1806,11 @@ func (a *UserGroupsApiService) GroupsUserPatch(ctx context.Context, id string, c /* UserGroupsApiService Create a new User Group This endpoint allows you to create a new User Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups ``` - * @param ctx context.Context Authentication Context + * @param ctx context.Context for authentication, logging, tracing, etc. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: - @param "body" (UserGroupData) + @param "body" (UserGroupPost) @return UserGroup*/ func (a *UserGroupsApiService) GroupsUserPost(ctx context.Context, contentType string, accept string, localVarOptionals map[string]interface{}) (UserGroup, *http.Response, error) { var ( @@ -1825,7 +1851,7 @@ func (a *UserGroupsApiService) GroupsUserPost(ctx context.Context, contentType s localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") localVarHeaderParams["Accept"] = parameterToString(accept, "") // body params - if localVarTempParam, localVarOk := localVarOptionals["body"].(UserGroupData); localVarOk { + if localVarTempParam, localVarOk := localVarOptionals["body"].(UserGroupPost); localVarOk { localVarPostBody = &localVarTempParam } if ctx != nil { @@ -1845,17 +1871,18 @@ func (a *UserGroupsApiService) GroupsUserPost(ctx context.Context, contentType s return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -1864,12 +1891,12 @@ func (a *UserGroupsApiService) GroupsUserPost(ctx context.Context, contentType s /* UserGroupsApiService Update a User Group This enpoint allows you to do a full update of the User Group. #### Sample Request ``` https://console.jumpcloud.com/api/v2/usergroups/{id} ``` - * @param ctx context.Context Authentication Context + * @param ctx context.Context for authentication, logging, tracing, etc. @param id ObjectID of the User Group. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: - @param "body" (UserGroupData) + @param "body" (UserGroupPut) @return UserGroup*/ func (a *UserGroupsApiService) GroupsUserPut(ctx context.Context, id string, contentType string, accept string, localVarOptionals map[string]interface{}) (UserGroup, *http.Response, error) { var ( @@ -1911,7 +1938,7 @@ func (a *UserGroupsApiService) GroupsUserPut(ctx context.Context, id string, con localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") localVarHeaderParams["Accept"] = parameterToString(accept, "") // body params - if localVarTempParam, localVarOk := localVarOptionals["body"].(UserGroupData); localVarOk { + if localVarTempParam, localVarOk := localVarOptionals["body"].(UserGroupPut); localVarOk { localVarPostBody = &localVarTempParam } if ctx != nil { @@ -1931,17 +1958,18 @@ func (a *UserGroupsApiService) GroupsUserPut(ctx context.Context, id string, con return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } diff --git a/v2/users_api.go b/v2/users_api.go index 9a5dc11..6ed3e74 100644 --- a/v2/users_api.go +++ b/v2/users_api.go @@ -1,16 +1,16 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 import ( + "io/ioutil" "net/url" "net/http" "strings" @@ -29,16 +29,16 @@ type UsersApiService service /* UsersApiService List the associations of a User This endpoint returns the _direct_ associations of a User. A direct association can be a non-homogenous relationship between 2 different objects. for example Users and Systems. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/associations?targets=user_group ``` - * @param ctx context.Context Authentication Context + * @param ctx context.Context for authentication, logging, tracing, etc. @param userId ObjectID of the User. - @param targets @param contentType @param accept + @param targets @param optional (nil or map[string]interface{}) with one or more of: @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. @return []GraphConnection*/ -func (a *UsersApiService) GraphUserAssociationsList(ctx context.Context, userId string, targets []string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphConnection, *http.Response, error) { +func (a *UsersApiService) GraphUserAssociationsList(ctx context.Context, userId string, contentType string, accept string, targets []string, localVarOptionals map[string]interface{}) ([]GraphConnection, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -62,13 +62,13 @@ func (a *UsersApiService) GraphUserAssociationsList(ctx context.Context, userId return successPayload, nil, err } - localVarQueryParams.Add("targets", parameterToString(targets, "csv")) if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) } if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } + localVarQueryParams.Add("targets", parameterToString(targets, "csv")) // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -107,17 +107,18 @@ func (a *UsersApiService) GraphUserAssociationsList(ctx context.Context, userId return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } @@ -126,12 +127,12 @@ func (a *UsersApiService) GraphUserAssociationsList(ctx context.Context, userId /* UsersApiService Manage the associations of a User This endpoint allows you to manage the _direct_ associations of a User. A direct association can be a non-homogenous relationship between 2 different objects. for example Users and Systems. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/associations ``` - * @param ctx context.Context Authentication Context + * @param ctx context.Context for authentication, logging, tracing, etc. @param userId ObjectID of the User. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: - @param "body" (GraphManagementReq) + @param "body" (UserGraphManagementReq) @return */ func (a *UsersApiService) GraphUserAssociationsPost(ctx context.Context, userId string, contentType string, accept string, localVarOptionals map[string]interface{}) ( *http.Response, error) { var ( @@ -172,7 +173,7 @@ func (a *UsersApiService) GraphUserAssociationsPost(ctx context.Context, userId localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") localVarHeaderParams["Accept"] = parameterToString(accept, "") // body params - if localVarTempParam, localVarOk := localVarOptionals["body"].(GraphManagementReq); localVarOk { + if localVarTempParam, localVarOk := localVarOptionals["body"].(UserGraphManagementReq); localVarOk { localVarPostBody = &localVarTempParam } if ctx != nil { @@ -192,27 +193,30 @@ func (a *UsersApiService) GraphUserAssociationsPost(ctx context.Context, userId return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } /* UsersApiService List the parent Groups of a User This endpoint returns all the User Groups a User is a member of. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/memberof ``` - * @param ctx context.Context Authentication Context + * @param ctx context.Context for authentication, logging, tracing, etc. @param userId ObjectID of the User. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. @return []GraphObjectWithPaths*/ func (a *UsersApiService) GraphUserMemberOf(ctx context.Context, userId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { var ( @@ -238,12 +242,18 @@ func (a *UsersApiService) GraphUserMemberOf(ctx context.Context, userId string, return successPayload, nil, err } + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) + } if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) } if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) + } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -282,26 +292,27 @@ func (a *UsersApiService) GraphUserMemberOf(ctx context.Context, userId string, return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* UsersApiService List the Applications associated with a User - This endpoint will return Applications associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding Application; this array represents all grouping and/or associations that would have to be removed to deprovision the Application from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/applications ``` - * @param ctx context.Context Authentication Context +/* UsersApiService List the Applications bound to a User + This endpoint will return all Applications bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding Application; this array represents all grouping and/or associations that would have to be removed to deprovision the Application from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/applications ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param userId ObjectID of the User. @param contentType @param accept @@ -377,26 +388,27 @@ func (a *UsersApiService) GraphUserTraverseApplication(ctx context.Context, user return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* UsersApiService List the Directories associated with a User - This endpoint will return Directories associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Directory from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/directories ``` - * @param ctx context.Context Authentication Context +/* UsersApiService List the Directories bound to a User + This endpoint will return all Directories bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding Directory; this array represents all grouping and/or associations that would have to be removed to deprovision the Directory from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/directories ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param userId ObjectID of the User. @param contentType @param accept @@ -472,26 +484,27 @@ func (a *UsersApiService) GraphUserTraverseDirectory(ctx context.Context, userId return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* UsersApiService List the G Suite instances associated with a User - This endpoint will return G Suite instances associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding G Suite instance; this array represents all grouping and/or associations that would have to be removed to deprovision the G Suite instance from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/gsuites ``` - * @param ctx context.Context Authentication Context +/* UsersApiService List the G Suite instances bound to a User + This endpoint will return all G-Suite Instances bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding G Suite instance; this array represents all grouping and/or associations that would have to be removed to deprovision the G Suite instance from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/gsuites ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param userId ObjectID of the User. @param contentType @param accept @@ -567,26 +580,27 @@ func (a *UsersApiService) GraphUserTraverseGSuite(ctx context.Context, userId st return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* UsersApiService List the LDAP servers associated with a User - This endpoint will return LDAP Servers associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding LDAP Server; this array represents all grouping and/or associations that would have to be removed to deprovision the LDAP Server from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/ldapservers ``` - * @param ctx context.Context Authentication Context +/* UsersApiService List the LDAP servers bound to a User + This endpoint will return all LDAP Servers bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding LDAP Server; this array represents all grouping and/or associations that would have to be removed to deprovision the LDAP Server from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/ldapservers ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param userId ObjectID of the User. @param contentType @param accept @@ -662,26 +676,27 @@ func (a *UsersApiService) GraphUserTraverseLdapServer(ctx context.Context, userI return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* UsersApiService List the Office 365 instances associated with User - This endpoint will return Office 365 instances associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding Office 365 instance; this array represents all grouping and/or associations that would have to be removed to deprovision the Office 365 instance from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/office365s ``` - * @param ctx context.Context Authentication Context +/* UsersApiService List the Office 365 instances bound to a User + This endpoint will return all Office 365 Instances bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding Office 365 instance; this array represents all grouping and/or associations that would have to be removed to deprovision the Office 365 instance from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/office365s ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param userId ObjectID of the User. @param contentType @param accept @@ -757,26 +772,27 @@ func (a *UsersApiService) GraphUserTraverseOffice365(ctx context.Context, userId return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* UsersApiService List the RADIUS Servers associated with a User - This endpoint will return RADIUS Servers associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding RADIUS Server; this array represents all grouping and/or associations that would have to be removed to deprovision the RADIUS Server from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/radiusservers ``` - * @param ctx context.Context Authentication Context +/* UsersApiService List the RADIUS Servers bound to a User + This endpoint will return all RADIUS Servers bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding RADIUS Server; this array represents all grouping and/or associations that would have to be removed to deprovision the RADIUS Server from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/radiusservers ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param userId ObjectID of the User. @param contentType @param accept @@ -852,26 +868,27 @@ func (a *UsersApiService) GraphUserTraverseRadiusServer(ctx context.Context, use return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* UsersApiService List the Systems associated with a User - This endpoint will return Systems associated with a User. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of attributes specifically set for this group. The `paths` array enumerates each path from this User to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/systems ``` - * @param ctx context.Context Authentication Context +/* UsersApiService List the Systems bound to a User + This endpoint will return all Systems bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding System; this array represents all grouping and/or associations that would have to be removed to deprovision the System from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/systems ``` + * @param ctx context.Context for authentication, logging, tracing, etc. @param userId ObjectID of the User. @param contentType @param accept @@ -947,17 +964,114 @@ func (a *UsersApiService) GraphUserTraverseSystem(ctx context.Context, userId st return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* UsersApiService List the System Groups bound to a User + This endpoint will return all System Groups bound to a User, either directly or indirectly, essentially traversing the JumpCloud Graph for your Organization. Each element will contain the type, id, attributes and paths. The `attributes` object is a key/value hash of compiled graph attributes for all paths followed. The `paths` array enumerates each path from this User to the corresponding System Group; this array represents all grouping and/or associations that would have to be removed to deprovision the System Group from this User. See `/members` and `/associations` endpoints to manage those collections. #### Sample Request ``` https://console.jumpcloud.com/api/v2/users/{user_id}/systemgroups ``` + * @param ctx context.Context for authentication, logging, tracing, etc. + @param userId ObjectID of the User. + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "limit" (int32) The number of records to return at once. + @param "skip" (int32) The offset into the records to return. + @return []GraphObjectWithPaths*/ +func (a *UsersApiService) GraphUserTraverseSystemGroup(ctx context.Context, userId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]GraphObjectWithPaths, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload []GraphObjectWithPaths + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/users/{user_id}/systemgroups" + localVarPath = strings.Replace(localVarPath, "{"+"user_id"+"}", fmt.Sprintf("%v", userId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } diff --git a/v2/workday_fields.go b/v2/workday_fields.go new file mode 100644 index 0000000..8758031 --- /dev/null +++ b/v2/workday_fields.go @@ -0,0 +1,17 @@ +/* + * JumpCloud APIs + * + * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. + * + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package v2 + +type WorkdayFields struct { + + ReportUrl string `json:"reportUrl,omitempty"` + + Name string `json:"name,omitempty"` +} diff --git a/v2/workday_api.go b/v2/workday_import_api.go similarity index 50% rename from v2/workday_api.go rename to v2/workday_import_api.go index 31cd852..40ab2e7 100644 --- a/v2/workday_api.go +++ b/v2/workday_import_api.go @@ -1,16 +1,16 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 import ( + "io/ioutil" "net/url" "net/http" "strings" @@ -24,29 +24,29 @@ var ( _ context.Context ) -type WorkdayApiService service +type WorkdayImportApiService service -/* WorkdayApiService Delete Workday - This endpoint allows you to delete a workday - * @param ctx context.Context Authentication Context - @param id +/* WorkdayImportApiService Authorize Workday + Adds an authorization method to a workday instance + * @param ctx context.Context for authentication, logging, tracing, etc. + @param workdayId @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: - @param "body" (WorkdayRequest) + @param "body" (AuthInputObject) @return */ -func (a *WorkdayApiService) WorkdaysDelete(ctx context.Context, id string, contentType string, accept string, localVarOptionals map[string]interface{}) ( *http.Response, error) { +func (a *WorkdayImportApiService) WorkdaysAuthorize(ctx context.Context, workdayId string, contentType string, accept string, localVarOptionals map[string]interface{}) ( *http.Response, error) { var ( - localVarHttpMethod = strings.ToUpper("Delete") + localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/workdays/{id}" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + localVarPath := a.client.cfg.BasePath + "/workdays/{workday_id}/auth" + localVarPath = strings.Replace(localVarPath, "{"+"workday_id"+"}", fmt.Sprintf("%v", workdayId), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -75,7 +75,7 @@ func (a *WorkdayApiService) WorkdaysDelete(ctx context.Context, id string, conte localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") localVarHeaderParams["Accept"] = parameterToString(accept, "") // body params - if localVarTempParam, localVarOk := localVarOptionals["body"].(WorkdayRequest); localVarOk { + if localVarTempParam, localVarOk := localVarOptionals["body"].(AuthInputObject); localVarOk { localVarPostBody = &localVarTempParam } if ctx != nil { @@ -95,25 +95,183 @@ func (a *WorkdayApiService) WorkdaysDelete(ctx context.Context, id string, conte return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return localVarHttpResponse, reportError(localVarHttpResponse.Status) - } + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } return localVarHttpResponse, err } -/* WorkdayApiService Get Workday - * @param ctx context.Context Authentication Context +/* WorkdayImportApiService Deauthorize Workday + Removes any and all authorization methods from the workday instance + * @param ctx context.Context for authentication, logging, tracing, etc. + @param workdayId + @param contentType + @param accept + @return */ +func (a *WorkdayImportApiService) WorkdaysDeauthorize(ctx context.Context, workdayId string, contentType string, accept string) ( *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/workdays/{workday_id}/auth" + localVarPath = strings.Replace(localVarPath, "{"+"workday_id"+"}", fmt.Sprintf("%v", workdayId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + return localVarHttpResponse, err +} + +/* WorkdayImportApiService Delete Workday + This endpoint allows you to delete an instance of Workday. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param id + @param contentType + @param accept + @return interface{}*/ +func (a *WorkdayImportApiService) WorkdaysDelete(ctx context.Context, id string, contentType string, accept string) (interface{}, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload interface{} + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/workdays/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* WorkdayImportApiService Get Workday + This endpoint will return all the available information about an instance of Workday. + * @param ctx context.Context for authentication, logging, tracing, etc. @param id @param contentType @param accept @return WorkdayOutput*/ -func (a *WorkdayApiService) WorkdaysGet(ctx context.Context, id string, contentType string, accept string) (WorkdayOutput, *http.Response, error) { +func (a *WorkdayImportApiService) WorkdaysGet(ctx context.Context, id string, contentType string, accept string) (WorkdayOutput, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -169,35 +327,124 @@ func (a *WorkdayApiService) WorkdaysGet(ctx context.Context, id string, contentT return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { + return successPayload, localVarHttpResponse, err + } + + + return successPayload, localVarHttpResponse, err +} + +/* WorkdayImportApiService Workday Import + Still in development. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param workdayId + @param contentType + @param accept + @param optional (nil or map[string]interface{}) with one or more of: + @param "body" ([]WorkdayWorker) + @return JobId*/ +func (a *WorkdayImportApiService) WorkdaysImport(ctx context.Context, workdayId string, contentType string, accept string, localVarOptionals map[string]interface{}) (JobId, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + successPayload JobId + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/workdays/{workday_id}/import/" + localVarPath = strings.Replace(localVarPath, "{"+"workday_id"+"}", fmt.Sprintf("%v", workdayId), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + + // to determine the Content-Type header + localVarHttpContentTypes := []string{ "application/json", } + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{ + "application/json", + } + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") + localVarHeaderParams["Accept"] = parameterToString(accept, "") + // body params + if localVarTempParam, localVarOk := localVarOptionals["body"].([]WorkdayWorker); localVarOk { + localVarPostBody = &localVarTempParam + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["x-api-key"] = key + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return successPayload, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* WorkdayApiService List Workdays - * @param ctx context.Context Authentication Context +/* WorkdayImportApiService List Workdays + This endpoint will return all the available information about all your instances of Workday. + * @param ctx context.Context for authentication, logging, tracing, etc. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: - @param "fields" (string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. - @param "filter" (string) Supported operators are: eq, ne, gt, ge, lt, le, between, search + @param "fields" ([]string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in @param "limit" (int32) The number of records to return at once. @param "skip" (int32) The offset into the records to return. - @param "sort" (string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. @return []WorkdayOutput*/ -func (a *WorkdayApiService) WorkdaysList(ctx context.Context, contentType string, accept string, localVarOptionals map[string]interface{}) ([]WorkdayOutput, *http.Response, error) { +func (a *WorkdayImportApiService) WorkdaysList(ctx context.Context, contentType string, accept string, localVarOptionals map[string]interface{}) ([]WorkdayOutput, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} @@ -213,27 +460,18 @@ func (a *WorkdayApiService) WorkdaysList(ctx context.Context, contentType string localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if err := typeCheckParameter(localVarOptionals["fields"], "string", "fields"); err != nil { - return successPayload, nil, err - } - if err := typeCheckParameter(localVarOptionals["filter"], "string", "filter"); err != nil { - return successPayload, nil, err - } if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { return successPayload, nil, err } if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { return successPayload, nil, err } - if err := typeCheckParameter(localVarOptionals["sort"], "string", "sort"); err != nil { - return successPayload, nil, err - } - if localVarTempParam, localVarOk := localVarOptionals["fields"].(string); localVarOk { - localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["fields"].([]string); localVarOk { + localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "csv")) } - if localVarTempParam, localVarOk := localVarOptionals["filter"].(string); localVarOk { - localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) } if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) @@ -241,8 +479,8 @@ func (a *WorkdayApiService) WorkdaysList(ctx context.Context, contentType string if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) } - if localVarTempParam, localVarOk := localVarOptionals["sort"].(string); localVarOk { - localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -282,32 +520,33 @@ func (a *WorkdayApiService) WorkdaysList(ctx context.Context, contentType string return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* WorkdayApiService Create new Workday - This endpoint allows you to create a new workday object - * @param ctx context.Context Authentication Context +/* WorkdayImportApiService Create new Workday + This endpoint allows you to create a new workday instance. You must supply a username and password for Basic Authentication that is the same as your WorkDay Integrator System User. Failure to provide these credentials will result in the request being rejected. + * @param ctx context.Context for authentication, logging, tracing, etc. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: - @param "body" (Body) + @param "body" (WorkdayInput) @return WorkdayOutput*/ -func (a *WorkdayApiService) WorkdaysPost(ctx context.Context, contentType string, accept string, localVarOptionals map[string]interface{}) (WorkdayOutput, *http.Response, error) { +func (a *WorkdayImportApiService) WorkdaysPost(ctx context.Context, contentType string, accept string, localVarOptionals map[string]interface{}) (WorkdayOutput, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Post") localVarPostBody interface{} @@ -346,7 +585,7 @@ func (a *WorkdayApiService) WorkdaysPost(ctx context.Context, contentType string localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") localVarHeaderParams["Accept"] = parameterToString(accept, "") // body params - if localVarTempParam, localVarOk := localVarOptionals["body"].(Body); localVarOk { + if localVarTempParam, localVarOk := localVarOptionals["body"].(WorkdayInput); localVarOk { localVarPostBody = &localVarTempParam } if ctx != nil { @@ -366,33 +605,34 @@ func (a *WorkdayApiService) WorkdaysPost(ctx context.Context, contentType string return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* WorkdayApiService Update Workday - This endpoint allows you to update the name and report_url for a Workday Authentication Edit - * @param ctx context.Context Authentication Context +/* WorkdayImportApiService Update Workday + This endpoint allows you to update the name and Custom Report URL for a Workday Instance. + * @param ctx context.Context for authentication, logging, tracing, etc. @param id @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: - @param "body" (WorkdayInput) + @param "body" (WorkdayFields) @return WorkdayOutput*/ -func (a *WorkdayApiService) WorkdaysPut(ctx context.Context, id string, contentType string, accept string, localVarOptionals map[string]interface{}) (WorkdayOutput, *http.Response, error) { +func (a *WorkdayImportApiService) WorkdaysPut(ctx context.Context, id string, contentType string, accept string, localVarOptionals map[string]interface{}) (WorkdayOutput, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Put") localVarPostBody interface{} @@ -432,7 +672,7 @@ func (a *WorkdayApiService) WorkdaysPut(ctx context.Context, id string, contentT localVarHeaderParams["Content-Type"] = parameterToString(contentType, "") localVarHeaderParams["Accept"] = parameterToString(accept, "") // body params - if localVarTempParam, localVarOk := localVarOptionals["body"].(WorkdayInput); localVarOk { + if localVarTempParam, localVarOk := localVarOptionals["body"].(WorkdayFields); localVarOk { localVarPostBody = &localVarTempParam } if ctx != nil { @@ -452,75 +692,53 @@ func (a *WorkdayApiService) WorkdaysPut(ctx context.Context, id string, contentT return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } return successPayload, localVarHttpResponse, err } -/* WorkdayApiService Get Workday Report Results - * @param ctx context.Context Authentication Context - @param id +/* WorkdayImportApiService Get Workday Settings + This endpoint allows you to obtain all settings needed for creating a workday instance, specifically the URL to initiate Basic Authentication with WorkDay. + * @param ctx context.Context for authentication, logging, tracing, etc. @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: - @param "fields" (string) The comma separated fields included in the returned records. If omitted the default list of fields will be returned. - @param "filter" (string) Supported operators are: eq, ne, gt, ge, lt, le, between, search - @param "sort" (string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. - @param "skip" (int32) The offset into the records to return. - @return WorkdayReportResult*/ -func (a *WorkdayApiService) WorkdaysReport(ctx context.Context, id string, contentType string, accept string, localVarOptionals map[string]interface{}) (WorkdayReportResult, *http.Response, error) { + @param "state" (string) + @return */ +func (a *WorkdayImportApiService) WorkdaysSettings(ctx context.Context, contentType string, accept string, localVarOptionals map[string]interface{}) ( *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - successPayload WorkdayReportResult ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/workdays/{id}/report" - localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", fmt.Sprintf("%v", id), -1) + localVarPath := a.client.cfg.BasePath + "/workdays/settings" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if err := typeCheckParameter(localVarOptionals["fields"], "string", "fields"); err != nil { - return successPayload, nil, err - } - if err := typeCheckParameter(localVarOptionals["filter"], "string", "filter"); err != nil { - return successPayload, nil, err - } - if err := typeCheckParameter(localVarOptionals["sort"], "string", "sort"); err != nil { - return successPayload, nil, err - } - if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { - return successPayload, nil, err + if err := typeCheckParameter(localVarOptionals["state"], "string", "state"); err != nil { + return nil, err } - if localVarTempParam, localVarOk := localVarOptionals["fields"].(string); localVarOk { - localVarQueryParams.Add("fields", parameterToString(localVarTempParam, "")) - } - if localVarTempParam, localVarOk := localVarOptionals["filter"].(string); localVarOk { - localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "")) - } - if localVarTempParam, localVarOk := localVarOptionals["sort"].(string); localVarOk { - localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "")) - } - if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { - localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["state"].(string); localVarOk { + localVarQueryParams.Add("state", parameterToString(localVarTempParam, "")) } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -557,56 +775,69 @@ func (a *WorkdayApiService) WorkdaysReport(ctx context.Context, id string, conte } r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) if err != nil { - return successPayload, nil, err + return nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - - if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) } - - return successPayload, localVarHttpResponse, err + return localVarHttpResponse, err } -/* WorkdayApiService Get Workday Settings - This endpoint allows you to obtain all settings needed for creating a workday instance, namely the URL to initiate an OAuth negotiation - * @param ctx context.Context Authentication Context +/* WorkdayImportApiService List Workday Workers + This endpoint will return all of the data available in your WorkDay Custom Report that has been associated with your WorkDay Instance. + * @param ctx context.Context for authentication, logging, tracing, etc. + @param workdayId @param contentType @param accept @param optional (nil or map[string]interface{}) with one or more of: - @param "state" (string) - @return InlineResponse200*/ -func (a *WorkdayApiService) WorkdaysSettings(ctx context.Context, contentType string, accept string, localVarOptionals map[string]interface{}) (InlineResponse200, *http.Response, error) { + @param "filter" ([]string) Supported operators are: eq, ne, gt, ge, lt, le, between, search, in + @param "skip" (int32) The offset into the records to return. + @param "sort" ([]string) The comma separated fields used to sort the collection. Default sort is ascending, prefix with `-` to sort descending. + @param "limit" (int32) The number of records to return at once. + @return []WorkdayWorker*/ +func (a *WorkdayImportApiService) WorkdaysWorkers(ctx context.Context, workdayId string, contentType string, accept string, localVarOptionals map[string]interface{}) ([]WorkdayWorker, *http.Response, error) { var ( localVarHttpMethod = strings.ToUpper("Get") localVarPostBody interface{} localVarFileName string localVarFileBytes []byte - successPayload InlineResponse200 + successPayload []WorkdayWorker ) // create path and map variables - localVarPath := a.client.cfg.BasePath + "/workdays/settings" + localVarPath := a.client.cfg.BasePath + "/workdays/{workday_id}/workers" + localVarPath = strings.Replace(localVarPath, "{"+"workday_id"+"}", fmt.Sprintf("%v", workdayId), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if err := typeCheckParameter(localVarOptionals["state"], "string", "state"); err != nil { + if err := typeCheckParameter(localVarOptionals["skip"], "int32", "skip"); err != nil { + return successPayload, nil, err + } + if err := typeCheckParameter(localVarOptionals["limit"], "int32", "limit"); err != nil { return successPayload, nil, err } - if localVarTempParam, localVarOk := localVarOptionals["state"].(string); localVarOk { - localVarQueryParams.Add("state", parameterToString(localVarTempParam, "")) + if localVarTempParam, localVarOk := localVarOptionals["filter"].([]string); localVarOk { + localVarQueryParams.Add("filter", parameterToString(localVarTempParam, "csv")) + } + if localVarTempParam, localVarOk := localVarOptionals["skip"].(int32); localVarOk { + localVarQueryParams.Add("skip", parameterToString(localVarTempParam, "")) + } + if localVarTempParam, localVarOk := localVarOptionals["sort"].([]string); localVarOk { + localVarQueryParams.Add("sort", parameterToString(localVarTempParam, "csv")) + } + if localVarTempParam, localVarOk := localVarOptionals["limit"].(int32); localVarOk { + localVarQueryParams.Add("limit", parameterToString(localVarTempParam, "")) } // to determine the Content-Type header localVarHttpContentTypes := []string{ "application/json", } @@ -646,17 +877,18 @@ func (a *WorkdayApiService) WorkdaysSettings(ctx context.Context, contentType st return successPayload, nil, err } - localVarHttpResponse, err := a.client.callAPI(r) - if err != nil || localVarHttpResponse == nil { - return successPayload, localVarHttpResponse, err - } - defer localVarHttpResponse.Body.Close() - if localVarHttpResponse.StatusCode >= 300 { - return successPayload, localVarHttpResponse, reportError(localVarHttpResponse.Status) - } - + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return successPayload, localVarHttpResponse, err + } + defer localVarHttpResponse.Body.Close() + if localVarHttpResponse.StatusCode >= 300 { + bodyBytes, _ := ioutil.ReadAll(localVarHttpResponse.Body) + return successPayload, localVarHttpResponse, reportError("Status: %v, Body: %s", localVarHttpResponse.Status, bodyBytes) + } + if err = json.NewDecoder(localVarHttpResponse.Body).Decode(&successPayload); err != nil { - return successPayload, localVarHttpResponse, err + return successPayload, localVarHttpResponse, err } diff --git a/v2/workday_input.go b/v2/workday_input.go index c517cb2..9ff9425 100644 --- a/v2/workday_input.go +++ b/v2/workday_input.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 @@ -16,5 +15,5 @@ type WorkdayInput struct { Name string `json:"name,omitempty"` - Oauth *OauthCodeInput `json:"oauth,omitempty"` + Auth *AuthInput `json:"auth,omitempty"` } diff --git a/v2/workday_output.go b/v2/workday_output.go index 75a7a82..0471522 100644 --- a/v2/workday_output.go +++ b/v2/workday_output.go @@ -1,22 +1,23 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 type WorkdayOutput struct { - Id string `json:"id"` + Id string `json:"id,omitempty"` - Name string `json:"name"` + Name string `json:"name,omitempty"` - ReportUrl string `json:"reportUrl"` + ReportUrl string `json:"reportUrl,omitempty"` - LastImport string `json:"lastImport"` + LastImport string `json:"lastImport,omitempty"` + + Auth *WorkdayoutputAuth `json:"auth,omitempty"` } diff --git a/v2/workday_report_row.go b/v2/workday_report_row.go index 3901d38..cbfcd6a 100644 --- a/v2/workday_report_row.go +++ b/v2/workday_report_row.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/workday_request.go b/v2/workday_request.go index 840115b..d76f599 100644 --- a/v2/workday_request.go +++ b/v2/workday_request.go @@ -1,11 +1,10 @@ -/* +/* * JumpCloud APIs * * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. * - * OpenAPI spec version: 2.0 - * - * Generated by: https://github.com/swagger-api/swagger-codegen.git + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package v2 diff --git a/v2/workday_worker.go b/v2/workday_worker.go new file mode 100644 index 0000000..7fe50c4 --- /dev/null +++ b/v2/workday_worker.go @@ -0,0 +1,23 @@ +/* + * JumpCloud APIs + * + * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. + * + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package v2 + +type WorkdayWorker struct { + + Username string `json:"username,omitempty"` + + FirstName string `json:"firstName,omitempty"` + + LastName string `json:"lastName,omitempty"` + + Email string `json:"email,omitempty"` + + Attributes *interface{} `json:"attributes,omitempty"` +} diff --git a/v2/workdayimportresult.go b/v2/workdayimportresult.go new file mode 100644 index 0000000..5c01532 --- /dev/null +++ b/v2/workdayimportresult.go @@ -0,0 +1,17 @@ +/* + * JumpCloud APIs + * + * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. + * + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package v2 + +type Workdayimportresult struct { + + Success bool `json:"success,omitempty"` + + Result *WorkdayimportresultResult `json:"result,omitempty"` +} diff --git a/v2/workdayimportresult_result.go b/v2/workdayimportresult_result.go new file mode 100644 index 0000000..b564e11 --- /dev/null +++ b/v2/workdayimportresult_result.go @@ -0,0 +1,15 @@ +/* + * JumpCloud APIs + * + * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. + * + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package v2 + +type WorkdayimportresultResult struct { + + Msg string `json:"msg,omitempty"` +} diff --git a/v2/workdayoutput_auth.go b/v2/workdayoutput_auth.go new file mode 100644 index 0000000..33f0c08 --- /dev/null +++ b/v2/workdayoutput_auth.go @@ -0,0 +1,17 @@ +/* + * JumpCloud APIs + * + * V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. The most recent version of JumpCloud's API. This set of endpoints allows JumpCloud customers to manage objects, groupings and mappings. + * + * API version: 2.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package v2 + +type WorkdayoutputAuth struct { + + Basic *AuthInfo `json:"basic,omitempty"` + + Oauth *AuthInfo `json:"oauth,omitempty"` +} From b6475bac89ae7d7f757dde9cdaf603f25d4c8e88 Mon Sep 17 00:00:00 2001 From: "John P. Vajda" Date: Mon, 26 Mar 2018 10:35:03 -0600 Subject: [PATCH 4/6] updating curl sample Testing out a fix for a markdown problem we are seeing for curl samples. --- v2/docs/ActiveDirectoryApi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/docs/ActiveDirectoryApi.md b/v2/docs/ActiveDirectoryApi.md index 2c9fbb5..b2ea7f0 100644 --- a/v2/docs/ActiveDirectoryApi.md +++ b/v2/docs/ActiveDirectoryApi.md @@ -47,7 +47,7 @@ Name | Type | Description | Notes > ActiveDirectoryOutput ActivedirectoriesGet(ctx, id, contentType, accept) Get an Active Directory -This endpoint returns a specific Active Directory. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/activedirectories/{ActiveDirectory_ID} \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` +This endpoint returns a specific Active Directory. ### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/activedirectories/{ActiveDirectory_ID} \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters From afb8881687f982b78551dcd73912254c87c3e5de Mon Sep 17 00:00:00 2001 From: Renaud Amar Date: Fri, 6 Apr 2018 11:25:25 -0600 Subject: [PATCH 5/6] Revert "updating curl sample" This reverts commit b6475bac89ae7d7f757dde9cdaf603f25d4c8e88. --- v2/docs/ActiveDirectoryApi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/docs/ActiveDirectoryApi.md b/v2/docs/ActiveDirectoryApi.md index b2ea7f0..2c9fbb5 100644 --- a/v2/docs/ActiveDirectoryApi.md +++ b/v2/docs/ActiveDirectoryApi.md @@ -47,7 +47,7 @@ Name | Type | Description | Notes > ActiveDirectoryOutput ActivedirectoriesGet(ctx, id, contentType, accept) Get an Active Directory -This endpoint returns a specific Active Directory. ### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/activedirectories/{ActiveDirectory_ID} \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` +This endpoint returns a specific Active Directory. #### Sample Request ``` curl -X GET https://console.jumpcloud.com/api/v2/activedirectories/{ActiveDirectory_ID} \\ -H 'accept: application/json' \\ -H 'content-type: application/json' \\ -H 'x-api-key: {API_KEY}' ``` ### Required Parameters From bfb48ccb3a012663f694d47e1f1ad248abb4c68a Mon Sep 17 00:00:00 2001 From: Renaud Amar Date: Fri, 6 Apr 2018 12:56:37 -0600 Subject: [PATCH 6/6] Change the package version to match the release tag --- config_v2.json | 2 +- v2/README.md | 2 +- v2/configuration.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config_v2.json b/config_v2.json index 16dd9ea..83d0fdd 100644 --- a/config_v2.json +++ b/config_v2.json @@ -1,4 +1,4 @@ { "packageName": "v2", - "packageVersion": "1.0.0" + "packageVersion": "1.2.1" } diff --git a/v2/README.md b/v2/README.md index 2236882..8576b8d 100644 --- a/v2/README.md +++ b/v2/README.md @@ -6,7 +6,7 @@ V1 & V2 versions of JumpCloud's API. The next version of JumpCloud's API. This s This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client. - API version: 2.0 -- Package version: 1.0.0 +- Package version: 1.2.1 - Build package: io.swagger.codegen.languages.GoClientCodegen ## Installation diff --git a/v2/configuration.go b/v2/configuration.go index 52c3f07..395b9e8 100644 --- a/v2/configuration.go +++ b/v2/configuration.go @@ -62,7 +62,7 @@ func NewConfiguration() *Configuration { cfg := &Configuration{ BasePath: "https://console.jumpcloud.com/api/v2", DefaultHeader: make(map[string]string), - UserAgent: "Swagger-Codegen/1.0.0/go", + UserAgent: "Swagger-Codegen/1.2.1/go", } return cfg }