Sessions & sign-in history
Where you're signed in (and signing out of those), and your recent sign-ins.
| Method | Path | Summary |
|---|---|---|
| GET | /v1/user/login_history | Your last 15 sign-ins |
| GET | /v1/user/login_history/month | Your sign-ins in the last month |
| GET | /v1/user/sessions | Where you're signed in |
| POST | /v1/user/sessions/revoke | Sign out one session |
| POST | /v1/user/sessions/revoke_all | Sign out everywhere |
| GET | /user/login_history | Your recent sign-ins (legacy) |
| GET | /user/login_history/month | Your sign-ins in the last month (legacy) |
#Your last 15 sign-ins
GET
/v1/user/login_historyGet the users last 15 login events. Returns the users last 15 login events
- Address
https://<your-org>.brambleit.cloud/api/v1/user/login_history- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Response 200
| Field | Type | Description |
|---|---|---|
result | any |
Example response
JSON
{
"result": null
}Errors
| Status | Message |
|---|---|
| 404 | Data not found |
Example request
Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/v1/user/login_history' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/user/login_history', {
method: 'GET',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY },
});
const data = await res.json();Python
import os, requests
r = requests.get(
"https://<your-org>.brambleit.cloud/api/v1/user/login_history",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
Invoke-RestMethod -Method GET -Uri 'https://<your-org>.brambleit.cloud/api/v1/user/login_history' -Headers $headers#Your sign-ins in the last month
GET
/v1/user/login_history/monthGet the users last 1 month of login events. Returns the users last 1 month of login events
- Address
https://<your-org>.brambleit.cloud/api/v1/user/login_history/month- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Response 200
| Field | Type | Description |
|---|---|---|
result | any |
Example response
JSON
{
"result": null
}Errors
| Status | Message |
|---|---|
| 404 | No login history found for the past 30 days |
Example request
Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/v1/user/login_history/month' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/user/login_history/month', {
method: 'GET',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY },
});
const data = await res.json();Python
import os, requests
r = requests.get(
"https://<your-org>.brambleit.cloud/api/v1/user/login_history/month",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
Invoke-RestMethod -Method GET -Uri 'https://<your-org>.brambleit.cloud/api/v1/user/login_history/month' -Headers $headers#Where you're signed in
GET
/v1/user/sessionsGet the users active authentication sessions. Returns the users active authentication sessions
- Address
https://<your-org>.brambleit.cloud/api/v1/user/sessions- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Response 200
| Field | Type | Description |
|---|---|---|
result | any |
Example response
JSON
{
"result": null
}Errors
| Status | Message |
|---|---|
| 404 | Data not found |
Example request
Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/v1/user/sessions' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/user/sessions', {
method: 'GET',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY },
});
const data = await res.json();Python
import os, requests
r = requests.get(
"https://<your-org>.brambleit.cloud/api/v1/user/sessions",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
Invoke-RestMethod -Method GET -Uri 'https://<your-org>.brambleit.cloud/api/v1/user/sessions' -Headers $headers#Sign out one session
POST
/v1/user/sessions/revokeRevoke one of the user's own login sessions
- Address
https://<your-org>.brambleit.cloud/api/v1/user/sessions/revoke- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Request body JSON
| Name | Type | Description |
|---|---|---|
session_id | integer | The session to end, from GET /v1/user/sessions. |
Response 200
| Field | Type | Description |
|---|---|---|
message | string |
Example response
JSON
{
"message": "Saved"
}Errors
| Status | Message |
|---|---|
| 400 | session_id is required |
| 404 | Session not found |
Example request
Bash
curl -X POST 'https://<your-org>.brambleit.cloud/api/v1/user/sessions/revoke' \
-H "X-API-Key: $BRAMBLE_KEY" \
-H "Content-Type: application/json" \
-d '{"session_id":7}'JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/user/sessions/revoke', {
method: 'POST',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({"session_id":7}),
});
const data = await res.json();Python
import os, requests
r = requests.post(
"https://<your-org>.brambleit.cloud/api/v1/user/sessions/revoke",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
json={"session_id":7},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"session_id":7}'
Invoke-RestMethod -Method POST -Uri 'https://<your-org>.brambleit.cloud/api/v1/user/sessions/revoke' -Headers $headers -ContentType 'application/json' -Body $body#Sign out everywhere
POST
/v1/user/sessions/revoke_allEnds every session, including the one making the call.
- Address
https://<your-org>.brambleit.cloud/api/v1/user/sessions/revoke_all- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Response 200
| Field | Type | Description |
|---|---|---|
message | string |
Example response
JSON
{
"message": "Saved"
}Example request
Bash
curl -X POST 'https://<your-org>.brambleit.cloud/api/v1/user/sessions/revoke_all' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/user/sessions/revoke_all', {
method: 'POST',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY },
});
const data = await res.json();Python
import os, requests
r = requests.post(
"https://<your-org>.brambleit.cloud/api/v1/user/sessions/revoke_all",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
Invoke-RestMethod -Method POST -Uri 'https://<your-org>.brambleit.cloud/api/v1/user/sessions/revoke_all' -Headers $headers#Your recent sign-ins (legacy)
GET
/user/login_history- Address
https://<your-org>.brambleit.cloud/api/user/login_history- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Response 200
| Field | Type | Description |
|---|---|---|
result | any |
Example response
JSON
{
"result": null
}Errors
| Status | Message |
|---|---|
| 404 | Data not found |
Example request
Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/user/login_history' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/user/login_history', {
method: 'GET',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY },
});
const data = await res.json();Python
import os, requests
r = requests.get(
"https://<your-org>.brambleit.cloud/api/user/login_history",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
Invoke-RestMethod -Method GET -Uri 'https://<your-org>.brambleit.cloud/api/user/login_history' -Headers $headers#Your sign-ins in the last month (legacy)
GET
/user/login_history/month- Address
https://<your-org>.brambleit.cloud/api/user/login_history/month- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Response 200
| Field | Type | Description |
|---|---|---|
result | any |
Example response
JSON
{
"result": null
}Errors
| Status | Message |
|---|---|
| 404 | No login history found for the past 30 days |
Example request
Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/user/login_history/month' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/user/login_history/month', {
method: 'GET',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY },
});
const data = await res.json();Python
import os, requests
r = requests.get(
"https://<your-org>.brambleit.cloud/api/user/login_history/month",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
Invoke-RestMethod -Method GET -Uri 'https://<your-org>.brambleit.cloud/api/user/login_history/month' -Headers $headersWas this page helpful?
Thanks for your feedback.