Skip to content

Commit

Permalink
GITBOOK-522: Remove unhelpful cURL sample
Browse files Browse the repository at this point in the history
  • Loading branch information
DebbieAtSeam authored and gitbook-bot committed Jan 17, 2025
1 parent ad9c316 commit 73f867a
Showing 1 changed file with 0 additions and 152 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -607,158 +607,6 @@ None
```
{% endtab %}

{% tab title="cURL (bash)" %}
**Request:**

```bash
user_identity_id=22222222-2222-2222-2222-222222222222

# Step 1: List and delete all client sessions
# associated with the user identity.

# List the client sessions.
# Use GET or POST.
curl -X 'GET' \
'https://connect.getseam.com/client_sessions/list' \
-H 'accept: application/json' \
-H "Authorization: Bearer ${SEAM_API_KEY}" \
-H 'Content-Type: application/json' \
-d "{
\"user_identity_id\": \"${user_identity_id}\"
}"

# Delete each returned client session, using the following endpoint:
curl -X 'POST' \
'https://connect.getseam.com/client_sessions/delete' \
-H 'accept: application/json' \
-H "Authorization: Bearer ${SEAM_API_KEY}" \
-H 'Content-Type: application/json' \
-d "{
\"client_session_id\": \"$client_session_id\"
}"

# Step 2: List and delete all ACS users and credentials
# associated with the user identity.

# List the ACS users associated with the user identity.
curl -X 'GET' \
'https://connect.getseam.com/acs/users/list' \
-H 'accept: application/json' \
-H "Authorization: Bearer ${SEAM_API_KEY}" \
-H 'Content-Type: application/json' \
-d "{
\"user_identity_id\": \"${user_identity_id}\"
}"

# For each returned ACS user, list the associated credentials,
# using the following endpoint:
curl -X 'GET' \
'https://connect.getseam.com/acs/credentials/list' \
-H 'accept: application/json' \
-H "Authorization: Bearer ${SEAM_API_KEY}" \
-H 'Content-Type: application/json' \
-d "{
\"acs_user_id\": \"${acs_user_id}\"
}"

# Delete each returned credential, using the following endpoint:
curl -X 'POST' \
'https://connect.getseam.com/acs/credentials/delete' \
-H 'accept: application/json' \
-H "Authorization: Bearer ${SEAM_API_KEY}" \
-H 'Content-Type: application/json' \
-d "{
\"acs_credential_id\": \"$acs_credential_id\"
}"

# Wait until each credential has been deleted.
# You can watch for acs_credential.deleted events.

# Delete each ACS user returned previously, using the following endpoint:
curl -X 'POST' \
'https://connect.getseam.com/acs/users/delete' \
-H 'accept: application/json' \
-H "Authorization: Bearer ${SEAM_API_KEY}" \
-H 'Content-Type: application/json' \
-d "{
\"acs_user_id\": \"$acs_user_id\"
}"

# Wait until each ACS user has been deleted.
# You can watch for acs_user.deleted events.

# Step 3: List and delete all enrollment automations
# associated with the user identity.

# List the enrollment automations.
curl -X 'GET' \
'https://connect.getseam.com/user_identities/enrollment_automations/list' \
-H 'accept: application/json' \
-H "Authorization: Bearer ${SEAM_API_KEY}" \
-H 'Content-Type: application/json' \
-d "{
\"user_identity_id\": \"${user_identity_id}\"
}"

# Delete each returned enrollment automation, using the following endpoint:
curl -X 'POST' \
'https://connect.getseam.com/user_identities/enrollment_automations/delete' \
-H 'accept: application/json' \
-H "Authorization: Bearer ${SEAM_API_KEY}" \
-H 'Content-Type: application/json' \
-d "{
\"enrollment_automation_id\": \"$enrollment_automation_id\"
}"

# Wait until each enrollment automation has been deleted.
# You can watch for enrollment_automation.deleted events.

# Step 4: List and deactivate all phones
# associated with the user identity.

# List the phones.
curl -X 'GET' \
'https://connect.getseam.com/phones/list' \
-H 'accept: application/json' \
-H "Authorization: Bearer ${SEAM_API_KEY}" \
-H 'Content-Type: application/json' \
-d "{
\"owner_user_identity_id=\": \"${user_identity_id}\"
}"

# Deactivate each returned phone, using the following endpoint:
curl -X 'POST' \
'https://connect.getseam.com/phones/deactivate' \
-H 'accept: application/json' \
-H "Authorization: Bearer ${SEAM_API_KEY}" \
-H 'Content-Type: application/json' \
-d "{
\"device_id\": \"$phone_device_id\"
}"

# Wait until each phone has been deactivated.
# You can watch for phone.deactivated events.

# Step 5: Delete the user identity.
curl -X 'POST' \
'https://connect.getseam.com/user_identities/delete' \
-H 'accept: application/json' \
-H "Authorization: Bearer ${SEAM_API_KEY}" \
-H 'Content-Type: application/json' \
-d "{
\"user_identity_id\": \"$user_identity_id\"
}"
```

**Response:**

```json
{
"ok": true
}
```
{% endtab %}

{% tab title="JavaScript" %}
**Command:**

Expand Down

0 comments on commit 73f867a

Please sign in to comment.