- Collection type management
- Collections management
- Assets management
- Assets operations
- Assets publishing
- Collection Sharing (consume share)
- Secure Upload (validate + upload file)
- Download ZIP
- Search
- General management
- List / get single collection types
- List / get single collections
- List / get single assets
- Operations on assets like: blobs, rotate, resize, similar, collections, customfields, download
- List / get single published asset
- Search for assets or collections
- Get version of deployment
API key is needed to access these endpoints.
Copyright © Agravity GmbH 2025. All Rights Reserved
This C# SDK is automatically generated by the OpenAPI Generator project:
- API version: 8.4.2
- SDK version: 8.4.2
- Generator version: 7.8.0
- Build package: org.openapitools.codegen.languages.CSharpClientCodegen For more information, please visit https://agravity.io
- .NET Core >=1.0
- .NET Framework >=4.6
- Mono/Xamarin >=vNext
- RestSharp - 106.13.0 or later
- Json.NET - 13.0.2 or later
- JsonSubTypes - 1.8.0 or later
- System.ComponentModel.Annotations - 5.0.0 or later
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.
Generate the DLL using your preferred tool (e.g. dotnet build
)
Then include the DLL (under the bin
folder) in the C# project, and use the namespaces:
using Agravity.Public.Api;
using Agravity.Public.Client;
using Agravity.Public.Model;
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;
using System.Collections.Generic;
using System.Diagnostics;
using Agravity.Public.Api;
using Agravity.Public.Client;
using Agravity.Public.Model;
namespace Example
{
public class Example
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://localhost:7072/api";
// Configure API key authorization: function_key
config.ApiKey.Add("x-functions-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.ApiKeyPrefix.Add("x-functions-key", "Bearer");
var apiInstance = new PublicAssetManagementApi(config);
var acceptLanguage = "acceptLanguage_example"; // string | The requested language of the response. If not matching it falls back to default language. (optional)
var name = "name_example"; // string | (optional)
var collectionid = "collectionid_example"; // string | (optional)
var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | (optional)
var filename = "filename_example"; // string | (optional)
var previewof = "previewof_example"; // string | (optional)
try
{
Asset result = apiInstance.HttpAssetUploadFile(acceptLanguage, name, collectionid, file, filename, previewof);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling PublicAssetManagementApi.HttpAssetUploadFile: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
All URIs are relative to http://localhost:7072/api
Class | Method | HTTP request | Description |
---|---|---|---|
PublicAssetManagementApi | HttpAssetUploadFile | POST /assetsupload | |
PublicAssetManagementApi | HttpAssetsCreate | POST /assets | |
PublicAssetManagementApi | HttpAssetsGet | GET /assets | |
PublicAssetManagementApi | HttpAssetsGetById | GET /assets/{id} | |
PublicAssetManagementApi | HttpPublicAssetsUpdateById | POST /assets/{id} | |
PublicAssetOperationsApi | HttpAssetImageEdit | GET /assets/{id}/imageedit | |
PublicAssetOperationsApi | HttpAssetResize | GET /assets/{id}/resize | |
PublicAssetOperationsApi | HttpAssetToCollection | POST /assets/{id}/tocollection | |
PublicAssetOperationsApi | HttpGetAssetBlob | GET /assets/{id}/blobs | |
PublicAssetOperationsApi | HttpGetAssetCollectionsById | GET /assets/{id}/collections | |
PublicAssetOperationsApi | HttpGetAssetDownload | GET /assets/{id}/download | |
PublicAssetOperationsApi | HttpGetSharedAssetBlob | GET /assets/{id}/blob | |
PublicAssetOperationsApi | HttpImageDynamicEdit | POST /assets/{id}/imageedit | |
PublicAssetOperationsApi | HttpImageDynamicGetFromDownloadId | GET /assets/{id}/imageedit/{download_format_id} | |
PublicAssetOperationsApi | HttpPutAssetAvailability | PUT /assets/{id}/availability | |
PublicAssetPublishingApi | HttpPublishedAssetsCreate | POST /assets/{id}/publish | |
PublicAssetPublishingApi | HttpPublishedAssetsGet | GET /assets/{id}/publish | |
PublicAssetPublishingApi | HttpPublishedAssetsGetById | GET /assets/{id}/publish/{pid} | |
PublicAssetVersioningApi | HttpAssetCreateUploadVersion | POST /assets/{id}/versionsupload | |
PublicAssetVersioningApi | HttpAssetCreateVersion | POST /assets/{id}/versions | |
PublicAssetVersioningApi | HttpDeleteVersionedAssetsById | DELETE /assets/{id}/versions/{vNr} | |
PublicAssetVersioningApi | HttpGetVersionedAssetBlobById | GET /assets/{id}/versions/{vNr}/blobs | |
PublicAssetVersioningApi | HttpRestoreVersionedAssetsById | POST /assets/{id}/versions/{vNr}/restore | |
PublicAssetVersioningApi | HttpUpdateVersionedAssetsById | POST /assets/{id}/versions/{vNr} | |
PublicAssetVersioningApi | HttpVersionedAssetsGet | GET /assets/{id}/versions | |
PublicAuthenticationManagementApi | HttpAuthGetContainerWriteSasToken | GET /auth/containerwrite/{containerName} | |
PublicAuthenticationManagementApi | HttpAuthGetInboxContainerWriteSasToken | GET /auth/inbox | |
PublicCollectionManagementApi | HttpCollectionsCreate | POST /collections | |
PublicCollectionManagementApi | HttpCollectionsGet | GET /collections | |
PublicCollectionManagementApi | HttpCollectionsGetById | GET /collections/{id} | |
PublicCollectionManagementApi | HttpCollectionsGetDescendantsTreeOfId | GET /collections/{id}/descendants | |
PublicCollectionManagementApi | HttpCollectionsGetTreeAncestorsOfId | GET /collections/{id}/ancestors | |
PublicCollectionManagementApi | HttpGetCollectionPreviewsById | GET /collections/{id}/previews | |
PublicCollectionManagementApi | HttpPublicCollectionsDeleteById | DELETE /collections/{id} | |
PublicCollectionManagementApi | HttpPublicCollectionsUpdateById | POST /collections/{id} | |
PublicCollectionSecureUploadApi | HttpSecureUploadEntityCheckById | GET /secureupload/{id} | |
PublicCollectionSecureUploadApi | HttpSecureUploadFileById | POST /secureupload/{id}/upload | |
PublicCollectionTypeManagementApi | HttpCollectionTypesGet | GET /collectiontypes | |
PublicCollectionTypeManagementApi | HttpCollectionTypesGetById | GET /collectiontypes/{id} | |
PublicCollectionTypeManagementApi | HttpGetCollectionTypeItems | GET /collectiontypesitems | |
PublicConfigurationManagementApi | HttpConfigGetFrontendAll | GET /config/frontend | |
PublicDownloadFormatManagementApi | HttpDownloadFormatsGetAll | GET /downloadformats | |
PublicDownloadFormatManagementApi | HttpDownloadFormatsGetAllFromShared | GET /downloadformats-shared | |
PublicEndpointsApi | HttpAssetGetViewForPortal | GET /public/view | |
PublicGeneralManagementApi | HttpAgravityVersionInfo | GET /version | |
PublicGeneralManagementApi | HttpGetDeletedEntities | GET /deleted | |
PublicGeneralManagementApi | HttpTriggerDurableContinue | GET /durable/{instanceId} | |
PublicGeneralManagementApi | HttpTriggerDurableScchTrainingDone | GET /durable/scch/{instanceId} | |
PublicHelperToolsApi | HttpGetAllUserDefinedLists | GET /helper/userdefinedlists | |
PublicHelperToolsApi | HttpGetAllowedFilterableItems | GET /helper/filterableitems | |
PublicHelperToolsApi | HttpGetAllowedSearchableItemNames | GET /helper/searchableitemnames | |
PublicHelperToolsApi | HttpGetAllowedSearchableItems | GET /helper/searchableitems | |
PublicHelperToolsApi | HttpPatchUpdateCachedUserDefinedLists | PATCH /helper/userdefinedlists | |
PublicPortalManagementApi | HttpPortalGetAllAssetIdsById | GET /portals/{id}/assetids | |
PublicPortalManagementApi | HttpPortalGetStatusZipById | GET /portals/{id}/zip/{zipId} | |
PublicPortalManagementApi | HttpPortalRequestZipById | POST /portals/{id}/zip | |
PublicPortalManagementApi | HttpPortalsConfigurationGetById | GET /portals/{id}/config | |
PublicPortalManagementApi | HttpPortalsEnhanceToken | POST /portalsenhancetoken | |
PublicPortalManagementApi | HttpPortalsGetById | GET /portals/{id} | |
PublicPortalManagementApi | HttpPortalsSavePortalUserAttributes | POST /portalssaveuserattributes | |
PublicPublishingApi | HttpPublishedAssetsGetAll | GET /publish | |
PublicSavedSearchApi | HttpSavedSearchesGetAll | GET /savedsearches | |
PublicSearchManagementApi | HttpGetSearchFacetteByName | GET /search/facette | |
PublicSearchManagementApi | HttpGlobalSearch | GET /search | |
PublicSearchManagementApi | HttpSearchAdminGetStatus | GET /searchadmin/status | |
PublicSharingManagementApi | HttpQuickShareGetById | GET /quickshares/{id} | |
PublicSharingManagementApi | HttpSharedCollectionsGetById | GET /shared/{id} | |
PublicSharingManagementApi | HttpSharedCollectionsGetStatusZipById | GET /shared/{id}/zip/{zipId} | |
PublicSharingManagementApi | HttpSharedCollectionsRequestZipById | POST /shared/{id}/zip | |
PublicSignalRConnectionManagementApi | HttpSignalRNegotiate | POST /signalr/negotiate | |
PublicStaticDefinedListManagementApi | HttpStaticDefinedListsGetAll | GET /staticdefinedlists | |
PublicStaticDefinedListManagementApi | HttpStaticDefinedListsGetById | GET /staticdefinedlists/{id} | |
PublicStaticDefinedListManagementApi | HttpStaticDefinedListsUpdateById | POST /staticdefinedlists/{id} | |
PublicTranslationManagementApi | HttpTranslationsById | GET /translations/{id} | |
PublicTranslationManagementApi | HttpTranslationsByIdFilterByCustomField | GET /translations/{id}/custom/{customField} | |
PublicTranslationManagementApi | HttpTranslationsByIdFilterByProperty | GET /translations/{id}/{property} | |
PublicWebAppDataApi | HttpGetDataCollectionType | GET /data/collectiontype/{id} | |
PublicWebAppDataApi | HttpGetWebAppData | GET /webappdata/{id} | |
PublicWorkspaceManagementApi | HttpWorkspacesGet | GET /workspaces | |
PublicWorkspaceManagementApi | HttpWorkspacesGetById | GET /workspaces/{id} |
- Model.AgravityErrorResponse
- Model.AgravityInfoResponse
- Model.AgravityVersion
- Model.AllWebAppData
- Model.ArtificialIntelligenceGroup
- Model.Asset
- Model.AssetAvailability
- Model.AssetBlob
- Model.AssetIconRule
- Model.AssetIdFormat
- Model.AssetPageResult
- Model.AzSearchOptions
- Model.CollTypeItem
- Model.Collection
- Model.CollectionType
- Model.CollectionUDL
- Model.CollectionUDLListEntity
- Model.CollectionUDLReference
- Model.CreateSftpUserResult
- Model.CustomClaimsProviderResponseActionAttributeCollectionSubmit
- Model.CustomClaimsProviderResponseActionTokenIssuanceStart
- Model.CustomClaimsProviderResponseClaims
- Model.CustomClaimsProviderResponseContentAttributeCollectionSubmit
- Model.CustomClaimsProviderResponseContentTokenIssuanceStart
- Model.CustomClaimsProviderResponseDataAttributeCollectionSubmit
- Model.CustomClaimsProviderResponseDataTokenIssuanceStart
- Model.DataResult
- Model.DeletedEntities
- Model.DistZipResponse
- Model.DownloadFormat
- Model.DynamicImageOperation
- Model.EntityId
- Model.EntityIdName
- Model.FrontendAppConfig
- Model.GroupAllAppData
- Model.MoveCollectionBody
- Model.PermissionEntity
- Model.Portal
- Model.PortalAuthentication
- Model.PortalConfiguration
- Model.PortalFields
- Model.PortalLinks
- Model.PortalTheme
- Model.PortalUserContext
- Model.PortalZipRequest
- Model.PublishEntity
- Model.PublishedAsset
- Model.QuickShareFull
- Model.SasToken
- Model.SavedSearch
- Model.SearchAdminDataSourceStatus
- Model.SearchAdminIndexStatus
- Model.SearchAdminIndexerLastRun
- Model.SearchAdminIndexerStatus
- Model.SearchAdminSkillStatus
- Model.SearchAdminStatistics
- Model.SearchAdminStatus
- Model.SearchFacet
- Model.SearchFacetEntity
- Model.SearchResult
- Model.SearchableItem
- Model.SecureUploadEntity
- Model.SharedAllowedFormat
- Model.SharedAsset
- Model.SharedCollectionFull
- Model.SharedCollectionZipRequest
- Model.SignalRConnectionInfo
- Model.StaticDefinedList
- Model.VersionEntity
- Model.VersionedAsset
- Model.WhereParam
- Model.Workspace
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: x-functions-key
- Location: HTTP header