Code Monkey home page Code Monkey logo

odoo-rest-api's Introduction

REST-API

AVAILABLE API

• Product
• Project
• Task
• Employees
• Departments
• Job Positions
• Employee Leaves

EMPLOYEE EXAMPLE

Fetch all employees using odoo REST API.

API

URL     :  http://<SERVER_URL>/get/api/1.0/get/list/employees
URL     :  http://<SERVER_URL>/get/api/1.0/get/employee/id/<EMPLOYEE_ID>
HEADER  :  {"Authorization", "OAuth <AUTH_TOKEN>"}

REQUEST

import urllib2

request = urllib2.Request('http://<SERVER_URL>/get/api/1.0/get/list/employees')
request.add_header("Authorization", "OAuth <AUTH_TOKEN>")
request = urllib2.urlopen(request)
result = request.read()

RESPONSE

{u'employees': [{u'active': True,
             u'city': False,
             u'coach_id': False,
             u'company_id': 1,
             u'country_id': False,
             u'department_id': 4,
             u'gender': u'male',
             u'id': 2,
             u'job_id': 2,
             u'marital': u'single',
             u'name': u'Antoine Langlais',
             u'user_id': False,
             u'work_phone': u'+3281813700'},
            {u'active': True,
             u'city': False,
             u'coach_id': False,
             u'company_id': 1,
             u'country_id': False,
             u'department_id': 1,
             u'gender': False,
             u'id': 12,
             u'job_id': 5,
             u'marital': False,
             u'name': u'Ashley Presley',
             u'user_id': False,
             u'work_phone': u'+3281813700'}]}

*Contact me for module

odoo-rest-api's People

Contributors

dbu-odoo avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

gulliverinv

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.