Applies to ReadyAPI 3.4.5, last modified on October 27, 2020

To remove completed jobs from the TestEngine database, use the following operation:

DELETE  http://<testengine-host>:8080/api/v1/testjobs[?before=YYYY-MM-DDThh:mm:ssZ]

before

The date and time in the YYYY-MM-DDThh:mm:ssZ format. Test jobs that were completed before this time will be deleted.

Z in the notation denotes the UTC time. If you need to indicate a different time zone, replace it with +hh:mm or -hh:mm.

Examples:

2019-06-01T00:01:00Z
2019-08-30T17:30:00+08:00
2019-07-10T12:00:00-05:00

This parameter is optional. If it is omitted, TestEngine will delete test jobs according to the Maximum days to keep and Maximum jobs to keep options (see Configure TestEngine).

Authentication

The request must be authenticated by a TestEngine administrator.

See details on SwaggerHub.

Examples

Use the following command line:

curl -u "user:password" -X DELETE "http://localhost:8080/api/v1/testjobs?before=2019-06-01T17:00:00Z"

In this example:

-u user:password

Authenticates the request with the user’s credentials.

-X DELETE

Specifies the DELETE method.

"http://localhost:8080/api/v1/testjobs"

The endpoint of the request.

before=2019-06-01T17:00:00Z

The date and time.
Make sure to take your timezone into account.
  1. Create a project by using the TestEngine API definition. See Creating Project From OpenAPI/Swagger Definition to learn how to do it.

    Tip: You can also create the needed request from scratch.
  2. Select the DELETE request to the /testjobs resource:

    Delete test jobs older than a certain date: Select a request

    Click the image to enlarge it.

  3. Enter the date and time in the Value field of the before parameter:

    Delete test jobs older than a certain date: Input date and time
    Make sure to take your timezone into account.
  4. Open the Auth panel.

  5. Select the Basic (Built-in) authorization type.

    Tip: If you use the same credentials in several requests, use authorization profiles.
  6. Specify the admin credentials and select the Authenticate pre-emptively option:

    Delete test jobs older than a certain date: Add authorization

    Click the image to enlarge it.

  7. Send the request:

    Delete test jobs older than a certain date: Send the request

    Click the image to enlarge it.

  8. The response will include the count of deleted jobs:

    Delete test jobs older than a certain date: View count of deleted jobs

Before you perform this action, you might want to set the the Maximum days to keep and Maximum jobs to keep options. To learn how to do this, see Configure TestEngine.

Use the following command line:

curl -u "user:password" -X DELETE "http://localhost:8080/api/v1/testjobs"

In this example:

-u user:password

Authenticates the request with the user’s credentials.

-X DELETE

Specifies the GET method.

"http://localhost:8080/api/v1/testjobs"

The endpoint of the request.
  1. Create a project by using the TestEngine API definition. See Creating Project From OpenAPI/Swagger Definition to learn how to do it.

    Tip: You can also create the needed request from scratch.
  2. Select the DELETE request to the /testjobs resource. Leave the before parameter blank:

    Delete test jobs older than a certain date: Select a request

    Click the image to enlarge it.

  3. Open the Auth panel.

  4. Select the Basic (Built-in) authorization type.

    Tip: If you use the same credentials in several requests, use authorization profiles.
  5. Specify the admin credentials and select the Authenticate pre-emptively option:

    Delete test jobs older than a certain date: Add authorization

    Click the image to enlarge it.

  6. Send the request:

    Delete test jobs older than a certain date: Send the request

    Click the image to enlarge it.

  7. The response will include the count of deleted jobs:

    Delete test jobs older than a certain date: View count of deleted jobs

See Also

Run Tests

Highlight search results