Skip to content

Latest commit

 

History

History
689 lines (543 loc) · 24.8 KB

PublicPortalManagementApi.md

File metadata and controls

689 lines (543 loc) · 24.8 KB

Agravity.Public.Api.PublicPortalManagementApi

All URIs are relative to http://localhost:7072/api

Method HTTP request Description
HttpPortalGetAllAssetIdsById GET /portals/{id}/assetids
HttpPortalGetStatusZipById GET /portals/{id}/zip/{zipId}
HttpPortalRequestZipById POST /portals/{id}/zip
HttpPortalsConfigurationGetById GET /portals/{id}/config
HttpPortalsEnhanceToken POST /portalsenhancetoken
HttpPortalsGetById GET /portals/{id}
HttpPortalsSavePortalUserAttributes POST /portalssaveuserattributes

HttpPortalGetAllAssetIdsById

List<string> HttpPortalGetAllAssetIdsById (string id)

This endpoint gets all Asset IDs in portal scope.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Agravity.Public.Api;
using Agravity.Public.Client;
using Agravity.Public.Model;

namespace Example
{
    public class HttpPortalGetAllAssetIdsByIdExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "http://localhost:7072/api";
            // Configure API key authorization: function_key
            config.AddApiKey("x-functions-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-functions-key", "Bearer");

            var apiInstance = new PublicPortalManagementApi(config);
            var id = "id_example";  // string | The ID of the portal.

            try
            {
                List<string> result = apiInstance.HttpPortalGetAllAssetIdsById(id);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling PublicPortalManagementApi.HttpPortalGetAllAssetIdsById: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the HttpPortalGetAllAssetIdsByIdWithHttpInfo variant

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

try
{
    ApiResponse<List<string>> response = apiInstance.HttpPortalGetAllAssetIdsByIdWithHttpInfo(id);
    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 PublicPortalManagementApi.HttpPortalGetAllAssetIdsByIdWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
id string The ID of the portal.

Return type

List

Authorization

function_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Returns all Asset IDs in scope of the portal. -
400 Portal ID is mandatory and not valid. (Code: f2817cb8-8573-4205-b45d-1b9a7f3d8cbb) -
401 Unauthorized. API Key not provided. -
404 The requested item could not be found. -
500 Internal server error. Please contact administrator. -

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

HttpPortalGetStatusZipById

PortalZipRequest HttpPortalGetStatusZipById (string id, string zipId)

This endpoint gets the progress/status of the ZIP creation of a portal.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Agravity.Public.Api;
using Agravity.Public.Client;
using Agravity.Public.Model;

namespace Example
{
    public class HttpPortalGetStatusZipByIdExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "http://localhost:7072/api";
            // Configure API key authorization: function_key
            config.AddApiKey("x-functions-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-functions-key", "Bearer");

            var apiInstance = new PublicPortalManagementApi(config);
            var id = "id_example";  // string | The ID of the zip request collection.
            var zipId = "zipId_example";  // string | The ID of the requested zip.

            try
            {
                PortalZipRequest result = apiInstance.HttpPortalGetStatusZipById(id, zipId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling PublicPortalManagementApi.HttpPortalGetStatusZipById: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the HttpPortalGetStatusZipByIdWithHttpInfo variant

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

try
{
    ApiResponse<PortalZipRequest> response = apiInstance.HttpPortalGetStatusZipByIdWithHttpInfo(id, zipId);
    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 PublicPortalManagementApi.HttpPortalGetStatusZipByIdWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
id string The ID of the zip request collection.
zipId string The ID of the requested zip.

Return type

PortalZipRequest

Authorization

function_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Returns the zip request for a portal with the given ID. -
400 Not valid zip request id! (Code: 15331af9-82d6-41ba-a015-47c23f864eec)<br>Zip request is no longer available! (Code: 18b7b4aa-6b4a-4da4-b8b3-c7ab1381e28c) -
401 Unauthorized. API Key not provided. -
500 Internal server error. Please contact administrator. -

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

HttpPortalRequestZipById

PortalZipRequest HttpPortalRequestZipById (string id, PortalZipRequest portalZipRequest)

Initiates the ZIP creation of an asset basket from an portal.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Agravity.Public.Api;
using Agravity.Public.Client;
using Agravity.Public.Model;

namespace Example
{
    public class HttpPortalRequestZipByIdExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "http://localhost:7072/api";
            // Configure API key authorization: function_key
            config.AddApiKey("x-functions-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-functions-key", "Bearer");

            var apiInstance = new PublicPortalManagementApi(config);
            var id = "id_example";  // string | The ID of the portal.
            var portalZipRequest = new PortalZipRequest(); // PortalZipRequest | The allowed formats are the input which could be added.

            try
            {
                PortalZipRequest result = apiInstance.HttpPortalRequestZipById(id, portalZipRequest);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling PublicPortalManagementApi.HttpPortalRequestZipById: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the HttpPortalRequestZipByIdWithHttpInfo variant

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

try
{
    ApiResponse<PortalZipRequest> response = apiInstance.HttpPortalRequestZipByIdWithHttpInfo(id, portalZipRequest);
    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 PublicPortalManagementApi.HttpPortalRequestZipByIdWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
id string The ID of the portal.
portalZipRequest PortalZipRequest The allowed formats are the input which could be added.

Return type

PortalZipRequest

Authorization

function_key

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 Returns the portal with the given ID. -
400 Not valid portal id! (Code: 00b410fe-97d1-4952-ba0b-327d22514934)<br>Object is not a valid PortalZipRequest. (Code: a51d1697-f56e-4fa3-bde8-3ab44e6cbb0a)<br>No allowed formats are given! (Code: 684df4b1-e0c5-4b07-8c81-cb9835e0bd00)<br>No asset ids are given! (Code: e8361816-fcc9-48b9-99d4-2133dfed7721)<br>Not all asset ids are valid! (Code: 0619480f-fa10-4c45-a60d-cb269d8be7b4)<br>Portal not found in database! (Code: 50a49113-cbcf-470c-ab8c-098dcd23cd0f)<br>Not all allowed formats are in the portal allowed formats! (Code: c679981e-fbaa-4941-90aa-3b99b1d5a748)<br>Not all asset ids are valid for this portal! (Code: 01e22b3a-13f9-4d5a-a777-2c69ce7b5b05)<br>No matching allowed formats for requested assets. (Code: bd27176f-9a4d-44ac-9055-9359b405558e)<br>Not all asset types have an allowed format in this request! (Code: 2289c7b1-0351-4815-b280-ce4628bdb3dd)<br>Error on upsert zipRequest in database - max retry count is reached. (Code:7a627b8f-11f8-4bbb-bcbd-9f6f5726557a) -
404 Portal not found. (Code: 87d09a21-14d6-4da4-ab69-01e6c87f108c)<br> -
401 Unauthorized. API Key not provided. -
500 Internal server error. Please contact administrator. -

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

HttpPortalsConfigurationGetById

PortalConfiguration HttpPortalsConfigurationGetById (string id, bool? translations = null, string acceptLanguage = null)

This endpoint returns a full configuration of the portal. Incl. download formats, SDLs, UDLs, etc.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Agravity.Public.Api;
using Agravity.Public.Client;
using Agravity.Public.Model;

namespace Example
{
    public class HttpPortalsConfigurationGetByIdExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "http://localhost:7072/api";
            // Configure API key authorization: function_key
            config.AddApiKey("x-functions-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-functions-key", "Bearer");

            var apiInstance = new PublicPortalManagementApi(config);
            var id = "id_example";  // string | The ID of the portal.
            var translations = true;  // bool? | When default language should be returned and the translation dictionary is delivered. (Ignores the \"Accept-Language\" header) (optional) 
            var acceptLanguage = "acceptLanguage_example";  // string | The requested language of the response. If not matching it falls back to default language. (optional) 

            try
            {
                PortalConfiguration result = apiInstance.HttpPortalsConfigurationGetById(id, translations, acceptLanguage);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling PublicPortalManagementApi.HttpPortalsConfigurationGetById: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the HttpPortalsConfigurationGetByIdWithHttpInfo variant

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

try
{
    ApiResponse<PortalConfiguration> response = apiInstance.HttpPortalsConfigurationGetByIdWithHttpInfo(id, translations, acceptLanguage);
    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 PublicPortalManagementApi.HttpPortalsConfigurationGetByIdWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
id string The ID of the portal.
translations bool? When default language should be returned and the translation dictionary is delivered. (Ignores the &quot;Accept-Language&quot; header) [optional]
acceptLanguage string The requested language of the response. If not matching it falls back to default language. [optional]

Return type

PortalConfiguration

Authorization

function_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Returns a full configuration of a portal. -
401 Unauthorized. API Key not provided. -
500 Internal server error. Please contact administrator. -

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

HttpPortalsEnhanceToken

CustomClaimsProviderResponseContentTokenIssuanceStart HttpPortalsEnhanceToken ()

This endpoint saves the portal user and returns CustomClaimsProviderResponseContentTokenIssuanceStart which is used to enhance the token with user context,...

Example

using System.Collections.Generic;
using System.Diagnostics;
using Agravity.Public.Api;
using Agravity.Public.Client;
using Agravity.Public.Model;

namespace Example
{
    public class HttpPortalsEnhanceTokenExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "http://localhost:7072/api";
            // Configure API key authorization: function_key
            config.AddApiKey("x-functions-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-functions-key", "Bearer");

            var apiInstance = new PublicPortalManagementApi(config);

            try
            {
                CustomClaimsProviderResponseContentTokenIssuanceStart result = apiInstance.HttpPortalsEnhanceToken();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling PublicPortalManagementApi.HttpPortalsEnhanceToken: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the HttpPortalsEnhanceTokenWithHttpInfo variant

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

try
{
    ApiResponse<CustomClaimsProviderResponseContentTokenIssuanceStart> response = apiInstance.HttpPortalsEnhanceTokenWithHttpInfo();
    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 PublicPortalManagementApi.HttpPortalsEnhanceTokenWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

This endpoint does not need any parameter.

Return type

CustomClaimsProviderResponseContentTokenIssuanceStart

Authorization

function_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Returns CustomClaimsProviderResponseContentTokenIssuanceStart. -
401 Unauthorized. API Key not provided. -
500 Internal server error. Please contact administrator. -

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

HttpPortalsGetById

Portal HttpPortalsGetById (string id)

This endpoint return the created portal by ID.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Agravity.Public.Api;
using Agravity.Public.Client;
using Agravity.Public.Model;

namespace Example
{
    public class HttpPortalsGetByIdExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "http://localhost:7072/api";
            // Configure API key authorization: function_key
            config.AddApiKey("x-functions-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-functions-key", "Bearer");

            var apiInstance = new PublicPortalManagementApi(config);
            var id = "id_example";  // string | The ID of the portal.

            try
            {
                Portal result = apiInstance.HttpPortalsGetById(id);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling PublicPortalManagementApi.HttpPortalsGetById: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the HttpPortalsGetByIdWithHttpInfo variant

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

try
{
    ApiResponse<Portal> response = apiInstance.HttpPortalsGetByIdWithHttpInfo(id);
    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 PublicPortalManagementApi.HttpPortalsGetByIdWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
id string The ID of the portal.

Return type

Portal

Authorization

function_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Returns on portal from database. -
401 Unauthorized. API Key not provided. -
500 Internal server error. Please contact administrator. -

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

HttpPortalsSavePortalUserAttributes

CustomClaimsProviderResponseContentAttributeCollectionSubmit HttpPortalsSavePortalUserAttributes ()

This endpoint saves the portal user attributes

Example

using System.Collections.Generic;
using System.Diagnostics;
using Agravity.Public.Api;
using Agravity.Public.Client;
using Agravity.Public.Model;

namespace Example
{
    public class HttpPortalsSavePortalUserAttributesExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "http://localhost:7072/api";
            // Configure API key authorization: function_key
            config.AddApiKey("x-functions-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-functions-key", "Bearer");

            var apiInstance = new PublicPortalManagementApi(config);

            try
            {
                CustomClaimsProviderResponseContentAttributeCollectionSubmit result = apiInstance.HttpPortalsSavePortalUserAttributes();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling PublicPortalManagementApi.HttpPortalsSavePortalUserAttributes: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the HttpPortalsSavePortalUserAttributesWithHttpInfo variant

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

try
{
    ApiResponse<CustomClaimsProviderResponseContentAttributeCollectionSubmit> response = apiInstance.HttpPortalsSavePortalUserAttributesWithHttpInfo();
    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 PublicPortalManagementApi.HttpPortalsSavePortalUserAttributesWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

This endpoint does not need any parameter.

Return type

CustomClaimsProviderResponseContentAttributeCollectionSubmit

Authorization

function_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Returns CustomClaimsProviderResponseContentAttributeCollectionSubmit -
401 Unauthorized. API Key not provided. -
500 Internal server error. Please contact administrator. -

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