For a RESTful API to work, all you really need to do is to have a program that responds to web requests. That can actually be achieved quite easily if you are willing to run basic CGI and you can use Apache's default settings to get you going immediately.
For example the following C program generated the output that follows.
#include <unistd.h>
#include <stdio.h>
extern char **environ;
void main (int argc, char* argv[]) {
printf("Content-Type: text/html\n\n");
printf("<html> <head>\n");
printf("<title>Hello, world!</title>");
printf("</head>\n");
printf("<body>\n");
printf("<h1>Hello, world!</h1>\n");
printf("<ul>");
int i = 0;
while(environ[i]) {
printf("<li>%s</li>\n", environ[i++]);
}
printf("</ul>");
printf("</body> </html>\n");
}
Then I compiled the code to a file called sample which I put in /var/www/cgi-bin and then I called up http://localhost/cgi-bin/sample?a=100&b=test which produced the following (roughly):
Hello, world!
UNIQUE_ID=VlWFh2o2Wu4o73LCT4efZgAAAAk
HTTP_HOST=192.168.1.12
HTTP_CONNECTION=keep-alive
HTTP_ACCEPT=text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_UPGRADE_INSECURE_REQUESTS=1
HTTP_USER_AGENT=Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36
HTTP_ACCEPT_ENCODING=gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE=en-GB,en-US;q=0.8,en;q=0.6
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
SERVER_SIGNATURE=
SERVER_SOFTWARE=Apache/2.4.6 (CentOS)
SERVER_NAME=192.168.1.12
SERVER_ADDR=192.168.1.12
SERVER_PORT=80
REMOTE_ADDR=192.168.1.100
DOCUMENT_ROOT=/var/www/html
REQUEST_SCHEME=http
CONTEXT_PREFIX=/cgi-bin/
CONTEXT_DOCUMENT_ROOT=/var/www/cgi-bin/
SERVER_ADMIN=root@localhost
SCRIPT_FILENAME=/var/www/cgi-bin/sample
REMOTE_PORT=58551
GATEWAY_INTERFACE=CGI/1.1
SERVER_PROTOCOL=HTTP/1.1
REQUEST_METHOD=GET
QUERY_STRING=a=100&b=test
REQUEST_URI=/cgi-bin/sample?a=100&b=test
SCRIPT_NAME=/cgi-bin/sample
That should at least get you up and going with the nitty-gritty. Then you can worry about tailoring your web config if necessary or preparing the code for a production environment.
Now its just a matter of extending that idea by writing it in C++ and using standard C++ libraries to do whatever you want and to respond to your requests in a RESTful way.
If you do plan on moving it into a production environment in the end then you ought to look into configuring Apache for FastCGI. That's a small project in itself, but it won't change the way you write your C++ code.