Sessions & sign-in history

Where you're signed in (and signing out of those), and your recent sign-ins.

MethodPathSummary
GET/v1/user/login_historyYour last 15 sign-ins
GET/v1/user/login_history/monthYour sign-ins in the last month
GET/v1/user/sessionsWhere you're signed in
POST/v1/user/sessions/revokeSign out one session
POST/v1/user/sessions/revoke_allSign out everywhere
GET/user/login_historyYour recent sign-ins (legacy)
GET/user/login_history/monthYour sign-ins in the last month (legacy)

#Your last 15 sign-ins

GET/v1/user/login_history

Get 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

FieldTypeDescription
resultany
Example response
JSON
{
  "result": null
}

Errors

StatusMessage
404Data not found

Example request

Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/v1/user/login_history' \
  -H "X-API-Key: $BRAMBLE_KEY"

#Your sign-ins in the last month

GET/v1/user/login_history/month

Get 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

FieldTypeDescription
resultany
Example response
JSON
{
  "result": null
}

Errors

StatusMessage
404No 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"

#Where you're signed in

GET/v1/user/sessions

Get 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

FieldTypeDescription
resultany
Example response
JSON
{
  "result": null
}

Errors

StatusMessage
404Data not found

Example request

Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/v1/user/sessions' \
  -H "X-API-Key: $BRAMBLE_KEY"

#Sign out one session

POST/v1/user/sessions/revoke

Revoke 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

NameTypeDescription
session_idintegerThe session to end, from GET /v1/user/sessions.

Response 200

FieldTypeDescription
messagestring
Example response
JSON
{
  "message": "Saved"
}

Errors

StatusMessage
400session_id is required
404Session 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}'

#Sign out everywhere

POST/v1/user/sessions/revoke_all

Ends 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

FieldTypeDescription
messagestring
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"

#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

FieldTypeDescription
resultany
Example response
JSON
{
  "result": null
}

Errors

StatusMessage
404Data not found

Example request

Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/user/login_history' \
  -H "X-API-Key: $BRAMBLE_KEY"

#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

FieldTypeDescription
resultany
Example response
JSON
{
  "result": null
}

Errors

StatusMessage
404No 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"