Giter Club home page Giter Club logo

Comments (3)

EdwinVW avatar EdwinVW commented on August 17, 2024

Hi @odidev.

You must specify the date of the workshop-planning on the URL. The JSON in the request should eb something like this:

{
  "jobId": "ec7432f4-f2a0-4534-8a7a-1b6a4b649dfb",
  "startTime": "2023-07-21T13:00:00",
  "endTime": "2023-07-21T14:00:00",
  "customerInfo": {
    "item1": "06d54189ecf549f983c6078cd9d300ae",
    "item2": "John Doe",
    "item3": "1234567890"
  },
  "vehicleInfo": {
    "item1": "81-XX-32",
    "item2": "Ford",
    "item3": "Fiesta"
  },
  "description": "General Maintenance",
  "messageId": "f1734ba1-82bb-46e8-bd77-8f46f6b3a741",
  "messageType": "PlanMaintenanceJob"
}

Obsiously, the Customer Id (item1 in the customerInfo tuple) and Vehicle Id (item1 in the vehicleInfo tuple) must correspond to an existing customer and vehicle.

This is the Curl command that I used to do a successful request using the Swagger UI:

curl -X 'POST' \
  'http://localhost:49659/api/WorkshopPlanning/2023-07-21/jobs' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json' \
  -d '{
  "jobId": "ec7432f4-f2a0-4534-8a7a-1b6a4b649dfb",
  "startTime": "2023-07-21T13:00:00",
  "endTime": "2023-07-21T14:00:00",
  "customerInfo": {
    "item1": "06d54189ecf549f983c6078cd9d300ae",
    "item2": "John Doe",
    "item3": "1234567890"
  },
  "vehicleInfo": {
    "item1": "81-XX-32",
    "item2": "Ford",
    "item3": "Fiesta"
  },
  "description": "General Maintenance",
  "messageId": "f1734ba1-82bb-46e8-bd77-8f46f6b3a741",
  "messageType": "PlanMaintenanceJob"
}'

I hope this helps.

from pitstop.

odidev avatar odidev commented on August 17, 2024

Thanks for the quick response @EdwinVW. It helped and now I am able to POST workshop data as well.

Also, if it's not too much to ask for can you also suggest how to clear the customer/vehicle data from webapp portal which gets stored there when we register any new customer/vehicle.

from pitstop.

EdwinVW avatar EdwinVW commented on August 17, 2024

Hi @odidev.

In the repo there's a SQL script to remove all the data. Editing or deleting data through the UI is not implemented (and will not be implemented). It would not add anything to the sample.

from pitstop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.