Undelete a Soft-Deleted Request

post

/sites/management/api/v1/requests/{id}/undelete

EXTENDED OPERATION

Undo a soft delete of a request. If a request is marked as deleted, this operation changes the deleted state of the request back to normal. The restored request details are included in the response. If a request is not marked as deleted, this operation does nothing. Only the latest revision of a request can be restored. Forked requests are permanently marked as deleted and cannot be restored.

Authorization

Users can restore any request they created. Any request can be restored by a site administrator.

Successful Response Examples

This operation responds with the following success (2xx) responses. For a full list of response HTTP status codes and example bodies, consult the Response section of this operation.

201Created - Restored

If the resource is successfully restored a 201 status code is returned with a Location where the restored resource can be read.

Client Error Response Examples

This operation responds with following client error (4xx) responses with exception details in the response body. For a full list of response HTTP status codes and example bodies, consult the Response section of this operation.

404Not Found - Request Not Found

The request does not exist or has been deleted, or the authenticated user or client application does not have access to the request.

Error Code

OCE-SITEMGMT-009001

Resolution - Check Identifier

Check that the request identifier is valid.

Resolution - Check Authorization

Check that the authenticated user can review the request or that the authenticated user is the user that created the request.

Exception Detail Fields

This error type includes the following fields/values in the response:

Field NameDescription
requestRequest that does not exist or is not visible to the authenticated user.

For detailed information about this exception detail type, consult the RequestNotFoundExceptionDetail schema in the definitions section of the swagger document.

Example Response Body
{
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
  "title": "Request Not Found",
  "status": "404",
  "detail": "Request does not exist or has been deleted, or the authenticated user or client application does not have access to the request.",
  "o:errorCode": "OCE-SITEMGMT-009001",
  "request": {
    "id": "e77229e8-1f44-4c27-bacb-9a99b7c77af7"
  }
}

409Conflict - Invalid Request Revision

A soft-deleted request can be restored only if the request is the latest revision. When requests are edited a copy of the request is made so there is a historical record of the requests life cycle. Only the latest request revision can be restored.

Error Code

OCE-SITEMGMT-009016

Exception Detail Fields

This error type includes the following fields/values in the response:

Field NameDescription
requestRequest can cannot be restored.

For detailed information about this exception detail type, consult the InvalidRequestRevisionExceptionDetail schema in the definitions section of the swagger document.

Example Response Body
{
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
  "title": "Invalid Request Revision",
  "status": "409",
  "detail": "Only the latest revision of the request can be restored.",
  "o:errorCode": "OCE-SITEMGMT-009016",
  "request": {
    "id": "e77229e8-1f44-4c27-bacb-9a99b7c77af7"
  }
}

Request

Path Parameters
  • Globally unique immutable identifier for a request.

Header Parameters
  • The if match request header is used with a method to make it conditional. A client that has one or more entity tag values previously obtained with the resource can verify that one of those entity tag values is current. If the requested resource does not match any of the provided entity tag values a precondition failed response will be returned without any body.

  • The if none match request header is used with a method to make it conditional. A client that has one or more entity tag values previously obtained with the resource can verify that none of those entity tag values is current.

Back to Top

Response

201 Response

Created
Headers

400 Response

Bad Request

401 Response

Unauthorized

403 Response

Forbidden

404 Response

Not Found
Headers
Body ()
Root Schema : schema
Match All
Show Source
Nested Schema : RequestNotFoundExceptionDetail
Match All
Show Source
Nested Schema : ExceptionDetail
Type: object

In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such cases, the additional information will be included in the response body.

Show Source
Nested Schema : RequestNotFoundExceptionDetail-allOf[1]
Type: object
Show Source
Nested Schema : o:errorDetails
Type: array

Multiple errors can be organized in a hierarchical structure.

Show Source
Nested Schema : items
Match All
Show Source
  • ExceptionDetail

    In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such cases, the additional information will be included in the response body.

Example Response (Request Not Found)
{
    "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
    "title":"Request Not Found",
    "status":"404",
    "detail":"Request does not exist or has been deleted, or the authenticated user or client application does not have access to the request.",
    "o:errorCode":"OCE-SITEMGMT-009001",
    "request":{
        "id":"e77229e8-1f44-4c27-bacb-9a99b7c77af7"
    }
}

409 Response

Conflict
Body ()
Root Schema : schema
Match All
Show Source
Nested Schema : InvalidRequestRevisionExceptionDetail
Match All
Show Source
Nested Schema : ExceptionDetail
Type: object

In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such cases, the additional information will be included in the response body.

Show Source
Nested Schema : InvalidRequestRevisionExceptionDetail-allOf[1]
Type: object
Show Source
Nested Schema : o:errorDetails
Type: array

Multiple errors can be organized in a hierarchical structure.

Show Source
Nested Schema : items
Match All
Show Source
  • ExceptionDetail

    In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such cases, the additional information will be included in the response body.

Example Response (Invalid Request Revision)
{
    "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
    "title":"Invalid Request Revision",
    "status":"409",
    "detail":"Only the latest revision of the request can be restored.",
    "o:errorCode":"OCE-SITEMGMT-009016",
    "request":{
        "id":"e77229e8-1f44-4c27-bacb-9a99b7c77af7"
    }
}

412 Response

Precondition Failed

413 Response

Payload Too Large

429 Response

Too Many Requests

500 Response

Internal Server Error

501 Response

Not Implemented

502 Response

Bad Gateway

503 Response

Service Unavailable

504 Response

Gateway Timeout
Back to Top