Package: plonemeeting.restapi
plonemeeting.restapiplone.restapi specific endpoints for Products.PloneMeetingInstallationInstall plonemeeting.restapi by adding it to your buildout:[buildout]

...

eggs =
    plonemeeting.restapiand then runningbin/buildoutContributeIssue Tracker:https://github.com/IMIO/plonemeeting.restapi/issuesSource Code:https://github.com/IMIO/plonemeeting.restapiLicenseThe project is licensed under the GPLv2.ChangelogVersion 1.x is for PloneMeeting 4.1.x, version 2.x is for PloneMeeting 4.2.x+2.3 (2023-12-11)Adapted code asProducts.PloneMeeting.utils.add_wf_history_actionwas moved
toimio.history.utils.add_event_to_wf_historyandToolPloneMeeting.getAdvicePortalTypesandToolPloneMeeting.getAdvicePortalTypeIdswere moved to utils.
[gbastien]2.2 (2023-09-12)Always include@typeinfo in result even wheninclude_base_data=falseas
it is used withUidSearchGet.required_meta_type_id.
[gbastien]2.1 (2023-06-27)Inbase.serialize_attendees, do not useUIDfrom serialized result as it
could not be there when usinginclude_base_data=false.
[gbastien]2.0.2 (2023-05-31)Added@attendees GETon meeting and item and@attendee GET/PATCHon meeting and item. Addedextra_include=attendeeson meeting and item.
[gbastien]Managemetadata_fields=internal_number.
[gbastien]2.0.1 (2023-03-07)Fixed test isolation problem when tests executed together withimio.pm.wstests.
[gbastien]2.0 (2023-03-06)Dropped support forPloneMeeting 4.1.x.
[gbastien]Addconfigtoextra_includeallowed parameters to return informations about the meeting config
[mpeeters]Ensure thatin_name_ofparameter is only handled once when__children__parameter is used
[mpeeters]Enforce usage ofUIDparameter only ifexternalIdentifieris not provided
[mpeeters]Addedtest_restapi_add_item_manually_linked_itemsto check that it is possible
to create items and use theMeetingItem.manuallyLinkedItemsfunctionnality.
[gbastien]Adapted code asMeetingConfig.useGroupsAsCategorieswas removed.
FieldMeetingItem.categoryis an optional field managed byMeetingConfig.usedItemAttributesas any other optional fields now.
[gbastien]Adddateby default to meeting informations.
[mpeeters]1.0rc18 (2022-08-26)Allow usage oftypeparameter within_name_ofwhenconfig_idis not specified
[mpeeters]FixedBasePost._turn_ids_into_uidsto manage organizations outsideMy organizationthis is the case for fieldMeetingItem.associatedGroups.
[gbastien]Refactored behavior so we use theISerializeToJsonserializer when
any parameter is given.
[gbastien]Completed the@configservice (that now uses aSearchGet)
to return everyMeetingConfigswhenconfig_id=*.
[gbastien]Refactored the@getendpoint to use aSearchGetso we can usein_name_of.
[gbastien]AddedDeserializeFromJson._need_update_local_rolesthat willupdate_local_roleswhen creating an item when required, this is needed in
some case like when creating an item withinternalNotesbecause this field
relies onlocal_role/permissionthat need to be setup to be writeable.
[gbastien]Register@get GETendpoint forIPloneSiteRootinsteadIFolderish.
[gbastien]Added possibility to get the selectable choices of a field in the response.
Parameterinclude_choices_for=field_namemay be given, in this case,
a keyfield_name__choicesis added to the result withtoken/titleof
the selectable values.
[gbastien]Refactored@item extra_include=linked_itemsto filter results using a
catalog query so parameters and functionnality is similar to other endpoints.
Removedutils.filter_datathat could be dangerous and build a catalog query.
Formalized convenience catalog index names substitution (passing parametertypecorresponds to indexportal_typeorstatecorresponds toreview_state).
[gbastien]Parameterconfig_idis no more required when usingin_name_ofin@getor@search.
Addedbbb.pyto backport methodsget_filtered_plone_groups_for_userandgetActiveConfigsfromToolPloneMeetingso it is avaible when usingPloneMeeting 4.1.x.
[gbastien]1.0rc17 (2022-07-01)Redo broken release…
[gbastien]1.0rc16 (2022-07-01)Addedextra_include=linked_itemsavailable on item.
This will append the item linked items, variousmodesmay be asked:auto(by default) will return every auto linked items,manualwill return
manually linked items,predecessorwill return the first predecessor,predecessorswill return every predecessors,successorswill return the
directsuccessorsandevery_successorswill return chain of successors.
[gbastien]Addedutils.filter_datathat will let filter given data.
[gbastien]RenamedBaseSerializeToJson._get_paramtoBaseSerializeToJson.get_paramor it is considered as a private method not to use directly but actually
it must be used insteadutils.get_param.
[gbastien]1.0rc15 (2022-06-14)Removed temporary fix introduced in versionplonemeeting.restapi=1.0rc13to avoid creating an empty item. This was fixed inplone.restapi=7.8.0.
[gbastien]1.0rc14 (2022-05-10)UseBadRequestinsteadExceptionfor every errors, this will return
an error code400instead500that is used for internal server errors.
[gbastien]1.0rc13 (2022-04-28)Enable environment variableRESTAPI_DEBUGin tests.
[gbastien]Prevent create an empty item.  Temporarily completely overridedDeserializeFromJson.__call__fromplone.restapiuntil issuehttps://github.com/plone/plone.restapi/issues/1386is fixed.
[gbastien]1.0rc12 (2022-02-15)Fixedbase.serialize_annexes, make sure we get no annex if the given filters gives no uids.
Passing no uids to get_categorized_elements meansDo not filter on uids.
[gbastien]1.0rc11 (2022-02-14)RestoredProducts.PloneMeeting 4.1.x/4.2.xbackward compatibility.
[gbastien]1.0rc10 (2022-02-03)Only display theUnknown datawarning when creating an element if returning
full obj serialization after creation.
[gbastien]Fixed creation of meeting with annexes.
[gbastien]Make the annex serializer includefilein base data.
[gbastien]Fixedclean_html=Falsewhen creating DX content,clean_htmlwas always applied.
[gbastien]1.0rc9 (2022-01-27)Added upgrade step to 2000 that will re-apply therolemapstep so we are
sure old installations are restricting the service to roleMember.
[gbastien]1.0rc8 (2022-01-21)Added HTML clean (enabled by default) when adding an element (AT or DX).
[gbastien]Addedextra_include=annexesavailable on item and meeting.
[gbastien]1.0rc7 (2022-01-14)Make sure everyextra_includeare correctly defined in_available_extra_includes.  Now if not defined there, it will be ignored.
[gbastien]1.0rc6 (2022-01-07)Addedextra_include=pod_templatesforMeetingandMeetingItem.
[gbastien]Fixed use ofutils.get_current_user_idandadopt_user.
[gbastien]1.0rc5 (2022-01-03)When returning annex additional values, ignorelast_updated.
[gbastien]1.0rc4 (2021-11-26)Default value for parameterthe_objectschanged inToolPloneMeeting.get_orgs_for_user(from True to False).
[gbastien]Adaptedutils.may_access_config_endpointsto only checktool.isManagerif givencfgis not None.
[gbastien]Make PMChoiceFieldSerializer use a MissingTerms adapter when value not found
in vocabulary.
[gbastien]1.0rc3 (2021-11-08)Extended@usersplone.restapiendpoint that by default returns infos for
a single user or let query several users:extra_include=groupswill add the organizations the user is member of;in addition, passingextra_include_groups_suffixes=creatorswill add
the organizations the user is creator for (any suffix may be used);extra_include=app_groupswill add the user Plone groups;extra_include=configswill return theMeetingConfigsthe user has access to;extra_include=categories, will return the categories the user is able to
use for eachMeetingConfigin addition,extra_include_categories_config=meeting-config-idparameter
will filter results for givenMeetingConfigid;extra_include=classifiers, will return the classifiers the user is able to
use for eachMeetingConfigin additionextra_include_classifiers_config=meeting-config-idparameter
will filter results for givenMeetingConfigids.[gbastien]Added@annexPOST endpoint to be able to add an annex on an existing element.
[gbastien]Changed default behavior of@get GETendpoint that will return by default
the summary version of serialized data, to get the full serialization, then
parameterfullobjectswill need to be given.
[gbastien]Serializer may now complete a@extra_includeskey that listextra_includevalues available for it.
[gbastien]1.0rc2 (2021-09-28)UseProducts.PloneMeeting.utils.convert2xhtmlto converttext/htmldata
to correct format (images to base64 data and xhtml compliant).
[gbastien]Simplify external service call to @item POST (add item):Handle parameterignore_not_used_data:truethat will add a warning instead
raising an error if an optional field is given (in this case, the given
optional field value is ignored);Handle parameterignore_validation_forthat will bypass validation of given
fields if it is not in data or if it is empty. This makes it possible to add
an item without every data, the item will have to be completed in the Web UI.[gbastien]Make sureexternalIdentifieris always stored as a string, as it may be
passed in the @add endpoint as an integer, if it is stored as an integer,
it is not searchable in theportal_catalogusing the@searchendpoint
afterwards.
[gbastien]FixedPMLazyCatalogResultSerializer.__call__to avoid anUnboundLocalErroror duplicates in results when the corresponding object does not exist anymore
for a brain or when aKeyErroroccured in call to serializer.
[gbastien]Handle anonymization of content.  To do so, addedutils.handle_htmlthat
will handle every html data (AT pr DX) and make sure it is compliant with
what we need:images as base64 data;useappy.podpreprocessor to make sure we have valid XHTML;anonymize content if necessary.[gbastien]1.0rc1 (2021-08-17)Make the summary serializer able to handleextra_includeandadditional_values. For this, needed to change the way summary serializer is
handled byplone.restapibecause by default there is one single summary
serializer for brain interface but we need to be able to register a summary
adapter for different interfaces (item, meeting, …).
[gbastien]RestoredProducts.PloneMeeting 4.1.x/4.2.xbackward compatibility.
[gbastien]Defined correct serializers for list fields so we have atoken/valuerepresentation in each case (AT/DX for single and multi valued select).
[gbastien]Added some newextra_includeforMeetingItem:classifier,groups_in_chargeandassociated_groups.
Theextra_includenamedproposingGroupwas renamed toproposing_group.
[gbastien]Useadditional_valuesin annex serializer to get categorized element infos
instead yet another parameterinclude_categorized_infos.
[gbastien]1.0b2 (2021-07-16)Adapted code and tests now thatMeetingwas moved fromATtoDX.
[gbastien]Manageextra_include=classifiersin@config GETendpoint.
[gbastien]Do no more require parameterconfig_idwhen atypeis given in@searchendpoint.  Whentypeis other thanitem/meeting, we simply add it to thequeryasportal_type.config_idis only required whentypeisitemormeeting.
[gbastien]Added possibility to filter theannexes endpointon any of the boolean
attributes (to_print,publishable,confidential,to_sign/signed).
[gbastien]Adaptedextra_include=deliberationthat was always returning every variants
of deliberation (deliberation/public_deliberation/public_deliberation_decided),
now theextra_includevalue is the name of the variants we want to get.
[gbastien]Take into account theextra_include_fullobjectsin theMeetingItemserializer.
To handle this, it was necessary to implement a summary serializer forMeeting.
[gbastien]Addedtest_restapi_search_items_extra_include_deliberation_imagesshowing
that images are received as base64 data value.
[gbastien]1.0b1 (2021-02-03)Override defaultPMBrainJSONSummarySerializerforICatalogBrainfromimio.restapi(that already overrides the one fromplone.restapi) to
include metadataenabledby default.
Define alsoPMJSONSummarySerializerfor object (not brain) to have a
summary representation of any objects. This makes it possible to get summary
serializers for aMeetingConfigand it’s associated groups while using@config?extra_include=associated_groups.
[gbastien]Changed behavior of our overrided@search: before, it was overriding the
default@searchand was requiring aconfig_idto work, nowconfig_idis
optional, when given, it will ease searching for items or meetings, but if
not given, then the endpoint will have the default@searchbehavior.
Nevertheless, if parametertypeis given, thenconfig_idmust be given as well.
[gbastien]1.0a6 (2021-01-06)Products.PloneMeeting.utils.fplogwas moved toimio.helpers.security.fplog, adapted code accordingly.
[gbastien]1.0a5 (2020-12-07)Added parametersextra_include_proposing_groups,extra_include_groups_in_chargeandextra_include_associated_groupsto@config GETendpoint.
[gbastien]By default, restrict access to endpoints to roleMember,
was given to roleAnonymousby default byplone.restapi.
[gbastien]1.0a4 (2020-10-14)Completed test showing thatMeetingItem.adviceIndexwas not correctly
initialized upon item creation.
[gbastien]Added parameterextra_include_meetingtoIMeetingItemserializer.
[gbastien]CompletedIMeetingserializer_additional_valueswithformatted_date,formatted_date_shortandformatted_date_long.
[gbastien]1.0a3 (2020-09-10)Fixedtest_restapi_config_extra_include_categoriesas formerAT MeetingCategoryare nowDX meetingcategorythat use fieldenabledinstead workflowreview_stateactive.
[gbastien]Addedtest_restapi_add_item_wf_transitionsthat was broken
withimio.restapi<1.0a11.
[gbastien]When adding a new item, insert the eventcreate_element_using_ws_restin theworkflow_historyat the beginning, just after thecreatedevent.
[gbastien]1.0a2 (2020-06-24)Added testtest_restapi_annex_type_only_for_meeting_managers, make sure an
annexcontent_categorythat is restricted toMeetingManagersusingcontent_category.only_for_meeting_managersis rendered the same way.
[gbastien]Try to build a more easy api :Turned@search_itemsinto@searchand@search_meetingsinto@search?type=meeting;ParametergetConfigIdis renamed toconfig_id;Addedin_name_ofparameter making it possible to use endpoint as another
user if original user is(Meeting)Manager.[gbastien]Added@itemPOST endpoint to be able to create item with/without annexes:Need to define new AT fieldsdeserializerto apply WF before settings
field values;Manage optional fields (can not use when not enabled);Manage creation of annexes as__children__of item;Ease use by being able to defineconfig_idonly at first level
(so not for annexes);Ease use by being able to use organizationsidsinsteadUIDsin creation data;Managein_name_ofparameter.[gbastien]Override@infosendpoint from imio.restapi to add our own informations.
[gbastien]Added parametermeetings_accepting_items=Trueto@searchwhentype=meeting, this will query only meetings accepting items but query
may still be completed with other arbitrary indexes.
[gbastien]Added@configendpoint that will return a givenconfig_idMeetingConfiginformations. Parametersinclude_categories(return enabled/disabled
categories),include_pod_templates(return enabled POD template) andinclude_searches(return enabled DashboardCollections) are available.
[gbastien]Added@getendpoint that receives anUIDand returns the object found.
A convenience endpoint@itemdo the same but just check that returned element
is a MeetingItem.
[gbastien]Added parameterbase_search_uid=collection_uidto@search,
this makes it possible to use thequerydefined on aDashboardCollection.
[gbastien]1.0a1 (2020-01-10)Initial release.
[gbastien]