Skip to content

Latest commit

 

History

History
299 lines (236 loc) · 9.62 KB

AnnotationApi.md

File metadata and controls

299 lines (236 loc) · 9.62 KB

Pieces.Os.Core.Api.AnnotationApi

All URIs are relative to http://localhost:1000

Method HTTP request Description
AnnotationScoresIncrement POST /annotation/{annotation}/scores/increment '/annotation/{annotation}/scores/increment' [POST]
AnnotationSpecificAnnotationSnapshot GET /annotation/{annotation} /annotation/{annotation} [GET]
AnnotationUpdate POST /annotation/update /annotation/update [POST]

AnnotationScoresIncrement

void AnnotationScoresIncrement (string annotation, SeededScoreIncrement seededScoreIncrement = null)

'/annotation/{annotation}/scores/increment' [POST]

This will take in a SeededScoreIncrement and will increment the material relative to the incoming body.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Pieces.Os.Core.Api;
using Pieces.Os.Core.Client;
using Pieces.Os.Core.SdkModel;

namespace Example
{
    public class AnnotationScoresIncrementExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "http://localhost:1000";
            // Configure API key authorization: application
            config.AddApiKey("X-Application-ID", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("X-Application-ID", "Bearer");

            var apiInstance = new AnnotationApi(config);
            var annotation = "annotation_example";  // string | This is a specific annotation uuid.
            var seededScoreIncrement = new SeededScoreIncrement(); // SeededScoreIncrement |  (optional) 

            try
            {
                // '/annotation/{annotation}/scores/increment' [POST]
                apiInstance.AnnotationScoresIncrement(annotation, seededScoreIncrement);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling AnnotationApi.AnnotationScoresIncrement: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the AnnotationScoresIncrementWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // '/annotation/{annotation}/scores/increment' [POST]
    apiInstance.AnnotationScoresIncrementWithHttpInfo(annotation, seededScoreIncrement);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling AnnotationApi.AnnotationScoresIncrementWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
annotation string This is a specific annotation uuid.
seededScoreIncrement SeededScoreIncrement [optional]

Return type

void (empty response body)

Authorization

application

HTTP request headers

  • Content-Type: application/json
  • Accept: text/plain

HTTP response details

Status code Description Response headers
204 No Content -
500 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AnnotationSpecificAnnotationSnapshot

Annotation AnnotationSpecificAnnotationSnapshot (string annotation)

/annotation/{annotation} [GET]

This will get a snapshot of a specific annotation.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Pieces.Os.Core.Api;
using Pieces.Os.Core.Client;
using Pieces.Os.Core.SdkModel;

namespace Example
{
    public class AnnotationSpecificAnnotationSnapshotExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "http://localhost:1000";
            // Configure API key authorization: application
            config.AddApiKey("X-Application-ID", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("X-Application-ID", "Bearer");

            var apiInstance = new AnnotationApi(config);
            var annotation = "annotation_example";  // string | This is a specific annotation uuid.

            try
            {
                // /annotation/{annotation} [GET]
                Annotation result = apiInstance.AnnotationSpecificAnnotationSnapshot(annotation);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling AnnotationApi.AnnotationSpecificAnnotationSnapshot: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the AnnotationSpecificAnnotationSnapshotWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // /annotation/{annotation} [GET]
    ApiResponse<Annotation> response = apiInstance.AnnotationSpecificAnnotationSnapshotWithHttpInfo(annotation);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling AnnotationApi.AnnotationSpecificAnnotationSnapshotWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
annotation string This is a specific annotation uuid.

Return type

Annotation

Authorization

application

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/plain

HTTP response details

Status code Description Response headers
200 OK -
500 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

AnnotationUpdate

Annotation AnnotationUpdate (Annotation annotation = null)

/annotation/update [POST]

This will update a specific annotation.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Pieces.Os.Core.Api;
using Pieces.Os.Core.Client;
using Pieces.Os.Core.SdkModel;

namespace Example
{
    public class AnnotationUpdateExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "http://localhost:1000";
            // Configure API key authorization: application
            config.AddApiKey("X-Application-ID", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("X-Application-ID", "Bearer");

            var apiInstance = new AnnotationApi(config);
            var annotation = new Annotation(); // Annotation |  (optional) 

            try
            {
                // /annotation/update [POST]
                Annotation result = apiInstance.AnnotationUpdate(annotation);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling AnnotationApi.AnnotationUpdate: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the AnnotationUpdateWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // /annotation/update [POST]
    ApiResponse<Annotation> response = apiInstance.AnnotationUpdateWithHttpInfo(annotation);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling AnnotationApi.AnnotationUpdateWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
annotation Annotation [optional]

Return type

Annotation

Authorization

application

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, text/plain

HTTP response details

Status code Description Response headers
200 OK -
500 Internal Server Error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]