Skip to main content
Version: Next

Hosting Capacity Mutations API

The Hosting Capacity Mutations of the GraphQL API grants the ability to execute and cancel hosting capacity work packages and generate diffs between two work packages. The GraphQL API is served at /api/graphql.

Queries

The Hosting Capacity Mutations component of the GraphQL API comprises the following queries:

  • runWorkPackage(input: GqlWorkPackageInput, workPackageName: String): [ID]: runs a hosting capacity work package and returns its ID.
  • cancelWorkPackage(workPackageId: ID): [ID]: cancels a hosting capacity work package and returns its ID.
  • generateNetworkPerformanceDiff(workPackageId1: ID, workPackageId2: ID, scenario: String?, feeder: String?, year: Int?): [Number of Entries generated for this diff_ID]: generate and store the differences of network performance metrics between two work packages and returns the number of entries generated with the ID of this diff package.
  • generateEnhancedNetworkPerformanceDiff(workPackageId1: ID, workPackageId2: ID, scenario: String?, feeder: String?, year: Int?, season: String?, timeOfDay: String?): [Number of Entries generated for this diff_ID]: generate and store the differences of enhanced network performance metrics between two work packages and returns the number of entries generated with the ID of this diff package.

Example queries

Some example queries:

mutation {
generateNetworkPerformanceDiff(workPackageId1: "id1", workPackageId2: "id2", scenario: null, feeder: "feeder", year: 2023)
}
mutation {
generateEnhancedNetworkPerformanceDiff(workPackageId1: "id1", workPackageId2: "id2", scenario: null, feeder: null, year: 2023, season: "summer", timeOfDay: "solar_day")
}

Expected Values

season : summer | winter | yearly | sprint | autumn
timeOfDay : night | all | solar_day | day