Mercurial > hg > orthanc
comparison OrthancServer/Sources/OrthancRestApi/OrthancRestApi.cpp @ 4419:cd96c807ca3d
cont openapi
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 29 Dec 2020 11:53:42 +0100 |
parents | 22a1352a0823 |
children | 83371ccdfe80 |
comparison
equal
deleted
inserted
replaced
4418:9d6fa3da8f00 | 4419:cd96c807ca3d |
---|---|
428 job->SetPermissive(false); | 428 job->SetPermissive(false); |
429 } | 429 } |
430 | 430 |
431 SubmitGenericJob(call, raii.release(), isDefaultSynchronous, body); | 431 SubmitGenericJob(call, raii.release(), isDefaultSynchronous, body); |
432 } | 432 } |
433 | |
434 | |
435 void OrthancRestApi::DocumentSubmitGenericJob(RestApiPostCall& call) | |
436 { | |
437 call.GetDocumentation() | |
438 .SetRequestField(KEY_SYNCHRONOUS, RestApiCallDocumentation::Type_Boolean, | |
439 "If `true`, run the job in synchronous mode, which means that the HTTP answer will directly " | |
440 "contain the result of the job. This is the default, easy behavior, but it is *not* desirable for " | |
441 "long jobs, as it might lead to network timeouts.", false) | |
442 .SetRequestField(KEY_ASYNCHRONOUS, RestApiCallDocumentation::Type_Boolean, | |
443 "If `true`, run the job in asynchronous mode, which means that the REST API call will immediately " | |
444 "return, reporting the identifier of a job. Prefer this flavor wherever possible.", false) | |
445 .SetRequestField(KEY_PRIORITY, RestApiCallDocumentation::Type_Number, | |
446 "In asynchronous mode, the priority of the job. The lower the value, the higher the priority.", false) | |
447 .SetAnswerField("ID", RestApiCallDocumentation::Type_String, "In asynchronous mode, identifier of the job") | |
448 .SetAnswerField("Path", RestApiCallDocumentation::Type_String, "In asynchronous mode, path to access the job in the REST API"); | |
449 } | |
450 | |
451 | |
452 void OrthancRestApi::DocumentSubmitCommandsJob(RestApiPostCall& call) | |
453 { | |
454 DocumentSubmitGenericJob(call); | |
455 call.GetDocumentation() | |
456 .SetRequestField(KEY_PERMISSIVE, RestApiCallDocumentation::Type_Boolean, | |
457 "If `true`, ignore errors during the individual steps of the job.", false); | |
458 } | |
433 } | 459 } |