- Definitions
- Data Types
- JSON Types
- Odoo | MailMail [Shared]
- Show
- REST API
Retrieve all existing Json data types:
Retrieve all existing Json data types you have previously created.
get https://cenit.io/api/v2/setup/json_data_type.json
tenant_access_key='...' tenant_access_token='...' curl -X GET \ -H "X-Tenant-Access-Key: ${tenant_access_key}" \ -H "X-Tenant-Access-Token: ${tenant_access_token}" \ -H "Content-Type: application/json" \ -d '{"page":1,"limit":25,"order":"id"}' \ "https://cenit.io/api/v2/setup/json_data_type.json"
$tenant_access_key = '...'; $tenant_access_token = '...'; $uri = "https://cenit.io/api/v2/setup/json_data_type.json"; $headers = array( "Content-Type: application/json", "X-Tenant-Access-Key: ${tenant_access_key}", "X-Tenant-Access-Token: ${tenant_access_token}" ); $options = array( 'http' => array( 'header' => implode($headers, "\r\n"), 'method' => 'GET', 'content' => '{"page":1,"limit":25,"order":"id"}' ) ); $context = stream_context_create($options); $response = file_get_contents($uri, false, $context); print_r(json_decode($response, true));
require 'rest-client' require 'json' tenant_access_key = '...' tenant_access_token = '...' response = RestClient::Request.execute( :url => "https://cenit.io/api/v2/setup/json_data_type.json", :method => 'GET', :payload => '{"page":1,"limit":25,"order":"id"}', :headers => { 'Content-Type' => 'application/json', 'X-Tenant-Access-Key' => tenant_access_key, 'X-Tenant-Access-Token' => tenant_access_token } ) puts JSON.parse(response.body)
import json from requests import Request, Session tenant_access_key = '...' tenant_access_token = '...' uri = 'https://cenit.io/api/v2/setup/json_data_type.json' % (tenant_access_key, tenant_access_token) options = { 'headers': { 'Content-Type': 'application/json', 'X-Tenant-Access-Key': tenant_access_key, 'X-Tenant-Access-Token': tenant_access_token }, 'data': json.dumps({"page":1,"limit":25,"order":"id"}) }; session = Session() request = Request('GET', uri, **options) prepped = request.prepare() response = session.send(prepped) print(response.json())
var request = require('request'), tenant_access_key = '...', tenant_access_token = '...', options = { method: 'GET', url: 'https://cenit.io/api/v2/setup/json_data_type.json', headers: { 'Content-Type': 'application/json', 'X-Tenant-Access-Key': tenant_access_key, 'X-Tenant-Access-Token': tenant_access_token }, json: true, qs: {"page":1,"limit":25,"order":"id"} }; request(options, function (error, response, data) { if (error) throw error; console.log(data); });
var tenant_access_key = '...', tenant_access_token = '...'; jQuery.ajax({ url: 'https://cenit.io/api/v2/setup/json_data_type.json', method: 'GET', dataType: 'json', crossOrigin: true, headers: { 'Content-Type': 'application/json', 'X-Tenant-Access-Key': tenant_access_key, 'X-Tenant-Access-Token': tenant_access_token }, data: {"page":1,"limit":25,"order":"id"}, success: function(data, textStatus, jqXHR) { console.log(data); } });
Create an Json data type:
Creates the specified Json data type. Any parameters not provided will be left unchanged.
post https://cenit.io/api/v2/setup/json_data_type.json
tenant_access_key='...' tenant_access_token='...' curl -X POST \ -H "X-Tenant-Access-Key: ${tenant_access_key}" \ -H "X-Tenant-Access-Token: ${tenant_access_token}" \ -H "Content-Type: application/json" \ -d '{"creator_id":{},"updater_id":{},"tenant_id":{},"namespace":"","name":"","title":"","snippet_id":{},"discard_additional_properties":false}' \ "https://cenit.io/api/v2/setup/json_data_type.json"
$tenant_access_key = '...'; $tenant_access_token = '...'; $uri = "https://cenit.io/api/v2/setup/json_data_type.json"; $headers = array( "Content-Type: application/json", "X-Tenant-Access-Key: ${tenant_access_key}", "X-Tenant-Access-Token: ${tenant_access_token}" ); $options = array( 'http' => array( 'header' => implode($headers, "\r\n"), 'method' => 'POST', 'content' => '{"creator_id":{},"updater_id":{},"tenant_id":{},"namespace":"","name":"","title":"","snippet_id":{},"discard_additional_properties":false}' ) ); $context = stream_context_create($options); $response = file_get_contents($uri, false, $context); print_r(json_decode($response, true));
require 'rest-client' require 'json' tenant_access_key = '...' tenant_access_token = '...' response = RestClient::Request.execute( :url => "https://cenit.io/api/v2/setup/json_data_type.json", :method => 'POST', :payload => '{"creator_id":{},"updater_id":{},"tenant_id":{},"namespace":"","name":"","title":"","snippet_id":{},"discard_additional_properties":false}', :headers => { 'Content-Type' => 'application/json', 'X-Tenant-Access-Key' => tenant_access_key, 'X-Tenant-Access-Token' => tenant_access_token } ) puts JSON.parse(response.body)
import json from requests import Request, Session tenant_access_key = '...' tenant_access_token = '...' uri = 'https://cenit.io/api/v2/setup/json_data_type.json' % (tenant_access_key, tenant_access_token) options = { 'headers': { 'Content-Type': 'application/json', 'X-Tenant-Access-Key': tenant_access_key, 'X-Tenant-Access-Token': tenant_access_token }, 'data': json.dumps({"creator_id":{},"updater_id":{},"tenant_id":{},"namespace":"","name":"","title":"","snippet_id":{},"discard_additional_properties":false}) }; session = Session() request = Request('POST', uri, **options) prepped = request.prepare() response = session.send(prepped) print(response.json())
var request = require('request'), tenant_access_key = '...', tenant_access_token = '...', options = { method: 'POST', url: 'https://cenit.io/api/v2/setup/json_data_type.json', headers: { 'Content-Type': 'application/json', 'X-Tenant-Access-Key': tenant_access_key, 'X-Tenant-Access-Token': tenant_access_token }, json: true, body: {"creator_id":{},"updater_id":{},"tenant_id":{},"namespace":"","name":"","title":"","snippet_id":{},"discard_additional_properties":false} }; request(options, function (error, response, data) { if (error) throw error; console.log(data); });
var tenant_access_key = '...', tenant_access_token = '...'; jQuery.ajax({ url: 'https://cenit.io/api/v2/setup/json_data_type.json', method: 'POST', dataType: 'json', crossOrigin: true, headers: { 'Content-Type': 'application/json', 'X-Tenant-Access-Key': tenant_access_key, 'X-Tenant-Access-Token': tenant_access_token }, data: JSON.stringify({"creator_id":{},"updater_id":{},"tenant_id":{},"namespace":"","name":"","title":"","snippet_id":{},"discard_additional_properties":false}), success: function(data, textStatus, jqXHR) { console.log(data); } });
Retrieve an existing Json data type:
Retrieves the details of an existing Json data type. You need only supply the unique Json data type identifier that was returned upon Json data type creation.
get https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a.json
tenant_access_key='...' tenant_access_token='...' curl -X GET \ -H "X-Tenant-Access-Key: ${tenant_access_key}" \ -H "X-Tenant-Access-Token: ${tenant_access_token}" \ -H "Content-Type: application/json" \ "https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a.json"
$tenant_access_key = '...'; $tenant_access_token = '...'; $uri = "https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a.json"; $headers = array( "Content-Type: application/json", "X-Tenant-Access-Key: ${tenant_access_key}", "X-Tenant-Access-Token: ${tenant_access_token}" ); $options = array( 'http' => array( 'header' => implode($headers, "\r\n"), 'method' => 'GET', ) ); $context = stream_context_create($options); $response = file_get_contents($uri, false, $context); print_r(json_decode($response, true));
require 'rest-client' require 'json' tenant_access_key = '...' tenant_access_token = '...' response = RestClient::Request.execute( :url => "https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a.json", :method => 'GET', :headers => { 'Content-Type' => 'application/json', 'X-Tenant-Access-Key' => tenant_access_key, 'X-Tenant-Access-Token' => tenant_access_token } ) puts JSON.parse(response.body)
from requests import Request, Session tenant_access_key = '...' tenant_access_token = '...' uri = 'https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a.json' % (tenant_access_key, tenant_access_token) options = { 'headers': { 'Content-Type': 'application/json', 'X-Tenant-Access-Key': tenant_access_key, 'X-Tenant-Access-Token': tenant_access_token }, }; session = Session() request = Request('GET', uri, **options) prepped = request.prepare() response = session.send(prepped) print(response.json())
var request = require('request'), tenant_access_key = '...', tenant_access_token = '...', options = { method: 'GET', url: 'https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a.json', headers: { 'Content-Type': 'application/json', 'X-Tenant-Access-Key': tenant_access_key, 'X-Tenant-Access-Token': tenant_access_token }, json: true, }; request(options, function (error, response, data) { if (error) throw error; console.log(data); });
var tenant_access_key = '...', tenant_access_token = '...'; jQuery.ajax({ url: 'https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a.json', method: 'GET', dataType: 'json', crossOrigin: true, headers: { 'Content-Type': 'application/json', 'X-Tenant-Access-Key': tenant_access_key, 'X-Tenant-Access-Token': tenant_access_token }, success: function(data, textStatus, jqXHR) { console.log(data); } });
Update an Json data type:
Updates the specified Json data type. Any parameters not provided will be left unchanged.
post https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a.json
tenant_access_key='...' tenant_access_token='...' curl -X POST \ -H "X-Tenant-Access-Key: ${tenant_access_key}" \ -H "X-Tenant-Access-Token: ${tenant_access_token}" \ -H "Content-Type: application/json" \ -d '{"creator_id":{},"updater_id":{},"tenant_id":{},"namespace":"","name":"","title":"","snippet_id":{},"discard_additional_properties":false}' \ "https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a.json"
$tenant_access_key = '...'; $tenant_access_token = '...'; $uri = "https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a.json"; $headers = array( "Content-Type: application/json", "X-Tenant-Access-Key: ${tenant_access_key}", "X-Tenant-Access-Token: ${tenant_access_token}" ); $options = array( 'http' => array( 'header' => implode($headers, "\r\n"), 'method' => 'POST', 'content' => '{"creator_id":{},"updater_id":{},"tenant_id":{},"namespace":"","name":"","title":"","snippet_id":{},"discard_additional_properties":false}' ) ); $context = stream_context_create($options); $response = file_get_contents($uri, false, $context); print_r(json_decode($response, true));
require 'rest-client' require 'json' tenant_access_key = '...' tenant_access_token = '...' response = RestClient::Request.execute( :url => "https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a.json", :method => 'POST', :payload => '{"creator_id":{},"updater_id":{},"tenant_id":{},"namespace":"","name":"","title":"","snippet_id":{},"discard_additional_properties":false}', :headers => { 'Content-Type' => 'application/json', 'X-Tenant-Access-Key' => tenant_access_key, 'X-Tenant-Access-Token' => tenant_access_token } ) puts JSON.parse(response.body)
import json from requests import Request, Session tenant_access_key = '...' tenant_access_token = '...' uri = 'https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a.json' % (tenant_access_key, tenant_access_token) options = { 'headers': { 'Content-Type': 'application/json', 'X-Tenant-Access-Key': tenant_access_key, 'X-Tenant-Access-Token': tenant_access_token }, 'data': json.dumps({"creator_id":{},"updater_id":{},"tenant_id":{},"namespace":"","name":"","title":"","snippet_id":{},"discard_additional_properties":false}) }; session = Session() request = Request('POST', uri, **options) prepped = request.prepare() response = session.send(prepped) print(response.json())
var request = require('request'), tenant_access_key = '...', tenant_access_token = '...', options = { method: 'POST', url: 'https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a.json', headers: { 'Content-Type': 'application/json', 'X-Tenant-Access-Key': tenant_access_key, 'X-Tenant-Access-Token': tenant_access_token }, json: true, body: {"creator_id":{},"updater_id":{},"tenant_id":{},"namespace":"","name":"","title":"","snippet_id":{},"discard_additional_properties":false} }; request(options, function (error, response, data) { if (error) throw error; console.log(data); });
var tenant_access_key = '...', tenant_access_token = '...'; jQuery.ajax({ url: 'https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a.json', method: 'POST', dataType: 'json', crossOrigin: true, headers: { 'Content-Type': 'application/json', 'X-Tenant-Access-Key': tenant_access_key, 'X-Tenant-Access-Token': tenant_access_token }, data: JSON.stringify({"creator_id":{},"updater_id":{},"tenant_id":{},"namespace":"","name":"","title":"","snippet_id":{},"discard_additional_properties":false}), success: function(data, textStatus, jqXHR) { console.log(data); } });
Delete an existing Json data type:
Permanently deletes an existing Json data type. It cannot be undone.
delete https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a.json
tenant_access_key='...' tenant_access_token='...' curl -X DELETE \ -H "X-Tenant-Access-Key: ${tenant_access_key}" \ -H "X-Tenant-Access-Token: ${tenant_access_token}" \ -H "Content-Type: application/json" \ "https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a.json"
$tenant_access_key = '...'; $tenant_access_token = '...'; $uri = "https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a.json"; $headers = array( "Content-Type: application/json", "X-Tenant-Access-Key: ${tenant_access_key}", "X-Tenant-Access-Token: ${tenant_access_token}" ); $options = array( 'http' => array( 'header' => implode($headers, "\r\n"), 'method' => 'DELETE', ) ); $context = stream_context_create($options); $response = file_get_contents($uri, false, $context); print_r(json_decode($response, true));
require 'rest-client' require 'json' tenant_access_key = '...' tenant_access_token = '...' response = RestClient::Request.execute( :url => "https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a.json", :method => 'DELETE', :headers => { 'Content-Type' => 'application/json', 'X-Tenant-Access-Key' => tenant_access_key, 'X-Tenant-Access-Token' => tenant_access_token } ) puts JSON.parse(response.body)
from requests import Request, Session tenant_access_key = '...' tenant_access_token = '...' uri = 'https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a.json' % (tenant_access_key, tenant_access_token) options = { 'headers': { 'Content-Type': 'application/json', 'X-Tenant-Access-Key': tenant_access_key, 'X-Tenant-Access-Token': tenant_access_token }, }; session = Session() request = Request('DELETE', uri, **options) prepped = request.prepare() response = session.send(prepped) print(response.json())
var request = require('request'), tenant_access_key = '...', tenant_access_token = '...', options = { method: 'DELETE', url: 'https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a.json', headers: { 'Content-Type': 'application/json', 'X-Tenant-Access-Key': tenant_access_key, 'X-Tenant-Access-Token': tenant_access_token }, json: true, }; request(options, function (error, response, data) { if (error) throw error; console.log(data); });
var tenant_access_key = '...', tenant_access_token = '...'; jQuery.ajax({ url: 'https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a.json', method: 'DELETE', dataType: 'json', crossOrigin: true, headers: { 'Content-Type': 'application/json', 'X-Tenant-Access-Key': tenant_access_key, 'X-Tenant-Access-Token': tenant_access_token }, success: function(data, textStatus, jqXHR) { console.log(data); } });
Retrieve one attribute of an existing Json data type:
Retrieves one attribute of an existing Json data type.
get https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a/{view}.json
tenant_access_key='...' tenant_access_token='...' view='...' curl -X GET \ -H "X-Tenant-Access-Key: ${tenant_access_key}" \ -H "X-Tenant-Access-Token: ${tenant_access_token}" \ -H "Content-Type: application/json" \ "https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a/${view}.json"
$tenant_access_key = '...'; $tenant_access_token = '...'; $view = '...'; $uri = "https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a/${view}.json"; $headers = array( "Content-Type: application/json", "X-Tenant-Access-Key: ${tenant_access_key}", "X-Tenant-Access-Token: ${tenant_access_token}" ); $options = array( 'http' => array( 'header' => implode($headers, "\r\n"), 'method' => 'GET', ) ); $context = stream_context_create($options); $response = file_get_contents($uri, false, $context); print_r(json_decode($response, true));
require 'rest-client' require 'json' tenant_access_key = '...' tenant_access_token = '...' view = '...' response = RestClient::Request.execute( :url => "https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a/#{view}.json", :method => 'GET', :headers => { 'Content-Type' => 'application/json', 'X-Tenant-Access-Key' => tenant_access_key, 'X-Tenant-Access-Token' => tenant_access_token } ) puts JSON.parse(response.body)
from requests import Request, Session tenant_access_key = '...' tenant_access_token = '...' view = '...' uri = 'https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a/%s.json' % (tenant_access_key, tenant_access_token, view) options = { 'headers': { 'Content-Type': 'application/json', 'X-Tenant-Access-Key': tenant_access_key, 'X-Tenant-Access-Token': tenant_access_token }, }; session = Session() request = Request('GET', uri, **options) prepped = request.prepare() response = session.send(prepped) print(response.json())
var request = require('request'), tenant_access_key = '...', tenant_access_token = '...', view = '...', options = { method: 'GET', url: 'https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a/${view}.json', headers: { 'Content-Type': 'application/json', 'X-Tenant-Access-Key': tenant_access_key, 'X-Tenant-Access-Token': tenant_access_token }, json: true, }; request(options, function (error, response, data) { if (error) throw error; console.log(data); });
var tenant_access_key = '...', tenant_access_token = '...', view = '...'; jQuery.ajax({ url: 'https://cenit.io/api/v2/setup/json_data_type/5bfd60c925d985266c00f03a/${view}.json', method: 'GET', dataType: 'json', crossOrigin: true, headers: { 'Content-Type': 'application/json', 'X-Tenant-Access-Key': tenant_access_key, 'X-Tenant-Access-Token': tenant_access_token }, success: function(data, textStatus, jqXHR) { console.log(data); } });
Basic info
- Namespace
- Odoo
- Title
- MailMail
- Name
- MailMail
- Storage size
- 0 Bytes
- Code warnings
-
The default snippet ref is pointing to Odoo | MailMail.json [Shared] and is actually the current code.
You're seeing the code from Odoo | MailMail.json [Shared] which is shared and therefore not editable. If you continue and save a new snippet will be created.
- Schema
- Discard additional properties
- ✓
- Id
- 5bfd60c925d985266c00f03a
- Created at
- November 27, 2018 15:20
- Updated at
- November 27, 2018 15:40