/
Get<T>()
Get<T>()
Description
Gets an artifact.
Package Details
Interface
IArtifactManager
Syntax
Task<T> Get<T>(int serviceRequestId, ArtifactType artifactType);
Returns
Task<T>
API Endpoint
GET
api/v1/artifacts
Parameter | Description | Parameter Type |
---|---|---|
serviceRequestId | Service request id associated to the artifact. | Query string |
ArtifactType | An artifact type.
| Query string |
Returns
HTTP 200 OK if successful, 401 if unauthorized, 400 otherwise.
Example
public class SampleDocument
{
public int Id { get; set; }
public string Name { get; set; }
public DateTime Date { get; set; }
}
var doc = new SampleDocument
{
Id = 100,
Name = "Tom",
Date = new DateTime(2020, 1, 1, 0, 0, 0)
};
var artifact = await ArtifactManager.Get<SampleDocument>(artifactInfo.Id, ArtifactType.JsonDcoument);
, multiple selections available,
Related content
Delete()
Delete()
Read with this
GetArtifacts()
GetArtifacts()
Read with this
CreateFromJson()
CreateFromJson()
Read with this
Exists()
Exists()
Read with this
Create()
Create()
Read with this
GetById<T>()
GetById<T>()
Read with this