Authors API =========== The author API supports creating users that could be used to create drafts. Creating authors ---------------- Creates an author and sets its role as guest editor. .. code:: POST /api/1.1/authors Parameters ********** ====================== ======= ========================================== Name Type Description ====================== ======= ========================================== ``first_name`` String First name - Optional ``last_name`` String Last name - Optional ``email`` String User email - Required ``password`` String User password - Optional ``name`` String Slug - Optional ``about_html`` String User biography - Optional ``image_id`` Integer ID of the uploaded image - Optional ``specific_data`` Object Specific data - Optional ====================== ======= ========================================== .. note:: * ``image_id`` can be found as ``id`` in Image API **response** when uploading or editing images. * ``specific_data`` might contain custom information and validated with a configured schema if any. Ask you Account Manager if is necessary. Response ******** .. code:: json { "id": , "name": "andreabreanna", "displayname": "Andrea Breanna", "about_html": "This is me", "bio": "", "photo": "https:///res/avatars/default", "fb_id": null, "profile_url": "https:///u/andreabreanna/", "specific_data": {} } Editing authors ---------------- Edits an author's information. .. code:: PUT /api/1.1/authors/ Parameters ********** ====================== ======= ========================================== Name Type Description ====================== ======= ========================================== ``first_name`` String First name - Optional ``last_name`` String Last name - Optional ``email`` String User email - Optional ``password`` String User password - Optional ``name`` String Slug - Optional ``about_html`` String User biography - Optional ``image_id`` Integer ID of the uploaded image - Optional ``specific_data`` Object Specific data - Optional ====================== ======= ========================================== .. note:: * ``first_name`` and ``last_name`` are mutually required. * If the user signed up using a social network, the ``password`` won't be allowed to set unless ``email`` is received. * ``image_id`` can be found as ``id`` in Image API **response** when uploading or editing images. * ``specific_data`` might contain custom information and validated with a configured schema if any. Ask you Account Manager if is necessary. Response ******** .. code:: json { "id": , "name": "andreabreanna", "displayname": "Andrea Breanna", "about_html": "This is me", "bio": "", "photo": "https:///res/avatars/default", "fb_id": null, "profile_url": "https:///u/andreabreanna/", "specific_data": {} } Get a single author ------------------- Fetch a single author by ID. .. code:: GET /api/1.1/authors/ Response ******** .. code:: json { "id": , "name": "andreabreanna", "displayname": "Andrea Breanna", "about_html": "This is me", "bio": "", "photo": "https:///res/avatars/default", "fb_id": null, "profile_url": "https:///u/andreabreanna/", "specific_data": {} } List authors ------------ Fetches authors information ordered by ID in descending order. .. code:: GET /api/1.3/authors/search Parameters ********** ====================== ======= ====================================================== Name Type Description ====================== ======= ====================================================== ``offset`` Integer Offset -- Optional ``limit`` Integer Limit -- Optional, defaults to 10, maximum value is 30 ====================== ======= ====================================================== Response ******** .. code:: json [ { "id": , "name": "andreabreanna", "displayname": "Andrea Breanna", "about_html": "This is me", "bio": "", "photo": "https:///res/avatars/default", "fb_id": null, "profile_url": "https:///u/andreabreanna", "specific_data": [] } ] Search authors by email ----------------------- Fetches authors information by email addresses. .. code:: GET /api/1.3/authors/email Parameters ********** ====================== ======= ========================================================================= Name Type Description ====================== ======= ========================================================================= ``emails`` String Required -- Multiple emails can be received with a comma-separated string ====================== ======= =========================================================================