GraphQL Schema
The Model Gateway Management API has a GraphQL Management API that allows you to manage and configure your Model Gateway. You can use the Management API to manage gateways, inference endpoints, and gateway keys. This guide will show you how to use the Management API to manage your Model Gateway.
schema {
query: Query
mutation: Mutation
}
input AddGatewayKeyInput {
gatewayId: ID!
name: String!
}
type AddGatewayKeyPayload {
gatewayKey: GatewayKey
key: String
}
type AzureModelDeployment {
accountEndpoint: String!
accountLocation: String!
accountName: String!
id: ID!
modelDeploymentModelName: String!
modelDeploymentModelVersion: String!
modelDeploymentName: String!
resourceGroupName: String!
subscriptionId: String!
}
input CreateGatewayInput {
name: String!
}
type CreateGatewayPayload {
gateway: Gateway
}
input CreateInferenceEndpointInput {
deploymentName: String
endpoint: String!
key: String
modelName: String
modelVersion: String
name: String!
platform: String!
region: String
}
type CreateInferenceEndpointPayload {
inferenceEndpoint: InferenceEndpoint
}
input DateTimeFilter {
gte: String
lte: String
}
type Gateway implements Node {
createdAt: String!
id: ID!
inferenceEndpoints(after: String, before: String, first: Int, last: Int): GatewayInferenceEndpointConnection
keys(after: String, before: String, first: Int, last: Int): GatewayKeyConnection
logPayload: Boolean!
logTraffic: Boolean!
name: String!
status: String!
tracePayload: Boolean!
traceTraffic: Boolean!
updatedAt: String!
}
type GatewayConnection {
edges: [GatewayEdge]
pageInfo: PageInfo!
totalCount: Int!
}
type GatewayEdge {
cursor: String!
node: Gateway
}
type GatewayInferenceEndpointConnection {
edges: [GatewayInferenceEndpointEdge]
pageInfo: PageInfo!
totalCount: Int!
}
type GatewayInferenceEndpointEdge {
cursor: String!
node: InferenceEndpoint
order: Int!
}
type GatewayKey implements Node {
createdAt: String!
id: ID!
maskedKey: String!
name: String!
status: String!
updatedAt: String!
}
type GatewayKeyConnection {
edges: [GatewayKeyEdge]
pageInfo: PageInfo!
totalCount: Int!
}
type GatewayKeyEdge {
cursor: String!
node: GatewayKey
}
type GatewayRequest implements Node {
body: String
contentType: String
createdAt: String!
gateway: Gateway!
gatewayKey: GatewayKey!
gatewayResponse: GatewayResponse
id: ID!
ip: String!
maxTokens: Int
requestId: String!
seed: Int
stream: Boolean
temperature: Float
tools: Boolean
topP: Float
url: String!
}
type GatewayRequestConnection {
edges: [GatewayRequestEdge]
pageInfo: PageInfo!
totalCount: Int!
}
type GatewayRequestEdge {
cursor: String!
node: GatewayRequest
}
input GatewayRequestFilter {
createdAt: DateTimeFilter
gatewayId: ID
}
type GatewayResponse {
body: String
createdAt: String!
duration: Float!
headers: JSONObject!
id: ID!
inferenceEndpointResponse: InferenceEndpointResponse
statusCode: Int!
}
input ImportAzureModelDeploymentInput {
inferenceEndpointName: String
modelDeploymentId: String!
}
input ImportAzureModelDeploymentsInput {
modelDeployments: [ImportAzureModelDeploymentInput!]!
}
type ImportAzureModelDeploymentsPayload {
inferenceEndpoints: [InferenceEndpoint!]!
}
type InferenceEndpoint implements Node {
createdAt: String!
deploymentName: String
endpoint: String!
id: ID!
modelName: String
modelVersion: String
name: String!
platform: String!
region: String
status: String!
updatedAt: String!
}
type InferenceEndpointConnection {
edges: [InferenceEndpointEdge]
pageInfo: PageInfo!
totalCount: Int!
}
type InferenceEndpointEdge {
cursor: String!
node: InferenceEndpoint
}
type InferenceEndpointRequest {
body: String
createdAt: String!
id: ID!
inferenceEndpoint: InferenceEndpoint!
method: String!
url: String!
}
type InferenceEndpointResponse {
body: String
choices: Int
completionTokens: Int
createdAt: String!
duration: Float!
headers: JSONObject!
id: ID!
inferenceEndpointRequest: InferenceEndpointRequest
promptTokens: Int
statusCode: Int!
}
scalar JSONObject
input LoginInput {
email: String!
password: String!
}
type LoginPayload {
token: String
}
type Mutation {
_empty: String
addGatewayKey(input: AddGatewayKeyInput!): AddGatewayKeyPayload
createGateway(input: CreateGatewayInput!): CreateGatewayPayload
createInferenceEndpoint(input: CreateInferenceEndpointInput!): CreateInferenceEndpointPayload
importAzureModelDeployments(input: ImportAzureModelDeploymentsInput!): ImportAzureModelDeploymentsPayload
login(input: LoginInput!): LoginPayload
logout: Boolean
revokeGatewayKey(input: RevokeGatewayKeyInput!): RevokeGatewayKeyPayload
updateGateway(input: UpdateGatewayInput!): UpdateGatewayPayload
updateInferenceEndpoint(input: UpdateInferenceEndpointInput!): UpdateInferenceEndpointPayload
}
interface Node {
id: ID!
}
type PageInfo {
endCursor: String
hasNextPage: Boolean!
hasPreviousPage: Boolean!
startCursor: String
}
type Query {
azureModelDeployments: [AzureModelDeployment!]!
gatewayRequests(after: String, before: String, filter: GatewayRequestFilter, first: Int, last: Int): GatewayRequestConnection
gateways(after: String, before: String, first: Int, last: Int): GatewayConnection
inferenceEndpoints(after: String, before: String, first: Int, last: Int): InferenceEndpointConnection
node(id: ID!): Node
viewer: Viewer
}
input RevokeGatewayKeyInput {
gatewayKeyId: ID!
}
type RevokeGatewayKeyPayload {
gatewayKey: GatewayKey
}
input UpdateGatewayInput {
gatewayId: ID!
inferenceEndpointIds: [ID!]!
logPayload: Boolean!
logTraffic: Boolean!
name: String!
tracePayload: Boolean!
traceTraffic: Boolean!
}
type UpdateGatewayPayload {
gateway: Gateway
}
input UpdateInferenceEndpointInput {
deploymentName: String
endpoint: String
inferenceEndpointId: ID!
key: String
modelName: String
modelVersion: String
name: String!
platform: String!
region: String
}
type UpdateInferenceEndpointPayload {
inferenceEndpoint: InferenceEndpoint
}
type Viewer {
email: String!
id: ID!
}