mirror of
https://github.com/sasjs/server.git
synced 2025-12-10 11:24:35 +00:00
92 lines
2.9 KiB
ReStructuredText
92 lines
2.9 KiB
ReStructuredText
###
|
|
POST http://localhost:5000/SASjsApi/drive/deploy
|
|
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRfaWQiOiJjbGllbnRJRDEiLCJ1c2VybmFtZSI6InVzZXJuYW1lMSIsImlzYWRtaW4iOmZhbHNlLCJpc2FjdGl2ZSI6dHJ1ZSwiaWF0IjoxNjM1ODA0MDc2LCJleHAiOjE2MzU4OTA0NzZ9.Cx1F54ILgAUtnkit0Wg1K1YVO2RdNjOnTKdPhUtDm5I
|
|
|
|
###
|
|
POST http://localhost:5000/SASjsApi/user
|
|
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRfaWQiOiJjbGllbnRJRDEiLCJ1c2VybmFtZSI6InNlY3JldHVzZXIiLCJpc2FkbWluIjp0cnVlLCJpc2FjdGl2ZSI6dHJ1ZSwiaWF0IjoxNjM1ODAzOTc3LCJleHAiOjE2MzU4OTAzNzd9.f-FLgLwryKvB5XrihdzaGZajO3d5E5OHEEuJI_03GRI
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"displayname": "User 2",
|
|
"username": "username2",
|
|
"password": "some password"
|
|
}
|
|
|
|
###
|
|
POST http://localhost:5000/SASjsApi/client
|
|
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRfaWQiOiJjbGllbnRJRDEiLCJ1c2VybmFtZSI6InNlY3JldHVzZXIiLCJpc2FkbWluIjp0cnVlLCJpc2FjdGl2ZSI6dHJ1ZSwiaWF0IjoxNjM1ODAzOTc3LCJleHAiOjE2MzU4OTAzNzd9.f-FLgLwryKvB5XrihdzaGZajO3d5E5OHEEuJI_03GRI
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"client_id": "newClientID",
|
|
"client_secret": "newClientSecret"
|
|
}
|
|
###
|
|
POST http://localhost:5000/SASjsApi/auth/authorize
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"username": "secretuser",
|
|
"password": "secretpassword",
|
|
"client_id": "clientID1"
|
|
}
|
|
|
|
###
|
|
POST http://localhost:5000/SASjsApi/auth/token
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"client_id": "clientID1",
|
|
"client_secret": "clientID1secret",
|
|
"code": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRfaWQiOiJjbGllbnRJRDEiLCJ1c2VybmFtZSI6InVzZXJuYW1lMSIsImlzYWRtaW4iOmZhbHNlLCJpc2FjdGl2ZSI6dHJ1ZSwiaWF0IjoxNjM1ODA0MDYxLCJleHAiOjE2MzU4MDQwOTF9.jV7DpBWG7XAGODs22zAW_kWOqVLZvOxmmYJGpSNQ-KM"
|
|
}
|
|
|
|
###
|
|
DELETE http://localhost:5000/SASjsApi/auth/logout
|
|
|
|
###
|
|
GET http://localhost:5000/SASjsApi/session
|
|
|
|
|
|
### multipart upload to sas server file
|
|
POST http://localhost:5000/SASjsApi/drive/file
|
|
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
|
|
|
|
------WebKitFormBoundary7MA4YWxkTrZu0gW
|
|
Content-Disposition: form-data; name="filePath"
|
|
|
|
/saad/files/new.sas
|
|
------WebKitFormBoundary7MA4YWxkTrZu0gW
|
|
Content-Disposition: form-data; name="file"; filename="sample_new.sas"
|
|
Content-Type: application/octet-stream
|
|
|
|
< ./sample.sas
|
|
------WebKitFormBoundary7MA4YWxkTrZu0gW--
|
|
|
|
### multipart upload to sas server file text
|
|
POST http://localhost:5000/SASjsApi/drive/file
|
|
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
|
|
|
|
------WebKitFormBoundary7MA4YWxkTrZu0gW \n
|
|
Content-Disposition: form-data; name="filePath"
|
|
|
|
/saad/files/new2.sas
|
|
------WebKitFormBoundary7MA4YWxkTrZu0gW
|
|
Content-Disposition: form-data; name="file"; filename="sample_new.sas"
|
|
Content-Type: text/plain
|
|
|
|
SOME CONTENTS OF SAS FILE IN REQUEST
|
|
|
|
------WebKitFormBoundary7MA4YWxkTrZu0gW--
|
|
|
|
|
|
Users
|
|
"username": "username1",
|
|
"password": "some password",
|
|
|
|
"username": "username2",
|
|
"password": "some password",
|
|
Admins
|
|
"username": "secretuser",
|
|
"password": "secretpassword", |