This API is still in development. All API methods are functional, they are however subject to change in future Elvis versions.
The Elvis REST API allows you to customize and integrate external applications with Elvis. Some examples of what you can do with the API:
- Search assets.
- Download assets, previews, or other renditions.
- Upload new assets.
- Change asset metadata.
- Search, create, rename and delete folders.
- Create Shared Links.
1. Authenticate using /services/apilogin For example:
curl -X POST http://localhost:8080/services/apilogin -F username=admin -F password=changemenow
2. Copy the authToken.
3. Click the Authorize button and use 'Bearer <authToken>' as value.
4. Click Authorize, the page is now authorized and you can try out the API methods.
This PHP package is automatically generated by the Swagger Codegen project:
- API version: 3.0.1
- Build package: io.swagger.codegen.languages.PhpClientCodegen
PHP 5.5 and later
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "git",
"url": "https://github.com//.git"
}
],
"require": {
"/": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php
:
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
To run the unit tests:
composer install
./vendor/bin/phpunit
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: Authorization
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new Swagger\Client\Api\AssetApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = "id_example"; // string | Asset identifier
try {
$result = $apiInstance->asset($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AssetApi->asset: ', $e->getMessage(), PHP_EOL;
}
?>
All URIs are relative to https://dam.vaf.be
Class | Method | HTTP request | Description |
---|---|---|---|
AssetApi | asset | GET /api/asset/{id} | Get Asset |
AssetApi | createAsset | POST /api/asset | Create an asset |
AssetApi | getSignedImageRenditionUrls | GET /api/asset/{ids}/signed-image-rendition-url | Get a signed URL for image renditions. |
AssetApi | getSignedOriginalUrls | GET /api/asset/{ids}/signed-original-url | Get a signed URL for original assets. |
AssetApi | getSignedPreviewUrls | GET /api/asset/{ids}/signed-preview-url | Get a signed URL for asset previews. |
AssetApi | getSignedThumbnailUrls | GET /api/asset/{ids}/signed-thumbnail-url | Get a signed URL for asset thumbnails. |
AssetApi | original | GET /api/asset/{id}/original | Download Asset Original |
AssetApi | preview | GET /api/asset/{id}/preview | Download Asset Preview |
AssetApi | putOriginal | PUT /api/asset/{id}/original | Upload a file for an asset using PUT. |
AssetApi | search | GET /api/asset/search | Search Assets |
AssetApi | thumbnail | GET /api/asset/{id}/thumbnail | Download Asset Thumbnail |
AssetApi | uploadOriginal | POST /api/asset/{id}/original | Upload a file for an asset using multi-part POST. |
FolderApi | createFolder | POST /api/folder | Create a folder |
FolderApi | deleteFolder | DELETE /api/folder/{id} | Delete a folder |
FolderApi | getFolder | GET /api/folder/{id} | Get a folder |
FolderApi | getFolderByPath | GET /api/folder/get | Get a folder |
FolderApi | listFolders | GET /api/folder/list | List folders |
FolderApi | searchFolders | GET /api/folder/search | Search folders |
FolderApi | updateFolderMetadata | PUT /api/folder/{id} | Update folder metadata |
SharelinkApi | createShareLink | POST /api/sharelink | Create a Share Link |
- ApiFolder
- CreateAssetRequest
- CreateAssetResponse
- CreateFolderRequest
- CreateShareLinkRequest
- CreateShareLinkResponse
- FolderSearchResponse
- Hit
- HitElement
- InputStream
- SearchResponse
- SignedAssetUrl
- UpdateFolderMetadataRequest
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header