Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Latest commit

 

History

History
572 lines (380 loc) · 17.7 KB

AuthAPI.md

File metadata and controls

572 lines (380 loc) · 17.7 KB

AuthAPI

All URIs are relative to https://elements.local

Method HTTP request Description
checkAuthTicket POST /api/2/auth/ticket/check
createAuthTicket POST /api/2/auth/ticket
deleteAccessToken DELETE /api/2/auth/access-tokens/{id}
generatePassword POST /api/2/auth/generate-password
getAccessToken GET /api/2/auth/access-tokens/{id}
getAllAccessTokens GET /api/2/auth/access-tokens
login POST /api/2/auth/login
logout POST /api/2/auth/logout
resetPassword POST /api/2/auth/reset-password
sendAccessTokenEmailNotification POST /api/2/auth/access-tokens/{id}/email
startImpersonation POST /api/2/auth/impersonation
stopImpersonation POST /api/2/auth/impersonation/stop

checkAuthTicket

    open class func checkAuthTicket( ticket: Ticket) -> Promise<ElementsUserDetail>

Required permissions * <class 'rest_framework.permissions.AllowAny'>

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK

let ticket = Ticket(ticket: "ticket_example") // Ticket | 

AuthAPI.checkAuthTicket(ticket: ticket).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
ticket Ticket

Return type

ElementsUserDetail

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

createAuthTicket

    open class func createAuthTicket() -> Promise<Ticket>

Required permissions * Authenticated user

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK


AuthAPI.createAuthTicket().then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

This endpoint does not need any parameter.

Return type

Ticket

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteAccessToken

    open class func deleteAccessToken( id: Int) -> Promise<Void>

Required permissions * Authenticated user

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK

let id = 987 // Int | A unique integer value identifying this one time access token.

AuthAPI.deleteAccessToken(id: id).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
id Int A unique integer value identifying this one time access token.

Return type

Void (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

generatePassword

    open class func generatePassword() -> Promise<GeneratePasswordEndpointResponse>

Required permissions * Authenticated user

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK


AuthAPI.generatePassword().then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

This endpoint does not need any parameter.

Return type

GeneratePasswordEndpointResponse

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getAccessToken

    open class func getAccessToken( id: Int) -> Promise<OneTimeAccessToken>

Required permissions * Authenticated user

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK

let id = 987 // Int | A unique integer value identifying this one time access token.

AuthAPI.getAccessToken(id: id).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
id Int A unique integer value identifying this one time access token.

Return type

OneTimeAccessToken

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getAllAccessTokens

    open class func getAllAccessTokens( sharedBundles: String? = nil,  sharedDirectories: String? = nil,  sharedBundlesAsset: String? = nil,  user: String? = nil,  createdBy: String? = nil,  ordering: String? = nil,  limit: Int? = nil,  offset: Int? = nil) -> Promise<[OneTimeAccessToken]>

Required permissions * Authenticated user

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK

let sharedBundles = "sharedBundles_example" // String | Filter the returned list by `shared_bundles`. (optional)
let sharedDirectories = "sharedDirectories_example" // String | Filter the returned list by `shared_directories`. (optional)
let sharedBundlesAsset = "sharedBundlesAsset_example" // String | Filter the returned list by `shared_bundles__asset`. (optional)
let user = "user_example" // String | Filter the returned list by `user`. (optional)
let createdBy = "createdBy_example" // String | Filter the returned list by `created_by`. (optional)
let ordering = "ordering_example" // String | Which field to use when ordering the results. (optional)
let limit = 987 // Int | Number of results to return per page. (optional)
let offset = 987 // Int | The initial index from which to return the results. (optional)

AuthAPI.getAllAccessTokens(sharedBundles: sharedBundles, sharedDirectories: sharedDirectories, sharedBundlesAsset: sharedBundlesAsset, user: user, createdBy: createdBy, ordering: ordering, limit: limit, offset: offset).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
sharedBundles String Filter the returned list by `shared_bundles`. [optional]
sharedDirectories String Filter the returned list by `shared_directories`. [optional]
sharedBundlesAsset String Filter the returned list by `shared_bundles__asset`. [optional]
user String Filter the returned list by `user`. [optional]
createdBy String Filter the returned list by `created_by`. [optional]
ordering String Which field to use when ordering the results. [optional]
limit Int Number of results to return per page. [optional]
offset Int The initial index from which to return the results. [optional]

Return type

[OneTimeAccessToken]

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

login

    open class func login( authLoginEndpointRequest: AuthLoginEndpointRequest) -> Promise<AuthLoginEndpointResponse>

Required permissions * <class 'rest_framework.permissions.AllowAny'>

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK

let authLoginEndpointRequest = AuthLoginEndpointRequest(username: "username_example", password: "password_example", otp: "otp_example", newPassword: "newPassword_example") // AuthLoginEndpointRequest | 

AuthAPI.login(authLoginEndpointRequest: authLoginEndpointRequest).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
authLoginEndpointRequest AuthLoginEndpointRequest

Return type

AuthLoginEndpointResponse

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

logout

    open class func logout() -> Promise<Void>

Required permissions * <class 'rest_framework.permissions.AllowAny'>

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK


AuthAPI.logout().then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

This endpoint does not need any parameter.

Return type

Void (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

resetPassword

    open class func resetPassword( passwordResetEndpointRequest: PasswordResetEndpointRequest) -> Promise<Void>

Required permissions * <class 'rest_framework.permissions.AllowAny'>

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK

let passwordResetEndpointRequest = PasswordResetEndpointRequest(token: "token_example", password: "password_example") // PasswordResetEndpointRequest | 

AuthAPI.resetPassword(passwordResetEndpointRequest: passwordResetEndpointRequest).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
passwordResetEndpointRequest PasswordResetEndpointRequest

Return type

Void (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

sendAccessTokenEmailNotification

    open class func sendAccessTokenEmailNotification( id: Int,  sendLinkEmailRequest: SendLinkEmailRequest) -> Promise<Void>

Required permissions * Authenticated user

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK

let id = 987 // Int | A unique integer value identifying this one time access token.
let sendLinkEmailRequest = SendLinkEmailRequest(email: "email_example", subject: "subject_example", text: "text_example") // SendLinkEmailRequest | 

AuthAPI.sendAccessTokenEmailNotification(id: id, sendLinkEmailRequest: sendLinkEmailRequest).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
id Int A unique integer value identifying this one time access token.
sendLinkEmailRequest SendLinkEmailRequest

Return type

Void (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

startImpersonation

    open class func startImpersonation( impersonationEndpointRequest: ImpersonationEndpointRequest) -> Promise<Void>

Required permissions * User account permission: system:admin-access

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK

let impersonationEndpointRequest = ImpersonationEndpointRequest(user: 123) // ImpersonationEndpointRequest | 

AuthAPI.startImpersonation(impersonationEndpointRequest: impersonationEndpointRequest).then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

Name Type Description Notes
impersonationEndpointRequest ImpersonationEndpointRequest

Return type

Void (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

stopImpersonation

    open class func stopImpersonation() -> Promise<Void>

Required permissions * Authenticated user

Example

// The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new
import ElementsSDK


AuthAPI.stopImpersonation().then {
         // when the promise is fulfilled
     }.always {
         // regardless of whether the promise is fulfilled, or rejected
     }.catch { errorType in
         // when the promise is rejected
}

Parameters

This endpoint does not need any parameter.

Return type

Void (empty response body)

Authorization

Bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]