Push your master data into your business applications.
/vocabularies/api/public/get_vocabulary/
Header | Value | Description |
---|---|---|
Authorization |
Basic YOUR_AUTH_KEY |
Replace YOUR_AUTH_KEY with your user:pass encoded in base64 |
Cache-Control |
no-cache |
Disable caching |
Parameter | Format | Description |
---|---|---|
api_key |
ABCDEFGHIJKLMNOPQRSTUVWXYZABCD |
Owner team API key |
voc |
01234567-89ab-cdef-0123-456789abcdef |
Vocabulary UUID |
{
"found": true,
"messages": [
"Found vocabulary voc_name (voc_description)"
],
"vocabulary": {
"key0": {
"val0": "value00",
"val1": "value01",
"val2": "value02"
},
"key1": {
"val0": "value10",
"val1": "value11",
"val2": "value12"
}
}
}
curl -X GET \
'https://mastertables.athento.com/vocabularies/api/public/get_vocabulary/?api_key=SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI&vocabulary=9ade473b-1eb1-4970-843a-0d795ebae612' \
-H 'Authorization: Basic YOUR_AUTH_KEY' \
-H 'Cache-Control: no-cache'
var client = new RestClient("https://mastertables.athento.com/vocabularies/api/public/get_vocabulary/?api_key=SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI&vocabulary=9ade473b-1eb1-4970-843a-0d795ebae612");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Basic YOUR_AUTH_KEY");
request.AddHeader("Cache-Control", "no-cache");
IRestResponse response = client.Execute(request);
package main
import(
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://mastertables.athento.com/vocabularies/api/public/get_vocabulary/?api_key=SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI&vocabulary=9ade473b-1eb1-4970-843a-0d795ebae612"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic YOUR_AUTH_KEY")
req.Header.Add("Cache-Control", "no-cache")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://mastertables.athento.com/vocabularies/api/public/get_vocabulary/?api_key=SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI&vocabulary=9ade473b-1eb1-4970-843a-0d795ebae612")
.get()
.addHeader("Authorization", "Basic YOUR_AUTH_KEY")
.addHeader("Cache-Control", "no-cache")
.build();
Response response = client.newCall(request).execute();
var settings = {
"async": true,
"crossDomain": true,
"url": "https://mastertables.athento.com/vocabularies/api/public/get_vocabulary/?api_key=SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI&vocabulary=9ade473b-1eb1-4970-843a-0d795ebae612",
"method": "GET",
"headers": {
"Authorization": "Basic YOUR_AUTH_KEY",
"Cache-Control": "no-cache"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require("request");
var options = {
method: 'GET',
url: 'https://mastertables.athento.com/vocabularies/api/public/get_vocabulary/',
qs: {
api_key: 'SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI',
vocabulary: '9ade473b-1eb1-4970-843a-0d795ebae612'
},
headers: {
'Authorization': 'Basic YOUR_AUTH_KEY',
'Cache-Control': 'no-cache'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
$request = new HttpRequest();
$request->setUrl('https://mastertables.athento.com/vocabularies/api/public/get_vocabulary/');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData(array(
'api_key' => 'SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI',
'vocabulary' => '9ade473b-1eb1-4970-843a-0d795ebae612'
));
$request->setHeaders(array(
'Authorization' => 'Basic YOUR_AUTH_KEY',
'Cache-Control' => 'no-cache'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
import requests
url = "https://mastertables.athento.com/vocabularies/api/public/get_vocabulary/"
querystring = {
"api_key": "SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI",
"vocabulary": "9ade473b-1eb1-4970-843a-0d795ebae612"
}
headers = {
"Authorization": "Basic YOUR_AUTH_KEY",
"Cache-Control": "no-cache"
}
response = requests.request("GET", url, headers=headers, params=querystring)
print(response.text)
require 'uri'
require 'net/http'
url = URI("https://mastertables.athento.com/vocabularies/api/public/get_vocabulary/?api_key=SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI&vocabulary=9ade473b-1eb1-4970-843a-0d795ebae612")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic YOUR_AUTH_KEY'
request["Cache-Control"] = 'no-cache'
response = http.request(request)
puts response.read_body
import Foundation
let headers = [
"Authorization": "Basic YOUR_AUTH_KEY",
"Cache-Control": "no-cache"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://mastertables.athento.com/vocabularies/api/public/get_vocabulary/?api_key=SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI&vocabulary=9ade473b-1eb1-4970-843a-0d795ebae612")! as URL, cachePolicy: .useProtocolCachePolicy,timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
/vocabularies/api/public/add_entity/
Header | Value | Description |
---|---|---|
Authorization |
Basic YOUR_AUTH_KEY |
Replace YOUR_AUTH_KEY with your user:pass encoded in base64 |
Content-Type |
application/json |
Sent data type |
Cache-Control |
no-cache |
Disable caching |
{
"api_key": "YOUR_TEAM_API_KEY",
"voc": "YOUR_VOCABULARY_KEY",
"key": "new_key",
"values": {
"val0": "new_value0",
"val1": "new_value1",
"val2": "new_value2",
"val3": "new_value3",
"val4": "new_value4"
}
}
{
"created": true,
"messages": [
"Entity new_key created",
"Value val0 set to new_value0",
"Value val1 set to new_value1",
"Value val2 set to new_value2",
"Value val3 set to new_value3",
"Value val4 set to new_value4"
]
}
curl -X POST \
http://mastertables.athento.com/vocabularies/api/public/add_entity/ \
-H 'Authorization: Basic YOUR_AUTH_KEY' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"api_key": "SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI",
"voc": "9ade473b-1eb1-4970-843a-0d795ebae612",
"key": "new_key",
"values": {
"val0": "new_value0",
"val1": "new_value1",
"val2": "new_value2",
"val3": "new_value3",
"val4": "new_value4"
}
}'
var client = new RestClient("http://mastertables.athento.com/vocabularies/api/public/add_entity/");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Basic YOUR_AUTH_KEY");
request.AddHeader("Cache-Control", "no-cache");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("undefined", "{\n\t\"api_key\": \"SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI\",\n\t\"voc\": \"9ade473b-1eb1-4970-843a-0d795ebae612\",\n\t\"key\": \"new_key\",\n\t\"values\": {\n\t\t\"val0\": \"new_value0\",\n\t\t\"val1\": \"new_value1\",\n\t\t\"val2\": \"new_value2\",\n\t\t\"val3\": \"new_value3\",\n\t\t\"val4\": \"new_value4\"\n\t}\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "http://mastertables.athento.com/vocabularies/api/public/add_entity/"
payload := strings.NewReader("{\n\t\"api_key\": \"SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI\",\n\t\"voc\": \"9ade473b-1eb1-4970-843a-0d795ebae612\",\n\t\"key\": \"new_key\",\n\t\"values\": {\n\t\t\"val0\": \"new_value0\",\n\t\t\"val1\": \"new_value1\",\n\t\t\"val2\": \"new_value2\",\n\t\t\"val3\": \"new_value3\",\n\t\t\"val4\": \"new_value4\"\n\t}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Cache-Control", "no-cache")
req.Header.Add("Authorization", "Basic YOUR_AUTH_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n\t\"api_key\": \"SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI\",\n\t\"voc\": \"9ade473b-1eb1-4970-843a-0d795ebae612\",\n\t\"key\": \"new_key\",\n\t\"values\": {\n\t\t\"val0\": \"new_value0\",\n\t\t\"val1\": \"new_value1\",\n\t\t\"val2\": \"new_value2\",\n\t\t\"val3\": \"new_value3\",\n\t\t\"val4\": \"new_value4\"\n\t}\n}");
Request request = new Request.Builder()
.url("http://mastertables.athento.com/vocabularies/api/public/add_entity/")
.post(body)
.addHeader("Content-Type", "application/json")
.addHeader("Cache-Control", "no-cache")
.addHeader("Authorization", "Basic YOUR_AUTH_KEY")
.build();
Response response = client.newCall(request).execute();
var settings = {
"async": true,
"crossDomain": true,
"url": "http://mastertables.athento.com/vocabularies/api/public/add_entity/",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Authorization": "Basic YOUR_AUTH_KEY"
},
"processData": false,
"data": "{\n\t\"api_key\": \"SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI\",\n\t\"voc\": \"9ade473b-1eb1-4970-843a-0d795ebae612\",\n\t\"key\": \"new_key\",\n\t\"values\": {\n\t\t\"val0\": \"new_value0\",\n\t\t\"val1\": \"new_value1\",\n\t\t\"val2\": \"new_value2\",\n\t\t\"val3\": \"new_value3\",\n\t\t\"val4\": \"new_value4\"\n\t}\n}"
}
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require("request");
var options = {
method: 'POST',
url: 'http://mastertables.athento.com/vocabularies/api/public/add_entity/',
headers: {
'Authorization': 'Basic YOUR_AUTH_KEY',
'Cache-Control': 'no-cache',
'Content-Type': 'application/json'
},
body: {
api_key: 'SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI',
voc: '9ade473b-1eb1-4970-843a-0d795ebae612',
key: 'new_key',
values: {
val0: 'new_value0',
val1: 'new_value1',
val2: 'new_value2',
val3: 'new_value3',
val4: 'new_value4'
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
$request = new HttpRequest();
$request->setUrl('http://mastertables.athento.com/vocabularies/api/public/add_entity/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders(array(
'Authorization' => 'Basic YOUR_AUTH_KEY',
'Cache-Control' => 'no-cache',
'Content-Type' => 'application/json'
));
$request->setBody('{
"api_key": "SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI",
"voc": "9ade473b-1eb1-4970-843a-0d795ebae612",
"key": "new_key",
"values": {
"val0": "new_value0",
"val1": "new_value1",
"val2": "new_value2",
"val3": "new_value3",
"val4": "new_value4"
}
}');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
import requests
url = "http://mastertables.athento.com/vocabularies/api/public/add_entity/"
payload = "{\n\t\"api_key\": \"SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI\",\n\t\"voc\": \"9ade473b-1eb1-4970-843a-0d795ebae612\",\n\t\"key\": \"new_key\",\n\t\"values\": {\n\t\t\"val0\": \"new_value0\",\n\t\t\"val1\": \"new_value1\",\n\t\t\"val2\": \"new_value2\",\n\t\t\"val3\": \"new_value3\",\n\t\t\"val4\": \"new_value4\"\n\t}\n}"
headers = {
'Content-Type': "application/json",
'Cache-Control': "no-cache",
'Authorization': "Basic YOUR_AUTH_KEY"
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
require 'uri'
require 'net/http'
url = URI("http://mastertables.athento.com/vocabularies/api/public/add_entity/")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request["Cache-Control"] = 'no-cache'
request["Authorization"] = 'Basic YOUR_AUTH_KEY'
request.body = "{\n\t\"api_key\": \"SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI\",\n\t\"voc\": \"9ade473b-1eb1-4970-843a-0d795ebae612\",\n\t\"key\": \"new_key\",\n\t\"values\": {\n\t\t\"val0\": \"new_value0\",\n\t\t\"val1\": \"new_value1\",\n\t\t\"val2\": \"new_value2\",\n\t\t\"val3\": \"new_value3\",\n\t\t\"val4\": \"new_value4\"\n\t}\n}"
response = http.request(request)
puts response.read_body
import Foundation
let headers = [
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Authorization": "Basic YOUR_AUTH_KEY"
]
let parameters = [
"api_key": "SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI",
"voc": "9ade473b-1eb1-4970-843a-0d795ebae612",
"key": "new_key",
"values": [
"val0": "new_value0",
"val1": "new_value1",
"val2": "new_value2",
"val3": "new_value3",
"val4": "new_value4"
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "http://mastertables.athento.com/vocabularies/api/public/add_entity/")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
/vocabularies/api/public/edit_entity/
Header | Value | Description |
---|---|---|
Authorization |
Basic YOUR_AUTH_KEY |
Replace YOUR_AUTH_KEY with your user:pass encoded in base64 |
Content-Type |
application/json |
Sent data type |
Cache-Control |
no-cache |
Disable caching |
{
"api_key": "YOUR_TEAM_API_KEY",
"voc": "YOUR_VOCABULARY_KEY",
"key": "edit_key",
"values": {
"val0": "new_value0",
"val1": "new_value1",
"val2": "new_value2",
"val3": "new_value3",
"val4": "new_value4"
}
}
{
"edit": true,
"messages": [
"Entity edit_key modified",
"Value val0 changed from pre0 to new_value0",
"Value val1 changed from pre1 to new_value1",
"Value val2 changed from pre2 to new_value2",
"Value val3 changed from pre3 to new_value3",
"Value val4 changed from pre4 to new_value4"
]
}
curl -X POST \
http://mastertables.athento.com/vocabularies/api/public/edit_entity/ \
-H 'Authorization: Basic YOUR_AUTH_KEY' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{
"api_key": "SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI",
"voc": "9ade473b-1eb1-4970-843a-0d795ebae612",
"key": "edit_key",
"values": {
"val0": "new_value0",
"val1": "new_value1",
"val2": "new_value2",
"val3": "new_value3",
"val4": "new_value4"
}
}'
var client = new RestClient("http://mastertables.athento.com/vocabularies/api/public/edit_entity/");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Basic YOUR_AUTH_KEY");
request.AddHeader("Cache-Control", "no-cache");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("undefined", "{\n\t\"api_key\": \"SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI\",\n\t\"voc\": \"9ade473b-1eb1-4970-843a-0d795ebae612\",\n\t\"key\": \"edit_key\",\n\t\"values\": {\n\t\t\"val0\": \"new_value0\",\n\t\t\"val1\": \"new_value1\",\n\t\t\"val2\": \"new_value2\",\n\t\t\"val3\": \"new_value3\",\n\t\t\"val4\": \"new_value4\"\n\t}\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "http://mastertables.athento.com/vocabularies/api/public/edit_entity/"
payload := strings.NewReader("{\n\t\"api_key\": \"SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI\",\n\t\"voc\": \"9ade473b-1eb1-4970-843a-0d795ebae612\",\n\t\"key\": \"edit_key\",\n\t\"values\": {\n\t\t\"val0\": \"new_value0\",\n\t\t\"val1\": \"new_value1\",\n\t\t\"val2\": \"new_value2\",\n\t\t\"val3\": \"new_value3\",\n\t\t\"val4\": \"new_value4\"\n\t}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Cache-Control", "no-cache")
req.Header.Add("Authorization", "Basic YOUR_AUTH_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n\t\"api_key\": \"SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI\",\n\t\"voc\": \"9ade473b-1eb1-4970-843a-0d795ebae612\",\n\t\"key\": \"edit_key\",\n\t\"values\": {\n\t\t\"val0\": \"new_value0\",\n\t\t\"val1\": \"new_value1\",\n\t\t\"val2\": \"new_value2\",\n\t\t\"val3\": \"new_value3\",\n\t\t\"val4\": \"new_value4\"\n\t}\n}");
Request request = new Request.Builder()
.url("http://mastertables.athento.com/vocabularies/api/public/edit_entity/")
.post(body)
.addHeader("Content-Type", "application/json")
.addHeader("Cache-Control", "no-cache")
.addHeader("Authorization", "Basic YOUR_AUTH_KEY")
.build();
Response response = client.newCall(request).execute();
var settings = {
"async": true,
"crossDomain": true,
"url": "http://mastertables.athento.com/vocabularies/api/public/edit_entity/",
"method": "POST",
"headers": {
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Authorization": "Basic YOUR_AUTH_KEY"
},
"processData": false,
"data": "{\n\t\"api_key\": \"SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI\",\n\t\"voc\": \"9ade473b-1eb1-4970-843a-0d795ebae612\",\n\t\"key\": \"edit_key\",\n\t\"values\": {\n\t\t\"val0\": \"new_value0\",\n\t\t\"val1\": \"new_value1\",\n\t\t\"val2\": \"new_value2\",\n\t\t\"val3\": \"new_value3\",\n\t\t\"val4\": \"new_value4\"\n\t}\n}"
}
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require("request");
var options = {
method: 'POST',
url: 'http://mastertables.athento.com/vocabularies/api/public/edit_entity/',
headers: {
'Authorization': 'Basic YOUR_AUTH_KEY',
'Cache-Control': 'no-cache',
'Content-Type': 'application/json'
},
body: {
api_key: 'SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI',
voc: '9ade473b-1eb1-4970-843a-0d795ebae612',
key: 'edit_key',
values: {
val0: 'new_value0',
val1: 'new_value1',
val2: 'new_value2',
val3: 'new_value3',
val4: 'new_value4'
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
$request = new HttpRequest();
$request->setUrl('http://mastertables.athento.com/vocabularies/api/public/edit_entity/');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders(array(
'Authorization' => 'Basic YOUR_AUTH_KEY',
'Cache-Control' => 'no-cache',
'Content-Type' => 'application/json'
));
$request->setBody('{
"api_key": "SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI",
"voc": "9ade473b-1eb1-4970-843a-0d795ebae612",
"key": "edit_key",
"values": {
"val0": "new_value0",
"val1": "new_value1",
"val2": "new_value2",
"val3": "new_value3",
"val4": "new_value4"
}
}');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
import requests
url = "http://mastertables.athento.com/vocabularies/api/public/edit_entity/"
payload = "{\n\t\"api_key\": \"SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI\",\n\t\"voc\": \"9ade473b-1eb1-4970-843a-0d795ebae612\",\n\t\"key\": \"edit_key\",\n\t\"values\": {\n\t\t\"val0\": \"new_value0\",\n\t\t\"val1\": \"new_value1\",\n\t\t\"val2\": \"new_value2\",\n\t\t\"val3\": \"new_value3\",\n\t\t\"val4\": \"new_value4\"\n\t}\n}"
headers = {
'Content-Type': "application/json",
'Cache-Control': "no-cache",
'Authorization': "Basic YOUR_AUTH_KEY"
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
require 'uri'
require 'net/http'
url = URI("http://mastertables.athento.com/vocabularies/api/public/edit_entity/")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request["Cache-Control"] = 'no-cache'
request["Authorization"] = 'Basic YOUR_AUTH_KEY'
request.body = "{\n\t\"api_key\": \"SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI\",\n\t\"voc\": \"9ade473b-1eb1-4970-843a-0d795ebae612\",\n\t\"key\": \"edit_key\",\n\t\"values\": {\n\t\t\"val0\": \"new_value0\",\n\t\t\"val1\": \"new_value1\",\n\t\t\"val2\": \"new_value2\",\n\t\t\"val3\": \"new_value3\",\n\t\t\"val4\": \"new_value4\"\n\t}\n}"
response = http.request(request)
puts response.read_body
import Foundation
let headers = [
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Authorization": "Basic YOUR_AUTH_KEY"
]
let parameters = [
"api_key": "SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI",
"voc": "9ade473b-1eb1-4970-843a-0d795ebae612",
"key": "edit_key",
"values": [
"val0": "new_value0",
"val1": "new_value1",
"val2": "new_value2",
"val3": "new_value3",
"val4": "new_value4"
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "http://mastertables.athento.com/vocabularies/api/public/edit_entity/")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
/vocabularies/api/public/custom_fetch/
Header | Value | Description |
---|---|---|
Authorization |
Basic YOUR_AUTH_KEY |
Replace YOUR_AUTH_KEY with your user:pass encoded in base64 |
Cache-Control |
no-cache |
Disable caching |
Parameter | Format | Description |
---|---|---|
api_key |
ABCDEFGHIJKLMNOPQRSTUVWXYZABCD |
Owner team API key |
voc |
01234567-89ab-cdef-0123-456789abcdef |
Vocabulary UUID |
method |
round-robin | random |
'round-robin' iterates the keys in a circular manner, 'random' |
{
"found": true,
"messages": [
"Fetched from vocabulary voc_name (voc_description)"
],
"key": "entity_key",
"values": {
"val0": "value00",
"val1": "value01",
"val2": "value02"
}
}
curl -X GET \
'https://mastertables.athento.com/vocabularies/api/public/custom_fetch/?api_key=SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI&vocabulary=9ade473b-1eb1-4970-843a-0d795ebae612&method=YOUR_METHOD' \
-H 'Authorization: Basic YOUR_AUTH_KEY' \
-H 'Cache-Control: no-cache'
var client = new RestClient("https://mastertables.athento.com/vocabularies/api/public/custom_fetch/?api_key=SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI&vocabulary=9ade473b-1eb1-4970-843a-0d795ebae612&method=YOUR_METHOD");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Basic YOUR_AUTH_KEY");
request.AddHeader("Cache-Control", "no-cache");
IRestResponse response = client.Execute(request);
package main
import(
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://mastertables.athento.com/vocabularies/api/public/custom_fetch/?api_key=SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI&vocabulary=9ade473b-1eb1-4970-843a-0d795ebae612&method=YOUR_METHOD"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic YOUR_AUTH_KEY")
req.Header.Add("Cache-Control", "no-cache")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://mastertables.athento.com/vocabularies/api/public/custom_fetch/?api_key=SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI&vocabulary=9ade473b-1eb1-4970-843a-0d795ebae612&method=YOUR_METHOD")
.get()
.addHeader("Authorization", "Basic YOUR_AUTH_KEY")
.addHeader("Cache-Control", "no-cache")
.build();
Response response = client.newCall(request).execute();
var settings = {
"async": true,
"crossDomain": true,
"url": "https://mastertables.athento.com/vocabularies/api/public/custom_fetch/?api_key=SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI&vocabulary=9ade473b-1eb1-4970-843a-0d795ebae612&method=YOUR_METHOD",
"method": "GET",
"headers": {
"Authorization": "Basic YOUR_AUTH_KEY",
"Cache-Control": "no-cache"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
var request = require("request");
var options = {
method: 'GET',
url: 'https://mastertables.athento.com/vocabularies/api/public/custom_fetch/',
qs: {
api_key: 'SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI',
vocabulary: '9ade473b-1eb1-4970-843a-0d795ebae612',
method: 'YOUR_METHOD'
},
headers: {
'Authorization': 'Basic YOUR_AUTH_KEY',
'Cache-Control': 'no-cache'
}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
$request = new HttpRequest();
$request->setUrl('https://mastertables.athento.com/vocabularies/api/public/custom_fetch/');
$request->setMethod(HTTP_METH_GET);
$request->setQueryData(array(
'api_key' => 'SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI',
'vocabulary' => '9ade473b-1eb1-4970-843a-0d795ebae612',
'method' => 'YOUR_METHOD'
));
$request->setHeaders(array(
'Authorization' => 'Basic YOUR_AUTH_KEY',
'Cache-Control' => 'no-cache'
));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
import requests
url = "https://mastertables.athento.com/vocabularies/api/public/custom_fetch/"
querystring = {
"api_key": "SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI",
"vocabulary": "9ade473b-1eb1-4970-843a-0d795ebae612",
"method": "YOUR_METHOD"
}
headers = {
"Authorization": "Basic YOUR_AUTH_KEY",
"Cache-Control": "no-cache"
}
response = requests.request("GET", url, headers=headers, params=querystring)
print(response.text)
require 'uri'
require 'net/http'
url = URI("https://mastertables.athento.com/vocabularies/api/public/custom_fetch/?api_key=SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI&vocabulary=9ade473b-1eb1-4970-843a-0d795ebae612&method=YOUR_METHOD")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic YOUR_AUTH_KEY'
request["Cache-Control"] = 'no-cache'
response = http.request(request)
puts response.read_body
import Foundation
let headers = [
"Authorization": "Basic YOUR_AUTH_KEY",
"Cache-Control": "no-cache"
]
let request = NSMutableURLRequest(url: NSURL(string: "https://mastertables.athento.com/vocabularies/api/public/custom_fetch/?api_key=SNMGCQPIBSMJFBPOUJRDVLRMXAPYSI&vocabulary=9ade473b-1eb1-4970-843a-0d795ebae612&method=YOUR_METHOD")! as URL, cachePolicy: .useProtocolCachePolicy,timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()