-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathodoo-rpc.yaml
208 lines (198 loc) · 5.22 KB
/
odoo-rpc.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
swagger: '2.0'
info:
description: Odoo XML-RPC API Specification
version: 1.0.0
title: Odoo XML-RPC API
# put the contact info for your development or API team
contact:
email: [email protected]
license:
name: Apache 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
host: odoo.sociosmith.com
# all paths will be relative to the basePath specified
basePath: /xmlrpc/2
schemes:
- http
- https
securityDefinitions:
basicAuth:
type: basic
description: HTTP Basic Authentication. Works over `HTTP` and `HTTPS`
security:
- basicAuth: []
# Declare consumed MIME Types here
consumes:
# RPC specific media subtypes
- application/xml+rpc
produces:
- application/xml+rpc
# Global Header parameters will be here
parameters:
Access-Control-Allow-Origin:
name: Access-Control-Allow-Origin
description: Header to enable CORS requests
in: header
type: string
required: true
Access-Control-Allow-Headers:
name: Access-Control-Allow-Headers
in: header
description: Comma De-limited List of allowed headers
required: true
type: string
paths:
/object:
parameters:
- in: body
name: args
schema:
$ref: '#/definitions/RPCMethod'
post:
operationId: execute_kw
summary: Invoke methods of specified Odoo data models
responses:
200:
$ref: '#/responses/200'
401:
$ref: '#/responses/401'
402:
$ref: '#/responses/402'
429:
$ref: '#/responses/429'
502:
$ref: '#/responses/502'
504:
$ref: '#/responses/504'
/common/authenticate:
parameters:
- in: body
name: kwargs
schema:
$ref: '#/definitions/RPCAuthMethod'
post:
operationId: authenticate
summary: Perform basic Authentication for Odoo RPC
responses:
200:
$ref: '#/responses/200'
401:
$ref: '#/responses/401'
402:
$ref: '#/responses/402'
429:
$ref: '#/responses/429'
502:
$ref: '#/responses/502'
504:
$ref: '#/responses/504'
definitions:
RPCAuthMethod:
title: rpcAuthMethod
description: parameters to authenticate against with Odoo
required:
- username
- password
- database
properties:
database:
type: string
description: The intended Odoo database to connect to
username:
type: string
description: The username to log into Odoo with
password:
type: string
description: The password for the given Odoo username
RPCMethod:
title: rpcMethod
description: The parameters to be sent to Odoo's XML-RPC service
required:
- database
- userId
- password
- modelName
- methodName
properties:
database:
type: string
description: Database name to connect our client to
userId:
type: string
description: User ID from the Odoo ERP
password:
type: string
description: Password for the authorized Odoo RPC user
modelName:
type: string
description: The data Model you're accessing
methodName:
type: string
description: The method signature of the data model we are invoking
argsList:
type: array
description: A collection of arguments for methodName; they are parsed, according to position
items:
type: string
argsDict:
type: object
description: A dictionary / map of arguments, named according to the arg fields of methodName
Error:
title: error
required:
- type
properties:
type:
type: string
description: The type of error returned. Can be api_connection_error, api_error, authentication_error, card_error, invalid_request_error, or rate_limit_error.
message:
type: string
description: A human-readable message providing more details about the error. For card errors, these messages can be shown to your users.
code:
type: string
description: For card errors, a short string from amongst those listed on the right describing the kind of card error that occurred.
param:
type: string
description: The parameter the error relates to if the error is parameter-specific. You can use this to display a message near the correct form field, for example.
responses:
200:
description: OK
schema:
type: string
format: int32
400:
description: Bad Request
schema:
$ref: '#/definitions/Error'
401:
description: Unauthorized
schema:
$ref: '#/definitions/Error'
402:
description: Request Failed
schema:
$ref: '#/definitions/Error'
404:
description: Not Found
schema:
$ref: '#/definitions/Error'
409:
description: Conflict
schema:
$ref: '#/definitions/Error'
429:
description: Too Many Requests
schema:
$ref: '#/definitions/Error'
502:
description: Server Error
schema:
$ref: '#/definitions/Error'
503:
description: Server Error
schema:
$ref: '#/definitions/Error'
504:
description: Server Error
schema:
$ref: '#/definitions/Error'