Skip to main content

Python client for interacting with the ServiceNow SOAP web service.

Project description

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.

  1. Fork the Project
  2. Create your Feature Branch
  3. Commit your Changes
  4. Push to the Branch
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

soap_snow-0.2.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

soap_snow-0.2.1-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file soap_snow-0.2.1.tar.gz.

File metadata

  • Download URL: soap_snow-0.2.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for soap_snow-0.2.1.tar.gz
Algorithm Hash digest
SHA256 48dc6bbd250965767c578b495eb3be0e3e3bb38369c7c57acebf7fa10be1cfdf
MD5 537c931fecbc5428c4a80574daa08beb
BLAKE2b-256 20079b85cea1578aafa07c5f3a96146bafbe64507ab5ce70d3ffb0abe0827843

See more details on using hashes here.

File details

Details for the file soap_snow-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: soap_snow-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for soap_snow-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2c2f851e799e415b83f35b218d615f66961090717ddf906bff37c370232f5045
MD5 9c74aebb5ac2d2a3afec4b8aabf8b9bc
BLAKE2b-256 8c6495901cc1337a314e3e9b586c4033f7fdf6bbbbbcad3cd3c958b11030a527

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page