Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

...

...

  • Image = 1,

...

  • Pdf = 2,

...

  • JsonMetadata = 3,

...

  • JsonDocument = 4,

...

  • SignedJsonDocument = 5,

...

  • None

...

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
languagec#
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);