You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
Get a v2 job information.
We have two v2 api for Get job: GET /api/v2/user/:userName/jobs/:jobName and GET /api/v2/jobs/:username~jobname,
The response was different.
Referenced by webportal: \src\rest-server\src\routes\authn.js
GET /api/v1/authn/oidc/logout
Return html code.
Referenced by webportal: \src\rest-server\src\routes\authn.js
GET/POST /api/v1/authn/oidc/return
Return html code.
API Documents:
b. Azure AD - OIDC mode
I. Login - get AuthCode
HTTP GET the redirect URL of Azure AD for authentication:
http://restserver/api/v1/authn/oidc/login
II. Login - get token with AuthCode
HTTP POST the token from AAD (AccessToken, IDToken, RefreshToken) to get OpenPAI's access token. Web-browser will call this API automatically after the step I.
HTTP://restserver/api/v1/authn/oidc/return
III. Logout
HTTP GET the redirect URL of Azure AD to sign out the authentication:
http://restserver/api/v1/authn/oidc/login
POST /api/v1/authn/basic/login
Post body:
{"username": "<username>","password": "<password>","expiration": "<expiration time in seconds>"}
It's said update job in the code.
Should use a new :jobName to avoid conflict, but the job name in job config don't have to change, looks like a different way to submit job without edit job config.
Status: 201{"message": "Update user extension data successfully."}
Same with document.
DELETE /api/v2/user/:username
Response:
Status: 200{"message": "user is removed successfully"}
Same with document.
PUT /api/v2/user/:username/virtualcluster
Response:
Status: 201{"message": "Update user virtualCluster data successfully."}
Same with document.
PUT /api/v2/user/:username/password
Response:
Status: 201{"message": "update user password successfully."}
Same with document.
POST /api/v2/user
Response:
Status: 201{"message": "User is created successfully"}
Same with document.
PUT /api/v2/user/:username/email
Request:
{"email": "<new email>"}
Response:
Status: 201{"message": "Update user email data successfully."}
The document in API.md:
Parameters
{
"email": "Update user email data successfully."
}
Response if succeeded
Status: 201
{
"message": "Update user virtualCluster data successfully."
}
Some mistake in the document.
PUT /api/v2/user/:username/admin
Response:
Status: 201{"message": "Update user admin permission successfully."}
Same with document.
PUT /api/v2/user/:username/grouplist
Response:
Status: 201{"message": "update user grouplist successfully."}
Same with document.
PUT /api/v2/user/:username/group
Response:
Status: 201{"message": "User <user name> is added into group <group name>"}
Same with document.
DELETE /api/v2/user/:username/group
Response:
Status: 201{"message": "User core11 is removed from group newGroup1"}
Compare Rest-server APIs with Docs
Go through all rest-server APIs and the document in
API.md
, found some problems in the document.Problems
No document APIs
Different with document
GET /api/v1/authn/oidc/login
Got html code instead of the redirect uri.
GET /api/v1/authn/oidc/logout
Got html code instead of the redirect uri.
POST /api/v1/token
Response contains item
"hasGitHubPAT": true | false
, don't have document.PUT /api/v2/group/:groupname/extension
The
message
of succeeded inAPI.md
was wrong.DELETE /api/v2/group/:groupname
The
Parameters
inAPI.md
wasn't needed.POST /api/v1/user/:userName/jobs
The
Response
was different.PUT /api/v1/user/:userName/jobs/:jobName/executionType
The
Status
inResponse if succeeded
was different.POST /api/v2/jobs
The
message
inResponse if succeeded
was different.PUT /api/v2/user/:username/email
The
Parameters
andResponse if succeeded
was wrong.PUT /api/v1/virtual-clusters/:vcName/status
The
message
inResponse if succeeded
was different.Doesn't work APIs
Confusion
We have two v2 api for
Get job
:GET /api/v2/user/:userName/jobs/:jobName
andGET /api/v2/jobs/:username~jobname
,The response was different.
Authn
GET /api/v1/authn/info
No document in
API.md
GET /api/v1/authn/oidc/login
Return html code.
Referenced by
webportal
:\src\rest-server\src\routes\authn.js
GET /api/v1/authn/oidc/logout
Return html code.
Referenced by
webportal
:\src\rest-server\src\routes\authn.js
GET/POST /api/v1/authn/oidc/return
Return html code.
API Documents:
POST /api/v1/authn/basic/login
Post body:
Response:
Same response with
/api/v1/token
Referenced by
webportal
:\src\webportal\src\app\home\index\conn.js
No document in
API.md
Group
GET /api/v2/group/:groupname
Get the group:
No document in
API.md
GET /api/v2/group
Get the group list:
No document in
API.md
PUT /api/v2/group/:groupname/extension
Response:
The
message
is different inAPI.md
.PUT /api/v2/group/:groupname/extension/:attribute
Response:
Same with the document.
PUT /api/v2/group/:groupname/description
Response:
Same with the document.
DELETE /api/v2/group/:groupname
Response:
The document in
API.md
:We don't need the parameters when call the delete group API.
POST /api/v2/group
Response:
Same with the document.
PUT /api/v2/group/:groupname/externalname
Response:
Same with the document.
GET /api/v2/group/:groupname/userlist
Response:
No document in
API.md
Jobs v1
GET /api/v1 (/user/:userName) /jobs
Response:
Same with the document.
POST /api/v1/user/:userName/jobs
Response:
The response in
API.md
:Different with document in
API.md
.GET /api/v1/user/:userName/jobs/:jobName
Response:
Same with the document.
PUT /api/v1/user/:userName/jobs/:jobName
Response:
It's said update job in the code.
Should use a new
:jobName
to avoid conflict, but the job name in job config don't have to change, looks like a different way to submit job without edit job config.No document in
API.md
DELETE /api/v1/user/:userName/jobs/:jobName
Response:
No document in
API.md
PUT /api/v1/user/:userName/jobs/:jobName/executionType
Response:
The status in
API.md
is 200, not 202.GET /api/v1/user/:userName/jobs/:jobName/config
Response:
Same with the document.
GET /api/v1/user/:userName/jobs/:jobName/ssh
Response:
Same with the document.
Jobs v2
GET /api/v2/jobs
Response
No document in
API.md
POST /api/v2/jobs
Response
Document in
API.md
:The
message
has a little different.GET /api/v2/jobs/:frameworkName
Response:
It's said
Get job
in the code.No document in
API.md
PUT /api/v2/jobs/:frameworkName/executionType
Response:
No document in
API.md
GET /api/v2/jobs/:frameworkName/config
Response:
Same with the document.
GET /api/v2/jobs/:frameworkName/ssh
Response:
No document in
API.md
Redirect /api/v2/user/:username/jobs => /api/v1/user/:username/jobs
The request for
/api/v2/user/:username/jobs
will be redirect to/api/v1/user/:username/jobs
.No document in
API.md
Token
POST /api/v1/token
Response:
No document for
hasGitHubPAT
from the response.User v1
GET /api/v1/user/:username
Response:
Get user info.
No document in
API.md
User v2
GET /api/v2/user/:username
Response:
Get user info.
No document in
API.md
GET /api/v2/user
Response:
List all users.
No document in
API.md
PUT /api/v2/user/:username/extension
Response:
Same with document.
DELETE /api/v2/user/:username
Response:
Same with document.
PUT /api/v2/user/:username/virtualcluster
Response:
Same with document.
PUT /api/v2/user/:username/password
Response:
Same with document.
POST /api/v2/user
Response:
Same with document.
PUT /api/v2/user/:username/email
Request:
Response:
The document in
API.md
:Some mistake in the document.
PUT /api/v2/user/:username/admin
Response:
Same with document.
PUT /api/v2/user/:username/grouplist
Response:
Same with document.
PUT /api/v2/user/:username/group
Response:
Same with document.
DELETE /api/v2/user/:username/group
Response:
Same with document.
Virtual-Cluster v1
GET /api/v1/virtual-clusters
Response:
Same with document.
GET /api/v1/virtual-clusters/:vcName
Response:
Same with document.
PUT /api/v1/virtual-clusters/:vcName
Response:
Same with document.
DELETE /api/v1/virtual-clusters/:vcName
Response:
Same with document.
PUT /api/v1/virtual-clusters/:vcName/status
Response:
Document in
API.md
:The response
message
is different.Virtual-Cluster v2
GET /api/v2/virtual-clusters
Response:
No document in
API.md
GET /api/v2/virtual-clusters/nodeResource
Response:
No document in
API.md
GET /api/v2/virtual-clusters/:virtualClusterName
Response:
No document in
API.md
PUT /api/v2/virtual-clusters/:virtualClusterName
Response:
A little different from v1.
No document in
API.md
DELETE /api/v2/virtual-clusters/:virtualClusterName
Response:
No document in
API.md
PUT /api/v2/virtual-clusters/:virtualClusterName/status
Response:
No document in
API.md
GET /api/v2/virtual-clusters/:virtualClusterName/resourceUnits
Response:
No document in
API.md
Info
GET /api/v1
Response:
Same with document.
The text was updated successfully, but these errors were encountered: