Step:1 sudo apt update sudo apt -y upgrade sudo apt autoremove Step:2 Install python 3.7 sudo apt install software-properties-common sudo add-apt-repository ppa:deadsnakes/ppa sudo apt update sudo apt install python3.7 Step:3 Install Dependency sudo apt-get install -y python3-testresources Step: 4 Install Python pip Tool wget https://bootstrap.pypa.io/get-pip.py sudo python3 get-pip.py sudo pip3 install --upgrade pip3 setuptools [ Alternative - Execute if the command above fails. 1) curl https://bootstrap.pypa.io/get-pip.py | python3 2) pip install --upgrade setuptools ] sudo pip3 install ansible Step:5 Install curl and yarn sudo apt -y install curl curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list sudo apt -y update && sudo apt -y install yarn Step: 6 Install MariaDB 10.4 sudo apt-get install software-properties-common sudo apt-key adv --recv-keys ...
Rest API in Frappe:
You can use a browser or postman to hit API
- Predefined APIs in Frappe:
- Create :(POST)
- To create any document with post request e.g.
- Localhost:8000/api/resource/{doctype}
- Read(GET):
- To get any document related to the mentioned doctype we can use the GETmethod followed by the document name. E.g.
- localhost:8000/api/resource/{doctype}/{name}
- Update(PUT):
- To create/update any document with specific name or required fieldname to be changed values.
- localhost:8000/api/resource/{doctype}/{name}
- Delete
- Custom APIs:
- With custom API we can create APIs which are not pre-defined.
- We can create all-new APIs or we can use resource APIs to generate different output or
- localhost:8000/api/method/{dotted path to the API starting from the second folderin application folder with application name}
- Where api/method is the method to call custom API and the rest of the URL is dottedpath to the custom API.
- Reference :
Comments
Post a Comment