rest-api/resources/schema.graphqls (497 lines of code) (raw):

# Object Identification spec compliance interface. interface Node { id: ID! } # Any type implementing this interface exposes a rawId which corresponds to some unqiue identificator in its domain. # Typically, most types implementing Node will implement this interface too. interface RawId { # Identificator, unique inside it's type domain. Does not guarantee uniquness across different domains. rawId: ID! } enum BuildTypeType { REGULAR COMPOSITE DEPLOYMENT } type BuildType implements RawId & Node { id: ID! rawId: ID! name: String type: BuildTypeType ancestorProjects: ProjectsConnection } type AgentEdge { node: Agent! } type AgentPoolAgentEdge { node: Agent! } type PageInfo { hasPreviousPage: Boolean hasNextPage: Boolean } type AgentPoolAgentsConnection { edges: [AgentPoolAgentEdge!]! count: Int! pageInfo: PageInfo! } type AgentTypeEdge { node: AgentType! } type AgentPoolAgentTypesConnection { edges: [AgentTypeEdge!]! count: Int! pageInfo: PageInfo! } type AgentPoolProjectEdge { node: Project! } type AgentPoolProjectsConnection { edges: [AgentPoolProjectEdge!]! count: Int! excludedCount: Int } type CloudImageInstancesConnection { edges: [AgentEdge!]! count: Int! } type CloudImage implements RawId & Node { id: ID! rawId: ID! name: String agentType: AgentType environment: AgentEnvironment instances: CloudImageInstancesConnection project: Project agentPool: AbstractAgentPool agentTypeRawId: ID @deprecated(reason: "Use agentType.rawId instead") assignableAgentPools: AgentPoolsConnection @deprecated(reason: "Use AgentPool.assignableCloudImages instead") } type AgentPoolCloudImageEdge { node: CloudImage! } type AgentPoolCloudImagesConnection { edges: [AgentPoolCloudImageEdge!]! } type AgentPoolPermissions { manage: Boolean manageProjects: Boolean authorizeAgents: Boolean enableAgents: Boolean manageAgents: Boolean } type MissingGlobalPermission { permissionName: String } type MissingGlobalOrPerProjectPermission { globalPermissionNames: [String]! projectPermissionName: String projectsWithoutPermission: ProjectsConnection hiddenProjectWithoutPermissionCount: Int } union UnavailableActionReason = MissingGlobalPermission | MissingGlobalOrPerProjectPermission type AgentPoolActionStatus { isAvailable: Boolean! unavailabilityReason: UnavailableActionReason } type AgentPoolActions { moveAgents: AgentPoolActionStatus moveCloudImages: AgentPoolActionStatus authorizeAgents: AgentPoolActionStatus enableAgents: AgentPoolActionStatus moveProjects: AgentPoolActionStatus updateProperties: AgentPoolActionStatus } type ProjectAgentPoolActions { moveCloudImages: AgentPoolActionStatus } interface AbstractAgentPool implements RawId & Node { id: ID! rawId: ID! name: String projects(filter: ProjectsFilter = {archived: false}): AgentPoolProjectsConnection agentTypes(filter: AgentPoolAgentTypesFilter): AgentPoolAgentTypesConnection maxAgentsNumber: Int cloudImages: AgentPoolCloudImagesConnection @deprecated(reason: "Use agentTypes(filter:{cloud = true})") agents: AgentPoolAgentsConnection @deprecated(reason: "Use agentTypes(filter:{cloud = false})") permissions: AgentPoolPermissions @deprecated } type AgentPool implements AbstractAgentPool & RawId & Node { id: ID! rawId: ID! name: String projects(filter: ProjectsFilter = {archived: false}): AgentPoolProjectsConnection agentTypes(filter: AgentPoolAgentTypesFilter): AgentPoolAgentTypesConnection cloudImages: AgentPoolCloudImagesConnection @deprecated(reason: "Use agentTypes(filter:{cloud = true})") agents: AgentPoolAgentsConnection @deprecated(reason: "Use agentTypes(filter:{cloud = false})") maxAgentsNumber: Int assignableAgents: AgentPoolAgentsConnection assignableCloudImages: AgentPoolCloudImagesConnection actions: AgentPoolActions permissions: AgentPoolPermissions @deprecated } type ProjectAgentPool implements AbstractAgentPool & RawId & Node { id: ID! rawId: ID! name: String projects(filter: ProjectsFilter = {archived: false}): AgentPoolProjectsConnection agentTypes(filter: AgentPoolAgentTypesFilter): AgentPoolAgentTypesConnection cloudImages: AgentPoolCloudImagesConnection @deprecated(reason: "Use agentTypes(filter:{cloud = true})") agents: AgentPoolAgentsConnection @deprecated(reason: "Use agentTypes(filter:{cloud = false})") maxAgentsNumber: Int project: Project actions: ProjectAgentPoolActions permissions: AgentPoolPermissions @deprecated } input AgentBuildTypesFilter { compatible: Boolean assigned: Boolean } type RunnerAgentBuildTypeIncompatibility { displayName: String! } type MissedVCSPluginAgentBuildTypeIncompatibility { name: String! } type InvalidRunParameterAgentBuildTypeIncompatibility { name: String! reason: String } type UndefinedRunParameterAgentBuildTypeIncompatibility { # Run? name: String! origin: String } type UnmetRequirementAgentBuildTypeIncompatibility { propertyName: String! propertyValue: String type: String } input AgentPoolAgentTypesFilter { cloud: Boolean } union AgentBuildTypeIncompatibility = RunnerAgentBuildTypeIncompatibility | MissedVCSPluginAgentBuildTypeIncompatibility | InvalidRunParameterAgentBuildTypeIncompatibility | UndefinedRunParameterAgentBuildTypeIncompatibility | UnmetRequirementAgentBuildTypeIncompatibility type AgentBuildTypeEdge { node: BuildType! assigned: Boolean compatible: Boolean incompatibilities: [AgentBuildTypeIncompatibility!]! } enum AgentRunPolicy { ALL ASSIGNED } type AssociatedAgentBuildTypesConnection { edges: [AgentBuildTypeEdge!]! count: Int! pageInfo: PageInfo! runPolicy: AgentRunPolicy } type DiassociatedAgentBuildTypesConnection { edges: [AgentBuildTypeEdge!]! count: Int! pageInfo: PageInfo! } enum OSType { Windows macOS Linux Solaris FreeBSD Unix Unknown } type OS { type: OSType! name: String } type AgentEnvironment { os: OS cpuBenchmarkIndex: Int } type AgentTypeAgentsConnection { edges: [AgentEdge!]! count: Int! pageInfo: PageInfo! } type AgentType implements RawId & Node { id: ID! rawId: ID! isCloud: Boolean! name: String environment: AgentEnvironment # Always empty in case this is a non-cloud AgentType cloudImage: CloudImage agentPool: AbstractAgentPool! # There may be no agents in case it is non cloud agent and it is dead. There also may be more than one agent in case this is a cloud agent type. agents: AgentTypeAgentsConnection } type Agent implements RawId & Node { id: ID! rawId: ID! name: String agentType: AgentType associatedBuildTypes(filter: AgentBuildTypesFilter): AssociatedAgentBuildTypesConnection dissociatedBuildTypes(filter: AgentBuildTypesFilter): DiassociatedAgentBuildTypesConnection authorized: Boolean enabled: Boolean connected: Boolean agentPool: AbstractAgentPool @deprecated(reason: "Use agentType.agentPool instead") environment: AgentEnvironment @deprecated(reason: "Use agentType.environment instead") } type ProjectEdge { node: Project! cursor: String! } type ProjectsConnection { edges: [ProjectEdge!]! count: Int! pageInfo: PageInfo! } type BuildTypeEdge { node: BuildType! cursor: String! } type BuildTypesConnection { edges: [BuildTypeEdge!]! pageInfo: PageInfo! count: Int! } type ProjectAgentPoolEdge { node: AbstractAgentPool! } type ProjectAgentPoolsConnection { edges: [ProjectAgentPoolEdge!]! } type ProjectPermissions { manageAgentPoolsForProject: Boolean } type Project implements RawId & Node { id: ID! rawId: ID! name: String ancestorProjects: ProjectsConnection buildTypes(first: Int, after: String): BuildTypesConnection agentPools: ProjectAgentPoolsConnection projectAgentPool: ProjectAgentPool archived: Boolean virtual: Boolean permissions: ProjectPermissions } input ProjectsFilter { archived: Boolean virtual: Boolean } type GlobalPermissions { manageAgentPools: Boolean } input AgentsFilter { authorized: Boolean } type AgentsConnection { edges: [AgentEdge!]! } type AgentPoolEdge { node: AbstractAgentPool! } type AgentPoolsConnection { edges: [AgentPoolEdge!]! } type AgentTypesConnection { edges: [AgentTypeEdge!]! } type Query { agent(id: ID!): Agent agents(filter: AgentsFilter): AgentsConnection # Returns only active agent types agentTypes: AgentTypesConnection agentPool(id: ID!): AbstractAgentPool agentPools: AgentPoolsConnection projects(filter: ProjectsFilter = {archived: false, virtual: false}, first: Int, after: String): ProjectsConnection globalPermissions: GlobalPermissions node(id: ID!): Node } input CreateAgentPoolInput { name: String! maxAgentsNumber: Int } type CreateAgentPoolPayload { agentPool: AgentPool } input UpdateAgentPoolInput { rawId: ID! name: String maxAgentsNumber: Int } type UpdateAgentPoolPayload { agentPool: AgentPool } input RemoveAgentPoolInput { agentPoolRawId: ID! } type ShallowAgentPool { rawId: ID! name: String } type RemoveAgentPoolPayload { agentPool: ShallowAgentPool } input SetAgentRunPolicyInput { agentRawId: ID! agentRunPolicy: AgentRunPolicy } type SetAgentRunPolicyPayload { agent: Agent } input AssignProjectWithAgentPoolInput { projectRawId: ID!, agentPoolRawId: ID! exclusively: Boolean = false } type AssignProjectWithAgentPoolPayload { project: Project, agentPool: AgentPool } input UnassignProjectFromAgentPoolInput { projectRawId: ID! agentPoolRawId: ID! recursive: Boolean! = false } type UnassignProjectFromAgentPoolPayload { project: Project, agentPool: AgentPool } input BulkAssignProjectWithAgentPoolInput { agentPoolRawId: ID! projectRawIds: [ID!]! exclusively: Boolean! = false } type BulkAssignProjectWithAgentPoolPayload { agentPool: AgentPool } input AssignBuildTypeWithAgentInput { agentRawId: ID!, buildTypeRawId: ID! } type AssignBuildTypeWithAgentPayload { agent: Agent, buildType: BuildType } input UnassignBuildTypeFromAgentInput { agentRawId: ID!, buildTypeRawId: ID! } type UnassignBuildTypeFromAgentPayload { agent: Agent, buildType: BuildType } input AssignProjectBuildTypesWithAgentInput { agentRawId: ID!, projectRawId: ID! } type AssignProjectBuildTypesWithAgentPayload { agent: Agent, project: Project } input UnassignProjectBuildTypesFromAgentInput { agentRawId: ID!, projectRawId: ID! } type UnassignProjectBuildTypesFromAgentPayload { agent: Agent, project: Project } input UnassignAllAgentBuildTypesInput { agentRawId: ID! } type UnassignAllAgentBuildTypesPayload { agent: Agent } input MoveAgentToAgentPoolInput { agentRawId: ID!, targetAgentPoolRawId: ID! } type MoveAgentToAgentPoolPayload { agent: Agent, sourceAgentPool: AgentPool, targetAgentPool: AgentPool } input BulkMoveAgentsToAgentPoolInput { agentRawIds: [ID!]!, targetAgentPoolRawId: ID! } type BulkMoveAgentsToAgentPoolPayload { agents: [Agent!], targetAgentPool: AgentPool } input MoveCloudImageToAgentPoolInput { agentTypeRawId: ID!, targetAgentPoolRawId: ID! } type MoveCloudImageToAgentPoolPayload { cloudImage: CloudImage, sourceAgentPool: AgentPool, targetAgentPool: AgentPool } input BulkMoveCloudImagesToAgentPoolInput { agentTypeRawIds: [ID!]!, targetAgentPoolRawId: ID! } type BulkMoveCloudImagesToAgentPoolPayload { cloudImages: [CloudImage!], targetAgentPool: AgentPool } input AuthorizeAgentInput { agentRawId: ID! reason: String targetAgentPoolRawId: ID } type AuthorizeAgentPayload { agent: Agent targetAgentPool: AbstractAgentPool } input UnauthorizeAgentInput { agentRawId: ID! reason: String } type UnauthorizeAgentPayload { agent: Agent } input BulkAuthorizeAgentsInput { agentRawIds: [ID!]! reason: String targetAgentPoolRawId: ID } type BulkAuthorizeAgentsPayload { agents: [Agent!]! targetAgentPool: AbstractAgentPool } type Mutation { createAgentPool(input: CreateAgentPoolInput): CreateAgentPoolPayload updateAgentPool(input: UpdateAgentPoolInput): UpdateAgentPoolPayload removeAgentPool(input: RemoveAgentPoolInput): RemoveAgentPoolPayload setAgentRunPolicy(input: SetAgentRunPolicyInput): SetAgentRunPolicyPayload authorizeAgent(input: AuthorizeAgentInput): AuthorizeAgentPayload unauthorizeAgent(input: UnauthorizeAgentInput): UnauthorizeAgentPayload bulkAuthorizeAgents(input: BulkAuthorizeAgentsInput): BulkAuthorizeAgentsPayload moveAgentToAgentPool(input: MoveAgentToAgentPoolInput): MoveAgentToAgentPoolPayload moveCloudImageToAgentPool(input: MoveCloudImageToAgentPoolInput): MoveCloudImageToAgentPoolPayload bulkMoveAgentsToAgentPool(input: BulkMoveAgentsToAgentPoolInput): BulkMoveAgentsToAgentPoolPayload bulkMoveCloudImagesToAgentPool(input: BulkMoveCloudImagesToAgentPoolInput): BulkMoveCloudImagesToAgentPoolPayload assignProjectWithAgentPool(input: AssignProjectWithAgentPoolInput): AssignProjectWithAgentPoolPayload unassignProjectFromAgentPool(input: UnassignProjectFromAgentPoolInput): UnassignProjectFromAgentPoolPayload bulkAssignProjectWithAgentPool(input: BulkAssignProjectWithAgentPoolInput): BulkAssignProjectWithAgentPoolPayload assignBuildTypeWithAgent(input: AssignBuildTypeWithAgentInput): AssignBuildTypeWithAgentPayload unassignBuildTypeFromAgent(input: UnassignBuildTypeFromAgentInput): UnassignBuildTypeFromAgentPayload assignProjectBuildTypesWithAgent(input: AssignProjectBuildTypesWithAgentInput): AssignProjectBuildTypesWithAgentPayload unassignProjectBuildTypesFromAgent(input: UnassignProjectBuildTypesFromAgentInput): UnassignProjectBuildTypesFromAgentPayload unassignAllAgentBuildTypes(input: UnassignAllAgentBuildTypesInput): UnassignAllAgentBuildTypesPayload } schema { query: Query mutation: Mutation }