Create a resource
curl --request POST \
--url https://aquila.attaxr.com/api/constraints \
--header 'Content-Type: application/json' \
--cookie better-auth.session_token= \
--data '
{
"userId": "<string>",
"text": "<string>"
}
'const options = {
method: 'POST',
headers: {cookie: 'better-auth.session_token=', 'Content-Type': 'application/json'},
body: JSON.stringify({userId: '<string>', text: '<string>'})
};
fetch('https://aquila.attaxr.com/api/constraints', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://aquila.attaxr.com/api/constraints"
payload = {
"userId": "<string>",
"text": "<string>"
}
headers = {
"cookie": "better-auth.session_token=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"userId": "<string>",
"text": "<string>",
"enabled": true,
"createdAt": "<unknown>",
"updatedAt": "<unknown>"
}{
"error": "<string>",
"details": "<unknown>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Constraints
Create a resource
Creates a row owned by the calling user; userId is injected server-side and never taken from the body.
POST
/
api
/
constraints
Create a resource
curl --request POST \
--url https://aquila.attaxr.com/api/constraints \
--header 'Content-Type: application/json' \
--cookie better-auth.session_token= \
--data '
{
"userId": "<string>",
"text": "<string>"
}
'const options = {
method: 'POST',
headers: {cookie: 'better-auth.session_token=', 'Content-Type': 'application/json'},
body: JSON.stringify({userId: '<string>', text: '<string>'})
};
fetch('https://aquila.attaxr.com/api/constraints', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://aquila.attaxr.com/api/constraints"
payload = {
"userId": "<string>",
"text": "<string>"
}
headers = {
"cookie": "better-auth.session_token=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"userId": "<string>",
"text": "<string>",
"enabled": true,
"createdAt": "<unknown>",
"updatedAt": "<unknown>"
}{
"error": "<string>",
"details": "<unknown>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}
