Files
speckle-server/modules/core/graph/schemas/apitoken.graphql
T

27 lines
479 B
GraphQL

extend type User{
"""
The api tokens of this user.
"""
apiTokens: [ApiToken]
}
type ApiToken {
id: String!
name: String!
lastChars: String!
scopes: [String]!
createdAt: String! #date
lifespan: BigInt!
lastUsed: String! #date
}
extend type Mutation {
"""
Creates an api token.
"""
apiTokenCreate(scopes: [String!]!, name: String!, lifespan: BigInt):String!
"""
Revokes (deletes) an api token.
"""
apiTokenRevoke(token: String!):Boolean!
}