ecentral / celum-connect-fal-rest-client
### Authorization If you are already logged into CELUM Content via browser, no further authorization is required. Otherwise, please use one of the below methods: 1. Click on 'Authorize' on the right and either provide an API Key, type in your username/password or use OpenID Connect to log in. 2. O
Package info
github.com/ecentral/celum-connect-fal-rest-client
pkg:composer/ecentral/celum-connect-fal-rest-client
Requires
- php: ^8.1
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
README
Authorization
If you are already logged into CELUM Content via browser, no further authorization is required. Otherwise, please use one of the below methods:
- Click on 'Authorize' on the right and either provide an API Key, type in your username/password or use OpenID Connect to log in.
- OpenId implicit flow is disabled for security reasons and will not work as Authorization option.
Creating an asset
- Request upload via upload endpoint. The endpoint will return a URl for uploading the binary and a upload handle to identify the upload.
- Upload the content of your asset by sending a POST request to the upload URL from step 1 and setting the
Content-Typeheader toapplication/octet-stream. Optionally, you can also use multipart upload withmultipart/form-dataasContent-Type- like our Nova UI. - Create the asset via create asset endpoint by passing in the upload handle from step 1 together with other parameters.
Installation & Usage
Requirements
PHP 8.1 and later.
Composer
To install the bindings via Composer, add the following to composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php:
<?php require_once('/path/to/celum-connect-fal-rest-client/vendor/autoload.php');
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: apiKey $config = Celum\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Celum\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer'); // Configure HTTP basic authorization: basicAuth $config = Celum\Client\Configuration::getDefaultConfiguration() ->setUsername('YOUR_USERNAME') ->setPassword('YOUR_PASSWORD'); $apiInstance = new Celum\Client\Api\AboutApi( // 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 ); $x_celum_username = 'x_celum_username_example'; // string | Provide the username of the user that you want to impersonate try { $result = $apiInstance->getVersion($x_celum_username); print_r($result); } catch (Exception $e) { echo 'Exception when calling AboutApi->getVersion: ', $e->getMessage(), PHP_EOL; }
API Endpoints
All URIs are relative to https://demo.celum.net/content-api/v1
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AboutApi | getVersion | GET /version | Build & version information |
| AssetTypesApi | getAssetType | GET /asset-types/{assetTypeId} | Get an asset type by ID |
| AssetTypesApi | getAssetTypes | GET /asset-types | Get all asset types |
| AssetsApi | createAssetInCollection | POST /assets | Create an asset |
| AssetsApi | deleteAsset | DELETE /assets/{assetId} | Delete an asset by ID |
| AssetsApi | findAssets | POST /assets/search | Find all assets matching the complex criteria |
| AssetsApi | getAsset | GET /assets/{assetId} | Get an asset by ID |
| AssetsApi | getAssets | GET /assets | Get all assets matching the criteria |
| AssetsApi | updateAsset | PATCH /assets/{assetId} | Update an asset by ID |
| ClientsApi | getClient | GET /clients/{clientId} | Get the client configuration by ID |
| CollectionTypesApi | getCollectionType | GET /collection-types/{collectionTypeId} | Get collection type by ID. |
| CollectionTypesApi | getCollectionTypes | GET /collection-types | Get all collection types. |
| CollectionsApi | createCollection | POST /collections | Create a collection |
| CollectionsApi | deleteCollection | DELETE /collections/{collectionId} | Delete a collection by ID |
| CollectionsApi | findCollections | POST /collections/search | Get all collections matching the criteria |
| CollectionsApi | getCollection | GET /collections/{collectionId} | Get a collection by ID |
| CollectionsApi | getCollections | GET /collections | Get all collections matching the criteria |
| CollectionsApi | updateCollection | PATCH /collections/{collectionId} | Update a collection |
| CompoundObjectTypesApi | getCompoundType | GET /compound-types/{compoundTypeKey} | Get a compound object type by business key |
| CompoundObjectTypesApi | getCompoundTypes | GET /compound-types | Get all compound object types |
| DownloadApi | requestBulkDownload | GET /assets/download | |
| DownloadApi | requestDownload | GET /assets/{assetId}/download | Request the asset download for the given asset ID. |
| DownloadFormatsApi | getDownloadFormats | GET /download-formats | Get all download formats. |
| InformationFieldsApi | getInformationFields | GET /information-fields | Get all information fields associated with Assets, Nodes and Asset Relations |
| JobsApi | execute | POST /jobs | Trigger a job |
| JobsApi | getStatus | GET /jobs/{jobId} | Get the status of a job by ID |
| RelationTypesApi | getRelationType | GET /relation-types/{id} | Get relation type by id |
| RelationTypesApi | getRelationTypes | GET /relation-types | Get all relation types |
| RelationsApi | createRelation | POST /relations | Create a relation |
| RelationsApi | deleteRelation | DELETE /relations/{relationId} | Delete a relation by ID |
| RelationsApi | getRelationById | GET /relations/{relationId} | Get a relation by ID |
| RelationsApi | getRelations | GET /relations | Get all relations matching the criteria |
| RelationsApi | updateRelation | PATCH /relations/{relationId} | Update a relation |
| RolesApi | getRole | GET /roles/{roleId} | Get role |
| RolesApi | getRoles | GET /roles | Get roles |
| UploadApi | requestUpload | POST /upload | Request an upload |
| UserGroupsApi | getUserGroupById | GET /user-groups/{userGroupId} | Get user group by id |
| UserGroupsApi | getUserGroups | GET /user-groups | Get user groups |
| UsersApi | getCurrentUser | GET /users/me | Get the currently logged in user |
| UsersApi | getUserById | GET /users/{userId} | Get user by id |
| UsersApi | getUserByName | GET /users | Get users |
| VersionsApi | addVersion | POST /assets/{assetId}/versions | Add a new version to an asset identified by the asset ID |
| VersionsApi | deleteVersion | DELETE /assets/{assetId}/versions/{versionId} | Delete a version of an asset identified by the asset ID and version ID |
| VersionsApi | getVersions | GET /assets/{assetId}/versions | Get all versions of an asset identified by the asset ID |
Models
- AddExternalReference
- AddVersion
- AllAssetInformationFieldsInclusionDto
- AllCollectionInformationFieldsInclusionDto
- AllDownloadFormatInclusionDto
- AllExternalReferencesInclusionDto
- AllFilePropertiesInclusionDto
- ArgumentValidationFault
- Asset
- AssetAddedEvent
- AssetAvailabilityDateRangeFilter
- AssetAvailabilityFilter
- AssetBooleanFieldFilter
- AssetBooleanFilePropertyEqualityFilter
- AssetChecksumFilter
- AssetCollectionReferenceFieldEqualityFilter
- AssetCollectionReferenceFieldNamesFilter
- AssetCollectionTypeIdFilter
- AssetContentFilter
- AssetCreatedEvent
- AssetCreationDateEqualityFilter
- AssetCreationDateRangeFilter
- AssetCreationUserIdFilter
- AssetCurrentVersionCreationDateEqualityFilter
- AssetCurrentVersionCreationDateRangeFilter
- AssetCurrentVersionCreationUserIdFilter
- AssetDateFieldEqualityFilter
- AssetDateFieldRangeFilter
- AssetDateFilePropertyEqualityFilter
- AssetDateFilePropertyRangeFilter
- AssetDeletedEvent
- AssetDoubleFieldEqualityFilter
- AssetDoubleFieldRangeFilter
- AssetDoubleFilePropertyEqualityFilter
- AssetDoubleFilePropertyRangeFilter
- AssetDropdownFieldEqualityFilter
- AssetExpirationDateRangeFilter
- AssetFileCategoryFilter
- AssetFileExtensionEmptyFilter
- AssetFileExtensionFilter
- AssetFileNameFilter
- AssetFilter
- AssetFilterType
- AssetFulltextFilter
- AssetIdFilter
- AssetIdRangeFilter
- AssetInclusionDto
- AssetInclusionDtoType
- AssetInformationFieldEmptyFilter
- AssetInformationFieldPermissionsInclusionDto
- AssetInformationFieldsInclusionDto
- AssetLocalizedTextAreaFieldFilter
- AssetLocalizedTextFieldFilter
- AssetLogicalFilter
- AssetModificationDateEqualityFilter
- AssetModificationDateRangeFilter
- AssetModificationUserIdFilter
- AssetNameFilter
- AssetNegationFilter
- AssetNumberFieldEqualityFilter
- AssetNumberFieldRangeFilter
- AssetNumberFilePropertyFilter
- AssetNumberFilePropertyRangeFilter
- AssetPage
- AssetParentIdFilter
- AssetPermissions
- AssetPermissionsInclusionDto
- AssetReleasedEvent
- AssetRemovedEvent
- AssetStatus
- AssetTagReferenceFieldEqualityFilter
- AssetTagReferenceFieldNamesFilter
- AssetTextAreaFieldFilter
- AssetTextFieldFilter
- AssetTextFilePropertyFilter
- AssetType
- AssetTypeIdFilter
- AssetTypePermissions
- AssetUpdatedEvent
- AssetValidationStatus
- AssetVersionActivatedEvent
- AssetVersionAddedEvent
- AssetVersionDeletedEvent
- Availability
- AvailabilityType
- BooleanField
- BooleanFieldUpdateValue
- BooleanFieldValue
- BooleanFileProperty
- ClearBooleanValue
- ClearDateValue
- ClearDoubleValue
- ClearDropdownValue
- ClearLocalizedValue
- ClearLock
- ClearNumberValue
- ClearReferenceValue
- ClearTextValue
- ClearValueDto
- Client
- Collection
- CollectionBooleanFieldFilter
- CollectionCreatedEvent
- CollectionCreationDateEqualityFilter
- CollectionCreationDateRangeFilter
- CollectionCreationUserIdFilter
- CollectionDateFieldEqualityFilter
- CollectionDateFieldRangeFilter
- CollectionDeletedEvent
- CollectionDoubleFieldEqualityFilter
- CollectionDoubleFieldRangeFilter
- CollectionDropdownFieldEqualityFilter
- CollectionFilter
- CollectionFilterType
- CollectionFulltextFilter
- CollectionIdFilter
- CollectionIdRangeFilter
- CollectionInclusionDto
- CollectionInclusionDtoType
- CollectionInformationFieldEmptyFilter
- CollectionInformationFieldPermissionsInclusionDto
- CollectionInformationFieldsInclusionDto
- CollectionLocalizedTextAreaFieldFilter
- CollectionLocalizedTextFieldFilter
- CollectionLogicalFilter
- CollectionModificationDateEqualityFilter
- CollectionModificationDateRangeFilter
- CollectionModificationUserIdFilter
- CollectionMovedEvent
- CollectionNameFilter
- CollectionNegationFilter
- CollectionNumberFieldEqualityFilter
- CollectionNumberFieldRangeFilter
- CollectionPage
- CollectionParentIdFilter
- CollectionPermissions
- CollectionPermissionsInclusionDto
- CollectionReference
- CollectionReferenceCompoundElementRule
- CollectionReferenceField
- CollectionReferenceFieldEqualityFilter
- CollectionReferenceFieldNamesFilter
- CollectionReferenceFieldUpdateValue
- CollectionReferenceFieldValue
- CollectionReferenceTypeRule
- CollectionRoleAssignmentsInclusionDto
- CollectionTagReferenceFieldEqualityFilter
- CollectionTagReferenceFieldNamesFilter
- CollectionTextAreaFieldFilter
- CollectionTextFieldFilter
- CollectionType
- CollectionTypeIdFilter
- CollectionUpdatedEvent
- CollectionValidationStatus
- CompoundElementDefinition
- CompoundElementRule
- CompoundElementRuleType
- CompoundError
- CompoundObject
- CompoundObjectState
- CompoundObjectType
- CompoundPreviewInformation
- CompoundSearchType
- CompoundTypeInformation
- CompoundTypeRule
- CompoundTypeRuleType
- CreateAsset
- CreateCollection
- CreateRelation
- DateField
- DateFieldUpdateValue
- DateFieldValue
- DateFileProperty
- DatedAvailability
- Description
- DirectAvailability
- DoubleField
- DoubleFieldUpdateValue
- DoubleFieldValue
- DoubleFileProperty
- Download
- DownloadFormat
- DownloadFormatInclusionDto
- DownloadFormatInterceptorDefinition
- DownloadItem
- DownloadJob
- DownloadJobTrigger
- DropDownSortOrder
- DropdownField
- DropdownFieldUpdateValue
- DropdownFieldValue
- DropdownOption
- Error
- Event
- EventType
- ExternalReferenceAddedEvent
- ExternalReferenceDeletedEvent
- ExternalReferenceDto
- FileCategory
- FilePropertyObject
- FilePropertyObjectType
- FindAssets
- FindCollections
- GenericValidationFault
- InformationFieldEntityType
- InformationFieldObject
- InformationFieldObjectType
- InformationFieldPermissions
- InformationFieldSet
- InformationFieldValidationFault
- InformationFieldValueObjectObject
- InformationFieldValueObjectObjectType
- InformationFieldValueSet
- InformationFieldValueUpdateObject
- InformationFieldValueUpdateObjectType
- Instance
- Job
- JobTrigger
- JobTriggerType
- JobType
- Languages
- LocalizedArgumentValidationFault
- LocalizedTextAreaField
- LocalizedTextAreaFieldUpdateValue
- LocalizedTextAreaFieldValue
- LocalizedTextField
- LocalizedTextFieldUpdateValue
- LocalizedTextFieldValue
- Lock
- ModifyExternalReferences
- ModifyLocalizedValue
- ModifyParents
- ModifyReferenceValue
- ModifyRequiredCollectionIds
- ModifyRoleAssignees
- ModifyRoleAssignments
- NumberField
- NumberFieldUpdateValue
- NumberFieldValue
- NumberFileProperty
- OAuth2
- Pagination
- Path
- PathSegment
- PreviewConversionEvent
- PreviewSize
- PreviewState
- Provider
- Relation
- RelationCreatedEvent
- RelationDeletedEvent
- RelationDirection
- RelationPage
- RelationStatus
- RelationType
- RemoveCompoundObjectTypeKey
- RemoveExternalReference
- RequestUpload
- Role
- RoleAssetPermissions
- RoleAssignee
- RoleAssigneeSubject
- RoleAssigneeUpdate
- RoleAssignment
- RoleCollectionPermissions
- RoleContentPermissions
- RoleReference
- SearchOperator
- SearchType
- SetBooleanValue
- SetCompoundObjectTypeKey
- SetDateValue
- SetDoubleValue
- SetDropdownValue
- SetLock
- SetNumberValue
- SetParents
- SetReferenceValue
- SetRequiredCollectionIds
- SetRoleAssignments
- SetTextValue
- Signing
- Sort
- SubjectDto
- Tag
- TagReferenceField
- TagReferenceFieldUpdateValue
- TagReferenceFieldValue
- TextAreaField
- TextAreaFieldUpdateValue
- TextAreaFieldValue
- TextField
- TextFieldUpdateValue
- TextFieldValue
- TextFileProperty
- Trail
- UpdateAlternativePreview
- UpdateAsset
- UpdateBooleanFieldValue
- UpdateBooleanValue
- UpdateBooleanValueOp
- UpdateCollection
- UpdateCollectionReferenceCompoundElementRule
- UpdateCollectionReferenceFieldValue
- UpdateCompoundElementRule
- UpdateCompoundElementRuleType
- UpdateCompoundObject
- UpdateCompoundObjectTypeKey
- UpdateCompoundObjectTypeKeyOp
- UpdateDateFieldValue
- UpdateDateValue
- UpdateDateValueOp
- UpdateDoubleFieldValue
- UpdateDoubleValue
- UpdateDoubleValueOp
- UpdateDropdownFieldValue
- UpdateDropdownValue
- UpdateDropdownValueOp
- UpdateExternalReferences
- UpdateExternalReferencesOp
- UpdateInformationFieldValueObject
- UpdateInformationFieldValueObjectType
- UpdateLocalizedTextAreaFieldValue
- UpdateLocalizedTextFieldValue
- UpdateLocalizedValue
- UpdateLocalizedValueOp
- UpdateLock
- UpdateLockOp
- UpdateNumberFieldValue
- UpdateNumberValue
- UpdateNumberValueOp
- UpdateParents
- UpdateParentsOp
- UpdateReferenceValue
- UpdateReferenceValueOp
- UpdateRelation
- UpdateRequiredCollectionIds
- UpdateRequiredCollectionIdsOp
- UpdateTagReferenceFieldValue
- UpdateTextAreaFieldValue
- UpdateTextFieldValue
- UpdateTextValue
- UpdateTextValueOp
- Upload
- User
- UserGroup
- UserGroupPage
- UserGroupReference
- UserPage
- UserPermissions
- UserReference
- ValidationFault
- ValidationFaultType
- ValidationLevel
- Version
- VersionInfoDto
- VersionPage
Authorization
Authentication schemes defined for the API:
apiKey
- Type: API key
- API key parameter name: X-API-KEY
- Location: HTTP header
basicAuth
- Type: HTTP basic authentication
openId
Tests
To run the tests, use:
composer install vendor/bin/phpunit
Author
About this package
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
v1- Generator version:
7.16.0-SNAPSHOT
- Generator version:
- Build package:
org.openapitools.codegen.languages.PhpClientCodegen