API
Description
Traffic Server Implements and exposes management calls using a JSONRPC API. This API is base on the following two things:
JSON format. Lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It's basically a collection of name/value pairs.
JSONRPC 2.0 protocol. Stateless, light-weight remote procedure call (RPC) protocol. Primarily this specification defines several data structures and the rules around their processing.
In order for programs to communicate with Traffic Server, the server exposes a JSONRRPC 2.0
API where programs can communicate with it.
Administrative API
This section describes how to interact with the administrative RPC API to interact with Traffic Server
Records
When interacting with the admin api, there are a few structures that need to be understood, this section will describe each of them.
RPC Record Request
To obtain information regarding a particular record(s) from Traffic Server, we should use the following fields in an unnamed json structure.
Field |
Type |
Description |
---|---|---|
|
|
The name we want to query from Traffic Server. This is |
|
|
The regular expression we want to query from Traffic Server. This is |
|
|
|
注釈
If record_name
and record_name_regex
are both provided, the server will not use any of them. Only one should be provided.
Example:
Single record:
{ "id":"2947819a-8563-4f21-ba45-bde73210e387", "jsonrpc":"2.0", "method":"admin_lookup_records", "params":[ { "record_name":"proxy.config.exec_thread.autoconfig.scale", "rec_types":[ 1, 16 ] } ] }
Multiple records:
{ "id": "ded7018e-0720-11eb-abe2-001fc69cc946", "jsonrpc": "2.0", "method": "admin_lookup_records", "params": [{ "record_name": "proxy.config.exec_thread.autoconfig.scale" }, { "record_name": "proxy.config.log.rolling_interval_sec", "rec_types": [1] } ] }
Batch Request
[ { "id": "ded7018e-0720-11eb-abe2-001fc69cc946", "jsonrpc": "2.0", "method": "admin_lookup_records", "params": [{ "record_name_regex": "proxy.config.exec_thread.autoconfig.scale", "rec_types": [1] }] }, { "id": "dam7018e-0720-11eb-abe2-001fc69dd123", "jsonrpc": "2.0", "method": "admin_lookup_records", "params": [{ "record_name_regex": "proxy.config.log.rolling_interval_sec", "rec_types": [1] }] } ]
RPC Record Response
When querying for a record(s), in the majority of the cases the record api will respond with the following json structure.
Field |
Type |
Description |
---|---|---|
|
|
A list of record object. See RecordRequestObject |
|
|
A list of error object. See RecordErrorObject |
RPC Record Error Object
All errors that are found during a record query, will be returned back to the caller in the error_list
field as part of the RecordResponse object.
The record errors have the following fields.
Field |
Type |
Description |
---|---|---|
|
|
|
|
|
|
|
|
|
Example:
1{ 2 "code": "2007", 3 "record_name": "proxy.config.exec_thread.autoconfig.scale" 4}
Examples:
Request a non existing record among with an invalid type for a record:
1{ 2 "id": "ded7018e-0720-11eb-abe2-001fc69cc946", 3 "jsonrpc": "2.0", 4 "method": "admin_lookup_records", 5 "params": [ 6 { 7 "record_name": "non.existing.record" 8 }, 9 { 10 "record_name": "proxy.process.http.total_client_connections_ipv4", 11 "rec_types": [1] 12 } 13 ] 14}
Line
7
requests a non existing record and in line11
we request a type that does not match the record's type.1{ 2 "jsonrpc":"2.0", 3 "result":{ 4 "errorList":[ 5 { 6 "code":"2000", 7 "record_name":"non.existing.record" 8 }, 9 { 10 "code":"2007", 11 "record_name":"proxy.process.http.total_client_connections_ipv4" 12 } 13 ] 14 }, 15 "id":"ded7018e-0720-11eb-abe2-001fc69cc946" 16}
In this case we get the response indicating that the requested fields couldn't be retrieved. See RecordErrorObject for more details.
The error list can also be included among with a recordList
1{ 2 "jsonrpc":"2.0", 3 "result":{ 4 "recordList":[] 5 ,"errorList":[ 6 { 7 "code":"2000", 8 "record_name":"non.existing.record" 9 }, 10 { 11 "code":"2007", 12 "record_name":"proxy.process.http.total_client_connections_ipv4" 13 } 14 ] 15 }, 16 "id":"ded7018e-0720-11eb-abe2-001fc69cc946" 17}
注釈
If there is no errors to report, the "errorList" field will be represented as an empty list (
[]
).
JSONRPC Record Errors
The following errors could be generated when requesting record from the server.
-
class RecordError
-
enumerator RECORD_NOT_FOUND = 2000
Record not found.
-
enumerator RECORD_NOT_CONFIG = 2001
Record is not a configuration type.
-
enumerator RECORD_NOT_METRIC = 2002
Record is not a metric type.
-
enumerator INVALID_RECORD_NAME = 2003
Invalid Record Name.
-
enumerator VALIDITY_CHECK_ERROR = 2004
Validity check failed.
-
enumerator GENERAL_ERROR = 2005
Error reading the record.
-
enumerator RECORD_WRITE_ERROR = 2006
Generic error while writing the record.
-
enumerator REQUESTED_TYPE_MISMATCH = 2007
The requested record's type does not match against the passed type list.
-
enumerator INVALID_INCOMING_DATA = 2008
This could be caused by an invalid value in the incoming request which may cause the parser to fail.
-
enumerator RECORD_NOT_FOUND = 2000
RPC Record Object
This is mapped from a RecRecord
, when requesting for a record the following information will be populated into a json object.
The record
structure has the following members.
Record Field |
Type |
Description |
---|---|---|
|
|
Current value that is held by the record. |
|
|
Record's default value. |
|
|
Record's name |
|
|
Record's order |
|
|
Records's overridable configuration. |
|
|
Raw Stat Block Id. |
|
|
Record type. Mapped from |
|
|
Record's data type. Mapped from RecDataT |
|
|
Record's version. |
|
object |
Stats metadata stats_meta |
|
object |
Config metadata config_meta |
it will be either
config_meta
orstats_meta
object, but never both*
Config Metadata
Record Field |
Type |
Description |
---|---|---|
access_type |
|
Access type. This is mapped from |
check_expr |
|
Syntax checks regular expressions. |
checktype |
|
Check type, This is mapped from |
source |
|
Source of the configuration value. Mapped from RecSourceT |
update_status |
|
Update status flag. |
update_type |
|
How the records get updated. Mapped from RecUpdateT |
Stats Metadata (TBC)
Record Field |
Type |
Description |
---|---|---|
persist_type |
|
Persistent type. This is mapped from |
Example with config meta:
1{ 2 "record":{ 3 "record_name":"proxy.config.diags.debug.tags", 4 "record_type":"3", 5 "version":"0", 6 "raw_stat_block":"0", 7 "order":"421", 8 "config_meta":{ 9 "access_type":"0", 10 "update_status":"0", 11 "update_type":"1", 12 "checktype":"0", 13 "source":"3", 14 "check_expr":"null" 15 }, 16 "record_class":"1", 17 "overridable":"false", 18 "data_type":"STRING", 19 "current_value":"rpc", 20 "default_value":"http|dns" 21 } 22}
Example with stats meta:
1 { 2 "record": { 3 "current_value": "0", 4 "data_type": "COUNTER", 5 "default_value": "0", 6 "order": "8", 7 "overridable": "false", 8 "raw_stat_block": "10", 9 "record_class": "2", 10 "record_name": "proxy.process.http.total_client_connections_ipv6", 11 "record_type": "4", 12 "stat_meta": { 13 "persist_type": "1" 14 }, 15 "version": "0" 16 } 17 }
JSONRPC API
Records
admin_lookup_records
method
Description
Obtain record(s) from TS.
Parameters
params
: A list of RecordRequest objects.
Result
A list of RecordResponse . In case of any error obtaining the requested record, the RecordErrorObject object will be included.
Examples
Request a configuration record, no errors:
{ "id":"b2bb16a5-135a-4c84-b0a7-8d31ebd82542", "jsonrpc":"2.0", "method":"admin_lookup_records", "params":[ { "record_name":"proxy.config.log.rolling_interval_sec", "rec_types":[ "1", "16" ] } ] }
Response:
{ "jsonrpc":"2.0", "result":{ "recordList":[ { "record":{ "record_name":"proxy.config.log.rolling_interval_sec", "record_type":"1", "version":"0", "raw_stat_block":"0", "order":"410", "config_meta":{ "access_type":"0", "update_status":"0", "update_type":"1", "checktype":"1", "source":"3", "check_expr":"^[0-9]+$" }, "record_class":"1", "overridable":"false", "data_type":"INT", "current_value":"86400", "default_value":"86400" } } ] ,"errorList":[] }, "id":"b2bb16a5-135a-4c84-b0a7-8d31ebd82542" }
Request a configuration record, some errors coming back:
{ "id": "ded7018e-0720-11eb-abe2-001fc69cc946", "jsonrpc": "2.0", "method": "admin_lookup_records", "params": [ { "rec_types": [1], "record_name": "proxy.config.log.rolling_interval_sec" }, { "record_name": "proxy.config.log.rolling_interv" } ] }
Response:
{ "jsonrpc":"2.0", "result":{ "recordList":[ { "record":{ "record_name":"proxy.config.log.rolling_interval_sec", "record_type":"1", "version":"0", "raw_stat_block":"0", "order":"410", "config_meta":{ "access_type":"0", "update_status":"0", "update_type":"1", "checktype":"1", "source":"3", "check_expr":"^[0-9]+$" }, "record_class":"1", "overridable":"false", "data_type":"INT", "current_value":"86400", "default_value":"86400" } } ], "errorList":[ { "code":"2000", "record_name":"proxy.config.log.rolling_interv" } ] }, "id":"ded7018e-0720-11eb-abe2-001fc69cc946" }
Request using a regex instead of the full name.
注釈
Regex lookups use record_name_regex` and not ``record_name
. Check RecordRequestObject .
Examples
Request a mix(config and stats) of records record using a regex, no errors:
{ "id": "ded7018e-0720-11eb-abe2-001fc69cc946", "jsonrpc": "2.0", "method": "admin_lookup_records", "params": [ { "rec_types": [1], "record_name_regex": "proxy.config.exec_thread.autoconfig.sca*" }, { "rec_types": [2], "record_name_regex": "proxy.process.http.total_client_connections_ipv" } ] }
Response:
{ "jsonrpc":"2.0", "result":{ "recordList":[ { "record":{ "record_name":"proxy.config.exec_thread.autoconfig.scale", "record_type":"2", "version":"0", "raw_stat_block":"0", "order":"355", "config_meta":{ "access_type":"2", "update_status":"0", "update_type":"2", "checktype":"0", "source":"3", "check_expr":"null" }, "record_class":"1", "overridable":"false", "data_type":"FLOAT", "current_value":"1", "default_value":"1" } }, { "record":{ "record_name":"proxy.process.http.total_client_connections_ipv4", "record_type":"4", "version":"0", "raw_stat_block":"9", "order":"7", "stat_meta":{ "persist_type":"1" }, "record_class":"2", "overridable":"false", "data_type":"COUNTER", "current_value":"0", "default_value":"0" } }, { "record":{ "record_name":"proxy.process.http.total_client_connections_ipv6", "record_type":"4", "version":"0", "raw_stat_block":"10", "order":"8", "stat_meta":{ "persist_type":"1" }, "record_class":"2", "overridable":"false", "data_type":"COUNTER", "current_value":"0", "default_value":"0" } } ] ,"errorList":[] }, "id":"ded7018e-0720-11eb-abe2-001fc69cc946" }
Request a configuration record using a regex with some errors coming back:
1{ 2 "id": "ded7018e-0720-11eb-abe2-001fc69cc946", 3 "jsonrpc": "2.0", 4 "method": "admin_lookup_records", 5 "params": [ 6 { 7 "rec_types": [1], 8 "record_name_regex": "proxy.config.exec_thread.autoconfig.sca*" 9 }, 10 { 11 "rec_types": [987], 12 "record_name_regex": "proxy.process.http.total_client_connections_ipv" 13 } 14 ] 15}
Note the invalid
rec_type
at line11
Response:
1{ 2 "jsonrpc":"2.0", 3 "result":{ 4 "recordList":[ 5 { 6 "record":{ 7 "record_name":"proxy.config.exec_thread.autoconfig.scale", 8 "record_type":"2", 9 "version":"0", 10 "raw_stat_block":"0", 11 "order":"355", 12 "config_meta":{ 13 "access_type":"2", 14 "update_status":"0", 15 "update_type":"2", 16 "checktype":"0", 17 "source":"3", 18 "check_expr":"null" 19 }, 20 "record_class":"1", 21 "overridable":"false", 22 "data_type":"FLOAT", 23 "current_value":"1", 24 "default_value":"1" 25 } 26 } 27 ], 28 "errorList":[ 29 { 30 "code":"2008", 31 "message":"Invalid request data provided" 32 } 33 ] 34 }, 35 "id":"ded7018e-0720-11eb-abe2-001fc69cc946" 36}
We get a valid record that was found based on the passed criteria,
proxy.config.exec_thread.autoconfig.sca*
and therec_type
1. Also we get a particular error that was caused by the invalid rec types987
Request all config records
1{ 2 "id": "ded7018e-0720-11eb-abe2-001fc69cc946", 3 "jsonrpc": "2.0", 4 "method": "admin_lookup_records", 5 "params": [{ 6 7 "record_name_regex": ".*", 8 "rec_types": [1, 16] 9 10 }] 11 12}
Note the `.*` regex we use to match them all. `rec_types` refer to ``RecT` , which in this case we are interested in `CONFIG` records and `LOCAL` records.
Response:
All the configuration records. See RecordResponse. The JSONRPC record handler is not limiting the response size.
注釈
It will retrieve ALL the configuration records, keep in mind that it might be a large response.
admin_config_set_records
method
Description
Set a value for a particular record.
Parameters
Field |
Type |
Description |
---|---|---|
|
|
The name of the record that wants to be updated. |
|
|
The associated record value. Use always a |
Example:
[ { "record_name": "proxy.config.exec_thread.autoconfig.scale", "record_value": "1.5" } ]
Result
A list of updated record names. JSONRPC Record Errors will be included.
Examples
Request:
1{
2 "id": "a32de1da-08be-11eb-9e1e-001fc69cc946",
3 "jsonrpc": "2.0",
4 "method": "admin_config_set_records",
5 "params": [
6 {
7 "record_name": "proxy.config.exec_thread.autoconfig.scale",
8 "record_value": "1.3"
9 }
10 ]
11}
Response:
1{
2 "jsonrpc":"2.0",
3 "result":[
4 {
5 "record_name":"proxy.config.exec_thread.autoconfig.scale"
6 }
7 ],
8 "id":"a32de1da-08be-11eb-9e1e-001fc69cc946"
9}
admin_config_reload
method
Description
Instruct Traffic Server to start the reloading process. You can find more information about config reload here(add link TBC)
Parameters
params
: Omitted
注釈
There is no need to add any parameters here.
Result
A string
with the success message indicating that the command was acknowledged by the server.
Examples
Request:
1{
2 "id": "89fc5aea-0740-11eb-82c0-001fc69cc946",
3 "jsonrpc": "2.0",
4 "method": "admin_config_reload"
5}
Response:
The response will contain the default success_response or a proper rpc error, check JSON RPC errors for mode details.
Validation:
You can request for the record proxy.process.proxy.reconfigure_time which will be updated with the time of the requested update.
Host
admin_host_set_status
Description
A record to track status is created for each host. The name is the host fqdn. This record contains the overall status and the status for each reason. The records may be viewed using the admin_host_get_status rpc api.
Parameters
Field |
Type |
Description |
---|---|---|
|
|
The name of the record that is meant to be updated. |
|
|
A list of hosts that we want to interact with. |
|
|
Reason for the operation. |
|
|
Set the duration of an operation to |
operation:
Field |
Type |
Description |
---|---|---|
|
|
Marks the listed hosts as |
|
|
Marks the listed hosts as down so that they will not be chosen as a next hop parent. If
|
reason:
Field |
Type |
Description |
---|---|---|
|
|
Set the active health check reason. |
|
|
Set the local health check reason. |
|
|
Set the administrative reason. This is the default reason if a reason is needed and not provided
by this option. If an invalid reason is provided |
Internally the reason can be self_detect
if
proxy.config.http.parent_proxy.self_detect
is set to the value 2 (the default). This is
used to prevent parent selection from creating a loop by selecting itself as the upstream by
marking this reason as "down" in that case.
注釈
The up / down status values are independent, and a host is consider available if and only if all of the statuses are "up".
Result
The response will contain the default success_response or an error. JSON RPC errors.
Examples
Request:
1{
2 "id": "c6d56fba-0cbd-11eb-926d-001fc69cc946",
3 "jsonrpc": "2.0",
4 "method": "admin_host_set_status",
5 "params": {
6 "operation": "up",
7 "host": ["host1"],
8 "reason": "manual",
9 "time": "100"
10 }
11}
Response:
1{
2 "jsonrpc": "2.0",
3 "result": "success",
4 "id": "c6d56fba-0cbd-11eb-926d-001fc69cc946"
5}
Getting the host status
Get the current status of the specified hosts with respect to their use as targets for parent selection. This returns the serialized information for the host.
Request:
1{
2 "id": "ded7018e-0720-11eb-abe2-001fc69cc946",
3 "jsonrpc": "2.0",
4 "method": "admin_host_get_status",
5 "params": [
6 "host1.mycdn.net"
7 ]
8}
Response:
1{
2 "jsonrpc": "2.0",
3 "id": "ded7018e-0720-11eb-abe2-001fc69cc946",
4 "result": {
5 "statusList": [{
6 "hostname": "host1.mycdn.net",
7 "status": "HOST_STATUS_DOWN,ACTIVE:UP:0:0,LOCAL:UP:0:0,MANUAL:UP:0:0,SELF_DETECT:DOWN:1646248306"
8 }
9 ]
10 ,"errorList":[]
11 }
12}
admin_server_stop_drain
method
Description
Stop the drain requests process. Recover server from the drain mode
Parameters
params
: Omitted
Result
The response will contain the default success_response or an error. JSON RPC errors.
Examples
1{
2 "id": "35f0b246-0cc4-11eb-9a79-001fc69cc946",
3 "jsonrpc": "2.0",
4 "method": "admin_server_stop_drain"
5}
admin_server_start_drain
method
Description
Drain TS requests.
Parameters
Field |
Type |
Description |
---|---|---|
|
|
Wait for new connections down to threshold before starting draining, |
Result
The response will contain the default success_response or an error. JSON RPC errors.
注釈
If the Server is already running a proper error will be sent back to the client.
Examples
Request:
1{
2 "id": "30700808-0cc4-11eb-b811-001fc69cc946",
3 "jsonrpc": "2.0",
4 "method": "admin_server_start_drain",
5 "params": {
6 "no_new_connections": "yes"
7 }
8}
Response could be either:
The response will contain the default success_response
Response from a server that is already in drain mode.
1{
2 "jsonrpc": "2.0",
3 "id": "30700808-0cc4-11eb-b811-001fc69cc946",
4 "error": {
5
6 "code": 9,
7 "message": "Error during execution",
8 "data": [{
9
10 "code": 3000,
11 "message": "Server already draining."
12 }]
13
14 }
15
16}
admin_plugin_send_basic_msg
method
Description
Interact with plugins. Send a message to plugins. All plugins that have hooked the TSLifecycleHookID::TS_LIFECYCLE_MSG_HOOK
will receive a callback for that hook.
The tag and data will be available to the plugin hook processing. It is expected that plugins will use tag to select relevant messages and determine the format of the data.
Parameters
Field |
Type |
Description |
---|---|---|
|
|
A tag name that will be read by the interested plugin |
|
|
Data to be send, this is |
Result
The response will contain the default success_response or an error. JSON RPC errors.
If plugins are not yet ready to handle any messages, then the following error will be set:
{
"error": {
"code": 9,
"message": "Error during execution",
"data": [
{
"code": 5000,
"message": "Plugin is not yet ready to handle any messages."
}
]
}
}
Examples
1{ 2 "id": "19095bf2-0d3b-11eb-b41a-001fc69cc946", 3 "jsonrpc": "2.0", 4 "method": "admin_plugin_send_basic_msg", 5 "params": { 6 "data": "ping", 7 "tag": "pong" 8 } 9}
admin_storage_get_device_status
method
Description
Show the storage configuration.
Parameters
A list of string
names for the specific storage we want to interact with. The storage identification used in the param list should match
exactly a path specified in storage.config
.
Result
cachedisk
Field |
Type |
Description |
---|---|---|
|
|
|
|
|
Disk status. |
|
|
Number of errors on the particular disk. |
Examples
Request:
1{
2 "id": "8574edba-0d40-11eb-b2fb-001fc69cc946",
3 "jsonrpc": "2.0",
4 "method": "admin_storage_get_device_status",
5 "params": ["/some/path/to/ats/trafficserver/cache.db", "/some/path/to/ats/var/to_remove/cache.db"]
6}
Response:
1{
2 "jsonrpc": "2.0",
3 "result": [{
4 "cachedisk": {
5 "path": "/some/path/to/ats/trafficserver/cache.db",
6 "status": "online",
7 "error_count": "0"
8 }
9 },
10 {
11 "cachedisk": {
12 "path": "/some/path/to/ats/var/to_remove/cache.db",
13 "status": "online",
14 "error_count": "0"
15 }
16 }
17 ],
18 "id": "8574edba-0d40-11eb-b2fb-001fc69cc946"
19}
admin_storage_set_device_offline
method
Description
Mark a cache storage device as offline
. The storage is identified by path which must match exactly a path specified in
storage.config
. This removes the storage from the cache and redirects requests that would have used this storage to
other storage. This has exactly the same effect as a disk failure for that storage. This does not persist across restarts of the
traffic_server process.
Parameters
A list of string
names for the specific storage we want to interact with. The storage identification used in the param list should match
exactly a path specified in storage.config
.
Result
A list of object which the following fields:
Field |
Type |
Description |
---|---|---|
|
|
Storage identification. The storage is identified by path which must match exactly a
path specified in |
|
|
A flag indicating if there is any online storage left after this operation. |
Examples
Request:
1{
2 "id": "53dd8002-0d43-11eb-be00-001fc69cc946",
3 "jsonrpc": "2.0",
4 "method": "admin_storage_set_device_offline",
5 "params": ["/some/path/to/ats/var/to_remove/cache.db"]
6}
Response:
1{
2 "jsonrpc": "2.0",
3 "result": [{
4 "path": "/some/path/to/ats/var/to_remove/cache.db",
5 "has_online_storage_left": "true"
6 }],
7 "id": "53dd8002-0d43-11eb-be00-001fc69cc946"
8}
show_registered_handlers
method
Description
List all the registered RPC public handlers.
Parameters
params
: Omitted
Result
An object with the following fields:
Field |
Type |
Description |
---|---|---|
|
|
A list of exposed method handler names. |
|
|
A list of exposed notification handler names. |
Examples
Request:
1{
2 "id": "f4477ac4-0d44-11eb-958d-001fc69cc946",
3 "jsonrpc": "2.0",
4 "method": "show_registered_handlers"
5}
Response:
1{
2 "id": "f4477ac4-0d44-11eb-958d-001fc69cc946",
3 "jsonrpc": "2.0",
4 "result": {
5 "methods": [
6 "admin_host_set_status",
7 "admin_server_stop_drain",
8 "admin_server_start_drain",
9 "admin_plugin_send_basic_msg",
10 "admin_lookup_records",
11 "admin_config_set_records",
12 "admin_storage_get_device_status",
13 "admin_storage_set_device_offline",
14 "admin_config_reload",
15 "show_registered_handlers"
16 ],
17 "notifications": []
18 }
19}
get_service_descriptor
method
Description
List and describe all the registered RPC handler.
Parameters
params
: Omitted
Result
An object with the following fields:
methods
object
Field |
Type |
Description |
---|---|---|
|
|
Handler's name. Call name |
|
|
Either 'method' or 'notification' |
|
|
Provider's information. |
|
|
A json-schema definition |
Examples
Request:
1{
2 "id": "f4477ac4-0d44-11eb-958d-001fc69cc946",
3 "jsonrpc": "2.0",
4 "method": "get_service_descriptor"
5}
Response:
1{
2"jsonrpc":"2.0",
3"result":{
4 "methods":[
5 {
6 "name":"admin_host_set_status",
7 "type":"method",
8 "provider":"Traffic Server JSONRPC 2.0 API",
9 "schema":{
10 }
11 },
12 {
13 "name":"some_plugin_call",
14 "type":"notification",
15 "provider":"ABC Plugin's details.",
16 "schema":{
17 }
18 }]
19 }
20}
filemanager.get_files_registry
method
Description
Fetch the registered config files within ATS. All configured files in the system will be retrieved by this API. This basically drops the FileManager binding files. File Manager keeps track of all the configured files in Traffic Server.
Parameters
params
: Omitted
Result
An list of object with the following fields:
config_registry
object:
Field |
Type |
Description |
---|---|---|
|
|
File path, includes the full path and the file name configured in the record config name(if it's the case) |
|
|
Internal record config variable name. |
|
|
Parent's configuration file name. e.g. If a top level remap.config includes additional mapping files, then the top level file will be set in this field. |
|
|
Elevated access needed. |
|
|
If it's required by Traffic Server. This specifies if Traffic Server treat this file as required to start the system(e.g. storage.config) |
Examples
Request:
1{
2 "id":"14c10697-5b09-40f6-b7e5-4be85f64aa5e",
3 "jsonrpc":"2.0",
4 "method":"filemanager.get_files_registry"
5}
Response:
1{
2 "jsonrpc":"2.0",
3 "result":{
4 "config_registry":[
5 {
6 "file_path":"/home/xyz/ats/etc/trafficserver/sni.yaml",
7 "config_record_name":"proxy.config.ssl.servername.filename",
8 "parent_config":"N/A",
9 "root_access_needed":"false",
10 "is_required":"false"
11 },
12 {
13 "file_path":"/home/xyz/ats/etc/trafficserver/storage.config",
14 "config_record_name":"",
15 "parent_config":"N/A",
16 "root_access_needed":"false",
17 "is_required":"true"
18 },
19 {
20 "file_path":"/home/xyz/ats/etc/trafficserver/jsonrpc3.yaml",
21 "config_record_name":"proxy.config.jsonrpc.filename",
22 "parent_config":"N/A",
23 "root_access_needed":"false",
24 "is_required":"false"
25 }
26 ]
27 }
28}