soap_snow
Python client for interacting with the ServiceNow SOAP web service.
API Documentation
For information about the ServiceNow SOAP web service, see the Direct web services and API Functions documentation.
Install
pip install soap_snow
Usage
from soap_snow import SOAPSnow
username, password, instance = 'test_user', 'test_pass', 'customer'
snow = SOAPSnow(username, password, instance)
# Example 'insert' request
# Should return sys_id
resp = snow.request(
method='insert',
endpoint='incident',
payload={
'short_description': 'This is a test.',
'assignment_group': 'my_group',
'severity': 3
}
)
print(resp.text)
# Example 'get' request
# Must send sys_id
resp = snow.request(
method='get',
endpoint='incident',
display_value='true',
payload={'sys_id': '01a7f0a71b5testsysid8556cc4bcb36'}
)
print(resp.text)
# Example 'update' request
# Must send sys_id
resp = snow.request(
method='update',
endpoint='incident',
payload={
'sys_id': '01a7f0a71b5testsysid8556cc4bcb36',
'state': 6,
'work_notes': 'This was a test.'
}
)
resp.raise_for_status()
print(resp.text)
# Example 'getRecords' request
# with limit function (see ServiceNow API Functions)
resp = snow.request(
method='getRecords',
endpoint='incident',
display_value='true',
payload={
'assignment_group': 'my_group',
'active': 1,
'__encoded_query=': 'state!=6^short_descriptionLIKEHost is unreachable',
'__limit': 20
}
)
print(resp.text)
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch
- Commit your Changes
- Push to the Branch
- Open a Pull Request
License
Distributed under the MIT License. See LICENSE for more information.
Metadata
Release files for soap-snow 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| soap_snow-0.2.1.tar.gz | 3.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| soap_snow-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.2 kB
Release files / soap_snow-0.2.1.tar.gz
| Download URL | soap_snow-0.2.1.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
48dc6bbd250965767c578b495eb3be0e3e3bb38369c7c57acebf7fa10be1cfdf
|
|
BLAKE2b-256 checksum How to use checksums |
20079b85cea1578aafa07c5f3a96146bafbe64507ab5ce70d3ffb0abe0827843
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.2
|
Release files / soap_snow-0.2.1-py3-none-any.whl
| Download URL | soap_snow-0.2.1-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2c2f851e799e415b83f35b218d615f66961090717ddf906bff37c370232f5045
|
|
BLAKE2b-256 checksum How to use checksums |
8c6495901cc1337a314e3e9b586c4033f7fdf6bbbbbcad3cd3c958b11030a527
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.2
|