Skip to content
Snippets Groups Projects
Select Git revision
2 results Searching

examples.http

Blame
  • examples.http 876 B
    ### Create a powerplant
    POST http://localhost:8080/powerplants
    Content-Type: application/json
    
    {
      "name": "SolarPark1",
      "type": "SOLAR",
      "capacityProduction": 750
    }
    
    ### Create an offer
    POST http://localhost:8080/offers
    Content-Type: application/json
    
    {
      "market": "Réserve Primaire",
      "blocks": [
        {
          "startTime": "00:00",
          "endTime": "03:00",
          "production": 500.0,
          "floorPrice": 30.0
        },
        {
          "startTime": "03:00",
          "endTime": "06:00",
          "production": 50.0,
          "floorPrice": 28.0
        }
      ]
    }
    
    ### Get a powerplant by his ID
    GET http://localhost:8080/powerplants/1
    
    ### Get all powerplants from a market
    GET http://localhost:8080/powerplants?market=Réserve Primaire
    
    ### Get an offer by his ID
    GET http://localhost:8080/offers/1
    
    ### Get all offers of a market
    GET http://localhost:8080/offers?market=Réserve Secondaire