From 67da9ab7ff9e710bc9f2188996a7a51dfa19fce8 Mon Sep 17 00:00:00 2001 From: Manuel Rego Casasnovas Date: Fri, 11 May 2012 09:01:41 +0200 Subject: [PATCH] doc: Improve web services documentation with the list of available services FEA: ItEr76S03Community --- scripts/rest-clients/README | 119 ++++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) diff --git a/scripts/rest-clients/README b/scripts/rest-clients/README index 410d754ea..ead2a5c1f 100644 --- a/scripts/rest-clients/README +++ b/scripts/rest-clients/README @@ -140,6 +140,9 @@ Example:: $ get-xml-schema.sh resources +You can also get it with a browser going to the following URL using a user with +read credentials for web services: ``/ws/rest//?_wadl&_type=xml`` + Export scripts -------------- @@ -175,3 +178,119 @@ Example:: .. _`HTTP Basic Authentication`: http://www.w3.org/Protocols/HTTP/1.0/spec.html#BasicAA + + +Available web services +---------------------- + +Business entities +~~~~~~~~~~~~~~~~~ + +For each entity there are the following methods: + +* Export all: + + * HTTP method: ``GET`` + * No parameters + * URL: ``/ws/rest//`` + +* Export one: + + * HTTP method: ``GET`` + * Parameter: ``entity-code`` + * URL: ``/ws/rest///`` + +* Import one or more: + + * HTTP method: ``POST`` + * No parameters + * URL: ``/ws/rest//`` + +Supported entities: + +* Exception Days: + + * Service path: ``calendarexceptiontypes`` + * DTO: ``org.libreplan.ws.calendarexceptiontypes.api.CalendarExceptionTypeDTO`` + * Business class: ``org.libreplan.business.calendars.entities.CalendarExceptionType`` + +* Calendars: + + * Service path: ``calendar`` + * DTO: ``org.libreplan.ws.calendars.api.BaseCalendarDTO`` + * Business class: ``org.libreplan.business.calendars.entities.BaseCalendar`` + +* Cost categories: + + * Service path: ``costcategories`` + * DTO: ``org.libreplan.ws.costcategories.api.CostCategoryDTO`` + * Business class: ``org.libreplan.business.costcategories.entities.CostCategory`` + +* Criteria: + + * Service path: ``criteriontypes`` + * DTO: ``org.libreplan.ws.resources.criterion.api.CriterionTypeDTO`` + * Business class: ``org.libreplan.business.resources.entities.CriterionType`` + +* Labels: + + * Service path: ``labels`` + * DTO: ``org.libreplan.ws.labels.api.LabelTypeDTO`` + * Business class: ``org.libreplan.business.labels.entities.LabelType`` + +* Materials: + + * Service path: ``materialcategories`` + * DTO: ``org.libreplan.ws.materials.api.MaterialCategoryDTO`` + * Business class: ``org.libreplan.business.materials.entities.MaterialCategory`` + +* Projects: + + * Service path: ``orderelements`` + * DTO: ``org.libreplan.ws.common.api.OrderDTO`` + * Business class: ``org.libreplan.business.orders.entities.Order`` + +* Resources: + + * Service path: ``resources`` + * DTO: ``org.libreplan.ws.resources.api.ResourceDTO`` + * Business class: ``org.libreplan.business.resources.entities.Resource`` + +* Work Hours: + + * Service path: ``typeofworkhours`` + * DTO: ``org.libreplan.ws.typeofworkhours.api.TypeOfWorkHoursDTO`` + * Business class: ``org.libreplan.business.costcategories.entities.TypeOfWorkHours`` + +* Unit Measures: + + * Service path: ``unittypes`` + * DTO: ``org.libreplan.ws.typeofworkhours.api.TypeOfWorkHoursDTO`` + * Business class: ``org.libreplan.business.materials.entities.UnitType`` + +* Work Reports: + + * Service path: ``workreports`` + * DTO: ``org.libreplan.ws.workreports.api.WorkReportDTO`` + * Business class: ``org.libreplan.business.workreports.entities.WorkReport`` + +Other +~~~~~ + +* Resource hours: + + * Methods: + + * Export all resource hours between two dates: + + * HTTP method: ``GET`` + * Parameters: ```` and ```` + * URL: ``/ws/rest/resourceshours///`` + + * Export all resource hours between two dates for a specified resource: + + * HTTP method: ``GET`` + * Parameters: ````, ```` and ```` + * URL: ``/ws/rest/resourceshours////`` + + * DTO: ``org.libreplan.ws.resources.api.ResourceWorkedHoursListDTO``