Search sessions
POST/v2/sessions/search
Search for sessions
Request​
- application/json
- application/grpc
- application/grpc-web+proto
Body
required
Array [
]
query
object
Object unspecific list filters like offset, limit and asc/desc.
Maximum amount of events returned. The default is set to 1000 in https://github.com/zitadel/zitadel/blob/new-eventstore/cmd/zitadel/startup.yaml. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.
default is descending
queries
object[]
idsQuery
object
userIdQuery
object
creationDateQuery
object
Possible values: [TIMESTAMP_QUERY_METHOD_EQUALS
, TIMESTAMP_QUERY_METHOD_GREATER
, TIMESTAMP_QUERY_METHOD_GREATER_OR_EQUALS
, TIMESTAMP_QUERY_METHOD_LESS
, TIMESTAMP_QUERY_METHOD_LESS_OR_EQUALS
]
Default value: TIMESTAMP_QUERY_METHOD_EQUALS
defines which timestamp comparison method is used
Possible values: [SESSION_FIELD_NAME_UNSPECIFIED
, SESSION_FIELD_NAME_CREATION_DATE
]
Default value: SESSION_FIELD_NAME_UNSPECIFIED
Body
required
Array [
]
query
object
Object unspecific list filters like offset, limit and asc/desc.
Maximum amount of events returned. The default is set to 1000 in https://github.com/zitadel/zitadel/blob/new-eventstore/cmd/zitadel/startup.yaml. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.
default is descending
queries
object[]
idsQuery
object
userIdQuery
object
creationDateQuery
object
Possible values: [TIMESTAMP_QUERY_METHOD_EQUALS
, TIMESTAMP_QUERY_METHOD_GREATER
, TIMESTAMP_QUERY_METHOD_GREATER_OR_EQUALS
, TIMESTAMP_QUERY_METHOD_LESS
, TIMESTAMP_QUERY_METHOD_LESS_OR_EQUALS
]
Default value: TIMESTAMP_QUERY_METHOD_EQUALS
defines which timestamp comparison method is used
Possible values: [SESSION_FIELD_NAME_UNSPECIFIED
, SESSION_FIELD_NAME_CREATION_DATE
]
Default value: SESSION_FIELD_NAME_UNSPECIFIED
Body
required
Array [
]
query
object
Object unspecific list filters like offset, limit and asc/desc.
Maximum amount of events returned. The default is set to 1000 in https://github.com/zitadel/zitadel/blob/new-eventstore/cmd/zitadel/startup.yaml. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.
default is descending
queries
object[]
idsQuery
object
userIdQuery
object
creationDateQuery
object
Possible values: [TIMESTAMP_QUERY_METHOD_EQUALS
, TIMESTAMP_QUERY_METHOD_GREATER
, TIMESTAMP_QUERY_METHOD_GREATER_OR_EQUALS
, TIMESTAMP_QUERY_METHOD_LESS
, TIMESTAMP_QUERY_METHOD_LESS_OR_EQUALS
]
Default value: TIMESTAMP_QUERY_METHOD_EQUALS
defines which timestamp comparison method is used
Possible values: [SESSION_FIELD_NAME_UNSPECIFIED
, SESSION_FIELD_NAME_CREATION_DATE
]
Default value: SESSION_FIELD_NAME_UNSPECIFIED
Responses​
- 200
- 400
- 403
- 404
- default
OK
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
- Example (from schema)
Schema
Array [
]
details
object
the last time the projection got updated
sessions
object[]
"id of the session"
"time when the session was created"
"time when the session was last updated"
"sequence of the session"
factors
object
"checked factors of the session, e.g. the user, password and more"
user
object
"time when the user was last checked"
"id of the checked user"
"login name of the checked user"
"display name of the checked user"
"organization id of the checked user"
password
object
"time when the password was last checked"
webAuthN
object
"time when the passkey challenge was last checked"
intent
object
"time when an intent was last checked"
totp
object
"time when the Time-based One-Time Password was last checked"
otpSms
object
"time when the One-Time Password was last checked"
otpEmail
object
"time when the One-Time Password was last checked"
metadata
object
"custom key value list"
userAgent
object
header
object
property name*
object
A header may have multiple values. In Go, headers are defined as map[string][]string, but protobuf doesn't allow this scheme.
"time the session will be automatically invalidated"
{
"details": {
"totalResult": "2",
"processedSequence": "267831",
"timestamp": "2024-11-22T16:27:04.662Z"
},
"sessions": [
{
"id": "string",
"creationDate": "2024-11-22T16:27:04.663Z",
"changeDate": "2024-11-22T16:27:04.663Z",
"sequence": "string",
"factors": {
"user": {
"verifiedAt": "2024-11-22T16:27:04.663Z",
"id": "string",
"loginName": "string",
"displayName": "string",
"organizationId": "string"
},
"password": {
"verifiedAt": "2024-11-22T16:27:04.663Z"
},
"webAuthN": {
"verifiedAt": "2024-11-22T16:27:04.663Z",
"userVerified": true
},
"intent": {
"verifiedAt": "2024-11-22T16:27:04.663Z"
},
"totp": {
"verifiedAt": "2024-11-22T16:27:04.663Z"
},
"otpSms": {
"verifiedAt": "2024-11-22T16:27:04.663Z"
},
"otpEmail": {
"verifiedAt": "2024-11-22T16:27:04.663Z"
}
},
"metadata": {},
"userAgent": {
"fingerprintId": "string",
"ip": "string",
"description": "string",
"header": {}
},
"expirationDate": "2024-11-22T16:27:04.663Z"
}
]
}
- Schema
- Example (from schema)
Schema
Array [
]
details
object
the last time the projection got updated
sessions
object[]
"id of the session"
"time when the session was created"
"time when the session was last updated"
"sequence of the session"
factors
object
"checked factors of the session, e.g. the user, password and more"
user
object
"time when the user was last checked"
"id of the checked user"
"login name of the checked user"
"display name of the checked user"
"organization id of the checked user"
password
object
"time when the password was last checked"
webAuthN
object
"time when the passkey challenge was last checked"
intent
object
"time when an intent was last checked"
totp
object
"time when the Time-based One-Time Password was last checked"
otpSms
object
"time when the One-Time Password was last checked"
otpEmail
object
"time when the One-Time Password was last checked"
metadata
object
"custom key value list"
userAgent
object
header
object
property name*
object
A header may have multiple values. In Go, headers are defined as map[string][]string, but protobuf doesn't allow this scheme.
"time the session will be automatically invalidated"
{
"details": {
"totalResult": "2",
"processedSequence": "267831",
"timestamp": "2024-11-22T16:27:04.664Z"
},
"sessions": [
{
"id": "string",
"creationDate": "2024-11-22T16:27:04.664Z",
"changeDate": "2024-11-22T16:27:04.664Z",
"sequence": "string",
"factors": {
"user": {
"verifiedAt": "2024-11-22T16:27:04.664Z",
"id": "string",
"loginName": "string",
"displayName": "string",
"organizationId": "string"
},
"password": {
"verifiedAt": "2024-11-22T16:27:04.664Z"
},
"webAuthN": {
"verifiedAt": "2024-11-22T16:27:04.664Z",
"userVerified": true
},
"intent": {
"verifiedAt": "2024-11-22T16:27:04.664Z"
},
"totp": {
"verifiedAt": "2024-11-22T16:27:04.664Z"
},
"otpSms": {
"verifiedAt": "2024-11-22T16:27:04.664Z"
},
"otpEmail": {
"verifiedAt": "2024-11-22T16:27:04.664Z"
}
},
"metadata": {},
"userAgent": {
"fingerprintId": "string",
"ip": "string",
"description": "string",
"header": {}
},
"expirationDate": "2024-11-22T16:27:04.664Z"
}
]
}
- Schema
- Example (from schema)
Schema
Array [
]
details
object
the last time the projection got updated
sessions
object[]
"id of the session"
"time when the session was created"
"time when the session was last updated"
"sequence of the session"
factors
object
"checked factors of the session, e.g. the user, password and more"
user
object
"time when the user was last checked"
"id of the checked user"
"login name of the checked user"
"display name of the checked user"
"organization id of the checked user"
password
object
"time when the password was last checked"
webAuthN
object
"time when the passkey challenge was last checked"
intent
object
"time when an intent was last checked"
totp
object
"time when the Time-based One-Time Password was last checked"
otpSms
object
"time when the One-Time Password was last checked"
otpEmail
object
"time when the One-Time Password was last checked"
metadata
object
"custom key value list"
userAgent
object
header
object
property name*
object
A header may have multiple values. In Go, headers are defined as map[string][]string, but protobuf doesn't allow this scheme.
"time the session will be automatically invalidated"
{
"details": {
"totalResult": "2",
"processedSequence": "267831",
"timestamp": "2024-11-22T16:27:04.668Z"
},
"sessions": [
{
"id": "string",
"creationDate": "2024-11-22T16:27:04.668Z",
"changeDate": "2024-11-22T16:27:04.668Z",
"sequence": "string",
"factors": {
"user": {
"verifiedAt": "2024-11-22T16:27:04.668Z",
"id": "string",
"loginName": "string",
"displayName": "string",
"organizationId": "string"
},
"password": {
"verifiedAt": "2024-11-22T16:27:04.668Z"
},
"webAuthN": {
"verifiedAt": "2024-11-22T16:27:04.668Z",
"userVerified": true
},
"intent": {
"verifiedAt": "2024-11-22T16:27:04.668Z"
},
"totp": {
"verifiedAt": "2024-11-22T16:27:04.668Z"
},
"otpSms": {
"verifiedAt": "2024-11-22T16:27:04.668Z"
},
"otpEmail": {
"verifiedAt": "2024-11-22T16:27:04.668Z"
}
},
"metadata": {},
"userAgent": {
"fingerprintId": "string",
"ip": "string",
"description": "string",
"header": {}
},
"expirationDate": "2024-11-22T16:27:04.668Z"
}
]
}
invalid list query
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Returned when the user does not have permission to access the resource.
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Returned when the resource does not exist.
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
An unexpected error response.
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
Array [
]
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}