Skip to main content

Fetch fields from OpenSPP V1 (Odoo)

Authenticates to Odoo via JSON-RPC and returns the field metadata for the given model. Blocks requests to private IP ranges and cloud metadata endpoints (SSRF mitigation).

Request

Method: POST
Path: /api/openspp-fields/fetch

Authentication: Not required

Request Body

Content Type: application/json

Schema: See component schemas below

Responses

200 - Fields

400 - Missing credentials or URL points at a private/internal range

500 - Failed to fetch from Odoo

Examples

cURL

curl -X POST \
-H "Content-Type: application/json" \
http://localhost:3000/api/openspp-fields/fetch \
-d '{"example": "data"}'

JavaScript

const response = await fetch('http://localhost:3000/api/openspp-fields/fetch', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
// Request data
}),
});

const data = await response.json();
console.log(data);

This documentation is automatically generated from the OpenAPI specification.