Versions Compared

Key

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

Get By Id

Description

Gets an artifact by it’s id.

Package Details

Interface

IArtifactManager

Syntax

Task<T> GetById<T>(int artifactId);

Returns

Task<T>

API Endpoint

GET

api/v1/artifacts/{artifactId}

Parameters

Parameter

Description

Parameter Type

artifactId

Artifact id

Path

Returns

On success, 200 Ok

On error, 400 Bad Request

On authorization error, 403 Forbidden

Example

Code Block
languagec#
public class SampleDocument
{
    public int Id  { get; set; }
    public string Name { get; set; }
    public DateTime Date { get; set; }
}
const int artifactId = 100;
var artifact = await ArtifactManager.GetById<SampleDocument>(artifactId);