Skip to content
Snippets Groups Projects
Select Git revision
  • Issue/2672-fixSfbPidPointing
  • main default protected
  • Issue/3142-kpiGenerator
  • Hotfix/3115-userReportingEmpty2
  • Hotfix/3115-userReportingEmpty
  • dev protected
  • Issue/3043-DataStorageNrwResource
  • Issue/3011-maintenanceMode
  • Issue/2492-respOrg
  • Issue/2446-addingResponsibleOrganization
  • Issue/2982-kpiDataPub
  • Issue/2981-dataPubInDb
  • Issue/2881-messageController
  • test-linux-pipelines
  • Issue/2944-gdShenanigans
  • Issue/2769-migrateCron
  • Issue/2668-graphDeployer
  • Issue/2847-reporting
  • Issue/2627-addPidRecord
  • Issue/2432-publicationKpi
  • v1.9.10
  • v1.9.9
  • v1.9.8
  • v1.9.7
  • v1.9.6
  • v1.9.5
  • v1.9.4
  • v1.9.3
  • v1.9.2
  • v1.9.1
  • v1.9.0
  • v1.8.0
  • v1.7.0
  • v1.6.0
  • v1.5.0
  • v1.4.0
  • v1.3.3
  • v1.3.2
  • v1.3.1
  • v1.3.0
40 results

apiclient

  • Open with
  • Download source code
  • Your workspaces

      A workspace is a virtual sandbox environment for your code in GitLab.

      No agents available to create workspaces. Please consult Workspaces documentation for troubleshooting.

  • Coscine.ApiClient.Core - the C# library for the Coscine Web API

    Coscine (short for COllaborative SCientific INtegration Environment) is the research data management platform for your research project.

    This C# SDK is automatically generated by the OpenAPI Generator project:

    • API version: 2.0
    • SDK version: 1.0.0
    • Build package: org.openapitools.codegen.languages.CSharpClientCodegen

    Frameworks supported

    Dependencies

    The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:

    Install-Package RestSharp
    Install-Package Newtonsoft.Json
    Install-Package JsonSubTypes
    Install-Package System.ComponentModel.Annotations

    NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742. NOTE: RestSharp for .Net Core creates a new socket for each api call, which can lead to a socket exhaustion problem. See RestSharp#1406.

    Installation

    Run the following command to generate the DLL

    • [Mac/Linux] /bin/sh build.sh
    • [Windows] build.bat

    Then include the DLL (under the bin folder) in the C# project, and use the namespaces:

    using Coscine.ApiClient.Core.Api;
    using Coscine.ApiClient.Core.Client;
    using Coscine.ApiClient.Core.Model;

    Packaging

    A .nuspec is included with the project. You can follow the Nuget quickstart to create and publish packages.

    This .nuspec uses placeholders from the .csproj, so build the .csproj directly:

    nuget pack -Build -OutputDirectory out Coscine.ApiClient.Core.csproj

    Then, publish to a local feed or other host and consume the new package via Nuget as usual.

    Usage

    To use the API client with a HTTP proxy, setup a System.Net.WebProxy

    Configuration c = new Configuration();
    System.Net.WebProxy webProxy = new System.Net.WebProxy("http://myProxyUrl:80/");
    webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
    c.Proxy = webProxy;

    Getting Started

    using System.Collections.Generic;
    using System.Diagnostics;
    using Coscine.ApiClient.Core.Api;
    using Coscine.ApiClient.Core.Client;
    using Coscine.ApiClient.Core.Model;
    
    namespace Example
    {
        public class Example
        {
            public static void Main()
            {
    
                Configuration config = new Configuration();
                config.BasePath = "http://localhost:7206/coscine";
                // Configure API key authorization: Bearer
                config.ApiKey.Add("Authorization", "YOUR_API_KEY");
                // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
                // config.ApiKeyPrefix.Add("Authorization", "Bearer");
    
                var apiInstance = new AdminApi(config);
    
                try
                {
                    // Responds with the HTTP methods allowed for the endpoint.
                    apiInstance.ApiV2AdminOptions();
                }
                catch (ApiException e)
                {
                    Debug.Print("Exception when calling AdminApi.ApiV2AdminOptions: " + e.Message );
                    Debug.Print("Status Code: "+ e.ErrorCode);
                    Debug.Print(e.StackTrace);
                }
    
            }
        }
    }

    Documentation for API Endpoints

    All URIs are relative to http://localhost:7206/coscine

    Class Method HTTP request Description
    AdminApi ApiV2AdminOptions OPTIONS /api/v2/admin Responds with the HTTP methods allowed for the endpoint.
    AdminApi GetAllActivityLogs GET /api/v2/admin/activity-logs Retrieves all activity logs.
    AdminApi GetAllProjects GET /api/v2/admin/projects Retrieves all projects.
    AdminApi GetAllResources GET /api/v2/admin/resources Retrieves all resources.
    AdminApi GetAllUsers GET /api/v2/admin/users Retrieves all users.
    AdminApi GetDeployedGraphs GET /api/v2/admin/graphs Gets all deployed graphs.
    AdminApi GetMetadataGraph GET /api/v2/admin/metadata/{graph} Gets a metadata graph.
    AdminApi PatchMetadata PATCH /api/v2/admin/metadata/{graph} Patches a metadata graph.
    AdminApi UpdateMetadataGraph PUT /api/v2/admin/metadata/{graph} Updates a metadata graph.
    ApplicationProfileApi ApiV2ApplicationProfilesOptions OPTIONS /api/v2/application-profiles Responds with the HTTP methods allowed for the endpoint.
    ApplicationProfileApi CreateApplicationProfileRequest POST /api/v2/application-profiles/requests Submits a request to create a new application profile.
    ApplicationProfileApi GetApplicationProfile GET /api/v2/application-profiles/profiles/{profile} Retrieves an application profile by its URI.
    ApplicationProfileApi GetApplicationProfiles GET /api/v2/application-profiles/profiles Retrieves all application profiles.
    ApplicationProfileApi GetRawApplicationProfile GET /api/v2/application-profiles/profiles/{profile}/raw Retrieves the raw application profile definition by its URI.
    BlobApi ApiV2ProjectsProjectIdResourcesResourceIdBlobsOptions OPTIONS /api/v2/projects/{projectId}/resources/{resourceId}/blobs Responds with the HTTP methods allowed for the endpoint.
    BlobApi CreateBlob POST /api/v2/projects/{projectId}/resources/{resourceId}/blobs/{key} Creates a new blob for a resource.
    BlobApi DeleteBlob DELETE /api/v2/projects/{projectId}/resources/{resourceId}/blobs/{key} Deletes a blob from a resource.
    BlobApi GetBlob GET /api/v2/projects/{projectId}/resources/{resourceId}/blobs/{key} Download a blob from a resource.
    BlobApi UpdateBlob PUT /api/v2/projects/{projectId}/resources/{resourceId}/blobs/{key} Updates an existing blob of a resource.
    DisciplineApi ApiV2DisciplinesOptions OPTIONS /api/v2/disciplines Responds with the HTTP methods allowed for the endpoint.
    DisciplineApi GetDiscipline GET /api/v2/disciplines/{disciplineId} Retrieves a discipline with the specified ID.
    DisciplineApi GetDisciplines GET /api/v2/disciplines Retrieves all disciplines.
    HandleApi ApiV2HandlesOptions OPTIONS /api/v2/handles Responds with the HTTP methods allowed for the endpoint.
    HandleApi GetHandle GET /api/v2/handles/{prefix}/{suffix} Retrieves all values of a handle by its PID.
    HandleApi UpdateHandle PUT /api/v2/handles/{prefix}/{suffix} Updates a handle.
    LanguageApi ApiV2LanguagesOptions OPTIONS /api/v2/languages Responds with the HTTP methods allowed for the endpoint.
    LanguageApi GetLanguage GET /api/v2/languages/{languageId} Retrieves a language by ID.
    LanguageApi GetLanguages GET /api/v2/languages Retrieves all languages.
    LicenseApi ApiV2LicensesOptions OPTIONS /api/v2/licenses Responds with the HTTP methods allowed for the endpoint.
    LicenseApi GetLicense GET /api/v2/licenses/{licenseId} Retrieves a license with the specified ID.
    LicenseApi GetLicenses GET /api/v2/licenses Retrieves all licenses.
    MaintenanceApi ApiV2MaintenancesOptions OPTIONS /api/v2/maintenances Responds with the HTTP methods allowed for the endpoint.
    MaintenanceApi GetCurrentMaintenances GET /api/v2/maintenances Retrieves the current maintenance messages.
    OrganizationApi ApiV2OrganizationsOptions OPTIONS /api/v2/organizations Responds with the HTTP methods allowed for the endpoint.
    OrganizationApi GetOrganization GET /api/v2/organizations/{organizationRorUri} Retrieves an organization.
    OrganizationApi GetOrganizations GET /api/v2/organizations Retrieves all organizations.
    PidApi ApiV2PidsOptions OPTIONS /api/v2/pids Responds with the HTTP methods allowed for the endpoint.
    PidApi GetPid GET /api/v2/pids/{prefix}/{suffix} Retrieves the Persistent Identifier (PID) for a given prefix and suffix.
    PidApi GetPids GET /api/v2/pids Retrieves all PIDs.
    PidApi SendRequestToOwner POST /api/v2/pids/{prefix}/{suffix}/requests Sends an inquiry to the owner of the given PID.
    ProjectApi ApiV2ProjectsOptions OPTIONS /api/v2/projects Responds with the HTTP methods allowed for the endpoint.
    ProjectApi CreateProject POST /api/v2/projects Creates a new project.
    ProjectApi DeleteProject DELETE /api/v2/projects/{projectId} Deletes a project.
    ProjectApi GetProject GET /api/v2/projects/{projectId} Retrieves a project.
    ProjectApi GetProjects GET /api/v2/projects Retrieves all projects.
    ProjectApi UpdateProject PUT /api/v2/projects/{projectId} Updates a project.
    ProjectInvitationApi ApiV2ProjectsProjectIdInvitationsOptions OPTIONS /api/v2/projects/{projectId}/invitations Responds with the HTTP methods allowed for the endpoint.
    ProjectInvitationApi CreateProjectInvitation POST /api/v2/projects/{projectId}/invitations Creates a project invitation for a specified project.
    ProjectInvitationApi DeleteProjectInvitation DELETE /api/v2/projects/{projectId}/invitations/{projectInvitationId} Deletes a project invitation for a specified project.
    ProjectInvitationApi GetProjectInvitation GET /api/v2/projects/{projectId}/invitations/{projectInvitationId} Retrieves a project invitation for a specified project.
    ProjectInvitationApi GetProjectInvitations GET /api/v2/projects/{projectId}/invitations Retrieves all project invitations for a specified project.
    ProjectMemberApi AddMembership POST /api/v2/projects/{projectId}/members Creates a project membership for a specified project.
    ProjectMemberApi ApiV2ProjectsProjectIdMembersOptions OPTIONS /api/v2/projects/{projectId}/members Responds with the HTTP methods allowed for the endpoint.
    ProjectMemberApi DeleteMembership DELETE /api/v2/projects/{projectId}/members/{membershipId} Deletes a project membership for a specified project.
    ProjectMemberApi GetMembership GET /api/v2/projects/{projectId}/members/{membershipId} Retrieves a project membership for a specified project.
    ProjectMemberApi GetMemberships GET /api/v2/projects/{projectId}/members Retrieves all project memberships for a specified project.
    ProjectMemberApi UpdateMembership PUT /api/v2/projects/{projectId}/members/{membershipId} Updates a project membership for a specified project.
    ProjectPublicationRequestApi ApiV2ProjectsProjectIdPublicationsRequestsOptions OPTIONS /api/v2/projects/{projectId}/publications/requests Responds with the HTTP methods allowed for the endpoint.
    ProjectPublicationRequestApi CreatePublicationRequest POST /api/v2/projects/{projectId}/publications/requests Creates a new publication request.
    ProjectQuotaApi ApiV2ProjectsProjectIdQuotasOptions OPTIONS /api/v2/projects/{projectId}/quotas Responds with the HTTP methods allowed for the endpoint.
    ProjectQuotaApi GetProjectQuota GET /api/v2/projects/{projectId}/quotas/{resourceTypeId} Retrieves a project quota for a specified project and resource type.
    ProjectQuotaApi GetProjectQuotas GET /api/v2/projects/{projectId}/quotas Retrieves all project quotas for a specified project.
    ProjectQuotaApi UpdateProjectQuota PUT /api/v2/projects/{projectId}/quotas/{resourceTypeId} Updates a project quota for a specified project and resource type.
    ProjectResourceApi ApiV2ProjectsProjectIdResourcesOptions OPTIONS /api/v2/projects/{projectId}/resources Responds with the HTTP methods allowed for the endpoint.
    ProjectResourceApi CreateResourceForProject POST /api/v2/projects/{projectId}/resources Creates a new resource for a specified project.
    ProjectResourceApi DeleteResourceForProject DELETE /api/v2/projects/{projectId}/resources/{resourceId} Deletes a resource for a specified project.
    ProjectResourceApi GetResourceForProject GET /api/v2/projects/{projectId}/resources/{resourceId} Retrieves a resource for a specified project.
    ProjectResourceApi GetResourcesForProject GET /api/v2/projects/{projectId}/resources Retrieves all resources for a specified project.
    ProjectResourceApi UpdateResourceForProject PUT /api/v2/projects/{projectId}/resources/{resourceId} Updates a resource for a specified project.
    ProjectResourceQuotaApi ApiV2ProjectsProjectIdResourcesResourceIdQuotaOptions OPTIONS /api/v2/projects/{projectId}/resources/{resourceId}/quota Responds with the HTTP methods allowed for the endpoint.
    ProjectResourceQuotaApi GetQuotaForResourceForProject GET /api/v2/projects/{projectId}/resources/{resourceId}/quota Retrieves the resource quota for a specific resource in a project.
    ProjectResourceTypeApi ApiV2ProjectsProjectIdResourceTypesOptions OPTIONS /api/v2/projects/{projectId}/resource-types Responds with the HTTP methods allowed for the endpoint.
    ProjectResourceTypeApi GetAvailableResourceTypesInformationForProject GET /api/v2/projects/{projectId}/resource-types Retrieves the available resource types information for a specific project.
    ProvenanceApi ApiV2ProjectsProjectIdResourcesResourceIdProvenanceOptions OPTIONS /api/v2/projects/{projectId}/resources/{resourceId}/provenance Responds with the HTTP methods allowed for the endpoint.
    ProvenanceApi GetSpecificProvenance GET /api/v2/projects/{projectId}/resources/{resourceId}/provenance/specific Retrieves the specific provenance information associated with a resource.
    ProvenanceApi UpdateSpecificProvenance PUT /api/v2/projects/{projectId}/resources/{resourceId}/provenance/specific Updates existing specific provenance information of a resource.
    ResourceApi ApiV2ResourcesOptions OPTIONS /api/v2/resources Responds with the HTTP methods allowed for the endpoint.
    ResourceApi GetResource GET /api/v2/resources/{resourceId} Retrieves a resource by its ID.
    ResourceTypeApi ApiV2ResourceTypesOptions OPTIONS /api/v2/resource-types Responds with the HTTP methods allowed for the endpoint.
    ResourceTypeApi GetAllGitlabBranchesForProject GET /api/v2/resource-types/gitlab/projects/{gitlabProjectId}/branches Retrieves all branches of a GitLab project, that the user is a member of, based on the provided credentials.
    ResourceTypeApi GetAllGitlabProjects GET /api/v2/resource-types/gitlab/projects Retrieves all GitLab projects, that the user is a member of, based on the provided credentials.
    ResourceTypeApi GetAllResourceTypesInformation GET /api/v2/resource-types/types Retrieves the entire global resource types information.
    ResourceTypeApi GetGitlabProject GET /api/v2/resource-types/gitlab/projects/{gitlabProjectId} Retrieves a single GitLab project, that the user is a member of, based on the provided credentials.
    ResourceTypeApi GetResourceTypeInformation GET /api/v2/resource-types/types/{resourceTypeId} Retrieves the resource type information for a specific resource type.
    RoleApi ApiV2RolesOptions OPTIONS /api/v2/roles Responds with the HTTP methods allowed for the endpoint.
    RoleApi GetRole GET /api/v2/roles/{roleId} Retrieves a role by ID.
    RoleApi GetRoles GET /api/v2/roles Retrieves all roles.
    SearchApi ApiV2SearchOptions OPTIONS /api/v2/search Responds with the HTTP methods allowed for the endpoint.
    SearchApi GetSearchResults GET /api/v2/search Retrieves a search result by given search parameters.
    SelfApi AcceptCurrentTos POST /api/v2/self/tos Accepts the current Terms Of Service for the current authenticated user.
    SelfApi ApiV2SelfOptions OPTIONS /api/v2/self Responds with the HTTP methods allowed for the endpoint.
    SelfApi ConfirmUserEmail POST /api/v2/self/emails Confirms the email of a user.
    SelfApi GetCurrentUser GET /api/v2/self Retrieves the current authenticated user.
    SelfApi InitiateUserMerge POST /api/v2/self/identities Initiates user merging for the current user.
    SelfApi ResolveProjectInvitation POST /api/v2/self/project-invitations Resolves a project invitation for the authenticated user.
    SelfApi UpdateCurrentUser PUT /api/v2/self Updates the current authenticated user.
    SelfApiTokenApi ApiV2SelfApiTokensOptions OPTIONS /api/v2/self/api-tokens Responds with the HTTP methods allowed for the endpoint.
    SelfApiTokenApi CreateApiToken POST /api/v2/self/api-tokens Creates an API token for the current authenticated user.
    SelfApiTokenApi GetAllApiTokens GET /api/v2/self/api-tokens Retrieves all API tokens for the current authenticated user.
    SelfApiTokenApi GetApiToken GET /api/v2/self/api-tokens/{apiTokenId} Retrieves an API token for the current authenticated user.
    SelfApiTokenApi RevokeToken DELETE /api/v2/self/api-tokens/{apiTokenId} Revokes an API token for the current authenticated user.
    TitleApi ApiV2TitlesOptions OPTIONS /api/v2/titles Responds with the HTTP methods allowed for the endpoint.
    TitleApi GetTitle GET /api/v2/titles/{titleId} Retrieves a title by ID.
    TitleApi GetTitles GET /api/v2/titles Retrieves all titles.
    TosApi ApiV2TosOptions OPTIONS /api/v2/tos Responds with the HTTP methods allowed for the endpoint.
    TosApi GetTos GET /api/v2/tos Retrieves the current Terms of Service version.
    TreeApi ApiV2ProjectsProjectIdResourcesResourceIdTreesOptions OPTIONS /api/v2/projects/{projectId}/resources/{resourceId}/trees Responds with the HTTP methods allowed for the endpoint.
    TreeApi CreateExtractedMetadataTree POST /api/v2/projects/{projectId}/resources/{resourceId}/trees/metadata/extracted Creates a new extracted metadata tree for a resource.
    TreeApi CreateMetadataTree POST /api/v2/projects/{projectId}/resources/{resourceId}/trees/metadata Creates a new metadata tree for a resource.
    TreeApi DeleteMetadataTree DELETE /api/v2/projects/{projectId}/resources/{resourceId}/trees/metadata Deletes (invalidates) a metadata tree associated with a resource.
    TreeApi GetFileTree GET /api/v2/projects/{projectId}/resources/{resourceId}/trees/files Retrieves the file tree associated with a resource.
    TreeApi GetMetadataTree GET /api/v2/projects/{projectId}/resources/{resourceId}/trees/metadata Retrieves the metadata tree associated with a resource.
    TreeApi GetSpecificMetadataTree GET /api/v2/projects/{projectId}/resources/{resourceId}/trees/metadata/specific Retrieves the specific metadata tree associated with a resource.
    TreeApi UpdateExtractedMetadataTree PUT /api/v2/projects/{projectId}/resources/{resourceId}/trees/metadata/extracted Updates an existing metadata tree of a resource.
    TreeApi UpdateMetadataTree PUT /api/v2/projects/{projectId}/resources/{resourceId}/trees/metadata Updates an existing metadata tree of a resource.
    UserApi ApiV2UsersOptions OPTIONS /api/v2/users Responds with the HTTP methods allowed for the endpoint.
    UserApi GetUsers GET /api/v2/users Retrieves all users.
    VisibilityApi ApiV2VisibilitiesOptions OPTIONS /api/v2/visibilities Responds with the HTTP methods allowed for the endpoint.
    VisibilityApi GetVisibilities GET /api/v2/visibilities Retrieves all visibilities.
    VisibilityApi GetVisibility GET /api/v2/visibilities/{visibilityId} Retrieves a visibility by ID.
    VocabularyApi ApiV2VocabulariesOptions OPTIONS /api/v2/vocabularies Responds with the HTTP methods allowed for the endpoint.
    VocabularyApi GetVocabularies GET /api/v2/vocabularies Retrieves top-level instances from vocabularies.
    VocabularyApi GetVocabularyInstance GET /api/v2/vocabularies/instances/{instance} Retrieves a single instance from a vocabulary.
    VocabularyApi GetVocabularyInstances GET /api/v2/vocabularies/instances Retrieves vocabulary instances.

    Documentation for Models

    Documentation for Authorization

    Authentication schemes defined for the API:

    Bearer

    • Type: API key
    • API key parameter name: Authorization
    • Location: HTTP header