Cannot connect to the enforcement point in WSS

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Cannot connect to the enforcement point in WSS

azila
This post has NOT been accepted by the mailing list yet.
Hi.

i have a problem to connect to an enforcement point when i create the data from my app.
an enforcement was used the REST API.
how should i do?

this is my interface. WSS Enforcement Point :
this is form in my application system :

the data should be listed in an enforcement point when i'm clicking the create button.

this is my codes .

def enforcement_submit(request):
    if request.method == 'PUT':
        form = EnforcementForm(request.PUT)
        tempdir = None
        errormsgs = []
        out = {'success': False}

    url = os.path.join(settings.WSS_API)

    data = {
            "ids": "id",
            "module": "module",
            "endpoint": "endpoint",
            "authentication": "authenticationSchemes"
            }

    headers = {'content-type': 'application/json'}

    #Call REST API
    response = requests.put(url, data=data, headers=headers)

    #Print Response
    print(response.text)

    return HttpResponseRedirect(reverse('enforcement_list'))


anyone please guide and help me.
thank you.
Loading...