All URIs are relative to http://localhost:7072/api
Method | HTTP request | Description |
---|---|---|
HttpPublishedAssetsCreate | POST /assets/{id}/publish | |
HttpPublishedAssetsGet | GET /assets/{id}/publish | |
HttpPublishedAssetsGetById | GET /assets/{id}/publish/{pid} |
PublishedAsset HttpPublishedAssetsCreate (string id, PublishedAsset publishedAsset)
This endpoint creates an additional published asset
using System.Collections.Generic;
using System.Diagnostics;
using Agravity.Public.Api;
using Agravity.Public.Client;
using Agravity.Public.Model;
namespace Example
{
public class HttpPublishedAssetsCreateExample
{
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 PublicAssetPublishingApi(config);
var id = "id_example"; // string | The ID of the asset.
var publishedAsset = new PublishedAsset(); // PublishedAsset | This creates / adds an unique published asset ID and adds the information to the asset (in DB).
try
{
PublishedAsset result = apiInstance.HttpPublishedAssetsCreate(id, publishedAsset);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling PublicAssetPublishingApi.HttpPublishedAssetsCreate: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<PublishedAsset> response = apiInstance.HttpPublishedAssetsCreateWithHttpInfo(id, publishedAsset);
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 PublicAssetPublishingApi.HttpPublishedAssetsCreateWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | The ID of the asset. | |
publishedAsset | PublishedAsset | This creates / adds an unique published asset ID and adds the information to the asset (in DB). |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Returns the created published-asset entity. | - |
400 | Could not publish asset because asset or original blob could not be found. (Code: 0da83425-da4e-4586-ae31-ba51e2c84f2c)<br>Could not publish an asset which is not active. (Code: be0b47c9-cf24-4cb8-a4ab-f17cdfe6dc4e)<br>Could not publish an asset which is locked. (Code: 16dbd27d-51f8-4556-a874-6cd7ddd7a1a8)<br>Could not resize asset <assedId> for publishing. (Code: 2d9187ac-dc37-4365-a633-7ef90a326d0f)<br>Could not find optimized asset <assetId> for publishing. (Code: e59e01cb-3f39-4c36-9c71-3d28bcabe486)<br>Tried to access not existion blob: <assetId> does not exists.... (Code: a96e079b-61b3-492a-8adb-93b399287b46)<br>Publish to this target is not supported. (Code: 8136f041-60e4-40de-b534-71a7250095cc)<br>Publishing of asset <assetId> failed. Blob could not be created. (Code: 43089864-d2a4-4a42-a2c2-1a9a2048bb58)<br>Could not update asset with ID <assedId> (Code: 87429a31-01cd-4a62-9afb-81d0a56a59d2) | - |
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]
PublishEntity HttpPublishedAssetsGet (string id)
This endpoint lists all the published assets which are stored in the database if asset is still valid.
using System.Collections.Generic;
using System.Diagnostics;
using Agravity.Public.Api;
using Agravity.Public.Client;
using Agravity.Public.Model;
namespace Example
{
public class HttpPublishedAssetsGetExample
{
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 PublicAssetPublishingApi(config);
var id = "id_example"; // string | The ID of the asset.
try
{
PublishEntity result = apiInstance.HttpPublishedAssetsGet(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling PublicAssetPublishingApi.HttpPublishedAssetsGet: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<PublishEntity> response = apiInstance.HttpPublishedAssetsGetWithHttpInfo(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 PublicAssetPublishingApi.HttpPublishedAssetsGetWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | The ID of the asset. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Returns the all published assets as . | - |
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]
PublishedAsset HttpPublishedAssetsGetById (string id, string pid)
This endpoint returns one single published asset (from ID). Not checked if assetId is not deleted!
using System.Collections.Generic;
using System.Diagnostics;
using Agravity.Public.Api;
using Agravity.Public.Client;
using Agravity.Public.Model;
namespace Example
{
public class HttpPublishedAssetsGetByIdExample
{
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 PublicAssetPublishingApi(config);
var id = "id_example"; // string | The ID of the asset.
var pid = "pid_example"; // string | The published asset ID.
try
{
PublishedAsset result = apiInstance.HttpPublishedAssetsGetById(id, pid);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling PublicAssetPublishingApi.HttpPublishedAssetsGetById: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<PublishedAsset> response = apiInstance.HttpPublishedAssetsGetByIdWithHttpInfo(id, pid);
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 PublicAssetPublishingApi.HttpPublishedAssetsGetByIdWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | The ID of the asset. | |
pid | string | The published asset ID. |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Returns the published asset with the given ID. | - |
401 | Unauthorized. API Key not provided. | - |
404 | If the asset or published asset with the IDs were not found. | - |
500 | Internal server error. Please contact administrator. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]