sne import allows the execution of configured need_services and stores the retrieved data in a
which can be used by
$ sne import -c docs/conf.py jira -v 3.0.1 -r needs.json -o . -w Importing config from /home/daniel/workspace/sphinx/sphinx-needs-enterprise/docs/conf.py Using provider "jira" for given service jira URL: ``http://127.0.0.1:8081/rest/api/2/search`` Query: project = PX Sending request: Done Retrieved 2 element Version to use: 3.0.1 Reusing needs.json: /home/daniel/workspace/sphinx/sphinx-needs-enterprise/needs.json Erasing existing data for version 3.0.1.
Please take into account that not all services are supporting all functions like
sne import or
Take a look at the service badges on our main page, to figure out what a service currently supports.
sne import can be used to retrieve and store baselines of external data at a specific point of time.
So instead of always getting the latest data via
.. needservice:: jira during each build,
sne import can
be used to request and store this data only once in a
This file can be stored inside your source version system, so that each developer works on the same data.
To get the data into your documentation, use
.. needimport:: needs.json.
For huge requests and big teams, this can reduce the number of requests against the external service dramatically and it makes sure that each build is using the same data.
sne import takes only one argument, the name of the service to call.
A given service must be defined inside
needs_services of a
sne looks into the current working directory for a
-c to specify another location.
The service key should start with the name of the tool, so that
sne is selecting the internal driver automatically.
sne import jira_my_server
Can be used to specify the location of the
conf.py file to use.
sne import jira -c docs/conf.py
conf.py (in the current working directory)
The folder, under which the final
needs.json file shall be created.
Will create not existing subfolders automatically.
sne import codebeamer -o my_exports/2.0.1/
. (current working directory)
Query to use for the service request.
sne import jira -q "status != closed"
Default: Taken from service config in
Location of a
needs.json compatible file, which data shall be copied/updated in the
sne import codebeamer -r my_exports/2.0.1/needs.json
Default: Not set
The version, under which the data shall be stored in the
sne import codebeamer -v 2.0.1
version attribute from
-r/--reuse is used, version specific data may contain data, which is not valid after an import. Maybe
because an issue got deleted, but its data is still available in the reused
-w / --wipe to delete all data for the version given by
-v / --version before the newly imported
data is stored.
sne import codebeamer -v 2.0.1 -w
Default: Not set