- Add Basic Authentification information to your putConfluence.conf file
- Ready!
./putConfluence.py get SPLUNK cisas.conf
./putConfluence.py -c ./putConfluence.conf get SPLUNK cisas.conf
./putConfluence.py put -p "Konfigurierte Logfiles" SPLUNK cisas.conf cisas.html
cat cisas.html | ./putConfluence.py put -p "Konfigurierte Logfiles" SPLUNK cisas.conf
./putConfluence.py put -p "Konfigurierte Logfiles" SPLUNK cisas.conf < cisas.html
where
SPLUNK
is the Spacecisas.conf
is the name of the pagecisas.html
is the file with the desired contentputconfluence.conf
is a valid configuration file of format seen in next chapter
# The auth stanza contains login information of the technical user
[auth]
username=<username>
password=<password>
# The request stanza contains information on how the connection should be built
[request]
truststore=<path to truststore>
# If a valid path to a truststore was set, the ssl connection to the Confluence
# webserver will be verified. If no truststore was set, the connection will not
# be verified. This is the standard behaviour.
# The confluence stanza contains connection information for confluence
[confluence]
restapi=https://confluence.example.com/rest/api/content
Make a Cronjob like this:
0 6 * * * /opt/splunk/bin/doPutConfluence.sh -c
The script doPutConfluence.sh
may be found in the src
directory of this repository.
- Special Characters can't be sent by POST or PUT
- Error occurs when updating a page without
-p
option, when it was created with-p
option - Can't use -x option in conjunction with STDIN file
- https://docs.atlassian.com/confluence/REST/latest/
- https://developer.atlassian.com/confdev/confluence-server-rest-api
- https://developer.atlassian.com/confdev/confluence-server-rest-api/confluence-rest-api-examples
- https://developer.atlassian.com/static/connect/docs/latest/scopes/confluence-rest-scopes.html