The NoRFC web service allows you to search and view the noRFC documents holded in the noRFC documents database
The documents that marks "Private" status are available only after authorization. The documents with "Top Secret" status are not available for downloading. The rest of the documents are available for downloading without any restrictions
Returns information about database status and shows total number documents
# curl -v --insecure https://127.0.0.1:8732/info
> GET /info HTTP/1.1
> Host: 127.0.0.1:8732
> User-Agent: curl/7.68.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Tue, 17 Jan 2023 05:41:09 GMT
< Server: NoRFC/1.08
< Content-Length: 629
< Content-Type: application/json;charset=UTF-8
< X-Authorized: 0
<
{
"categories": [
"Informational",
"Experimental",
...,
"Etcetera"
],
"datadir": "/var/lib/norfc",
"dbdir": "/var/lib/norfc/db",
"documentroot": "/usr/share/norfc",
"dsn": "DBI:SQLite:dbname=/var/lib/norfc/norfc.db",
"homedir": "/var/lib/norfc",
"is_authorized": 0,
"maxstorefilesize": 1024,
"message": "OK",
"name": "info",
"status": 1,
"tempdir": "/tmp/norfc/server",
"total": 12,
"version": "1.08"
}
Format of the JSON response:
Returns information about specified noRFC document by its number
# curl -v --insecure https://127.0.0.1:8732/info/Draft-R202301125
> GET /info/Draft-R202301125 HTTP/1.1
> Host: 127.0.0.1:8732
> User-Agent: curl/7.68.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/json;charset=UTF-8
< Content-Length: 1500
< Server: NoRFC/1.08
< Date: Tue, 17 Jan 2023 08:15:15 GMT
<
{
"attributes": "columns=80; external=1",
"author": "Anonymous",
"category": "Etcetera",
"file": "/var/lib/norfc/db/2023/2023011/Draft-R202301125.raw",
"id": 10,
"md5": "ad988fc83f3d4c9ff4549a1a7c384440",
"message": "Found",
"num": "Draft-R202301125",
"obsoletes": [
"NoRFC-R202300945",
"NoRFC-R202300977",
"NoRFC-R202301011"
],
"pub": 1673424823,
"sha1": "...",
"sha256": "...",
"signature": "...",
"size": 1234,
"status": 1,
"title": "Test document",
"updates": [
"NoRFC-R202300963",
"NoRFC-R202301029"
]
}
Format of the JSON response:
This method performs getting file of the noRFC document by noRFC number
# curl -v --insecure https://127.0.0.1:8732/Draft-R202301125
> GET /Draft-R202301125 HTTP/1.1
> Host: 127.0.0.1:8732
> User-Agent: curl/7.68.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Tue, 17 Jan 2023 08:32:53 GMT
< Content-Type: text/plain; charset=utf-8
< Content-Length: 1539
< Server: NoRFC/1.08
<
Document : Draft-R202301125
...
This method performs getting source file of the noRFC document by noRFC number
# curl -v --insecure https://127.0.0.1:8732/Draft-R202301125.raw
> GET /Draft-R202301125.raw HTTP/1.1
> Host: 127.0.0.1:8732
> User-Agent: curl/7.68.0
> Accept: */*
>
< HTTP/1.1 200 OK
< ETag: "6b27eb9135ccb9acf82154e53427620c"
< Last-Modified: Tue, 17 Jan 2023 08:35:48 GMT
< Date: Tue, 17 Jan 2023 08:35:48 GMT
< Content-Length: 1240
< Server: NoRFC/1.08
< Content-Type: application/octet-stream
< Accept-Ranges: bytes
<
... content of the source file ...
Performs searching the noRFC documents by noRFC number
# curl -v --insecure https://127.0.0.1:8732/search?text=Test
> GET /search?text=Test HTTP/1.1
> Host: 127.0.0.1:8732
> User-Agent: curl/7.68.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Tue, 17 Jan 2023 08:42:08 GMT
< Content-Length: 1406
< Server: NoRFC/1.08
< Content-Type: application/json;charset=UTF-8
<
{
"count": 12,
"found": [
{
"category": "Etcetera",
"id": 3,
"n": 1,
"num": "NoRFC-R202300945",
"pub": 1673296160,
"title": "Test document"
},
...
],
"in": {
"category": "",
"text": "Test"
},
"message": "Found",
"page": 1,
"pages": 1,
"status": 1,
"total": 12
}
URL parameters of the query string (search criterias):
Format of the JSON response:
This GET method have the POST alternative:
# curl -v --insecure -F "text=Test" https://127.0.0.1:8732/search
This method performs generation a new noRFC document number. This method basic authentication required
# curl -v --insecure -u test:test "https://127.0.0.1:8732/gendocnum?year=2023&yday=123&type=NoRFC&status=R&nn=1"
> GET /gendocnum?year=2023&yday=123&type=NoRFC&status=R&nn=1 HTTP/1.1
> Host: 127.0.0.1:8732
> Authorization: Basic dGVzdDp0ZXN0
> User-Agent: curl/7.68.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Tue, 17 Jan 2023 09:45:35 GMT
< Content-Type: application/json;charset=UTF-8
< Content-Length: 124
< Server: NoRFC/1.08
<
{
"dkey": "2023-01-17",
"dotted": "2023.123.1.0",
"message": "OK",
"nn": 1,
"number": "NoRFC-R202312310",
"short": "202312310",
"status": "R",
"type": "NoRFC",
"yday": "123",
"year": 2023
}
URL parameters of the query string:
Format of the JSON response:
This method performs add the noRFC document to database. This method basic authentication required
# echo "Content of test document" > test.txt
# stat -c "%s" test.txt
# md5sum test.txt
# curl -v --insecure -X PUT -F "published=1673950709" -F "category=Test" -F "title=Test document" \
-F "author=Anonymous" -F "attributes=test=foo" -F "size=25" -F "md5=761e9f7b8769a84ad89c110871c3cf2f" \
-F "fileraw=@test.txt" -u test:test https://127.0.0.1:8732/NoRFC-R202312310
> PUT /NoRFC-R202312310 HTTP/1.1
> Host: 127.0.0.1:8732
> Authorization: Basic dGVzdDp0ZXN0
> User-Agent: curl/7.68.0
> Accept: */*
> Content-Length: 960
> Content-Type: multipart/form-data; boundary=...
>
< HTTP/1.1 200 OK
< Content-Type: application/json;charset=UTF-8
< Content-Length: 218
< Server: NoRFC/1.08
< Date: Tue, 17 Jan 2023 10:59:56 GMT
<
{
"attributes": "test=foo",
"author": "Anonymous",
"category": "Test",
"md5": "761e9f7b8769a84ad89c110871c3cf2f",
"message": "",
"number": "NoRFC-R202312310",
"published": "1673950709",
"size": "25",
"status": 1,
"title": "Test document"
}
PUT request form parameters:
Format of the JSON response:
This method performs delete the noRFC document from database. This method basic authentication required
# curl -v --insecure -X DELETE -u test:test https://127.0.0.1:8732/NoRFC-R202312310
> DELETE /NoRFC-R202312310 HTTP/1.1
> Host: 127.0.0.1:8732
> Authorization: Basic dGVzdDp0ZXN0
> User-Agent: curl/7.68.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: NoRFC/1.08
< Content-Length: 55
< Content-Type: application/json;charset=UTF-8
< Date: Tue, 17 Jan 2023 11:30:43 GMT
<
{
"message": "Ok",
"number": "NoRFC-R202312310",
"status": 1
}
Format of the JSON response:
This method performs add new relation to the noRFC document. This method basic authentication required
# curl -v --insecure -F "external=Draft-R202301125" -F "name=Updates" -u test:test https://127.0.0.1:8732/rel/NoRFC-R202312310
> POST /rel/NoRFC-R202312310 HTTP/1.1
> Host: 127.0.0.1:8732
> Authorization: Basic dGVzdDp0ZXN0
> User-Agent: curl/7.68.0
> Accept: */*
> Content-Length: 259
> Content-Type: multipart/form-data; boundary=...
>
< HTTP/1.1 200 OK
< Date: Tue, 17 Jan 2023 11:39:40 GMT
< Content-Type: application/json;charset=UTF-8
< Content-Length: 91
< Server: NoRFC/1.08
<
{
"external": "Draft-R202301125",
"id": 21,
"message": "",
"number": "NoRFC-R202312310",
"status": 1
}
Format of the JSON response:
This method returns relations of the noRFC document. This method basic authentication required
# curl -v --insecure -u test:test https://127.0.0.1:8732/rel/NoRFC-R202312310
> GET /rel/NoRFC-R202312310 HTTP/1.1
> Host: 127.0.0.1:8732
> Authorization: Basic dGVzdDp0ZXN0
> User-Agent: curl/7.68.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Tue, 17 Jan 2023 11:45:31 GMT
< Content-Length: 171
< Server: NoRFC/1.08
< Content-Type: application/json;charset=UTF-8
<
{
"external": "",
"message": "Found",
"number": "NoRFC-R202312310",
"relations": [
{
"external": "Draft-R202301125",
"id": 21,
"name": "Updates",
"number": "NoRFC-R202312310"
}
],
"status": 1
}
URL parameters of the query string:
Format of the JSON response:
This method performs delete relations of the noRFC document. This method basic authentication required
# curl -v --insecure -X DELETE -u test:test https://127.0.0.1:8732/rel/NoRFC-R202312310
> DELETE /rel/NoRFC-R202312310 HTTP/1.1
> Host: 127.0.0.1:8732
> Authorization: Basic dGVzdDp0ZXN0
> User-Agent: curl/7.68.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Tue, 17 Jan 2023 11:54:09 GMT
< Content-Type: application/json;charset=UTF-8
< Server: NoRFC/1.08
< Content-Length: 69
<
{
"external": "",
"message": "Ok",
"number": "NoRFC-R202312310",
"status": 1
}
URL parameters of the query string:
Format of the JSON response:
Returns current server environment variables in perl-dump format. This method available in debug mode of server only. Also this method basic authentication required
# curl -v --insecure -u test:test https://127.0.0.1:8732/env
> GET /env HTTP/1.1
> Host: 127.0.0.1:8732
> Authorization: Basic dGVzdDp0ZXN0
> User-Agent: curl/7.68.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Length: 2682
< Content-Type: text/plain; charset=utf-8
< Server: NoRFC/1.08
< Date: Tue, 17 Jan 2023 08:03:06 GMT
<
{
"HOME" => "/root",
"MOJO_LOG_LEVEL" => "debug",
"MOJO_MODE" => "development",
...
}