aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/server/src/controllers
diff options
context:
space:
mode:
authorAhmed Abbas <ahmad.helmy@orange.com>2019-11-13 11:09:25 +0200
committerAhmed Abbas <ahmad.helmy@orange.com>2019-11-14 09:06:58 +0200
commit43bbe44b1babdcfc91ad47df2b3c6a93e525b6a6 (patch)
tree422b5ecd30206fa0004bf16942f5c7262066b5a3 /cds-ui/server/src/controllers
parent54eb2f2680d4f2447a4d48b612b2b83e37d90754 (diff)
add API to list blueprints with pagination in loopback server
Issue-ID: CCSDK-1770 Signed-off-by: Ahmed Abbas <ahmad.helmy@orange.com> Change-Id: I705135af4898db68eeddb8b67bf62fbbea6921ac
Diffstat (limited to 'cds-ui/server/src/controllers')
-rw-r--r--cds-ui/server/src/controllers/blueprint-rest.controller.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/cds-ui/server/src/controllers/blueprint-rest.controller.ts b/cds-ui/server/src/controllers/blueprint-rest.controller.ts
index b52952826..49ecb9df1 100644
--- a/cds-ui/server/src/controllers/blueprint-rest.controller.ts
+++ b/cds-ui/server/src/controllers/blueprint-rest.controller.ts
@@ -69,6 +69,21 @@ export class BlueprintRestController {
return await this.bpservice.getAllblueprints();
}
+ @get('/controllerblueprint/paged', {
+ responses: {
+ '200': {
+ description: 'Blueprint model instance with pagination',
+ content: { 'application/json': { schema: { 'x-ts-type': Blueprint } } },
+ },
+ },
+ })
+ async getPagedBlueprints(
+ @param.query.number('limit') limit: number,
+ @param.query.number('offset') offset: number,
+ @param.query.string('sort') sort: string) {
+ return await this.bpservice.getPagedBueprints(limit, offset, sort);
+ }
+
@get('/controllerblueprint/meta-data/{keyword}', {
responses: {
'200': {