...
API
[POST] /api/v1/artifacts
...
serviceRequestId: [Integer]- A service request id.
...
Parameters
Parameter | Description | Parameter Type |
---|---|---|
serviceRequestId | Service request id | Query string |
artifactType | An artifact type. |
...
...
|
...
|
...
|
...
|
...
|
...
|
...
version: [String] - version number.
...
userId: [Integer] - current user id.
...
artifact: [string] - artifact information
Query string | ||
version | Version number | Query string |
userId | Current user id | Query string |
artifact | Artifact information (JSON payload) | Request body |
Returns
HTTP 200 OK if successful, 401 if unauthorized, 400 otherwise.
...
Code Block | ||
---|---|---|
| ||
using MTOA.BLL.Interfaces;
string myDocumentVersion = "MySrv_1.0.0";
int serviceRequestId = 12345;
var signature = new DTO.ESignature
{
UserId = CurrentUser.Id.ToString(),
FirstName = CurrentUser.FirstName,
LastName = CurrentUser.LastName,
SignatureDateTime = DateTime.Now,
IpAddress = WebRequestExtension.GetUserIPAddress(),
HostName = WebRequestExtension.GetHostName(),
BrowserDetails = WebRequestExtension.GetBrowserDetails()
};
await _artifactManager.Create( signature, ArtifactType.SignedJsonDocument, myDocumentVersion, serviceRequestId, CurrentUser.Id);
|