Skip to main content

Manage Repository Content

REST API Version 1

A large part of the MTPlatform data is organized in repositories. Version 1 of the REST API allows the management of MTPs and PEAs without specifying the exact repository. In this case, the alphanumerically first repository is selected for the requests, see the following route:

v1/pea/types

To be sure the correct repository is selected it is recommended to specify the repository explicitly by its guid as a query parameter:

v1/pea/types?repoId=75d1b89e-d1bb-4002-b08a-0c8b5e7a513e

REST API Version 2

Version 2 of the REST API removes the possibility to make requests without specifying the repository id explicitly. For example, get all MTP.Projects from a given repository by its repoId:

v2/repositories/{repoId:guid}/Mtp/projects

How to Manage Repositories

Repositories can be created with the post method repository, passing the following request object:

var repoCreationRequest = new RepositoryCreationRequest
{
Name = "MyRepoName",
Description = "MyDescription",
OwnerId = Guid.Parse("d4502449-c53a-457f-8d9c-7020575959b5"),
OwnerType = OwnerType.User
};

All your own repositories can be retrieved by calling repository as a get method. They are provided as a list of RepositoryDto. A specific repository can be requested via repository/<repositoryId>.