/id4i-api_client-php

PHP Client for the Id4i API

Primary LanguagePHP

ID4i API Client Library - PHP

This library allows developers to interact with the http://id4i.de HTTP API. Typically you won't have to build it yourselves, you can just pull in the dependency from maven central using Maven, Gradle or the like.

Feel free to look at the sources and the documentation contained in this repository.

For additional information, please refer to

  • API version: 1.0.0
  • Build package: io.swagger.codegen.languages.PhpClientCodegen For more information, please visit http://bluerain.de

Requirements

PHP 5.5 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
"repositories": [
{
"type": "git",
"url": "https://github.com/bluerainsoftware/id4i-api_client-php.git"
}
],
"require": {
"bluerainsoftware/id4i-api_client-php": "*@dev"
}
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

require_once('/path/to/./vendor/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

        <?php
require_once(__DIR__ . '/vendor/autoload.php');

    // Configure API key authorization: Authorization
    $config = Bluerain\ID4iClient\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
    // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    // $config = Bluerain\ID4iClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$apiInstance = new Bluerain\ID4iClient\Api\AccountsApi(
// 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
);
$organization_id = "organization_id_example"; // string | The namespace of the organization
$username = "username_example"; // string | username
$change_role_request = new \Bluerain\ID4iClient\Model\ChangeRoleRequest(); // \Bluerain\ID4iClient\Model\ChangeRoleRequest | changeRoleRequest

try {
$apiInstance->addUserRoles($organization_id, $username, $change_role_request);
} catch (Exception $e) {
echo 'Exception when calling AccountsApi->addUserRoles: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

All URIs are relative to https://backend.id4i.de

Class Method HTTP request Description
AccountsApi addUserRoles POST /api/v1/organizations/{organizationId}/users/{username}/roles Add role(s) to user
AccountsApi completeRegistration PUT /account/registration Complete registration
AccountsApi findUserByUsername GET /api/v1/users/{username} Find by username
AccountsApi findUsers GET /api/v1/users Find users
AccountsApi getAllOrganizationRoles GET /api/v1/organizations/{organizationId}/roles List users and their roles
AccountsApi getOrganizationsOfUser GET /api/v1/user/organizations Retrieve organizations of user
AccountsApi getUserRoles GET /api/v1/organizations/{organizationId}/users/{username}/roles Get user roles by username
AccountsApi getUsersOfOrganization GET /api/v1/organizations/{organizationId}/users Find users in organization
AccountsApi inviteUsers POST /api/v1/organizations/{organizationId}/users/invite Invite Users
AccountsApi listAllRoles GET /api/v1/roles List roles
AccountsApi login POST /login
AccountsApi registerUser POST /account/registration Register user
AccountsApi removeUserRoles DELETE /api/v1/organizations/{organizationId}/users/{username}/roles Remove role(s) from user
AccountsApi requestPasswordReset POST /account/password Request password reset
AccountsApi verifyPasswordReset PUT /account/password Verify password reset
AccountsApi verifyUserRegistration POST /account/verification Verify registration
AliasApi addGuidAlias POST /api/v1/id4ns/{id4n}/alias/{aliasType} Add alias for GUID or Collection
AliasApi getGuidAliasTypes GET /api/v1/search/guids/aliases/types List all supported alias types
AliasApi getGuidAliases GET /api/v1/id4ns/{id4n}/alias Get all aliases for the given GUID or Collection.
AliasApi removeGuidAlias DELETE /api/v1/id4ns/{id4n}/alias/{aliasType} Remove aliases from GUID or Collection
AliasApi searchByAlias GET /api/v1/search/guids Search for GUIDs by alias
ApiKeysApi addApiKeyPrivilege POST /api/v1/apikeys/{key}/privileges Add privilege
ApiKeysApi addApiKeyPrivilegeForId4ns POST /api/v1/apikeys/{key}/privileges/{privilege}/id4ns Add ID4ns of a privilege
ApiKeysApi createNewApiKey POST /api/v1/apikeys Create API key
ApiKeysApi deleteApiKey DELETE /api/v1/apikeys/{key} Delete API key
ApiKeysApi getApiKey GET /api/v1/apikeys/{key} Show API key
ApiKeysApi listAllApiKeyPrivileges GET /api/v1/apikeys/privileges List all privileges
ApiKeysApi listAllApiKeysOfOrganization GET /api/v1/apikeys Find API key by organization
ApiKeysApi listApiKeyPrivileges GET /api/v1/apikeys/{key}/privileges List privileges
ApiKeysApi listId4ns GET /api/v1/apikeys/{key}/privileges/{privilege}/id4ns ID4ns of a privilege
ApiKeysApi removeApiKeyPrivilege DELETE /api/v1/apikeys/{key}/privileges Remove privilege
ApiKeysApi removeApiKeyPrivilegeForId4ns DELETE /api/v1/apikeys/{key}/privileges/{privilege}/id4ns Remove id4ns of a privilege
ApiKeysApi updateApiKey PUT /api/v1/apikeys/{key} Update API keys
AuditingApi listOrganizationChangeLog GET /api/v1/changelog/organization/{organizationId}/ List change log entries of an organization
BillingApi getPositionsForOrganization GET /api/v1/billing/{organizationId}/positions Get billing positions for a given organization
BillingApi getSumForOrganization GET /api/v1/billing/{organizationId} Get billing amount of services for a given organization
CollectionsApi addElementsToCollection POST /api/v1/collections/{id4n}/elements Add elements to collection
CollectionsApi createCollection POST /api/v1/collections Create collection
CollectionsApi deleteCollection DELETE /api/v1/collections/{id4n} Delete collection
CollectionsApi deleteProperties DELETE /api/v1/id4ns/{id4n}/properties Delete ID4n properties
CollectionsApi findCollection GET /api/v1/collections/{id4n} Find collection
CollectionsApi getAllCollectionsOfOrganization GET /api/v1/organizations/{organizationId}/collections Get collections of organization
CollectionsApi getProperties GET /api/v1/id4ns/{id4n}/properties Retrieve ID4n properties
CollectionsApi listElementsOfCollection GET /api/v1/collections/{id4n}/elements List contents of the collection
CollectionsApi patchProperties PATCH /api/v1/id4ns/{id4n}/properties Patch ID4n properties
CollectionsApi removeElementsFromCollection DELETE /api/v1/collections/{id4n}/elements Remove elements from collection
CollectionsApi updateCollection PATCH /api/v1/collections/{id4n} Update collection
GuidsApi addGuidAlias POST /api/v1/id4ns/{id4n}/alias/{aliasType} Add alias for GUID or Collection
GuidsApi createGuid POST /api/v1/guids Create GUID(s)
GuidsApi deleteProperties DELETE /api/v1/id4ns/{id4n}/properties Delete ID4n properties
GuidsApi getCollections GET /api/v1/id4ns/{id4n}/collections Retrieve collections of an ID
GuidsApi getGuid GET /api/v1/guids/{id4n} Retrieve GUID information
GuidsApi getGuidAliases GET /api/v1/id4ns/{id4n}/alias Get all aliases for the given GUID or Collection.
GuidsApi getGuidsWithoutCollection GET /api/v1/guids/withoutCollection Retrieve GUIDs not in any collection
GuidsApi getId4n GET /api/v1/id4ns/{id4n} Retrieve ID4n information
GuidsApi getProperties GET /api/v1/id4ns/{id4n}/properties Retrieve ID4n properties
GuidsApi importGS1Codes POST /api/v1/import/gs1 Import GS1/MAPP codes
GuidsApi patchProperties PATCH /api/v1/id4ns/{id4n}/properties Patch ID4n properties
GuidsApi removeGuidAlias DELETE /api/v1/id4ns/{id4n}/alias/{aliasType} Remove aliases from GUID or Collection
GuidsApi updateGuid PATCH /api/v1/guids/{id4n} Change GUID information.
HistoryApi addItem POST /api/v1/history/{id4n} Add history item
HistoryApi callList GET /api/v1/history/{id4n}/{organizationId} DEPRECATED - List history
HistoryApi filteredList GET /api/v1/history/{id4n} List history
HistoryApi retrieveItem GET /api/v1/history/{id4n}/{organizationId}/{sequenceId} Get history item
HistoryApi updateItem PATCH /api/v1/history/{id4n}/{organizationId}/{sequenceId} Update history item
HistoryApi updateItemVisibility PUT /api/v1/history/{id4n}/{organizationId}/{sequenceId}/visibility Set history item visibility
ImagesApi resolveImageUsingGET GET /api/v1/public/image/{imageID} Resolve image
MessagingApi enqueueCustomMessage POST /api/v1/organizations/{organizationId}/messaging/enqueueCustomMessage Enqueue a custom message
MessagingApi getDefaultQueue GET /api/v1/organizations/{organizationId}/messaging
MessagingApi patchDefaultQueue PATCH /api/v1/organizations/{organizationId}/messaging
MetaInformationApi applicationInfo GET /api/v1/info Retrieve version information about ID4i
OrganizationsApi addPartnerOrganization PUT /api/v1/organizations/{organizationId}/partner Add partner
OrganizationsApi addUserRoles POST /api/v1/organizations/{organizationId}/users/{username}/roles Add role(s) to user
OrganizationsApi createOrganization POST /api/v1/organizations Create organization
OrganizationsApi deleteOrganization DELETE /api/v1/organizations/{organizationId} Delete organization
OrganizationsApi deleteOrganizationBillingAddress DELETE /api/v1/organizations/{organizationId}/addresses/billing Remove billing address
OrganizationsApi deleteOrganizationLogo DELETE /api/v1/organizations/{organizationId}/logo Delete organization logo
OrganizationsApi findOrganization GET /api/v1/organizations/{organizationId} Find organization by id/namespace
OrganizationsApi findOrganizationAddress GET /api/v1/organizations/{organizationId}/addresses/default Retrieve address
OrganizationsApi findOrganizationBillingAddress GET /api/v1/organizations/{organizationId}/addresses/billing Retrieve billing address
OrganizationsApi getAllCollectionsOfOrganization GET /api/v1/organizations/{organizationId}/collections Get collections of organization
OrganizationsApi getAllOrganizationRoles GET /api/v1/organizations/{organizationId}/roles List users and their roles
OrganizationsApi getOrganizationPrivileges GET /api/v1/organizations/{organizationId}/privileges List my privileges
OrganizationsApi getOrganizationsOfUser GET /api/v1/user/organizations Retrieve organizations of user
OrganizationsApi getPartnerOrganizations GET /api/v1/organizations/{organizationId}/partner Get partners of an organization
OrganizationsApi getUserRoles GET /api/v1/organizations/{organizationId}/users/{username}/roles Get user roles by username
OrganizationsApi getUsersOfOrganization GET /api/v1/organizations/{organizationId}/users Find users in organization
OrganizationsApi inviteUsers POST /api/v1/organizations/{organizationId}/users/invite Invite Users
OrganizationsApi listCountries GET /api/v1/countries List countries
OrganizationsApi removePartnerOrganization DELETE /api/v1/organizations/{organizationId}/partner Remove partner
OrganizationsApi removeUserRoles DELETE /api/v1/organizations/{organizationId}/users/{username}/roles Remove role(s) from user
OrganizationsApi setOrganizationLogo POST /api/v1/organizations/{organizationId}/logo Update organization logo
OrganizationsApi updateOrganization PUT /api/v1/organizations/{organizationId} Update organization
OrganizationsApi updateOrganizationAddress PUT /api/v1/organizations/{organizationId}/addresses/default Store address
OrganizationsApi updateOrganizationBillingAddress PUT /api/v1/organizations/{organizationId}/addresses/billing Store billing address
PublicServicesApi getPublicDocument GET /api/v1/public/documents/{id4n}/{organizationId}/{fileName}/metadata Retrieve a public document (meta-data only, no content)
PublicServicesApi getRoutes GET /api/v1/public/routes/{id4n} Retrieve all public routes for a GUID
PublicServicesApi go GET /go/{guid} Forward
PublicServicesApi listAllPublicDocuments GET /api/v1/public/documents/{id4n} List public documents
PublicServicesApi listPublicHistory GET /api/v1/public/history/{id4n} Shows the public history of the given GUID
PublicServicesApi readOrganizationInfo GET /api/v1/public/organizations/{organizationId} Read public organization information
PublicServicesApi readPublicDocument GET /api/v1/public/documents/{id4n}/{organizationId}/{fileName} Read public document contents
PublicServicesApi resolveImageUsingGET GET /api/v1/public/image/{imageID} Resolve image
PublicServicesApi resolveWhoIsEntry GET /whois/{id4n} Resolve owner of id4n
RoutingApi getAllRoutes GET /api/v1/routingfiles/{id4n}/routes/{type} Retrieve all routes of a GUID (or ID4N)
RoutingApi getRoute GET /api/v1/routingfiles/{id4n}/route/{type} Retrieve current route of a GUID (or ID4N)
RoutingApi getRoutingFile GET /api/v1/routingfiles/{id4n} Retrieve routing file
RoutingApi updateRoutingFile PUT /api/v1/routingfiles/{id4n} Store routing file
StorageApi createDocument POST /api/v1/documents/{id4n}/{organizationId} Create an document for an id4n
StorageApi deleteDocument DELETE /api/v1/documents/{id4n}/{organizationId}/{fileName} Delete a document
StorageApi getDocument GET /api/v1/documents/{id4n}/{organizationId}/{fileName}/metadata Retrieve a document (meta-data only, no content)
StorageApi getPublicDocument GET /api/v1/public/documents/{id4n}/{organizationId}/{fileName}/metadata Retrieve a public document (meta-data only, no content)
StorageApi listAllDocuments GET /api/v1/documents/{id4n} List documents
StorageApi listAllPublicDocuments GET /api/v1/public/documents/{id4n} List public documents
StorageApi listDocuments GET /api/v1/documents/{id4n}/{organizationId} List organization specific documents
StorageApi putDocument PUT /api/v1/documents/{id4n}/{organizationId} Put an document for an id4n
StorageApi readDocument GET /api/v1/documents/{id4n}/{organizationId}/{fileName} Read document contents
StorageApi readFromMicrostorage GET /api/v1/microstorage/{id4n}/{organization} Read data from microstorage
StorageApi readPublicDocument GET /api/v1/public/documents/{id4n}/{organizationId}/{fileName} Read public document contents
StorageApi updateDocumentMetadata PATCH /api/v1/documents/{id4n}/{organizationId}/{fileName}/metadata Update a document
StorageApi writeToMicrostorage PUT /api/v1/microstorage/{id4n}/{organization} Write data to microstorage
TransferApi getSendInfo GET /api/v1/transfers/{id4n}/sendInfo Show transfer preparation information
TransferApi prepare PUT /api/v1/transfers/{id4n}/sendInfo Prepare an object for transfer
TransferApi receive PUT /api/v1/transfers/{id4n}/receiveInfo Transfer a GUID or collection, obtaining it (i.e. becoming the holder) and if allowed also taking ownership
WhoIsApi resolveWhoIsEntry GET /whois/{id4n} Resolve owner of id4n

Documentation For Models

Documentation For Authorization

Authorization

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Author

info@bluerain.de