Database Clients GraphQL API#

The Database Clients GraphQL API allows for managing OAuth clients stored in a database using GraphQL queries and mutations. This API is exposed via an endpoint in the Token profile and it provides a flexible way to create, read, update, and delete database clients programmatically. To enable this API, the Database Clients functionality must be enabled in the Token profile.

Queries and Mutations#

The operations are categorized into two types: query and mutation. Queries are used to retrieve data, while mutations are used to modify data.

Queries#

The possible queries for database clients are:

databaseClientById(id: ID!): DatabaseClient

databaseClients(
    activeClientsOnly: Boolean = true
    clientName: String
    tags: [String!]
    first: Int
    after: String
    sorting: DatabaseClientSorting = {sortBy: name, sortOrder: ASCENDING}
): DatabaseClientConnection!

searchDatabaseClients(
    activeClientsOnly: Boolean = true
    first: Int
    after: String
    sorting: DatabaseClientSorting = {sortBy: name, sortOrder: ASCENDING}
    searchTerms: String
): DatabaseClientConnection!

These queries allow you to fetch individual database clients by their ID, retrieve a list of database clients with optional filtering and pagination, and search for database clients based on search terms.

Mutations#

The possible mutations for database clients are:

setDatabaseClientStatusById(input: SetDatabaseClientStatusByIdInput!): SetDatabaseClientStatusPayload

createDatabaseClient(input: CreateDatabaseClientInput!): CreateDatabaseClientPayload

updateDatabaseClientById(input: UpdateDatabaseClientByIdInput!): UpdateDatabaseClientPayload

duplicateDatabaseClientById(input: DuplicateDatabaseClientByIdInput!): CreateDatabaseClientPayload

setDatabaseClientOwnerById(input: SetDatabaseClientOwnerByIdInput!): SetDatabaseClientOwnerPayload

deleteDatabaseClientById(input: DeleteDatabaseClientByIdInput!): DeleteDatabaseClientPayload

These mutations allow you to change the status of a database client, create new clients, update existing clients, duplicate clients, set the owner of a client, and delete clients.

Was this helpful?