Create a record
Create a record object.
- Python
- JavaScript
- Java
import requests
url = "http://www.lytecms.com/fields/fld_BxJPVIRa5Jd7rzdKgeIPlDAh"
payload = {"name": "name updated"}
headers = {
"Authorization": "Bearer <ACCESS_TOKEN>",
"Content-Type": "application/json"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'PUT',
headers: {
Authorization: 'Bearer <ACCESS_TOKEN>',
'Content-Type': 'application/json'
},
body: '{"name":"name updated"}'
};
fetch('http://www.lytecms.com/fields/fld_BxJPVIRa5Jd7rzdKgeIPlDAh', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
class HelloWorld {
public static void main(String args[]) {
System.out.println("Hello, World");
}
}
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
table | string | Yes | ID of the table |
fields | object | Yes | fields |
Request body example
{
"table": "tbl_tableid",
"fields": {
"text": "hello world",
"Article": "# Title \n## Subtitle \n *Bold* ",
"date": "2020-01-01",
"URL": [ {"link": "http://google.com", "text": "Google"} ],
"image": "http://xxxx.png",
"single select": "option 1",
"multiple selects": ["option 1", "option 2"],
"number": 123.456,
"checkbox": true
}
}