A quiz module can be restarted if it was completed by the current API user with the “failed” status (the earned score is less than the required one) and if the number of possible attempts is not reached yet. To restart a module, restartContentAttempt mutation should be executed. All necessary parameters will be returned in RESTART_EDGE CTA data when execute getLearningPath query:
query getLearningPath {
  getLearningPath(lpId: 40) {
    navigation {
      edgeId
      edgeRid
      contentType
      sequence
      attempt {
        metrics {
          status
        }
      }
      cta {
        title
        actionId
        arguments {
          key
          value
        }
      }
    }
  }
}

restartContentAttempt mutation

ArgumentTypeDescription
edgeRidIDRequired; contains the module edge ID.
lpAttemptContextIdIDRequired; contains the corresponding attempt context ID.
As a result, the mutation returns a RestartContentAttemptResponse object:
PropertyTypeDescription
errors[Violation]Contains the list of validation errors, if there are any.
responseAttemptThe created attempt object.
Here is an example of the mutation execution:
  mutation restartContentAttempt {
    restartContentAttempt(edgeRid: 485, lpAttemptContextId: 2396) {
      errors
      response {
        id
      }
    }
  }