Oturumlar
Adlandırılmış bir API belirteci oluşturun; clientId ve Base64 kodlu 32 baytlık token döndürülür. Oturum açma ve API belirteci oturumlarını listeleyin. LOGIN için token ve urlToken boştur; API_TOKEN kimlik bilgileri yerel sahibin isteklerini gerektirir.
Tip Tanımları
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
}İşlemler
createApiToken
Adlandırılmış bir API belirteci oluşturun; clientId ve Base64 kodlu 32 baytlık token döndürülür.
mutation createApiToken($name: String!) {
createApiToken(name: $name) { clientId token }
}renameSession
Belirtilen yetkili istemci oturumunu yeniden adlandırır.
mutation renameSession($clientId: ID!, $name: String!) {
renameSession(clientId: $clientId, name: $name)
}revokeSession
Belirtilen istemci oturumunu ve erişimini iptal eder.
mutation revokeSession($clientId: ID!) {
revokeSession(clientId: $clientId)
}sessions
Oturum açma ve API belirteci oturumlarını listeleyin. LOGIN için token ve urlToken boştur; API_TOKEN kimlik bilgileri yerel sahibin isteklerini gerektirir.
query sessions {
sessions { clientId clientName type clientIp osName osVersion appName appVersion }
}