1. spp-ctl REST API

1.1. Overview

spp-ctl provides simple REST like API. It supports http only, not https.

1.1.1. Request and Response

Request body is JSON format. It is accepted both text/plain and application/json for the content-type header.

A response of GET is JSON format and the content-type is application/json if the request success.

$ curl http://127.0.0.1:7777/v1/processes
[{"type": "primary"}, ..., {"client-id": 2, "type": "vf"}]

$ curl -X POST http://localhost:7777/v1/vfs/1/components \
  -d '{"core": 2, "name": "fwd0_tx", "type": "forward"}'

If a request is failed, the response is a text which shows error reason and the content-type is text/plain.

1.1.2. Error code

spp-ctl does basic syntax and lexical check of a request.

Table 1.1 Error codes in spp-ctl.
Error Description
400 Syntax or lexical error, or SPP returns error for the request.
404 URL is not supported, or no SPP process of client-id in a URL.
500 System error occured in spp-ctl.