Loading TOC...
Matches for cat:guide/rest-dev have been highlighted. remove
REST Application Developer's Guide (PDF)

MarkLogic Server 11.0 Product Documentation
REST Application Developer's Guide
— Chapter 10

Data Services Declarations to Open API

You can generate an Open API definition that describes the HTTP transport for a functional endpoint exposed by Data Services.

By making a GET request with an Accept header of application/vnd.oai.openapi+json (the mime type for an Open API declaration), the REST API dispatches the request to transform the endpoint *.api declaration into Open API and returns the result as the response.

The request may specify a data service endpoint installed in the modules database for the REST API appserver or any of its containing directories as in:

/ds/someBundle/someService.sjs
/ds/someBundle
/ds
/

The response ignores the contents of directories in the modules database managed by the REST API.

The transform is not supported on appservers without the REST API.

The following example illustrates a request to the modules database with an Accept header of application/vnd.oai.openapi+json with /ds/someBundle/someService.sjs as a data service endpoint:

curl --anyauth --user user:password -X GET -i -H "Accept: application/vnd.oai.openapi+json" 'http://localhost:8003/ds/someBundle.someService.sjs'{"openapi":"3.0.0", "info"://data service endpoint informations}

To learn how to create Data Services using the MarkLogic Java Developments Tools, see Creating Data Services Using the MarkLogic Java Development Tools in Java Application Developer's Guide.

To learn how to create Data Services and Developer Actions in Node.js, see Creating Data Services and Developer Actions in Node.js in Node.js Application Developer's Guide.

« Previous chapter