curl --request POST \
--url https://api.eddy.engineer/v1/practice.remember \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"choice": "<string>",
"code": "<string>",
"created_at": "<string>",
"why": "<string>",
"actor": "<string>",
"scope": {}
}
'import requests
url = "https://api.eddy.engineer/v1/practice.remember"
payload = {
"choice": "<string>",
"code": "<string>",
"created_at": "<string>",
"why": "<string>",
"actor": "<string>",
"scope": {}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
choice: '<string>',
code: '<string>',
created_at: '<string>',
why: '<string>',
actor: '<string>',
scope: {}
})
};
fetch('https://api.eddy.engineer/v1/practice.remember', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eddy.engineer/v1/practice.remember",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'choice' => '<string>',
'code' => '<string>',
'created_at' => '<string>',
'why' => '<string>',
'actor' => '<string>',
'scope' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eddy.engineer/v1/practice.remember"
payload := strings.NewReader("{\n \"choice\": \"<string>\",\n \"code\": \"<string>\",\n \"created_at\": \"<string>\",\n \"why\": \"<string>\",\n \"actor\": \"<string>\",\n \"scope\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eddy.engineer/v1/practice.remember")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"choice\": \"<string>\",\n \"code\": \"<string>\",\n \"created_at\": \"<string>\",\n \"why\": \"<string>\",\n \"actor\": \"<string>\",\n \"scope\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/practice.remember")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"choice\": \"<string>\",\n \"code\": \"<string>\",\n \"created_at\": \"<string>\",\n \"why\": \"<string>\",\n \"actor\": \"<string>\",\n \"scope\": {}\n}"
response = http.request(request)
puts response.read_body{
"adopted": true,
"candidate": {},
"item_id": "<string>",
"pack_key": "<string>",
"rev": "<string>",
"said": "<string>",
"state": "<string>"
}Remember a person's answer to a typed question as a candidate for their organisation's practice (R8)
“Remember this for my organisation” (the chat’s chip, after a person answers a typed question). The answer is written as a candidate row into the organisation’s practice pack in work: the pack in work, else a new revision of the one in force, else a new pack (our-practice). The row carries by, the person, bound to the caller. One answer per question and scope: a newer one replaces it. Nothing is adopted: the practice in force is unchanged until an organisation admin adopts the revision (/v1/practice.adopt). A candidate in a revision not adopted is shown to its proposer and the organisation’s admins only (D10). A person’s act: an API key is refused (HUMAN_GATE_NEEDS_HUMAN, 403) and so is an agent actor. The code, choice and scope are checked as an imported pack’s are (PRACTICE_CODE_UNKNOWN, PRACTICE_CHOICE_UNKNOWN, PRACTICE_SCOPE); an empty why is PRACTICE_WHY. The answer is the import’s, with candidate, adopted: false and said. The answer names no pack_key to a member while the stored head holds another’s candidate (D10).
curl --request POST \
--url https://api.eddy.engineer/v1/practice.remember \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"choice": "<string>",
"code": "<string>",
"created_at": "<string>",
"why": "<string>",
"actor": "<string>",
"scope": {}
}
'import requests
url = "https://api.eddy.engineer/v1/practice.remember"
payload = {
"choice": "<string>",
"code": "<string>",
"created_at": "<string>",
"why": "<string>",
"actor": "<string>",
"scope": {}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
choice: '<string>',
code: '<string>',
created_at: '<string>',
why: '<string>',
actor: '<string>',
scope: {}
})
};
fetch('https://api.eddy.engineer/v1/practice.remember', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eddy.engineer/v1/practice.remember",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'choice' => '<string>',
'code' => '<string>',
'created_at' => '<string>',
'why' => '<string>',
'actor' => '<string>',
'scope' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eddy.engineer/v1/practice.remember"
payload := strings.NewReader("{\n \"choice\": \"<string>\",\n \"code\": \"<string>\",\n \"created_at\": \"<string>\",\n \"why\": \"<string>\",\n \"actor\": \"<string>\",\n \"scope\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eddy.engineer/v1/practice.remember")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"choice\": \"<string>\",\n \"code\": \"<string>\",\n \"created_at\": \"<string>\",\n \"why\": \"<string>\",\n \"actor\": \"<string>\",\n \"scope\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/practice.remember")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"choice\": \"<string>\",\n \"code\": \"<string>\",\n \"created_at\": \"<string>\",\n \"why\": \"<string>\",\n \"actor\": \"<string>\",\n \"scope\": {}\n}"
response = http.request(request)
puts response.read_body{
"adopted": true,
"candidate": {},
"item_id": "<string>",
"pack_key": "<string>",
"rev": "<string>",
"said": "<string>",
"state": "<string>"
}