Skip to content
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

chore(jans-config-api): document ADS projects management endpoint #3263

Closed
jgomer2001 opened this issue Dec 8, 2022 · 1 comment
Closed
Assignees
Labels
comp-jans-config-api Component affected by issue or PR kind-dependencies Pull requests that update a dependency file

Comments

@jgomer2001
Copy link
Contributor

Recently I added the endpoints related to ADS projects, see #3094

These lack the swagger stuff, please add them

Soon I'll be posting here details about how these endpoints are used

@mo-auto mo-auto added comp-jans-config-api Component affected by issue or PR kind-dependencies Pull requests that update a dependency file labels Dec 8, 2022
@jgomer2001
Copy link
Contributor Author

jgomer2001 commented Dec 8, 2022

All URLs are relative to /jans-config-api/api/v1

Endpoint -> /ads-deployment/list
Purpose Retrieve a list of deployments in the server. This is not a search, just a paged listing
Method GET
Query params start and count helps paginating results. start is 0-index based. Both params optional
Output Existing deployments (regardless they are thoroughly processed or still being deployed). They are listed and sorted by deployment date
Sample output {"start":...,"totalEntriesCount":...,"entriesCount":...,"entries":[ ... ]}
Status 200 (OK)
Endpoint -> /ads-deployment
Purpose Retrieve details of a single deployment by name
Method GET
Query params name - mandatory
Sample output The structure of a deployment is explained below
Status 200 (deployment task is finished), 204 (task still in course), 404 (project unknown), 400 (a param is missing)
Deployment structure Notes Example
dn Distinguished name jansId=123,ou=deployments,ou=agama,o=jans
id Identifier of deployment (generated automatically) 115276
createdAt Datetime (in UTC) of the instant the deployment task was created (POSTed) 2022-12-07T21:47:42
taskActive Boolean value indicating if the deployment task is being currently processed, ie. the .agama file is being scanned, flows analysed, etc. false
finishedAt Datetime (in UTC) representing the instant when the deployment task was finished, or null if it hasn't ended 2022-12-07T21:48:42
details Extra details, see below
Deployment details structure Notes Example
projectMetadata Includes author, type, description, and project's name - as supplied when the deployment task was created Ref bean here
error A general description of the error (if presented) when processing the task, otherwise null Archive missing web and/or code subdirectories
flowsError A mapping of the errors obtained per flow found in the archive. The keys correspond to qualified names. A null value indicates the flow was successfully added { "co.acme.example": "Syntax error on line 4", "io.jans.test": null }
Endpoint -> /ads-deployment
Purpose Add or replace an ADS project to the server
Method POST
Query params name (the project's name) - mandatory
Body The binary contents of a .gama file. See example below. Ensure to use header Content-Type: application/zip
Output Textual explanation, e.g. A deployment task for project XXX has been queued. Use the GET endpoint to poll status
Status 202 (the task was created and scheduled for deployment), 409 (there is a task already for this project and it hasn't finished yet), 400 (a param is missing)
Endpoint -> /ads-deployment
Purpose Undeploy an ADS project from the server. Entails removing flows and assets initally supplied
Method DELETE
Query params name (the project's name) - mandatory
Status 204 (scheduled for removal), 409 (the project is being deployed currently), 404 (unknown project), 400 (a param is missing)

extracted .gama file example:

Screenshot from 2022-12-08 14-22-01

Oauth2 scopes:

  • GET: https://jans.io/oauth/config/agama.readonly
  • Others: https://jans.io/oauth/config/agama.write

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-jans-config-api Component affected by issue or PR kind-dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

3 participants