This handles creating and getting of simple register entries, as well as admin areas
and finding out whats currently in the register.
Developer Design Choices
Here is the list of choices we have made in the design of the register, that may not be noticeable from reading the specification.
1. Handling a Trailing /
The trailing / is not explicitly declared in the path OpenAPI specification,
mainly to reduce bloating the schema with duplicated fields and to reduce errors for autogenerating server code based on the specification.
For the ease of integration into different proxies such as NGINX
then a design decision has been taken to allow the register to handle them.
For example /reg and /reg/ are expected to give the same response, as are
/reg?limit=20 and /reg/?limit=20. In the
demo server
, this is achieved by stripping the trailing / from
the URL of any requests.
URL obj = new URL("/test");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
URL obj = new URL("/reg");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
Defaults to returning the most recently added entries based on the configuration of limit.
Query parameter summary (see definitions for defaults):
‘skip=N’ skips the first N entries of the returned results * ’limit=L’ return only L results. * ‘sort=ASC|DESC,CREATE|MODIFIED|ALPHABETICAL’ sorting. * ‘format=MrxIds|EntriesList’
The value of the limit query param (if specified) or the default value of limit (if unspecified in the query) or the maximum value that can be used in this system if the specified value was too big.
ยป queryId
string(uuid)
true
none
The id of the query that generated this list
ยป start
integer
true
none
The number of records skipped before returning this list
URL obj = new URL("/reg");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
URL obj = new URL("/reg/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
# You can also use wgetcurl -X POST /reg/{id} \
-H 'Content-Type: application/json'\
-H 'Accept: text/plain'\
-H 'Authorization: Bearer {access-token}'
1
2
3
4
POST /reg/{id} HTTP/1.1
Content-Type: application/json
Accept: text/plain
URL obj = new URL("/reg/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
URL obj = new URL("/regadmin/reg/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
URL obj = new URL("/regadmin/reg/{id}/help");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
clocked when there is one document per frame (MXF frame wrapping). embedded when the timing is inside the metadata document
treatAs
string
false
none
text when the metadata is treated like text (JSON, YAML, XML etc), binary when the document is treated as a blob by some application (machine data, word docs, pdf docs and the like)
expires
string
false
none
The UTC date+time when this entry may be removed from the register. If the property is missing then the entry never expires.
mrx
object
false
none
mrx controlled properties that enhance the metadata definition
ยป specification
string
false
none
none
ยป services
[object]
false
none
none
ยปยป API
string
false
none
none
ยปยป method
string
false
none
none
ยปยป metarexId
string
false
none
none
ยปยป APISchema
string
false
none
none
ยปยป output
string
false
none
none
ยปยป description
string
false
none
none
ยปยป serviceID
string
false
none
none
ยป mapping
object
false
none
none
ยปยป convertTypes
boolean
false
none
none
ยปยป MissedFieldsKey
string
false
none
none
ยปยป mappingDefinitions
object
false
none
none
ยปยปยป additionalProperties
[string]
false
none
none
extra
object
false
none
registrant controlled properties that enhance the metadata definition
The value of the limit query param (if specified) or the default value of limit (if unspecified in the query) or the maximum value that can be used in this system if the specified value was too big.
queryId
string(uuid)
true
none
The id of the query that generated this list
start
integer
true
none
The number of records skipped before returning this list
a valid semantic version for the running server as defined by semver.org
limitAllSchema
1
"ALL"
A value of ALL for limit will result in the maximum number of entries allowed by the system (max limit)
Properties
Name
Type
Required
Restrictions
Description
anonymous
string
false
none
A value of ALL for limit will result in the maximum number of entries allowed by the system (max limit)
Enumerated Values
Property
Value
anonymous
ALL
limitSchema
1
20
Properties
None
limitValueSchema
1
20
A limit can be an integer value indicating the maximum number of entries to return in a query. A limit value set greater than the system’s internal max limit value will be clamped to the max limit value number.
Properties
Name
Type
Required
Restrictions
Description
anonymous
integer
false
none
A limit can be an integer value indicating the maximum number of entries to return in a query. A limit value set greater than the system’s internal max limit value will be clamped to the max limit value number.
skipParamSchema
1
0
an integer of the number of items to skip in responses
Properties
Name
Type
Required
Restrictions
Description
anonymous
integer
false
none
an integer of the number of items to skip in responses
semVerSchema
1
"v0.5.1"
a valid semantic version as defined by semver.org
Properties
Name
Type
Required
Restrictions
Description
anonymous
string
false
none
a valid semantic version as defined by semver.org
sortParamSchema
1
"ASC"
A comma separated list of sortParamElementSchema values presented as an array to the server.
Properties
None
sortParamElementSchema
1
"ASC"
Valid keywords are described here - how the logic is applied is application specific. Recommended behaviour is that precedence is highest at the start of the query string and lowest at the end.
sort=ASC,MODIFIED,DESC,ALPHABETICAL
would result in sorting by ASC first, then MODIFIED. DESC and ALPHABETICAL are ignored because of mutual exclusivity rules.
Properties
Name
Type
Required
Restrictions
Description
anonymous
string
false
none
Valid keywords are described here - how the logic is applied is application specific. Recommended behaviour is that precedence is highest at the start of the query string and lowest at the end. sort=ASC,MODIFIED,DESC,ALPHABETICAL would result in sorting by ASC first, then MODIFIED. DESC and ALPHABETICAL are ignored because of mutual exclusivity rules.