Reject Enrollment File

This operation sets the status of an enrollment file to REJECTED and reverts all policies that are linked to the enrollment file. It also sets all related policy update requests to the status REJECTED.

This operation is available on any enrollment file that has the status IN REVIEW.

Rejecting an enrollment file is a long running operation, initiated by a HTTP POST request to api-context-root/enrollmentfiles/<id>/reject.

Long-Running Operations Through REST are described in the development guide.

Resource Representation

Resource representation of an enrollment file that can be rejected:

{
  ... enrollment file properties ...
  "links": [
    {
      "href": "http://<host>:<port>/[api-context-root]/generic/enrollmentfiles/<id>",
      "rel": "self"
    },
    {
      "href": "http://<host>:<port>/[api-context-root]/enrollmentfiles/<id>/reject",
      "rel": "enrollmentfile:accept"
      "httpMethod": "POST"
    }
  ]
}

Reject Operation

If the enrollment file already has the status ACCEPTED or REJECTED, this operation has no effect. Otherwise:

  • The enrollment file status is set to REJECTED.

  • All policies that are linked to the enrollment file regardless of their status are reverted.

  • All policy update requests that are linked to the enrollment file are set to status REJECTED.

  • All the other policy update requests linked to the above policies with the status LOADED are set to status QUEUED (Update requests from other enrollment files or individual update requests)

    • No change for the other policy update requests with FAILED, QUEUED, PROCESSED, PROCESSED NO UPDATE and INITIAL status

  • If no update request with status FAILED exist for the policy, attachedpolicydata.disableUpdateFromQueue is set to false i.e. allow auto processing of new policy update requests

  • If the first version of the policy is reverted, Policy GID is removed form all the matched policy update requests

Response Messages

This operation provides HTTP status codes as defined in Response Messages. When the system accepts the request , status 201 and location header "api-context-root/enrollmentfiles/<id>/operationstatus"

GET on api-context-root/enrollmentfiles/<id>/operationstatus returns the following response in case of success

   {
    "workId": " activity id",
    "status": "Success",
    "links": [
        {
            "rel": "operator",
            "href": "link to activity",
            "httpMethod": "GET"
        },
        {
            "rel": "self",
            "href": "http://<host>:<port>/[api-context-root]/generic/enrollmentfiles/<file id>/operationstatus",
            "httpMethod": "GET"
        },
        {
            "rel": "monitor",
            "href": "http://<host>:<port>/[api-context-root]/generic/rejectenrollmentfiles/<LRO id>",
            "httpMethod": "GET"
        }
    ],
    "activityStatus": "CO",
    "type": "REJECT_ENROLLMENT_FILE",
    "level": "GL"
}

In case of failure, the following response is returned

  {

    "status": "Failure",
    "links": [
        {
            "rel": "operator:messages",
            "href": "Link to messages",
            "httpMethod": "GET"
        },
        {
            "rel": "operator:restart",
            "href": "http://<host>:<port>/[api-context-root]/activities/<activity id>/recover",
            "httpMethod": "POST"
        },
        {
            "rel": "operator",
            "href": "link to activity",
            "httpMethod": "GET"
        },
        {
            "rel": "self",
            "href": "http://<host>:<port>/[api-context-root]/generic/enrollmentfile/<>/operationstatus",
            "httpMethod": "GET"
        },
        {
            "rel": "monitor",
            "href": "hhttp://<host>:<port>/[api-context-root]/generic/rejectenrollmentfiles/<LRO Id>",
            "httpMethod": "GET"
        }
    ],
    "activityStatus": "CT",
    "type": "REJECT_ENROLLMENT_FILE",
    "level": "GL"
}
IP api-context-root/enrollmentfiles/<file id>/operationstatus, return the processing status of latest accept or reject file operations.

If an error occurs, the appropriate HTTP status code is returned .

In addition, system also sends a notification upon completion of the long running process. For details on notification configuration and structure refer to Long-Running Operations Through REST.

The following operation specific error can occur:

Table 1. Response Messages
Code Severity Message Text

POL-HTTP-024

Fatal

This enrollment file has already been accepted or rejected.

Authorization

The above described operation is protected by access restriction reject enrollment file IP.