From 404171c2cbec0ed7c344444bf2916da797fec29e Mon Sep 17 00:00:00 2001 From: Michael Valdron Date: Thu, 21 Mar 2024 19:06:44 -0400 Subject: [PATCH] REST doc update Signed-off-by: Michael Valdron --- index/server/openapi.yaml | 54 +- index/server/registry-REST-API.adoc | 920 +++++++++++++++++++++++++++- 2 files changed, 962 insertions(+), 12 deletions(-) diff --git a/index/server/openapi.yaml b/index/server/openapi.yaml index 5f755001..daf31d82 100644 --- a/index/server/openapi.yaml +++ b/index/server/openapi.yaml @@ -108,8 +108,6 @@ paths: - $ref: '#/components/parameters/iconUriParam' - $ref: '#/components/parameters/projectTypeParam' - $ref: '#/components/parameters/languageParam' - - $ref: '#/components/parameters/minSchemaVersionParam' - - $ref: '#/components/parameters/maxSchemaVersionParam' - $ref: '#/components/parameters/resourcesParam' - $ref: '#/components/parameters/starterProjectsParam' - $ref: '#/components/parameters/linkNamesParam' @@ -174,8 +172,6 @@ paths: - $ref: '#/components/parameters/iconUriParam' - $ref: '#/components/parameters/projectTypeParam' - $ref: '#/components/parameters/languageParam' - - $ref: '#/components/parameters/minSchemaVersionParam' - - $ref: '#/components/parameters/maxSchemaVersionParam' - $ref: '#/components/parameters/resourcesParam' - $ref: '#/components/parameters/starterProjectsParam' - $ref: '#/components/parameters/linkNamesParam' @@ -1007,24 +1003,30 @@ components: name: name in: query required: false + description: Search string to filter stacks by their name schema: $ref: '#/components/schemas/Name' displayNameParam: name: displayName in: query required: false + description: Search string to filter stacks by their display names schema: $ref: '#/components/schemas/DisplayName' descriptionParam: name: description in: query required: false + description: Search string to filter stacks by the description text schema: $ref: '#/components/schemas/Description' attributeNamesParam: name: attributeNames in: query required: false + description: |- + Collection of search strings to filter stacks by the names of + defined free-form attributes schema: type: array items: @@ -1033,6 +1035,7 @@ components: name: tags in: query required: false + description: Collection of search strings to filter stacks by their tags schema: type: array items: @@ -1040,21 +1043,21 @@ components: iconParam: name: icon in: query - description: The icon encoding filter + description: Toggle on encoding content passed required: false schema: $ref: '#/components/schemas/Icon' iconUriParam: name: iconUri in: query - description: The icon uri filter + description: Search string to filter stacks by their icon uri required: false schema: $ref: '#/components/schemas/IconUri' archParam: name: arch in: query - description: The target architecture filter + description: Collection of search strings to filter stacks by their architectures required: false schema: $ref: '#/components/schemas/Architectures' @@ -1062,120 +1065,157 @@ components: name: projectType in: query required: false + description: Search string to filter stacks by their project type schema: $ref: '#/components/schemas/ProjectType' languageParam: name: language in: query required: false + description: Search string to filter stacks by their programming language schema: $ref: '#/components/schemas/Language' minVersionParam: name: minVersion in: query required: false + description: The minimum stack version schema: $ref: '#/components/schemas/Version' maxVersionParam: name: maxVersion in: query required: false + description: The maximum stack version schema: $ref: '#/components/schemas/Version' minSchemaVersionParam: name: minSchemaVersion in: query required: false + description: The minimum devfile schema version schema: $ref: '#/components/schemas/SchemaVersion' maxSchemaVersionParam: name: maxSchemaVersion in: query required: false + description: The maximum devfile schema version schema: $ref: '#/components/schemas/SchemaVersion' defaultParam: name: default in: query required: false + description: Boolean to filter stacks if they are default or not schema: $ref: '#/components/schemas/Default' resourcesParam: name: resources in: query required: false + description: |- + Collection of search strings to filter stacks by their + resource files schema: $ref: '#/components/schemas/Resources' starterProjectsParam: name: starterProjects in: query required: false + description: |- + Collection of search strings to filter stacks by the names + of the starter projects schema: $ref: '#/components/schemas/StarterProjects' linkNamesParam: name: linkNames in: query required: false + description: |- + Collection of search strings to filter stacks by the names + of the link sources schema: $ref: '#/components/schemas/LinkNames' linksParam: name: links in: query required: false + description: |- + Collection of search strings to filter stacks by their link + sources schema: $ref: '#/components/schemas/Links' commandGroupsParam: name: commandGroups in: query required: false + description: |- + Collection of search strings to filter stacks by their present command + groups schema: $ref: '#/components/schemas/CommandGroups' gitRemoteNamesParam: name: gitRemoteNames in: query required: false + description: |- + Collection of search strings to filter stacks by the names of + the git remotes schema: $ref: '#/components/schemas/GitRemoteNames' gitRemotesParam: name: gitRemotes in: query required: false + description: |- + Collection of search strings to filter stacks by the URIs of + the git remotes schema: $ref: '#/components/schemas/GitRemotes' gitUrlParam: name: gitUrl in: query required: false + description: Search string to filter stacks by their git urls schema: $ref: '#/components/schemas/Url' gitRemoteNameParam: name: gitRemoteName in: query required: false + description: |- + Search string to filter stacks by their git remote name schema: $ref: '#/components/schemas/GitRemoteName' gitSubDirParam: name: gitSubDir in: query required: false + description: |- + Search string to filter stacks by their target subdirectory + of the git repository schema: $ref: '#/components/schemas/GitSubDir' gitRevisionParam: name: gitRevision in: query required: false + description: Search string to filter stacks by their git revision schema: $ref: '#/components/schemas/GitRevision' providerParam: name: provider in: query required: false + description: Search string to filter stacks by the stack provider schema: $ref: '#/components/schemas/Provider' supportUrlParam: name: supportUrl in: query required: false + description: Search string to filter stacks by their given support url schema: $ref: '#/components/schemas/Url' responses: diff --git a/index/server/registry-REST-API.adoc b/index/server/registry-REST-API.adoc index 56b6d479..722bbccf 100644 --- a/index/server/registry-REST-API.adoc +++ b/index/server/registry-REST-API.adoc @@ -323,6 +323,119 @@ curl http://devfile-registry.192.168.1.1.nip.io/index ] ---- +=== Query parameters +[cols="1,1"] +|=== +|Parameter|Description + +|Name +|Search string to filter stacks by their name + +|DisplayName +|Search string to filter stacks by their display names + +|Description +|Search string to filter stacks by the description text + +|AttributeNames +|Collection of search strings to filter stacks by the names of defined free-form attributes + +|Arch +|Collection of search strings to filter stacks by their architectures + +|Tags +|Collection of search strings to filter stacks by their tags + +|Icon +|Toggle on encoding content passed + +|IconUri +|Search string to filter stacks by their icon uri + +|ProjectType +|Search string to filter stacks by their project type + +|Language +|Search string to filter stacks by their programming language + +|Resources +|Collection of search strings to filter stacks by their resource files + +|StarterProjects +|Collection of search strings to filter stacks by the names of the starter projects + +|LinkNames +|Collection of search strings to filter stacks by the names of the link sources + +|Links +|Collection of search strings to filter stacks by their link sources + +|GitRemoteNames +|Collection of search strings to filter stacks by the names of the git remotes + +|GitRemotes +|Collection of search strings to filter stacks by the URIs of the git remotes + +|GitUrl +|Search string to filter stacks by their git urls + +|GitRemoteName +|Search string to filter stacks by their git remote name + +|GitSubDir +|Search string to filter stacks by their target subdirectory of the git repository + +|GitRevision +|Search string to filter stacks by their git revision + +|Provider +|Search string to filter stacks by the stack provider + +|SupportUrl +|Search string to filter stacks by their given support url + +|=== + +=== Request example +.... +curl 'http://devfile-registry.192.168.1.1.nip.io/index?provider=Red%22Hat&resources=.zip' +.... + +*Note:* Field filter parameters accept fuzzy search strings, meaning if `.zip` is passed into `resources` parameter, the results will be any stack with resource entries which contain `.zip` as partial matches. + +=== Response example +[source,json] +---- +[ + { + "name": "go", + "version": "1.2.0", + "displayName": "Go Runtime", + "description": "Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.", + "type": "stack", + "tags": [ + "testtag" + ], + "icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/golang.svg", + "projectType": "Go", + "language": "Go", + "links": { + "self": "devfile-catalog/go:1.2.0" + }, + "resources": [ + "devfile.yaml", + "go-starter-offline.zip" + ], + "starterProjects": [ + "go-starter", + "go-starter-offline" + ], + "provider": "Red Hat" + } +] +---- + + == Gets registry index of sample devfile type Gets the registry index file content of sample devfile type from HTTP response @@ -427,6 +540,164 @@ curl http://devfile-registry.192.168.1.1.nip.io/index/sample ] --- +=== Query parameters +[cols="1,1"] +|=== +|Parameter|Description + +|Name +|Search string to filter samples by their name + +|DisplayName +|Search string to filter samples by their display names + +|Description +|Search string to filter samples by the description text + +|AttributeNames +|Collection of search strings to filter samples by the names of defined free-form attributes + +|Arch +|Collection of search strings to filter samples by their architectures + +|Tags +|Collection of search strings to filter samples by their tags + +|Icon +|Toggle on encoding content passed + +|IconUri +|Search string to filter samples by their icon uri + +|ProjectType +|Search string to filter samples by their project type + +|Language +|Search string to filter samples by their programming language + +|Resources +|Collection of search strings to filter samples by their resource files + +|StarterProjects +|Collection of search strings to filter samples by the names of the starter projects + +|LinkNames +|Collection of search strings to filter samples by the names of the link sources + +|Links +|Collection of search strings to filter samples by their link sources + +|GitRemoteNames +|Collection of search strings to filter samples by the names of the git remotes + +|GitRemotes +|Collection of search strings to filter samples by the URIs of the git remotes + +|GitUrl +|Search string to filter samples by their git urls + +|GitRemoteName +|Search string to filter samples by their git remote name + +|GitSubDir +|Search string to filter samples by their target subdirectory of the git repository + +|GitRevision +|Search string to filter samples by their git revision + +|Provider +|Search string to filter samples by the stack provider + +|SupportUrl +|Search string to filter samples by their given support url + +|=== + +=== Request example +.... +curl 'http://devfile-registry.192.168.1.1.nip.io/index/sample?description=Hello%22World' +.... + +*Note:* Field filter parameters accept fuzzy search strings, meaning if `Hello World` is passed into `description` parameter, the results will be any sample with resource entries which contain `Hello World` as partial matches. + +=== Response example +[source,json] +---- +[ + { + "name": "python-basic", + "displayName": "Basic Python", + "description": "A simple Hello World application using Python", + "type": "sample", + "tags": [ + "Python" + ], + "icon": "https://www.python.org/static/community_logos/python-logo-generic.svg", + "projectType": "python", + "language": "python", + "git": { + "remotes": { + "origin": "https://github.com/devfile-samples/devfile-sample-python-basic.git" + } + } + }, + { + "name": "nodejs-basic", + "displayName": "Basic Node.js", + "description": "A simple Hello World Node.js application", + "type": "sample", + "tags": [ + "NodeJS", + "Express" + ], + "icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/node-js.svg", + "projectType": "nodejs", + "language": "nodejs", + "git": { + "remotes": { + "origin": "https://github.com/nodeshift-starters/devfile-sample.git" + } + } + }, + { + "name": "code-with-quarkus", + "displayName": "Basic Quarkus", + "description": "A simple Hello World Java application using Quarkus", + "type": "sample", + "tags": [ + "Java", + "Quarkus" + ], + "icon": "https://design.jboss.org/quarkus/logo/final/SVG/quarkus_icon_rgb_default.svg", + "projectType": "quarkus", + "language": "java", + "git": { + "remotes": { + "origin": "https://github.com/devfile-samples/devfile-sample-code-with-quarkus.git" + } + } + }, + { + "name": "java-springboot-basic", + "displayName": "Basic Spring Boot", + "description": "A simple Hello World Java Spring Boot application using Maven", + "type": "sample", + "tags": [ + "Java", + "Spring" + ], + "icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/spring.svg", + "projectType": "springboot", + "language": "java", + "git": { + "remotes": { + "origin": "https://github.com/devfile-samples/devfile-sample-java-springboot-basic.git" + } + } + } +] +---- + == Gets registry index of all devfile types Gets the registry index file content of all devfile types from HTTP response @@ -789,6 +1060,141 @@ curl http://devfile-registry.192.168.1.1.nip.io/index/all ] ---- +=== Query parameters +[cols="1,1"] +|=== +|Parameter|Description + +|Name +|Search string to filter stacks/samples by their name + +|DisplayName +|Search string to filter stacks/samples by their display names + +|Description +|Search string to filter stacks/samples by the description text + +|AttributeNames +|Collection of search strings to filter stacks/samples by the names of defined free-form attributes + +|Arch +|Collection of search strings to filter stacks/samples by their architectures + +|Tags +|Collection of search strings to filter stacks/samples by their tags + +|Icon +|Toggle on encoding content passed + +|IconUri +|Search string to filter stacks/samples by their icon uri + +|ProjectType +|Search string to filter stacks/samples by their project type + +|Language +|Search string to filter stacks/samples by their programming language + +|Resources +|Collection of search strings to filter stacks/samples by their resource files + +|StarterProjects +|Collection of search strings to filter stacks/samples by the names of the starter projects + +|LinkNames +|Collection of search strings to filter stacks/samples by the names of the link sources + +|Links +|Collection of search strings to filter stacks/samples by their link sources + +|GitRemoteNames +|Collection of search strings to filter stacks/samples by the names of the git remotes + +|GitRemotes +|Collection of search strings to filter stacks/samples by the URIs of the git remotes + +|GitUrl +|Search string to filter stacks/samples by their git urls + +|GitRemoteName +|Search string to filter stacks/samples by their git remote name + +|GitSubDir +|Search string to filter stacks/samples by their target subdirectory of the git repository + +|GitRevision +|Search string to filter stacks/samples by their git revision + +|Provider +|Search string to filter stacks/samples by the stack provider + +|SupportUrl +|Search string to filter stacks/samples by their given support url + +|=== + +=== Request example +.... +curl 'http://devfile-registry.192.168.1.1.nip.io/index/all?description=node' +.... + +*Note:* Field filter parameters accept fuzzy search strings, meaning if `node` is passed into `description` parameter, the results will be any stack or sample with resource entries which contain `node` as partial matches. + +=== Response example +[source,json] +---- +[ + { + "name": "nodejs-basic", + "displayName": "Basic Node.js", + "description": "A simple Hello World Node.js application", + "type": "sample", + "tags": [ + "NodeJS", + "Express" + ], + "icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/node-js.svg", + "projectType": "nodejs", + "language": "nodejs", + "git": { + "remotes": { + "origin": "https://github.com/nodeshift-starters/devfile-sample.git" + } + } + }, + { + "name": "nodejs", + "version": "1.0.0", + "displayName": "NodeJS Runtime", + "description": "Stack with NodeJS 12", + "type": "stack", + "tags": [ + "NodeJS", + "Express", + "ubi8" + ], + "architectures": [ + "amd64", + "arm64" + ], + "icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/node-js.svg", + "projectType": "nodejs", + "language": "nodejs", + "links": { + "self": "devfile-catalog/nodejs:1.0.0" + }, + "resources": [ + "devfile.yaml" + ], + "starterProjects": [ + "nodejs-starter" + ], + "provider": "Red Hat", + "supportUrl": "http://testurl/support.md" + } +] +---- + == Gets registry v2 index of stack devfile type Gets the registry v2 index file content of stack devfile type, which contains versions information, from HTTP response @@ -1045,11 +1451,17 @@ curl http://devfile-registry.192.168.1.1.nip.io/v2index ] ---- -=== Query parameters +=== Query (range) parameters [cols="1,1"] |=== |Parameter|Description +|MaxVersion +|The maximum stack version + +|MinVersion +|The minimum stack version + |MaxSchemaVersion |The maximum devfile schema version @@ -1159,8 +1571,205 @@ curl http://devfile-registry.192.168.1.1.nip.io/v2index?minSchemaVersion=2.1&max ] ---- -== Gets registry v2 index of sample devfile type -Gets the registry v2 index file content of sample devfile type, which contains versions information, from HTTP response +=== Query (field) parameters +[cols="1,1"] +|=== +|Parameter|Description + +|Name +|Search string to filter stacks by their name + +|DisplayName +|Search string to filter stacks by their display names + +|Description +|Search string to filter stacks by the description text + +|AttributeNames +|Collection of search strings to filter stacks by the names of defined free-form attributes + +|Arch +|Collection of search strings to filter stacks by their architectures + +|Tags +|Collection of search strings to filter stacks by their tags + +|Icon +|Toggle on encoding content passed + +|IconUri +|Search string to filter stacks by their icon uri + +|ProjectType +|Search string to filter stacks by their project type + +|Language +|Search string to filter stacks by their programming language + +|Default +|Boolean to filter stacks if they are default or not + +|Resources +|Collection of search strings to filter stacks by their resource files + +|StarterProjects +|Collection of search strings to filter stacks by the names of the starter projects + +|LinkNames +|Collection of search strings to filter stacks by the names of the link sources + +|Links +|Collection of search strings to filter stacks by their link sources + +|CommandGroups +|Collection of search strings to filter stacks by their present command groups + +|GitRemoteNames +|Collection of search strings to filter stacks by the names of the git remotes + +|GitRemotes +|Collection of search strings to filter stacks by the URIs of the git remotes + +|GitUrl +|Search string to filter stacks by their git urls + +|GitRemoteName +|Search string to filter stacks by their git remote name + +|GitSubDir +|Search string to filter stacks by their target subdirectory of the git repository + +|GitRevision +|Search string to filter stacks by their git revision + +|Provider +|Search string to filter stacks by the stack provider + +|SupportUrl +|Search string to filter stacks by their given support url + +|=== + +=== Request example +.... +curl 'http://devfile-registry.192.168.1.1.nip.io/v2index?name=java&default=true' +.... + +*Note:* Field filter parameters accept fuzzy search strings, meaning if `java` is passed into `name` parameter, the results will be any stack with resource entries which contain `java` as partial matches. + +=== Response example +[source,json] +---- +[ + { + "name": "java-maven", + "displayName": "Maven Java", + "description": "Upstream Maven and OpenJDK 11", + "type": "stack", + "tags": [ + "Java", + "Maven" + ], + "architectures": [ + "amd64", + "arm64", + "s390x" + ], + "icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/java-maven.jpg", + "projectType": "maven", + "language": "java", + "versions": [ + { + "version": "1.1.0", + "schemaVersion": "2.1.0", + "default": true, + "description": "Upstream Maven and OpenJDK 11", + "tags": [ + "Java", + "Maven" + ], + "architectures": [ + "amd64", + "arm64", + "s390x" + ], + "icon": "https://raw.githubusercontent.com/devfile-samples/devfile-stack-icons/main/java-maven.jpg", + "links": { + "self": "devfile-catalog/java-maven:1.1.0" + }, + "commandGroups": { + "build": true, + "debug": true, + "deploy": false, + "run": true, + "test": false + }, + "resources": [ + "devfile.yaml" + ], + "starterProjects": [ + "springbootproject-offline", + "springbootproject" + ] + } + ] + }, + { + "name": "java-quarkus", + "displayName": "Quarkus Java", + "description": "Quarkus with Java", + "type": "stack", + "tags": [ + "Java", + "Quarkus" + ], + "architectures": [ + "amd64" + ], + "icon": "https://design.jboss.org/quarkus/logo/final/SVG/quarkus_icon_rgb_default.svg", + "projectType": "quarkus", + "language": "java", + "versions": [ + { + "version": "1.1.0", + "schemaVersion": "2.0.0", + "default": true, + "description": "Quarkus with Java", + "tags": [ + "Java", + "Quarkus" + ], + "architectures": [ + "amd64" + ], + "icon": "https://design.jboss.org/quarkus/logo/final/SVG/quarkus_icon_rgb_default.svg", + "links": { + "self": "devfile-catalog/java-quarkus:1.1.0" + }, + "commandGroups": { + "build": false, + "debug": true, + "deploy": false, + "run": true, + "test": false + }, + "resources": [ + "community-offline.zip", + "devfile.yaml" + ], + "starterProjects": [ + "community-offline", + "community", + "redhat-product" + ] + } + ] + } +] +---- + +== Gets registry v2 index of sample devfile type +Gets the registry v2 index file content of sample devfile type, which contains versions information, from HTTP response === HTTP request .... @@ -1254,11 +1863,17 @@ curl http://devfile-registry.192.168.1.1.nip.io/v2index/sample ] ---- -=== Query parameters +=== Query (range) parameters [cols="1,1"] |=== |Parameter|Description +|MaxVersion +|The maximum sample version + +|MinVersion +|The minimum sample version + |MaxSchemaVersion |The maximum devfile schema version @@ -1303,6 +1918,125 @@ curl http://devfile-registry.192.168.1.1.nip.io/v2index/sample?maxSchemaVersion= ] ---- +=== Query (field) parameters +[cols="1,1"] +|=== +|Parameter|Description + +|Name +|Search string to filter samples by their name + +|DisplayName +|Search string to filter samples by their display names + +|Description +|Search string to filter samples by the description text + +|AttributeNames +|Collection of search strings to filter samples by the names of defined free-form attributes + +|Arch +|Collection of search strings to filter samples by their architectures + +|Tags +|Collection of search strings to filter samples by their tags + +|Icon +|Toggle on encoding content passed + +|IconUri +|Search string to filter samples by their icon uri + +|ProjectType +|Search string to filter samples by their project type + +|Language +|Search string to filter samples by their programming language + +|Default +|Boolean to filter samples if they are default or not + +|Resources +|Collection of search strings to filter samples by their resource files + +|StarterProjects +|Collection of search strings to filter samples by the names of the starter projects + +|LinkNames +|Collection of search strings to filter samples by the names of the link sources + +|Links +|Collection of search strings to filter samples by their link sources + +|CommandGroups +|Collection of search strings to filter samples by their present command groups + +|GitRemoteNames +|Collection of search strings to filter samples by the names of the git remotes + +|GitRemotes +|Collection of search strings to filter samples by the URIs of the git remotes + +|GitUrl +|Search string to filter samples by their git urls + +|GitRemoteName +|Search string to filter samples by their git remote name + +|GitSubDir +|Search string to filter samples by their target subdirectory of the git repository + +|GitRevision +|Search string to filter samples by their git revision + +|Provider +|Search string to filter samples by the stack provider + +|SupportUrl +|Search string to filter samples by their given support url + +|=== + +=== Request example +.... +curl 'http://devfile-registry.192.168.1.1.nip.io/v2index/sample?description=java&default=true' +.... + +*Note:* Field filter parameters accept fuzzy search strings, meaning if `java` is passed into `description` parameter, the results will be any sample with resource entries which contain `java` as partial matches. + +=== Response example +[source,json] +---- +[ + { + "name": "code-with-quarkus", + "displayName": "Basic Quarkus", + "description": "A simple Hello World Java application using Quarkus", + "type": "sample", + "tags": [ + "Java", + "Quarkus" + ], + "icon": "https://design.jboss.org/quarkus/logo/final/SVG/quarkus_icon_rgb_default.svg", + "projectType": "quarkus", + "language": "java", + "versions": [ + { + "version": "1.1.0", + "schemaVersion": "2.2.0", + "default": true, + "git": { + "remotes": { + "origin": "https://github.com/devfile-samples/devfile-sample-code-with-quarkus.git" + } + }, + "description": "java quarkus with devfile v2.2.0" + } + ] + } +] +---- + == Gets registry v2 index of all devfile types Gets the registry v2 index file content of all devfile types, which contains versions information, from HTTP response @@ -1656,11 +2390,17 @@ curl http://devfile-registry.192.168.1.1.nip.io/v2index/all ] ---- -=== Query parameters +=== Query (range) parameters [cols="1,1"] |=== |Parameter|Description +|MaxVersion +|The maximum stack/sample version + +|MinVersion +|The minimum stack/sample version + |MaxSchemaVersion |The maximum devfile schema version @@ -1822,6 +2562,176 @@ curl http://devfile-registry.192.168.1.1.nip.io/v2index/sample?minSchemaVersion= ] ---- +=== Query (field) parameters +[cols="1,1"] +|=== +|Parameter|Description + +|Name +|Search string to filter stacks/samples by their name + +|DisplayName +|Search string to filter stacks/samples by their display names + +|Description +|Search string to filter stacks/samples by the description text + +|AttributeNames +|Collection of search strings to filter stacks/samples by the names of defined free-form attributes + +|Arch +|Collection of search strings to filter stacks/samples by their architectures + +|Tags +|Collection of search strings to filter stacks/samples by their tags + +|Icon +|Toggle on encoding content passed + +|IconUri +|Search string to filter stacks/samples by their icon uri + +|ProjectType +|Search string to filter stacks/samples by their project type + +|Language +|Search string to filter stacks/samples by their programming language + +|Default +|Boolean to filter stacks/samples if they are default or not + +|Resources +|Collection of search strings to filter stacks/samples by their resource files + +|StarterProjects +|Collection of search strings to filter stacks/samples by the names of the starter projects + +|LinkNames +|Collection of search strings to filter stacks/samples by the names of the link sources + +|Links +|Collection of search strings to filter stacks/samples by their link sources + +|CommandGroups +|Collection of search strings to filter stacks/samples by their present command groups + +|GitRemoteNames +|Collection of search strings to filter stacks/samples by the names of the git remotes + +|GitRemotes +|Collection of search strings to filter stacks/samples by the URIs of the git remotes + +|GitUrl +|Search string to filter stacks/samples by their git urls + +|GitRemoteName +|Search string to filter stacks/samples by their git remote name + +|GitSubDir +|Search string to filter stacks/samples by their target subdirectory of the git repository + +|GitRevision +|Search string to filter stacks/samples by their git revision + +|Provider +|Search string to filter stacks/samples by the stack provider + +|SupportUrl +|Search string to filter stacks/samples by their given support url + +|=== + +=== Request example +.... +curl 'http://devfile-registry.192.168.1.1.nip.io/v2index/all?description=java&default=true' +.... + +*Note:* Field filter parameters accept fuzzy search strings, meaning if `java` is passed into `description` parameter, the results will be any stack or sample with resource entries which contain `java` as partial matches. + +=== Response example +[source,json] +---- +[ + { + "name": "java-quarkus", + "displayName": "Quarkus Java", + "description": "Quarkus with Java", + "type": "stack", + "tags": [ + "Java", + "Quarkus" + ], + "architectures": [ + "amd64" + ], + "icon": "https://design.jboss.org/quarkus/logo/final/SVG/quarkus_icon_rgb_default.svg", + "projectType": "quarkus", + "language": "java", + "versions": [ + { + "version": "1.1.0", + "schemaVersion": "2.0.0", + "default": true, + "description": "Quarkus with Java", + "tags": [ + "Java", + "Quarkus" + ], + "architectures": [ + "amd64" + ], + "icon": "https://design.jboss.org/quarkus/logo/final/SVG/quarkus_icon_rgb_default.svg", + "links": { + "self": "devfile-catalog/java-quarkus:1.1.0" + }, + "commandGroups": { + "build": false, + "debug": true, + "deploy": false, + "run": true, + "test": false + }, + "resources": [ + "community-offline.zip", + "devfile.yaml" + ], + "starterProjects": [ + "community-offline", + "community", + "redhat-product" + ] + } + ] + }, + { + "name": "code-with-quarkus", + "displayName": "Basic Quarkus", + "description": "A simple Hello World Java application using Quarkus", + "type": "sample", + "tags": [ + "Java", + "Quarkus" + ], + "icon": "https://design.jboss.org/quarkus/logo/final/SVG/quarkus_icon_rgb_default.svg", + "projectType": "quarkus", + "language": "java", + "versions": [ + { + "version": "1.1.0", + "schemaVersion": "2.2.0", + "default": true, + "git": { + "remotes": { + "origin": "https://github.com/devfile-samples/devfile-sample-code-with-quarkus.git" + } + }, + "description": "java quarkus with devfile v2.2.0" + } + ] + } +] +---- + == Gets registry stack devfile Gets the specific registry stack devfile content from HTTP response