Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new SCIM endpoint #4276

Merged
merged 5 commits into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions _docs/_api/api_limits.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,8 @@ The following table lists specific API rate limits for different request types.
| [`/catalogs/catalog_name`][31]<br>[`/catalogs`][32]<br>[`/catalogs`][33] | 5 requests per minute shared between the endpoints. |
| [`/catalogs/catalog_name/items`][34]<br>[`/catalogs/catalog_name/items`][35]<br>[`/catalogs/catalog_name/items`][36] | 100 requests per minute shared between the endpoints. |
| [`/catalogs/catalog_name/items/item_id`][37]<br>[`/catalogs/catalog_name/items/item_id`][38]<br>[`/catalogs/catalog_name/items`][39]<br>[`/catalogs/catalog_name/items/item_id`][40]<br>[`/catalogs/catalog_name/items/item_id`][41] | 50 requests per minute shared between the endpoints. |
| [`GET: /scim/v2/Users/YOUR_ID_HERE`][22]<br>[`GET: /scim/v2/Users?filter=userName eq “user@test.com”`][43]<br>[`PUT: /scim/v2/Users/YOUR_ID_HERE`][25]<br>[`DELETE: /scim/v2/Users/YOUR_ID_HERE`][24]<br>[`POST: /scim/v2/Users/`][23] | 5,000 requests per day, per company, shared between the endpoints. |
{: .reset-td-br-1 .reset-td-br-2}
<!--
| [`GET: /scim/v2/Users/YOUR_ID_HERE`][22] | 5,000 requests per day, per company, shared with the `/scim/v2/Users/YOUR_ID_HERE` PUT, DELETE and `/scim/v2/Users` POST endpoints. |
| [`PUT: /scim/v2/Users/YOUR_ID_HERE`][25] | 5,000 requests per day, per company, shared with the `/scim/v2/Users/YOUR_ID_HERE` GET, DELETE and `/scim/v2/Users` POST endpoints. |
| [`DELETE: /scim/v2/Users/YOUR_ID_HERE`][24] | 5,000 requests per day, per company, shared with the `/scim/v2/Users/YOUR_ID_HERE` PUT, GET and `/scim/v2/Users` POST endpoints. |
| [`POST: /scim/v2/Users/`][23] | 5,000 requests per day, per company, shared with the `/scim/v2/Users/YOUR_ID_HERE` PUT, GET, and DELETE endpoints. |
--->

## Batching API requests

Expand Down Expand Up @@ -115,10 +110,10 @@ Under normal conditions, the time for our data eventual consistency to occur is
[19]: {{site.baseurl}}/api/endpoints/subscription_groups/post_update_user_subscription_group_status/
[20]: {{site.baseurl}}/api/endpoints/user_data/external_id_migration/post_external_ids_rename/
[21]: {{site.baseurl}}/api/endpoints/user_data/external_id_migration/post_external_ids_remove/
[22]: {{site.baseurl}}/scim/get/
[23]: {{site.baseurl}}/scim/post/
[24]: {{site.baseurl}}/scim/delete/
[25]: {{site.baseurl}}/scim/put
[22]: {{site.baseurl}}/get_see_user_account_information/
[23]: {{site.baseurl}}/post_create_user_account/
[24]: {{site.baseurl}}/delete_existing_dashboard_user/
[25]: {{site.baseurl}}/post_update_existing_user_account/
[26]: {{site.baseurl}}/api/endpoints/preference_center/get_create_url_preference_center/
[27]: {{site.baseurl}}/api/endpoints/preference_center/get_list_preference_center/
[28]: {{site.baseurl}}/api/endpoints/preference_center/get_view_details_preference_center/
Expand All @@ -134,4 +129,5 @@ Under normal conditions, the time for our data eventual consistency to occur is
[38]: {{site.baseurl}}/api/endpoints/catalogs/catalog_items/synchronous/get_catalog_item_details/
[39]: {{site.baseurl}}/api/endpoints/catalogs/catalog_items/synchronous/get_catalog_items_details_bulk/
[40]: {{site.baseurl}}/api/endpoints/catalogs/catalog_items/synchronous/patch_catalog_item/
[41]: {{site.baseurl}}/api/endpoints/catalogs/catalog_items/synchronous/post_create_catalog_item/
[41]: {{site.baseurl}}/api/endpoints/catalogs/catalog_items/synchronous/post_create_catalog_item/
[43]: {{site.baseurl}}/get_search_existing_dashboard_user_email/
3 changes: 3 additions & 0 deletions _docs/_api/endpoints/scim.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ guide_featured_list:
- name: "GET: Look Up Existing Dashboard User Account"
link: /docs/get_see_user_account_information/
fa_icon: fa-solid fa-eye
- name: "GET: Search Existing Dashboard User Account by Email"
link: /docs/get_search_existing_dashboard_user_email/
fa_icon: fa-solid fa-eye
- name: "PUT: Update Dashboard User Account"
link: /docs/post_update_existing_user_account/
fa_icon: fa-solid fa-pencil
Expand Down
10 changes: 5 additions & 5 deletions _docs/_api/endpoints/scim/delete_existing_dashboard_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ description: "This article outlines details about the Remove Existing User Accou
{% api %}
# Remove a dashboard user account
{% apimethod delete %}
/scim/v2/users/YOUR_ID_HERE
/scim/v2/Users/YOUR_ID_HERE
{% endapimethod %}

This endpoint allows you to permanently delete an existing dashboard user, similarly to deleting a user in the **Manage Users** section of the Braze dashboard. For information on how to obtain a SCIM token, visit [Automated user provisioning]({{site.baseurl}}/scim/automated_user_provisioning/).
This endpoint allows you to permanently delete an existing dashboard user, similar to deleting a user in the **Manage Users** section of the Braze dashboard. For information on how to obtain a SCIM token, visit [Automated user provisioning]({{site.baseurl}}/scim/automated_user_provisioning/).

## Rate limit

Expand All @@ -33,12 +33,12 @@ X-Request-Origin: YOUR-REQUEST-ORIGIN-HERE

| Parameter | Required | Data type | Description |
| --------- | -------- | --------- | ----------- |
| `id` | Required | String | The developer's email address |
| `id` | Required | String | The user’s resource ID |
{: .reset-td-br-1 .reset-td-br-2 .reset-td-br-3 .reset-td-br-4}

## Example request
```json
curl --location --request DELETE 'https://rest.iad-01.braze.com/scim/v2/Users/user@test.com' \
curl --location --request DELETE 'https://rest.iad-01.braze.com/scim/v2/Users/dfa245b7-24195aec-887bb3ad-602b3340' \
--header 'Content-Type: application/json' \
--header 'X-Request-Origin: YOUR-REQUEST-ORIGIN-HERE' \
--header 'Authorization: Bearer YOUR-SCIM-TOKEN-HERE' \
Expand All @@ -49,7 +49,7 @@ HTTP/1.1 204 Not Found
Content-Type: text/html; charset=UTF-8
```
### Error states
If a developer with this email address doesn’t exist in Braze, the endpoint will respond with:
If a developer with this ID doesn’t exist in Braze, the endpoint will respond with:
```json
HTTP/1.1 404 Not Found
Content-Type: text/html; charset=UTF-8
Expand Down
77 changes: 77 additions & 0 deletions _docs/_api/endpoints/scim/get_search_existing_dashboard_user.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
nav_title: "GET: Search Existing Dashboard User Account by Email"
article_title: "GET: Search Existing Dashboard User Account by Email"
alias: /get_search_existing_dashboard_user_email/
search_tag: Endpoint
page_order: 4
layout: api_page
page_type: reference
description: "This article outlines details about the Search Existing Dashboard User Account by Email Endpoint."
---

{% api %}
# Search for an existing dashboard user account by email
{% apimethod get %}
/scim/v2/Users?filter=userName eq “user@test.com”
{% endapimethod %}

This endpoint allows you to look up an existing dashboard user account by specifying their email in the filter query param. Note that when the query parameter is URL encoded it will read like this:
KellieHawks marked this conversation as resolved.
Show resolved Hide resolved

`/scim/v2/Users?filter=userName%20eq%20%22user@test.com%22`

For information on how to obtain a SCIM token, visit [Automated user provisioning]({{site.baseurl}}/scim/automated_user_provisioning/).

## Rate limit

{% multi_lang_include rate_limits.md endpoint='look up dashboard user email' %}

## Example request
```json
curl --location --request GET \ 'https://rest.iad-01.braze.com/scim/v2/Users?filter=userName%20eq%20%22user@test.com%22’ \
--header 'Content-Type: application/json' \
--header 'X-Request-Origin: YOUR-REQUEST-ORIGIN-HERE' \
--header 'Authorization: Bearer YOUR-SCIM-TOKEN-HERE' \
```

## Response
```json
Content-Type: application/json
X-Request-Origin: YOUR-REQUEST-ORIGIN-HERE
Authorization: Bearer YOUR-SCIM-TOKEN-HERE
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
"totalResults": 1,
"Resources": [
{
"userName": "user@test.com",
"id": "dfa245b7-24195aec-887bb3ad-602b3340",
"name": {
"givenName": "Test",
"familyName": "User"
},
"department": "finance",
"lastSignInAt": "Thursday, January 1, 1970 12:00:00 AM",
"permissions": {
"companyPermissions": ["manage_company_settings"],
"appGroup": [
{
"appGroupId": "241adcd25789fabcded",
"appGroupName": "Test App Group",
"appGroupPermissions": ["basic_access","send_campaigns_canvases"],
"team": [
{
"teamId": "241adcd25789fabcded",
"teamName": "Test Team",
"teamPermissions": ["admin"]
}
]
}
]
}
}
]
}
```

{% endapi %}

8 changes: 4 additions & 4 deletions _docs/_api/endpoints/scim/get_see_user_account_information.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ description: "This article outlines details about the Look Up an Existing Dashbo
{% api %}
# Look up an existing dashboard user account
{% apimethod get %}
/scim/v2/users/YOUR_ID_HERE
/scim/v2/Users/YOUR_ID_HERE
{% endapimethod %}

This endpoint allows you to look up an existing dashboard user account by specifying their email. For information on how to obtain a SCIM token, visit [Automated user provisioning]({{site.baseurl}}/scim/automated_user_provisioning/).
This endpoint allows you to look up an existing dashboard user account by specifying their resource ID. For information on how to obtain a SCIM token, visit [Automated user provisioning]({{site.baseurl}}/scim/automated_user_provisioning/).

## Rate limit

Expand All @@ -25,12 +25,12 @@ This endpoint allows you to look up an existing dashboard user account by specif

| Parameter | Required | Data type | Description |
| --------- | -------- | --------- | ----------- |
| `id` | Required | String | The users's email address |
| `id` | Required | String | The user’s resource ID |
{: .reset-td-br-1 .reset-td-br-2 .reset-td-br-3 .reset-td-br-4}

## Example request
```json
curl --location --request GET 'https://rest.iad-01.braze.com/scim/v2/Users/user@test.com' \
curl --location --request GET 'https://rest.iad-01.braze.com/scim/v2/Users/dfa245b7-24195aec-887bb3ad-602b3340' \
--header 'Content-Type: application/json' \
--header 'X-Request-Origin: YOUR-REQUEST-ORIGIN-HERE' \
--header 'Authorization: Bearer YOUR-SCIM-TOKEN-HERE' \
Expand Down
4 changes: 2 additions & 2 deletions _docs/_api/endpoints/scim/post_create_user_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ description: "This article outlines details about the Create New Dashboard User
{% api %}
# Create a new dashboard user account
{% apimethod post %}
/scim/v2/users
/scim/v2/Users
{% endapimethod %}

This endpoint allows you to create a new dashboard user account by specifying email, given and family names, permissions (for setting permissions at the company, app group, and team level). For information on how to obtain a SCIM token, visit [Automated user provisioning]({{site.baseurl}}/scim/automated_user_provisioning/).
Expand Down Expand Up @@ -44,7 +44,7 @@ Authorization: Bearer YOUR-SCIM-TOKEN-HERE
| --------- | -------- | --------- | ----------- |
| Schemas | Required | Array of strings | Expected SCIM 2.0 schema name for user object. |
| `userName` | Required | String | The user’s email address |
| `name` | Required | JSON object | This object contains the user's first name and last name |
| `name` | Required | JSON object | This object contains the user's given name and family name |
KellieHawks marked this conversation as resolved.
Show resolved Hide resolved
| `department` | Required | String | Valid department string from the [department string table]({{site.baseurl}}/scim_api_appendix/#department-strings). |
| `permissions` | Required | JSON object | Permissions object as described in the [Permissions object]({{site.baseurl}}/scim_api_appendix/#permissions-object) section. |
{: .reset-td-br-1 .reset-td-br-2 .reset-td-br-3 .reset-td-br-4}
Expand Down
12 changes: 4 additions & 8 deletions _docs/_api/endpoints/scim/put_update_existing_user_account.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ description: "This article outlines details about the Update Existing Dashboard
{% api %}
# Update an existing dashboard user account
{% apimethod put %}
/scim/v2/users/YOUR_ID_HERE
/scim/v2/Users/YOUR_ID_HERE
{% endapimethod %}

This endpoint allows you to update an existing dashboard user account by specifying email, given and family names, permissions (for setting permissions at the company, app group, and team level). For information on how to obtain a SCIM token, visit [Automated user provisioning]({{site.baseurl}}/scim/automated_user_provisioning/).
This endpoint allows you to update an existing dashboard user account by specifying the resource ID. Allows for the update of given and family names, permissions (for setting permissions at the company, app group, and team level) and department. For information on how to obtain a SCIM token, visit [Automated user provisioning]({{site.baseurl}}/scim/automated_user_provisioning/).

For security reasons, `userName` (email address) cannot be updated through this endpoint at this time. If you would like to change the `userName` (email address) for a user, contact [Support]({{site.baseurl}}/support_contact/).

Expand All @@ -32,7 +32,6 @@ Authorization: Bearer YOUR-SCIM-TOKEN-HERE
```
{
"schemas": (required, array of strings),
"userName": (required, string),
"name": (required, JSON object),
"department": (required, string),
"permissions": (required, JSON object)
Expand All @@ -44,8 +43,7 @@ Authorization: Bearer YOUR-SCIM-TOKEN-HERE
| Parameter | Required | Data type | Description |
| --------- | -------- | --------- | ----------- |
| Schemas | Required | Array of strings | Expected SCIM 2.0 schema name for user object. |
| `userName` | Required | String | The username that the user will need to log into Braze (usually the same as email address). |
| `name` | Required | JSON object | This object contains the user's first name and last name. |
| `name` | Required | JSON object | This object contains the user's given name and family name. |
| `department` | Required | String | Valid department string from the [department string table]({{site.baseurl}}/scim_api_appendix/#department-strings). |
| `permissions` | Required | JSON object | Permissions object as described in the [Permissions object]({{site.baseurl}}/scim_api_appendix/#permissions-object) section. |
{: .reset-td-br-1 .reset-td-br-2 .reset-td-br-3 .reset-td-br-4}
Expand All @@ -58,7 +56,6 @@ curl --location --request PUT 'https://rest.iad-01.braze.com/scim/v2/Users/user@
--header 'Authorization: Bearer YOUR-SCIM-TOKEN-HERE' \
--data raw '{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"userName": "user@test.com",
"name": {
"givenName": "Test",
"familyName": "User"
Expand Down Expand Up @@ -91,7 +88,6 @@ Authorization: Bearer YOUR-SCIM-TOKEN-HERE
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"id": "user@test.com",
"userName": "user@test.com",
"name": {
"givenName": "Test",
"familyName": "User"
Expand Down Expand Up @@ -119,7 +115,7 @@ Authorization: Bearer YOUR-SCIM-TOKEN-HERE
```

### Error states
If a user with this email address doesn’t exist in Braze, the endpoint will respond with:
If a user with this ID doesn’t exist in Braze, the endpoint will respond with:

```json
HTTP/1.1 404 Not Found
Expand Down
12 changes: 8 additions & 4 deletions _docs/_api/home.md
Original file line number Diff line number Diff line change
Expand Up @@ -380,20 +380,24 @@ glossaries:
description: Delete an item in a catalog.
tags:
- Catalogs
- name: <a href='/docs/post_create_user_account/'>/scim/v2/users</a>
- name: <a href='/docs/post_create_user_account/'>/scim/v2/Users</a>
description: Create a new dashboard user account by specifying email, given and family names, permissions (for setting permissions at the company, app group, and team level).
tags:
- SCIM
- name: <a href='/docs/get_see_user_account_information/'>/scim/v2/users/{ID}</a>
- name: <a href='/docs/get_see_user_account_information/'>/scim/v2/Users/{ID}</a>
description: Look up an existing dashboard user account by specifying their email.
tags:
- SCIM
- name: <a href='/docs/post_update_existing_user_account/'>/scim/v2/users/{ID}</a>
- name: <a href='/docs/post_update_existing_user_account/'>/scim/v2/Users/{ID}</a>
description: Update an existing dashboard user account by specifying email, given and family names, permissions (for setting permissions at the company, app group, and team level).
tags:
- SCIM
- name: <a href='/docs/delete_existing_dashboard_user/'>/scim/v2/users/{ID}</a>
- name: <a href='/docs/delete_existing_dashboard_user/'>/scim/v2/Users/{ID}</a>
description: Permanently delete an existing dashboard user.
tags:
- SCIM
- name: <a href='/docs/get_search_existing_dashboard_user_email/'>/scim/v2/Users?filter=userName eq “user@test.com”</a>
description: Look up an existing dashboard user account by specifying their email.
tags:
- SCIM
---
12 changes: 8 additions & 4 deletions _includes/rate_limits.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,23 @@ We apply the default Braze rate limit of 250,000 requests per hour to this endpo

<!---PUT /scim/v2/Users/YOUR_ID_HERE--->
{% elsif include.endpoint == "update dashboard user" %}
This endpoint has a rate limit of 5000 requests per day, per company. This rate limit is shared with the `/scim/v2/Users/YOUR_ID_HERE` GET, DELETE and `/scim/v2/Users` POST endpoints<!--, as documented in [API rate limits]({{site.baseurl}}/api/api_limits/)--->.
This endpoint has a rate limit of 5000 requests per day, per company. This rate limit is shared with the `/scim/v2/Users/` GET, DELETE, and POST endpoints as documented in [API rate limits]({{site.baseurl}}/api/api_limits/).

<!---GET /scim/v2/Users/YOUR_ID_HERE--->
{% elsif include.endpoint == "look up dashboard user" %}
This endpoint has a rate limit of 5000 requests per day, per company. This rate limit is shared with the `/scim/v2/Users/YOUR_ID_HERE` GET, DELETE and `/scim/v2/Users` POST endpoints<!--, as documented in [API rate limits]({{site.baseurl}}/api/api_limits/)--->.
This endpoint has a rate limit of 5000 requests per day, per company. This rate limit is shared with the `/scim/v2/Users/` PUT, GET, DELETE, and POST endpoints as documented in [API rate limits]({{site.baseurl}}/api/api_limits/).

<!---DELETE /scim/v2/Users/YOUR_ID_HERE--->
{% elsif include.endpoint == "delete dashboard user" %}
This endpoint has a rate limit of 5000 requests per day, per company. This rate limit is shared with the `/scim/v2/Users/YOUR_ID_HERE` PUT, GET and `/scim/v2/Users` POST endpoints<!--, as documented in [API rate limits]({{site.baseurl}}/api/api_limits/)--->.
This endpoint has a rate limit of 5000 requests per day, per company. This rate limit is shared with the `/scim/v2/Users/` PUT, GET, and POST endpoints as documented in [API rate limits]({{site.baseurl}}/api/api_limits/).

<!---POST /scim/v2/Users--->
{% elsif include.endpoint == "create dashboard user" %}
This endpoint has a rate limit of 5000 requests per day, per company. This rate limit is shared with the `/scim/v2/Users/YOUR_ID_HERE` PUT, GET, and DELETE endpoints<!--, as documented in [API rate limits]({{site.baseurl}}/api/api_limits/)--->.
This endpoint has a rate limit of 5000 requests per day, per company. This rate limit is shared with the `/scim/v2/Users/` PUT, GET, and DELETE endpoints as documented in [API rate limits]({{site.baseurl}}/api/api_limits/).

<!---GET /scim/v2/Users--->
{% elsif include.endpoint == "look up dashboard user email" %}
This endpoint has a rate limit of 5000 requests per day, per company. This rate limit is shared with the `/scim/v2/Users/` PUT, GET, DELETE, and POST endpoints as documented in [API rate limits]({{site.baseurl}}/api/api_limits/).


<!---/users/external_id/rename-->
Expand Down