-
Notifications
You must be signed in to change notification settings - Fork 74
Index server REST APIs docs #282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7775f01
docs: index server rest apis
GeekArthur 0941467
fix: placeholder syntax
GeekArthur 5e7fb60
docs: address comments
GeekArthur da8cce8
docs: add details
GeekArthur 3d149dd
docs: adjust format
GeekArthur 42d68c5
docs: address comments
GeekArthur File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,241 @@ | ||
| # Index server REST APIs | ||
| This documentation explains how to use the index server REST APIs | ||
|
|
||
| ## Gets registry index file | ||
| Gets the registry index file content from HTTP response | ||
| ### HTTP request | ||
| ``` | ||
| GET http://{registry host}/index | ||
| ``` | ||
| ### Request parameters | ||
| | Parameter | Description | | ||
| | --------- | ----------- | | ||
| | registry host | the URL/ingress that exposes registry service | | ||
| ### Request body | ||
| The request body must be empty. | ||
| ### Request example | ||
| ``` | ||
| curl http://devfile-registry.192.168.1.1.nip.io/index | ||
| ``` | ||
| ### Response example | ||
| ```json | ||
| [ | ||
| { | ||
| "name": "java-maven", | ||
| "displayName": "Maven Java", | ||
| "description": "Upstream Maven and OpenJDK 11", | ||
| "tags": [ | ||
| "Java", | ||
| "Maven" | ||
| ], | ||
| "projectType": "maven", | ||
| "language": "java", | ||
| "links": { | ||
| "self": "devfile-catalog/java-maven:latest" | ||
GeekArthur marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }, | ||
| "resources": [ | ||
| "devfile.yaml", | ||
| "archive.tar" | ||
| ] | ||
| }, | ||
| { | ||
| "name": "java-openliberty", | ||
| "displayName": "Open Liberty", | ||
| "description": "Open Liberty microservice in Java", | ||
| "projectType": "docker", | ||
| "language": "java", | ||
| "links": { | ||
| "self": "devfile-catalog/java-openliberty:latest" | ||
| }, | ||
| "resources": [ | ||
| "devfile.yaml", | ||
| "archive.tar" | ||
| ] | ||
| }, | ||
| { | ||
| "name": "java-quarkus", | ||
| "displayName": "Quarkus Java", | ||
| "description": "Upstream Quarkus with Java+GraalVM", | ||
| "tags": [ | ||
| "Java", | ||
| "Quarkus" | ||
| ], | ||
| "projectType": "quarkus", | ||
| "language": "java", | ||
| "links": { | ||
| "self": "devfile-catalog/java-quarkus:latest" | ||
| }, | ||
| "resources": [ | ||
| "devfile.yaml", | ||
| "archive.tar" | ||
| ] | ||
| }, | ||
| { | ||
| "name": "java-springboot", | ||
| "displayName": "Spring Boot®", | ||
| "description": "Spring Boot® using Java", | ||
| "tags": [ | ||
| "Java", | ||
| "Spring" | ||
| ], | ||
| "projectType": "spring", | ||
| "language": "java", | ||
| "links": { | ||
| "self": "devfile-catalog/java-springboot:latest" | ||
| }, | ||
| "resources": [ | ||
| "devfile.yaml", | ||
| "archive.tar" | ||
| ] | ||
| }, | ||
| { | ||
| "name": "java-vertx", | ||
| "displayName": "Vert.x Java", | ||
| "description": "Upstream Vert.x using Java", | ||
| "tags": [ | ||
| "Java", | ||
| "Vert.x" | ||
| ], | ||
| "projectType": "vertx", | ||
| "language": "java", | ||
| "links": { | ||
| "self": "devfile-catalog/java-vertx:latest" | ||
| }, | ||
| "resources": [ | ||
| "devfile.yaml", | ||
| "archive.tar" | ||
| ] | ||
| }, | ||
| { | ||
| "name": "nodejs", | ||
| "displayName": "NodeJS Runtime", | ||
| "description": "Stack with NodeJS 12", | ||
| "tags": [ | ||
| "NodeJS", | ||
| "Express", | ||
| "ubi8" | ||
| ], | ||
| "projectType": "nodejs", | ||
| "language": "nodejs", | ||
| "links": { | ||
| "self": "devfile-catalog/nodejs:latest" | ||
| }, | ||
| "resources": [ | ||
| "devfile.yaml", | ||
| "archive.tar" | ||
| ] | ||
| }, | ||
| { | ||
| "name": "python", | ||
| "displayName": "Python", | ||
| "description": "Python Stack with Python 3.7", | ||
| "tags": [ | ||
| "Python", | ||
| "pip" | ||
| ], | ||
| "projectType": "python", | ||
| "language": "python", | ||
| "links": { | ||
| "self": "devfile-catalog/python:latest" | ||
| }, | ||
| "resources": [ | ||
| "devfile.yaml", | ||
| "archive.tar" | ||
| ] | ||
| }, | ||
| { | ||
| "name": "python-django", | ||
| "displayName": "Django", | ||
| "description": "Python3.7 with Django", | ||
| "tags": [ | ||
| "Python", | ||
| "pip", | ||
| "Django" | ||
| ], | ||
| "projectType": "django", | ||
| "language": "python", | ||
| "links": { | ||
| "self": "devfile-catalog/python-django:latest" | ||
| }, | ||
| "resources": [ | ||
| "devfile.yaml", | ||
| "archive.tar" | ||
| ] | ||
| } | ||
| ] | ||
| ``` | ||
|
|
||
| ## Gets registry stack devfile | ||
| Gets the specific registry stack devfile content from HTTP response | ||
|
|
||
| Note: this REST API only returns the content of `devfile.yaml`, it won't return other resources in the stack | ||
| ### HTTP request | ||
| ``` | ||
| GET http://{registry host}/devfiles/{stack} | ||
| ``` | ||
| ### Request parameters | ||
| | Parameter | Description | | ||
| | ----------| ----------- | | ||
| | registry host | the URL/ingress that exposes registry service | | ||
| | stack | registry stack name | | ||
| ### Request body | ||
| The request body must be empty. | ||
| ### Request example | ||
| ``` | ||
| curl http://devfile-registry.192.168.1.1.nip.io/devfiles/nodejs | ||
| ``` | ||
| ### Response example | ||
GeekArthur marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ```yaml | ||
| schemaVersion: 2.0.0 | ||
| metadata: | ||
| name: nodejs | ||
| version: 1.0.0 | ||
| starterProjects: | ||
| - name: nodejs-starter | ||
| git: | ||
| remotes: | ||
| origin: "https://github.com/odo-devfiles/nodejs-ex.git" | ||
| components: | ||
| - name: runtime | ||
| container: | ||
| image: registry.access.redhat.com/ubi8/nodejs-12:1-45 | ||
| memoryLimit: 1024Mi | ||
| mountSources: true | ||
| sourceMapping: /project | ||
| endpoints: | ||
| - name: http-3000 | ||
| targetPort: 3000 | ||
| commands: | ||
| - id: install | ||
| exec: | ||
| component: runtime | ||
| commandLine: npm install | ||
| workingDir: /project | ||
| group: | ||
| kind: build | ||
| isDefault: true | ||
| - id: run | ||
| exec: | ||
| component: runtime | ||
| commandLine: npm start | ||
| workingDir: /project | ||
| group: | ||
| kind: run | ||
| isDefault: true | ||
| - id: debug | ||
| exec: | ||
| component: runtime | ||
| commandLine: npm run debug | ||
| workingDir: /project | ||
| group: | ||
| kind: debug | ||
| isDefault: true | ||
| - id: test | ||
| exec: | ||
| component: runtime | ||
| commandLine: npm test | ||
| workingDir: /project | ||
| group: | ||
| kind: test | ||
| isDefault: true | ||
| ``` | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.