Sessioni
Crea un token API con nome e restituisce clientId e il token di 32 byte codificato in Base64. Elenca le sessioni di accesso e dei token API. Per LOGIN, token e urlToken sono vuoti; le credenziali API_TOKEN richiedono richieste del proprietario locale.
Definizioni di tipo
type Mutation {
createApiToken(name: String!): CreatedApiToken!
renameSession(clientId: ID!, name: String!): Boolean!
revokeSession(clientId: ID!): Boolean!
}
type Query {
sessions: [Session!]!
}
type CreatedApiToken {
clientId: ID!
token: String!
}
scalar Instant
type Session {
clientId: ID!
clientName: String!
type: SessionType!
clientIp: String!
osName: String!
osVersion: String!
appName: String!
appVersion: String!
lastSeenAt: Instant
lastActive: Instant!
createdAt: Instant!
updatedAt: Instant!
}
enum SessionType {
LOGIN
API_TOKEN
}Operazioni
createApiToken
Crea un token API con nome e restituisce clientId e il token di 32 byte codificato in Base64.
mutation createApiToken($name: String!) {
createApiToken(name: $name) { clientId token }
}renameSession
Rinominare la sessione del client autorizzato specificato.
mutation renameSession($clientId: ID!, $name: String!) {
renameSession(clientId: $clientId, name: $name)
}revokeSession
Revocare la sessione del client specificato e il relativo accesso.
mutation revokeSession($clientId: ID!) {
revokeSession(clientId: $clientId)
}sessions
Elenca le sessioni di accesso e dei token API. Per LOGIN, token e urlToken sono vuoti; le credenziali API_TOKEN richiedono richieste del proprietario locale.
query sessions {
sessions { clientId clientName type clientIp osName osVersion appName appVersion }
}