Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Drawio
bordertrue
diagramNamemapper service arch
simpleViewerfalse
width
linksauto
tbstyletop
lboxtrue
diagramWidth447
revision1
 

3. API definition guide

Template CRUD operations

Create xpath template

Interface definitionDescription
Content-Typeapplication/json
OperationPOST
URI/api/v1/templates

Request Body

AttributeRequiredTypeDescription
idYStringIdentifier for the template
schema-setYStringschema set on which xpath query should be executed
templateYStringxpath template

Response Codes

CodeDescription
201Template created successfully
400Bad Request (Error in request attributes)
500Internal server error

List all xpath template

Interface definitionDescription
Content-Typeapplication/json
OperationGET
URI/api/v1/templates

Response Codes

CodeDescription
200Templates returned successfully
404No templates found
500Internal server error

Response Body

AttributeRequiredTypeDescription
templatesYListList of template objects

Template Object

AttributeRequiredTypeDescription
idYStringIdentifier for the template
schema-setYStringschema set on which xpath query should be executed
templateYStringxpath template

Get a xpath template by id

Interface definitionDescription
Content-Typeapplication/json
OperationGET
URI/api/v1/templates/{schema-set}/{id}

Response Codes

CodeDescription
200Template found and returned
404Template not found
500Internal server error

Response Body

Same as template Object

Delete xpath template

Interface definitionDescription
Content-Typeapplication/json
OperationDELETE
URI/api/v1/templates/{schema-set}/{id}

Response Codes

CodeDescription
200Template deleted successfully
400Bad Request (Error in request attributes)
500Internal server error

Execute template

Interface definitionDescription
Content-Typeapplication/json
OperationPOST
URI/api/v1/execute/{schema-set}/{id}

Request Body

AttributeRequiredTypeDescription
InputYJSON blobInput dictionary to be applied to the template

Response Codes

CodeDescription
200Template executed successfully
400Bad Request (Error in request attributes)
500Internal server error

Response Body

AttributeRequiredTypeDescription
resultYJSON BlobResult of the xpath query as JSON object

4. Dependencies

  • Definition of templates


5. Deployment aspects

To be updated