All URIs are relative to http://localhost/service/rest
| Method | HTTP request | Description |
|---|---|---|
| add | POST /v1/script | Add a new script |
| browse | GET /v1/script | List all stored scripts |
| delete1 | DELETE /v1/script/{name} | Delete stored script by name |
| edit | PUT /v1/script/{name} | Update stored script by name |
| read | GET /v1/script/{name} | Read stored script by name |
| run1 | POST /v1/script/{name}/run | Run stored script by name |
add(body=body)
Add a new script
from __future__ import print_function
import time
import nexus_api_python_client
from nexus_api_python_client.rest import ApiException
from pprint import pprint
# Enter a context with an instance of the API client
with nexus_api_python_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = nexus_api_python_client.ScriptApi(api_client)
body = nexus_api_python_client.ScriptXO() # ScriptXO | (optional)
try:
# Add a new script
api_instance.add(body=body)
except ApiException as e:
print("Exception when calling ScriptApi->add: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| body | ScriptXO | [optional] |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 204 | Script was added | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[ScriptXO] browse()
List all stored scripts
from __future__ import print_function
import time
import nexus_api_python_client
from nexus_api_python_client.rest import ApiException
from pprint import pprint
# Enter a context with an instance of the API client
with nexus_api_python_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = nexus_api_python_client.ScriptApi(api_client)
try:
# List all stored scripts
api_response = api_instance.browse()
pprint(api_response)
except ApiException as e:
print("Exception when calling ScriptApi->browse: %s\n" % e)This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete1(name)
Delete stored script by name
from __future__ import print_function
import time
import nexus_api_python_client
from nexus_api_python_client.rest import ApiException
from pprint import pprint
# Enter a context with an instance of the API client
with nexus_api_python_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = nexus_api_python_client.ScriptApi(api_client)
name = 'name_example' # str |
try:
# Delete stored script by name
api_instance.delete1(name)
except ApiException as e:
print("Exception when calling ScriptApi->delete1: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| name | str |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 204 | Script was deleted | - |
| 404 | No script with the specified name | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
edit(name, body=body)
Update stored script by name
from __future__ import print_function
import time
import nexus_api_python_client
from nexus_api_python_client.rest import ApiException
from pprint import pprint
# Enter a context with an instance of the API client
with nexus_api_python_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = nexus_api_python_client.ScriptApi(api_client)
name = 'name_example' # str |
body = nexus_api_python_client.ScriptXO() # ScriptXO | (optional)
try:
# Update stored script by name
api_instance.edit(name, body=body)
except ApiException as e:
print("Exception when calling ScriptApi->edit: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| name | str | ||
| body | ScriptXO | [optional] |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 204 | Script was updated | - |
| 404 | No script with the specified name | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ScriptXO read(name)
Read stored script by name
from __future__ import print_function
import time
import nexus_api_python_client
from nexus_api_python_client.rest import ApiException
from pprint import pprint
# Enter a context with an instance of the API client
with nexus_api_python_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = nexus_api_python_client.ScriptApi(api_client)
name = 'name_example' # str |
try:
# Read stored script by name
api_response = api_instance.read(name)
pprint(api_response)
except ApiException as e:
print("Exception when calling ScriptApi->read: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| name | str |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | - |
| 404 | No script with the specified name | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ScriptResultXO run1(name, body=body)
Run stored script by name
from __future__ import print_function
import time
import nexus_api_python_client
from nexus_api_python_client.rest import ApiException
from pprint import pprint
# Enter a context with an instance of the API client
with nexus_api_python_client.ApiClient() as api_client:
# Create an instance of the API class
api_instance = nexus_api_python_client.ScriptApi(api_client)
name = 'name_example' # str |
body = 'body_example' # str | (optional)
try:
# Run stored script by name
api_response = api_instance.run1(name, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling ScriptApi->run1: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| name | str | ||
| body | str | [optional] |
No authorization required
- Content-Type: text/plain, application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | successful operation | - |
| 404 | No script with the specified name | - |
| 500 | Script execution failed with exception | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]