Apply to api success status code 200

This commit is contained in:
cloverhearts 2016-12-28 22:42:07 -08:00
parent 3f2886591b
commit 754309ed4c
4 changed files with 14 additions and 14 deletions

View file

@ -253,7 +253,7 @@ The role of registered interpreters, settings and interpreters group are describ
</tr>
<tr>
<td>Success code</td>
<td>201</td>
<td>200</td>
</tr>
<tr>
<td>Fail code</td>
@ -492,7 +492,7 @@ The role of registered interpreters, settings and interpreters group are describ
</tr>
<tr>
<td>Success code</td>
<td>201</td>
<td>200</td>
</tr>
<tr>
<td>Fail code</td>

View file

@ -92,7 +92,7 @@ If you work with Apache Zeppelin and find a need for an additional REST API, ple
</tr>
<tr>
<td>Success code</td>
<td>201</td>
<td>200</td>
</tr>
<tr>
<td> Fail code</td>
@ -275,7 +275,7 @@ If you work with Apache Zeppelin and find a need for an additional REST API, ple
</tr>
<tr>
<td>Success code</td>
<td>201</td>
<td>200</td>
</tr>
<tr>
<td> Fail code</td>
@ -710,7 +710,7 @@ If you work with Apache Zeppelin and find a need for an additional REST API, ple
</tr>
<tr>
<td>Success code</td>
<td>201</td>
<td>200</td>
</tr>
<tr>
<td> Fail code</td>
@ -1010,7 +1010,7 @@ If you work with Apache Zeppelin and find a need for an additional REST API, ple
</tr>
<tr>
<td>Success code</td>
<td>201</td>
<td>200</td>
</tr>
<tr>
<td> Fail code</td>
@ -1060,7 +1060,7 @@ If you work with Apache Zeppelin and find a need for an additional REST API, ple
</tr>
<tr>
<td>Success code</td>
<td>201</td>
<td>200</td>
</tr>
<tr>
<td> Fail code</td>

View file

@ -122,7 +122,7 @@ public class InterpreterRestApi {
.createNewSetting(request.getName(), request.getGroup(), request.getDependencies(),
request.getOption(), p);
logger.info("new setting created with {}", interpreterSetting.getId());
return new JsonResponse<>(Status.CREATED, "", interpreterSetting).build();
return new JsonResponse<>(Status.OK, "", interpreterSetting).build();
} catch (InterpreterException | IOException e) {
logger.error("Exception in InterpreterRestApi while creating ", e);
return new JsonResponse<>(Status.NOT_FOUND, e.getMessage(), ExceptionUtils.getStackTrace(e))
@ -237,7 +237,7 @@ public class InterpreterRestApi {
return new JsonResponse<>(Status.INTERNAL_SERVER_ERROR, e.getMessage(),
ExceptionUtils.getStackTrace(e)).build();
}
return new JsonResponse(Status.CREATED).build();
return new JsonResponse(Status.OK).build();
}
/**

View file

@ -323,7 +323,7 @@ public class NotebookRestApi {
public Response importNote(String req) throws IOException {
AuthenticationInfo subject = new AuthenticationInfo(SecurityUtils.getPrincipal());
Note newNote = notebook.importNote(req, null, subject);
return new JsonResponse<>(Status.CREATED, "", newNote.getId()).build();
return new JsonResponse<>(Status.OK, "", newNote.getId()).build();
}
/**
@ -359,7 +359,7 @@ public class NotebookRestApi {
note.persist(subject);
notebookServer.broadcastNote(note);
notebookServer.broadcastNoteList(subject, SecurityUtils.getRoles());
return new JsonResponse<>(Status.CREATED, "", note.getId()).build();
return new JsonResponse<>(Status.OK, "", note.getId()).build();
}
/**
@ -391,7 +391,7 @@ public class NotebookRestApi {
* Clone note REST API
*
* @param noteId ID of Note
* @return JSON with status.CREATED
* @return JSON with status.OK
* @throws IOException, CloneNotSupportedException, IllegalArgumentException
*/
@POST
@ -410,7 +410,7 @@ public class NotebookRestApi {
Note newNote = notebook.cloneNote(noteId, newNoteName, subject);
notebookServer.broadcastNote(newNote);
notebookServer.broadcastNoteList(subject, SecurityUtils.getRoles());
return new JsonResponse<>(Status.CREATED, "", newNote.getId()).build();
return new JsonResponse<>(Status.OK, "", newNote.getId()).build();
}
/**
@ -445,7 +445,7 @@ public class NotebookRestApi {
note.persist(subject);
notebookServer.broadcastNote(note);
return new JsonResponse<>(Status.CREATED, "", p.getId()).build();
return new JsonResponse<>(Status.OK, "", p.getId()).build();
}
/**