diff --git a/misc/idp-sync/api.md b/misc/idp-sync/api.md index b81de47f..827ff07f 100644 --- a/misc/idp-sync/api.md +++ b/misc/idp-sync/api.md @@ -13,12 +13,13 @@ By default, for new integration synchronization is enabled. Request: - `service_account_key`: A Base64 encoded string derived from a service account key JSON. For the creation of the service account key JSON, refer to the provided [IdP guideline](https://docs.netbird.io/how-to/idp-sync#google-work-space). - Encode service account JSON to base64 by using the command: +Encode service account JSON to base64 by using the command: ```shell base64 -i ``` - - `sync_interval`: Optional. The default value is 300 seconds. +- `group_prefixes`: Specifies list of starts_with patterns for group provision. If the group name matches one the the pattern it will be provisioned regardless of the members. Optional. The default value is empty list. +- `user_group_prefixes`: Specifies list of starts_with patterns for user provision. If the user belongs to group which name matches one the the pattern the user will be provisioned. Optional. The default value is empty list. ```shell curl --request POST \ @@ -27,18 +28,22 @@ curl --request POST \ --header 'Authorization: Token ' \ --header 'Content-Type: application/json' \ --data '{ - "service_account_key": "", - "customerID": "" + "service_account_key": "", + "customerID": "", + "group_prefixes": [], + "user_group_prefixes": [] }' ``` Response ```json { - "id": , - "customer_id": ", + "customer_id": ", "customer_id": ", "customer_id": "", "sync_interval": 300, - "enabled": true + "enabled": true, + "group_prefixes": [], + "user_group_prefixes": [] } ] ``` @@ -108,7 +117,9 @@ Request base64 -i ``` - `sync_interval`: Optional. Should not be less than 300 seconds. -- `enabled`: Optional. Used to disable/enable the integration. +- `group_prefixes`: Specifies list of starts_with patterns for group provision. If the group name matches one the the pattern it will be provisioned regardless of the members. Optional. The default value is empty list. +- `user_group_prefixes`: Specifies list of starts_with patterns for user provision. If the user belongs to group which name matches one the the pattern the user will be provisioned. Optional. The default value is empty list. +- `enabled`: Optional. Used to disable/enable the integration. ```shell curl --request PUT \ @@ -117,9 +128,11 @@ curl --request PUT \ --header 'Authorization: Token ' \ --header 'Content-Type: application/json' \ --data '{ - "service_account_key": "", - "sync_interval": 300, - "enabled": false + "service_account_key": "", + "sync_interval": 300, + "enabled": false, + "group_prefixes": [], + "user_group_prefixes": [] }' ``` @@ -129,7 +142,9 @@ Response "id": , "customer_id": "", "sync_interval": 300, - "enabled": false + "enabled": false, + "group_prefixes": [], + "user_group_prefixes": [] } ``` @@ -182,6 +197,9 @@ Request: - `client_id`: Azure Directory application client Id. - `tenant_id`: Azure Directory ID. - `sync_interval`: Optional. The default value is 300 seconds. +- `group_prefixes`: Specifies list of starts_with patterns for group provision. If the group name matches one the the pattern it will be provisioned regardless of the members. Optional. The default value is empty list. +- `user_group_prefixes`: Specifies list of starts_with patterns for user provision. If the user belongs to group which name matches one the the pattern the user will be provisioned. Optional. The default value is empty list. +- `enabled`: Optional. Used to disable/enable the integration. ```shell curl --request POST \ @@ -190,9 +208,11 @@ curl --request POST \ --header 'Authorization: Token ' \ --header 'Content-Type: application/json' \ --data '{ - "client_secret": "", - "client_id": "", - "tenant_id": "" + "client_secret": "", + "client_id": "", + "tenant_id": "", + "group_prefixes": [], + "user_group_prefixes": [] }' ``` @@ -223,7 +243,9 @@ Response "client_id": "", "tenant_id": "", "sync_interval": 300, - "enabled": true + "enabled": true, + "group_prefixes": [], + "user_group_prefixes": [] } ``` @@ -244,7 +266,9 @@ Response "client_id": "", "tenant_id": "", "sync_interval": 300, - "enabled": true + "enabled": true, + "group_prefixes": [], + "user_group_prefixes": [] } ] ``` @@ -275,7 +299,9 @@ Request echo -n | base64 ``` - `sync_interval`: Optional. Should not be less than 300 seconds. -- `enabled`: Optional. Used to disable/enable the integration. +- `group_prefixes`: Specifies list of starts_with patterns for group provision. If the group name matches one the the pattern it will be provisioned regardless of the members. Optional. The default value is empty list. +- `user_group_prefixes`: Specifies list of starts_with patterns for user provision. If the user belongs to group which name matches one the the pattern the user will be provisioned. Optional. The default value is empty list. +- `enabled`: Optional. Used to disable/enable the integration. ```shell curl --request PUT \ @@ -297,7 +323,9 @@ Response "client_id": "", "tenant_id": "", "sync_interval": 300, - "enabled": true + "enabled": true, + "group_prefixes": [], + "user_group_prefixes": [] } ```