Skip to main content
Mitratech Success Center

PolicyHub Administration API

The administration API provides access to PolicyHub under an administrator context similar to the PolicyHub administration website interface. All API methods will be run using the permissions of the API caller context.

As an example a call to retrieve the library from the administration API would return the system library as seen by the administration website and not the library as seen by an individual user’s inbox view, which is based only on the policies that user has been sent.

Add a New Document

This method allows new documents to be uploaded to the PolicyHub library.

int AddDocument( 
    Credentials credentials, 
    NewDocument document, 
    NewFileData data
)

credentials

The credentials to verify the calling user for this call.

document

The new document’s properties such as its name, reference and library location.

data

The new document’s file data for upload such as the original filename and byte array of its content.

return

INT - The newly created document ID.

Add a New Document Revision

This method allows a new document revision to be uploaded to an existing document record.

int AddDocumentRevision( 
    Credentials credentials, 
    NewDocumentRevision revision, 
    NewFileData data
)

credentials

The credentials to verify the calling user for this call.

revision

The new revision’s properties such as its name and parent document identifier.

data

The new document’s file data for upload such as the original filename and byte array of its content.

return

INT - The newly created document ID.

Get a Document

This method allows a single document’s properties to be retrieved by a known ID.

PolicyHubDocument GetDocument ( 
    Credentials credentials,
    int documentId
)

credentials

The credentials to verify the calling user for this call.

documentId

The ID of the document you wish to retrieve properties for.

return

PolicyHubDocument - The document properties of the requested document ID.

Download a Document

This method allows the document data (the physical file) to be retrieved from the library.

PolicyHubFilData GetDocumentData( 
    Credentials credentials,
    int documentId
)

credentials

The credentials to verify the calling user for this call.

documentId

The ID of the document you wish to download.

return

PolicyHubFileData - The filename, MIME type and content of the active revision of the requested document ID.

Get a Document’s Review Details

This method allows you to retrieve the properties of a document’s review schedule.

PolicyHubDocumentReview GetDocumentReviewDetails( 
    Credentials credentials,
    int documentId
)

credentials

The credentials to verify the calling user for this call.

documentId

The ID of the document to retrieve the review information for.

return

PolicyHubDocumentReview - The review schedule information for the document such as the next review date.

Get a Document Revision’s Details

This method allows you to retrieve the properties of a specific document revision.

PolicyHubDocumentRevision GetDocumentRevision( Credentials credentials,
int revisionId
)

credentials

The credentials to verify the calling user for this call.

revisionId

The ID of the document revision to retrieve the information for.

return

PolicyHubDocumentRevision - The properties of the document revision requested.

Download a Document Revision

This method allows the document revision’s content (the physical file) to be retrieved from the library.

PolicyHubFilData GetDocumentRevisionData( 
    Credentials credentials,
    int revisionId
)

credentials

The credentials to verify the calling user for this call.

revisionId

The ID of the revision you wish to download.

return

PolicyHubFileData - The filename, MIME type and content for the requested revision of the requested document.

Get a Document’s Revisions

This method allows the retrieval of a collection of revisions for a specific document.

PolicyHubDocumentRevision[] GetDocumentRevisions( 
    Credentials credentials,
    int documentId
)

credentials

The credentials to verify the calling user for this call.

documentId

The ID of the document you wish to retrieve all the revisions for.

return

PolicyHubDocumentRevision[ ] - An array of all document revisions for the requested document.

Get all Documents for a Library Folder

This method allows the retrieval of a collection of all immediate documents for a given folder within the library.

PolicyHubDocument[] GetDocumentsByFolder( 
    Credentials credentials,
    int folderId
)

credentials

The credentials to verify the calling user for this call.

folderId

The ID of the folder to retrieve documents for.

return

PolicyHubDocument[ ] - An array of all documents within the requested folder.

Get the PolicyHub Library

This method allows the retrieval of the PolicyHub library. Returning a collection of folders as a tree structure.

PolicyHubFolder GetLibrary( 
    Credentials credentials
)

credentials

The credentials to verify the calling user for this call.

return

PolicyHubFolder - A tree structure of the PolicyHub library starting at the root node. Each folder may contain one or more sub folders, each themselves containing one or more sub folders.

Get a List of Recipient Lists

This method allows the retrieval of any available recipient lists from PolicyHub.

PolicyHubRecipientList[] GetRecipientLists( 
    Credentials credentials
)

credentials

The credentials to verify the calling user for this call.

return

PolicyHubRecipientList[ ] - An array of all available recipient lists.

Get a List of Rules

This method allows the retrieval of any available publication rules from PolicyHub.

PolicyHubRule[] GetRules( 
    Credentials credentials
)

credentials

The credentials to verify the calling user for this call.

return

PolicyHubRule[ ] - An array of all available rules.

Get a User by Email

This method allows the retrieval of a single user by email address lookup.

PolicyHubUser GetUserByEmail( 
    Credentials credentials, 
    string email
)

credentials

The credentials to verify the calling user for this call.

email

The email address of the user you wish to retrieve.

return

PolicyHubUser - The user with the request email. If more than one user has the same email within the PolicyHub system, the first record found will be returned.

Get a User by Login Name

This method allows the retrieval of a single user by login name.

PolicyHubUser GetUserByLoginName( 
    Credentials credentials,
    string loginName
)

credentials

The credentials to verify the calling user for this call.

loginName

The login name of the user you wish to retrieve.

return

PolicyHubUser - The user with the request login name.

Get a User(s) by Display Name

This method allows the retrieval of one or more users by searching for their display name.

PolicyHubUser[] GetUsersByDisplayName( 
    Credentials credentials,
    string displayName
)

credentials

The credentials to verify the calling user for this call.

displayName

The display name of the user(s) you wish to search for.

return

PolicyHubUser[ ] - An array of zero or more users found with the request display name during search.

Publish a Document

This method allows a new publication to be created for a given document. The active revision for the given document will be used to create the publication.

int PublishDocument( 
    Credentials credentials, 
    PolicyHubUser[] users, 
    int documentId, 
    int ruleId, 
    NewPublicationDetails details
)

credentials

The credentials to verify the calling user for this call.

users

An array of users to send the publication to.

documentId

The ID of the library document to include in the publication.

ruleId

The ID of the rule to use for the publication.

details

The publication’s properties and details.

return

INT - The publication ID.

int PublishDocument( 
    Credentials credentials, 
    PolicyHubUser[] users, 
    int documentId, 
    string ruleName, 
    NewPublicationDetails details
)

credentials

The credentials to verify the calling user for this call.

users

An array of users to send the publication to.

documentId

The ID of the library document to include in the publication.

ruleName

The name of the rule to use for the publication.

details

The publication’s properties and details.

return

INT - The publication ID.

int PublishDocument( 
    Credentials credentials, 
    int recipientListId, 
    int documentId, 
    int ruleId, 
    NewPublicationDetails details
)

credentials

The credentials to verify the calling user for this call.

recipientListId

The ID of a recipient list to send the publication to.

documentId

The ID of the library document to include in the publication.

ruleId

The ID of the rule to use for the publication.

details

The publication’s properties and details.

return

INT - The publication ID.

int PublishDocument( 
    Credentials credentials, 
    string recipientListName, 
    int documentId, 
    string ruleName, 
    NewPublicationDetails details
)

credentials

The credentials to verify the calling user for this call.

recipientListName

The name of a recipient list to send the publication to.

documentId

The ID of the library document to include in the publication.

ruleName

The name of the rule to use for the publication.

details

The publication’s properties and details.

return

INT - The publication ID.

Publish a Specific Document Revision

This method allows a new publication to be created and dispatched for a given document revision.

int PublishDocumentRevision( 
    Credentials credentials, 
    PolicyHubUser[] users, 
    int revisionId, int ruleId, 
    NewPublicationDetails details
)

credentials

The credentials to verify the calling user for this call.

users

An array of users to send the publication to.

revisionId

The ID of the library revision to include in the publication.

ruleId

The ID of the rule to use for the publication.

details

The publication’s properties and details.

return

INT - The publication ID.

int PublishDocumentRevision( 
    Credentials credentials, 
    PolicyHubUser[] users, 
    int revisionId, string ruleName,
    NewPublicationDetails details
)

credentials

The credentials to verify the calling user for this call.

users

An array of users to send the publication to.

revisionId

The ID of the library revision to include in the publication.

ruleName

The name of the rule to use for the publication.

details

The publication’s properties and details.

return

INT - The publication ID.

int PublishDocumentRevision( 
    Credentials credentials, 
    int recipientListId, 
    int revisionId, 
    int ruleId,
    NewPublicationDetails details
)

credentials

The credentials to verify the calling user for this call.

recipientListId

The ID of a recipient list to send the publication to.

revisionId

The ID of the library revision to include in the publication.

ruleId

The ID of the rule to use for the publication.

details

The publication’s properties and details.

return

INT - The publication ID.

int PublishDocumentRevision( 
    Credentials credentials, 
    string recipientListName, 
    int revisionId,
    string ruleName, 
    NewPublicationDetails details
)

credentials

The credentials to verify the calling user for this call.

recipientListName

The name of a recipient list to send the publication to.

revisionId

The ID of the library revision to include in the publication.

ruleName

The name of the rule to use for the publication.

details

The publication’s properties and details.

return

INT - The publication ID.

Start a Workflow

This method allows a Workflow to be started for a document. If no workflow is specified then the method will only start a workflow if there is a category assigned to the document with a valid Workflow configured against it.

int StartWorkflow( 
    Credentials credentials, 
    int documentId
)

credentials

The credentials to verify the calling user for this call.

documentId

The ID of the document revision to start the Workflow for.

return

INT - The ID of the Workflow Instance.

int StartWorkflow( 
    Credentials credentials, 
    int documentId, 
    int workflowId
)

credentials

The credentials to verify the calling user for this call.

documentId

The ID of the document revision to start the Workflow for.

workflowId

The ID of the Workflow start.

return

INT - The ID of the Workflow Instance.

Cancel a Workflow

This method can be used to cancel a running Workflow instance.

void CancelWorkflowInstance( 
    Credentials credentials, 
    int instanceId
)

credentials

The credentials to verify the calling user for this call.

instanceId

The ID of the Workflow instance to cancel.

Restart a Workflow

This method can be used to restart a running Workflow instance.

void RestartWorkflowInstance( 
    Credentials credentials, 
    int instanceId
)

credentials

The credentials to verify the calling user for this call.

instanceId

The ID of the Workflow instance to restart.

Get a List of Categories

This method can be used to retrieve a list of all Categories within PolicyHub.

PolicyCategory[] GetCategories( 
    Credentials credentials
)

credentials

The credentials to verify the calling user for this call.

return

PolicyCategory[ ] - An array of all Categories within PolicyHub.

  • Was this article helpful?