> For the complete documentation index, see [llms.txt](https://docs.graph.build/EGeX4aTAJLlpg9Hh8kfl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.graph.build/EGeX4aTAJLlpg9Hh8kfl/graph-writer/rest-api-endpoints.md).

# REST API Endpoints

In addition to the Process Endpoint designed for ingesting data into the Writer, there is a selection of built-in exposed endpoints for you to call.

<table data-header-hidden><thead><tr><th width="133.51171875"></th><th width="142.46875"></th><th></th><th></th></tr></thead><tbody><tr><td><strong>API</strong></td><td><strong>HTTP Request</strong></td><td><strong>URL / Body</strong></td><td><strong>Description</strong></td></tr><tr><td>Process</td><td>POST</td><td><code>/process</code> — body: <code>{ "inputFileURL": "&#x3C;input-file-url>" }</code></td><td>Tells the Writer to ingest the RDF or CSV file located at the specified URL.</td></tr><tr><td>Config</td><td>GET</td><td><code>/config</code></td><td>Displays all Writer configuration as JSON</td></tr><tr><td></td><td>GET</td><td><code>/config?paths=&#x3C;config-options></code></td><td>Displays all Writer configuration specified in param as a comma-separated list</td></tr><tr><td>Check Connection</td><td>GET</td><td><code>/checkConnection</code></td><td>Tests whether the Writer can establish a connection with the specific Knowledge Graph credentials</td></tr><tr><td>Update Config</td><td>PUT</td><td><code>/updateConfig?configEntry=&#x3C;config-entry>&#x26;configValue=&#x3C;config-value></code></td><td>Update configuration options on a running Writer</td></tr><tr><td>Upload Config Backup</td><td>PUT</td><td><code>/uploadConfigBackup</code></td><td>Uploads the current configuration to the specified config backup location so that it can be restored at a later date</td></tr><tr><td>License</td><td>GET</td><td><code>/license</code></td><td>Displays license information</td></tr><tr><td>Restart Kafka</td><td>GET</td><td><code>/restartKafka</code></td><td>Turns the Writer’s Kafka connection on or off depending on its current state.</td></tr></tbody></table>

### Config

The config endpoint is a GET request that allows you to view the configuration settings of a running Writer. By sending `GET http://<writer-ip>:<writer-port>/config` (for example `http://127.0.0.1:8080/config`), you will receive the entire configuration represented as a JSON object, as seen in this small snippet below.

```
 {
    "version": "2.1.0.0",
    "applicationName": "Graph-Writer",
    "friendlyName": "Graph-Writer",
    "graphBuildWriterConfig": {
        "provenance": {
            "recordProvo": false
        }..........

```

### Update Config

#### PUT `/updateConfig`

The configuration on running Writer can now be edited without having to restart. This is done through the update config endpoint. For example, by running the following `/updateConfig?configEntry=friendlyName&configValue=GraphBuilder` we have changed the friendly name of the Writer to GraphBuilder. To see a list of the configuration entry names, consult the Graph Writer [Configurable Options](/EGeX4aTAJLlpg9Hh8kfl/graph-writer/all-configuration-options.md).

### License

The license endpoint is a GET request that allows you to view information about your license key that is in use on a running Transformer or Writer. By sending `GET http://<writer-ip>:<writer-port>/license` (for example: `http://127.0.0.1:8080/license`), you will receive a JSON response containing the following values.

```
{
    "license": "# graphbuild License (id: xxx) xxxxxxxx",
    "licenseInformation": {
        "registeredTo": "Name - Company - email@example.com",
        "expires": "Thu Dec 31 00:01:00 GMT 2020 - (xxx days to go)",
        "productName": "graphbuild"
    },
    "validationStatus": "LICENSE_VALID"
}
```

### Process

#### POST `/process`

As previously [outlined](/EGeX4aTAJLlpg9Hh8kfl/graph-writer/ingesting-graph-data-rdf-and-csv.md), using the process endpoint is one way of triggering the Writer to ingest your source data. Send a `POST` to `/process` with `Content-Type: application/json` and a JSON body containing `inputFileURL`. When an execution of the Writer fails after being triggered in this way, the response will be a status `400 Bad Request` and contain a response message similar to that sent to the dead letter queue.

```
{
    "name": "Graph-Writer",
	"time": "2023-03-09T11:41:28.374",
	"type": "Graph-Writer",
	"error": "Record '/var/local/basic-rdf.xyz' could not be processed due to: u.c.d.w.e.GraphWriterExecutionException: Input file is of an invalid file type: (.xyz) - Expected nq.",
	"version": "2.1.0.0",
	"entity": "/var/local/basic-rdf.xyz"
}
```
