Client Resource (Debugger API 2.0)

Summary

Http Method Resource Description
POST /client Creates the Client and enables the debugger. You must create the Client before you can interact with other debugger resources.
DELETE /client Removes all breakpoints, resumes all halted script threads and disables the debugger by deleting the Client.

Client Create

Creates the Client and enables the debugger. You must create the Client before you can interact with other debugger resources.

Url

POST http://hostname:port/dw/debugger/v2_0/client

Formats

json, xml

Authentication

Name Description
None No authentication.

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ClientIdRequiredException   Indicates that the request did not contain a client identifier.
401 NotAuthorizedException   Indicates that the specified user is not authorized.

Sample

REQUEST:
POST /s/-/dw/debugger/v1_0/client HTTP/1.1
Authorization: Basic YWRtaW46RGVtYW5kd2FyZTEh
x-dw-client-id: DebuggerTest
Content-Type: application/json
Content-Length: 0

# in case of success:
 
RESPONSE:
HTTP/1.1 204 No Content
Content-Length: 0

# in case of failure:

RESPONSE:
HTTP/1.1 401 Unauthorized
Content-Type: application/json;charset=UTF-8
{
  "_v":"2.0",
  "fault":
    {
      "type":"NotAuthorizedException",
      "message":"You are not authorized to use the Script Debugger."
    }
}

RESPONSE:
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
{
  "_v":"2.0",
  "fault":
  {
    "type":"ClientIdRequiredException",
    "message":"You must have a client identifier in the request header using the key 'x-dw-client-id'."
  }
}

Client Delete

Removes all breakpoints, resumes all halted script threads and disables the debugger by deleting the Client.

Url

DELETE http://hostname:port/dw/debugger/v2_0/client

Formats

json, xml

Authentication

Name Description
None No authentication.

In case of a failure Fault Document is returned.

Faults

Status Type Arguments Description
400 ClientIdRequiredException   Indicates that the request did not contain a client identifier.
401 NotAuthorizedException   Indicates that the specified user is not authorized.

Sample

REQUEST:
DELETE /s/-/dw/debugger/v1_0/client HTTP/1.1
Authorization: Basic YWRtaW46RGVtYW5kd2FyZTEh
x-dw-client-id: DebuggerTest
Content-Type: application/json
Content-Length: 0

# in case of success:
 
RESPONSE:
HTTP/1.1 204 No Content

# in case of error:

RESPONSE:
HTTP/1.1 401 Unauthorized
Content-Type: application/json;charset=UTF-8
{
  "_v":"2.0",
  "fault":
    {
      "type":"NotAuthorizedException",
      "message":"You are not authorized to use the Script Debugger."
    }
}

RESPONSE:
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
{
  "_v":"2.0",
  "fault":
  {
    "type":"ClientIdRequiredException",
    "message":"You must have a client identifier in the request header using the key 'x-dw-client-id'."
  }
}