Git Product home page Git Product logo

delta_project's Introduction

DELTA_PROJECT

Use url localhost:8080/api/post_office

GET METHODS

/api/post_office/all

returns all the data in a json Format

/api/post_office?Officetype=B.O&Dstats=Delivery

returns post office data (the data consists of all the info of post office given in the querry parameters) with having officetype as B.O and deliverystatus as Delivery If the data is not present for the given query parameters it returns an empty String

Querry parameters:

id

Officename

Pincode

Officetype

Dstats (deliverystatus)

Divname (division name)

Regname (Region name)

Circlename

Taluk

Distname (district name)

Statename

Phnum (Telephone number)

RHO (Regional Head Office)

RSO (Regional Sub Ofiice)

All the querry parameters are strings except for id which integer

DELETE METHOD

/api/post_office/id

/api/post_office/2

returns the JSON object of deleted post office of id 2

{ "Officename":"BEERNADI B.O",

"Pincode":"631502",

"Officetype": "B.O",

"Dstats": "DELIVERY",

"Divname": "ADILABAD",

"Regname": "HYDERABAD",

"Circlename": "ANDHRA PRADESH",

"Taluk": "CHENNUR",

"Distname": "ADILABAD",

"Statename": "TELANGANA",

"Phnum": "08733-279530",

"RHO": "JAINOOR S.O",

"RSO": "MANCHERIAL H.O"

"id": 2

}

if the id given is not present or is aldready deleted { 'data':"not existing" }

The above json object is returned

POST METHOD:

/api/post_office

It should contain a json body with all info specified in querry parameters except id.

http://0.0.0.0:32783/api/post_office

JSON body: {

"Officename":"Beernandi B.O",

"Pincode":"631502",

"Officetype": "b.o",

"Dstats": "delivery",

"Divname": "Adilabad",

"Regname": "Hyderabad",

"Circlename": "Andhra Pradesh",

"Taluk": "Chennur",

"Distname": "Adilabad",

"Statename": "TELANGANA",

"Phnum": "08733-279530",

"RHO": "Jainoor S.O",

"RSO": "Mancherial H.O"

}

It returns the json object of the posted data along with it's id

The above data returns the below JSON object

{

 "Officename":"BEERNADI B.O",

 "Pincode":"631502",

 "Officetype": "B.O",

 "Dstats": "DELIVERY",

 "Divname": "ADILABAD",

 "Regname": "HYDERABAD",

 "Circlename": "ANDHRA PRADESH",

 "Taluk": "CHENNUR",

 "Distname": "ADILABAD",

 "Statename": "TELANGANA",

 "Phnum": "08733-279530",

 "RHO": "JAINOOR S.O",

 "RSO": "MANCHERIAL H.O"

 "id": 154798

}

PUT METHOD:

/api/post_office/id

http://0.0.0.0:32783/api/post_office/154798

JSON body:

{

"Officename":"BERNADI",

"Pincode":"631501",

"Officetype": "H.O"

}

It should contain a json body only with parameters to be changed

It returns the json object of the changed data

{ "Officename":"BERNADI",

 "Pincode":"631501",

 "Officetype": "H.O",

 "Dstats": "DELIVERY",

 "Divname": "ADILABAD",

 "Regname": "HYDERABAD",

 "Circlename": "ANDHRA PRADESH",

 "Taluk": "CHENNUR",

 "Distname": "ADILABAD",

 "Statename": "TELANGANA",

 "Phnum": "08733-279530",

 "RHO": "JAINOOR S.O",

 "RSO": "MANCHERIAL H.O"

 "id": 154798

}

if the id given is not present or is deleted

{ 'data':"not existing" }

The above json object is returned

Use the below command to run multiple containers of api service

docker-compose up --build --scale api=2

delta_project's People

Contributors

tharun-b777 avatar

Watchers

 avatar

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.