'create( self, trans, payload, **kwd )
* POST /api/pages
Create a page and return dictionary containing Page summary
:param  payload:    dictionary structure containing::
\'slug\'       = The title slug for the page URL, must be unique
\'title\'      = Title of the page
\'content\'    = HTML contents of the page
\'annotation\' = Annotation that will be attached to the page
:rtype:     dict
:returns:   Dictionary return of the Page.to_dict call'

@expose_api
def create(self, trans, payload, **kwd):

    user = trans.get_user()
    if (not payload.get('title', None)):
        raise exceptions.ObjectAttributeMissingException('Page    name    is    required')
    elif (not payload.get('slug', None)):
        raise exceptions.ObjectAttributeMissingException('Page    id    is    required')
    elif (not self._is_valid_slug(payload['slug'])):
        raise exceptions.ObjectAttributeInvalidException("Page    identifier    must    consist    of    only    lowercase    letters,    numbers,    and    the    '-'    character")
    elif trans.sa_session.query(trans.app.model.Page).filter_by(user=user, slug=payload['slug'], deleted=False).first():
        raise exceptions.DuplicatedSlugException('Page    slug    must    be    unique')
    content = payload.get('content', '')
    content = sanitize_html(content, 'utf-8', 'text/html')
    page = trans.app.model.Page()
    page.title = payload['title']
    page.slug = payload['slug']
    page_annotation = sanitize_html(payload.get('annotation', ''), 'utf-8', 'text/html')
    self.add_item_annotation(trans.sa_session, trans.get_user(), page, page_annotation)
    page.user = user
    page_revision = trans.app.model.PageRevision()
    page_revision.title = payload['title']
    page_revision.page = page
    page.latest_revision = page_revision
    page_revision.content = content
    session = trans.sa_session
    session.add(page)
    session.flush()
    rval = self.encode_all_ids(trans, page.to_dict(), True)
    return rval
