POST api/Object?model={model}&method={method}&objID={objID}

Executes a method with one parameter/Führt eine Methode in Odoo mit einem Parameter aus

Request Information

Parameters

NameDescriptionAdditional information
model
The model name of the table/Modellname der Tabelle
            Example: hr.holidays.status

Define this parameter in the request URI.

method
Name of the method/Name der Methode
            Example: get_days

Define this parameter in the request URI.

objID
ID of the object for which the method is called/ID des Datensatzes für den die Methode ausgeführt wird
            Example: 1

Define this parameter in the request URI.

inputData
Contains the authentication token from Login and the ids as strings for the method call/Enthält den Anmeldetoken und die IDs für den Methodenaufruf

Define this parameter in the request body.

Request body formats

application/json, text/json

Sample:
{
  "AuthToken": "your authentication token",
  "IDs": [
    "1",
    "2",
    "3"
  ]
}

application/xml, text/xml

Sample:
<ExecuteMethodRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/openErpRestApi.Models">
  <AuthToken>your authentication token</AuthToken>
  <IDs xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>1</d2p1:string>
    <d2p1:string>2</d2p1:string>
    <d2p1:string>3</d2p1:string>
  </IDs>
</ExecuteMethodRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Response body formats

application/json, text/json

Sample:
{
  "city": "city1",
  "street": "street1",
  "name": "name1"
}

application/xml, text/xml

Sample:
<ArrayOfKeyValueOfanyTypeanyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
  <KeyValueOfanyTypeanyType>
    <Key xmlns:d3p1="http://www.w3.org/2001/XMLSchema" i:type="d3p1:string">name</Key>
    <Value xmlns:d3p1="http://www.w3.org/2001/XMLSchema" i:type="d3p1:string">name1</Value>
  </KeyValueOfanyTypeanyType>
  <KeyValueOfanyTypeanyType>
    <Key xmlns:d3p1="http://www.w3.org/2001/XMLSchema" i:type="d3p1:string">street</Key>
    <Value xmlns:d3p1="http://www.w3.org/2001/XMLSchema" i:type="d3p1:string">street1</Value>
  </KeyValueOfanyTypeanyType>
  <KeyValueOfanyTypeanyType>
    <Key xmlns:d3p1="http://www.w3.org/2001/XMLSchema" i:type="d3p1:string">city</Key>
    <Value xmlns:d3p1="http://www.w3.org/2001/XMLSchema" i:type="d3p1:string">city1</Value>
  </KeyValueOfanyTypeanyType>
</ArrayOfKeyValueOfanyTypeanyType>