Generic Agency Contributor API
Design Outline

Bob Davies - picNiche.com
admin@picNiche.com
May 2010

Generic Agency Contributor API - Design Outline

There are a wide range of concerns when designing an API (Application Programming Interface) capable of being used by a various service providers. The design must be flexible enough to support the presence/absence of various information as differ at each data-source, yet must be solid enough to allow for the reliable operation of the functionality provided by each.

The document outlines first the most basic functions required to support contribution of images and common related data across various image agencies, and secondly the functions required for additional tasks relevant to a minority of potential hosts.

The intent is to specify a system whereby images may be received and stored, and relevant information pertaining to each image can be registered to accompany each image. Whilst maintaining appropriate references of ownership to the image creator, provider or rights-holder.

In addition, the retrieval of a contributor's own data (that which they rightly own) relevant to their portfolio of images, and related sales & performance data shall be retrievable by this design to aid in their business analysis and planning.

Benefits of Providing a Contributor API

Very briefly, some of the benefits of of providing an API including contributor functionality are:


There is a more thorough accompanying document entitled: "Benefits of Providing a Contributor API" which covers in detail the benefits an agency and it's contributors may realise from implementation of this design.


Terminology



Assumptions & Considerations

It is assumed that the following requirements are to be met:



Primary Functions

The primary functions are those relevant to only the majority of systems.

Function
Parameters
Description
Image Management:


put_ImageMetadata
Title, Description, Keywords, Language, Content Type, Ref No, Filename, Owner Id
Creates (or updates) an image record with provided metadata, with or without references to identify the file(s) or uploaded content.
get_UploadDestination
Ref No, Content Type, Owner Id
Returns a set of data specifying the upload location.
put_UploadImage
File(s), Content Type, Ref No, Owner Id
Receives an uploaded file (with or without a reference) and stores in or sends to the appropriate systems.
get_ImageMetadata
Ref No
Returns the metadata associated with the provided image reference.
get_ImageList
Owner Id, Phrase, Options
Returns a list of image references for that owner (optionally matching provided search phrase or other options)
Release Management:


put_Release
Release Type, Name, DoB, Location, File, Owner Id
Receives an uploaded file and stores in or sends to the appropriate systems.
get_Releases
Release Type, Ref No, Options, Owner Id
Returns a list of releases for this owner (optionally matching search options)
assign_Releases
Release(s), Ref No, Owner Id, Remove
Assigns provided release records to provided image reference.
Authentication:


Login
Username, Encrypted Password
Creates a session for this user (if stateful), or returns a value confirming they are sufficiently authenticated to alter information relating to their account (which may be provided to the api for future operations).
Logout
Owner Id
Closes a session for this user or any user if omitted. Prevents further authenticated operations.
Workflow & Status:


get_ImageStatus
Ref No, Owner Id
Returns review status for image reference (in review, rejected (and reason), approved)
get_ImageHistory
Ref No, Owner Id, Start Date, End Date
Returns sales records for an image record
get_AccountHistory
Owner Id, Start Date, End Date
Returns sales records across all images for a given owner account
get_AccountBalance
Owner Id
Returns the current account total earnings
get_PortfolioCount
Owner Id
Returns the total count of images available for sale in portfolio



Secondary Functions

The secondary functions are those likely relevant to a minority of systems.

Function
Arguments
Description
Satellite Metadata:


assign_Licenses
Ref No, Licenses, Owner Id
Sets the granted licenses on referenced image to provided licenses.
assign_Categories
Ref No, Categories, Owner Id
Sets the provided categories on referenced image.
assign_Vocabulary
Ref No, Vocabulary Set, Owner Id
Sets the provided vocabulary on referenced image.
Lookups:


get_ContentTypes

Returns a list of content types (image, video, audio, etc)
get_Licenses
Content Type
Returns a list of licenses for this content type (each named value should include a link to relevant legal documentation).
get_Categories
Content Type, Keyword(s)
Returns a list of categories for this content type (including Ids and/or matching provided keywords).
get_Vocabulary
Keyword(s)
Returns a list of vocabulary matches (matching against provided keyword(s)) for systems with a fixed vocabulary restriction.











Implementation Guidelines

When considering the distribution of data from any source, there are many issues to consider outside of the technical requirements.

Although the following issues are not necessarily aspects controllable within the scope of the outline design for the API framework, they are crucial to the successful (and legal) operation of an API with the intent of data distribution.

These issues should be considered as key aspects of development for any host implementing their API on the aforementioned design:


This outline is intended to be built upon the apiKit framework. I have pre-configured and re-packaged the base release to create the "agencyKit" package (contact me or visit the site to download it at http://www.picNiche.com/agencykit/). The agencyKit (built from this design) provides a set of functionality geared specifically for companies licensing digital content, primarily for microstock image websites.

By using the apiKit (agencyKit) package, you have a headstart on creating an API (not 'only' for contributors), reducing the required workload significantly.


Notes

This document does not exhaustively cover every aspect of a contributor-api project, but should suffice as an outline or guide to the implementation thereof.

This design (and the apiKit-based agencyKit framework) was built speculatively; meaning I (Bob Davies) do not own or run a business selling rights to use or access content on behalf of content owners. I have a technical history in workflow, efficiency and business-to-business software. I built this design to encourage development of contributor-focussed APIs within the stock photography industry.

This document (dependent upon the format you have received it in) may be accompanied by an API framework preconfigured with the (unimplemented) functions described above (the agencyKit), downloadable at http://www.picNiche.com/agencykit/. It is built upon the open-source apiKit project found at http://www.apiKit.org (Also built by Bob Davies, shared under a creative-commons attribution share-alike license).

Revisions

This project is open and collaborative, all contributors are welcome and I would very much appreciate your sharing this document and your thoughts on it with your colleagues, co-workers or other interested third-parties.

Please update with any revisions (if accessing the online version) or send revisions, questions, suggestions or additions to Bob Davies at admin@picNiche.com

Thank you

Thank you for taking the time to read, I hope you find the prospect of implementing systems to foster greater inter-company communication and improved crowd-sourcing processes as exciting as I do :)

Bob