| GET | /document-permission/Pending-Access-Requests |
|---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports tvpl.api.ServiceModel
Imports tvpl.data.Constant
Imports tvpl.data.Models
Namespace Global
Namespace tvpl.api.ServiceModel
Public Partial Class PagingRequest
Public Overridable Property Page As Integer
Public Overridable Property Limit As Integer
End Class
Public Partial Class PendingAccessRequests
Inherits PagingRequest
Public Overridable Property Status As Nullable(Of DocumentApprovalStatus)
End Class
Public Partial Class PendingAccessResponse
Public Sub New()
Requests = New List(Of DocumentAccessRequestView)
End Sub
Public Overridable Property Total As Integer
Public Overridable Property Code As Integer
Public Overridable Property Message As String
Public Overridable Property Requests As List(Of DocumentAccessRequestView)
End Class
End Namespace
Namespace tvpl.data.Constant
Public Enum DocumentAccessPermissions
Read
Write
GrantRead
End Enum
Public Enum DocumentApprovalStatus
Pending
Approved
Rejected
End Enum
End Namespace
Namespace tvpl.data.Models
Public Partial Class DocumentAccessRequest
Public Overridable Property Id As Integer
Public Overridable Property DocumentId As Integer
Public Overridable Property RequestedBy As Integer
Public Overridable Property RequestPermission As DocumentAccessPermissions
Public Overridable Property Status As DocumentApprovalStatus
Public Overridable Property CreatedDate As Date
Public Overridable Property ApprovedBy As Nullable(Of Integer)
Public Overridable Property ApprovedDate As Nullable(Of Date)
Public Overridable Property Note As String
Public Overridable Property Comment As String
Public Overridable Property DueDate As Nullable(Of Date)
End Class
Public Partial Class DocumentAccessRequestView
Inherits DocumentAccessRequest
Public Overridable Property ApprovedByName As String
Public Overridable Property RequestedName As String
Public Overridable Property DocumentTitle As String
End Class
End Namespace
End Namespace
VB.NET PendingAccessRequests DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /document-permission/Pending-Access-Requests HTTP/1.1 Host: etc-api.vsmlab.vn Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"total":0,"code":0,"message":"String","requests":[{"approvedByName":"String","requestedName":"String","documentTitle":"String","id":0,"documentId":0,"requestedBy":0,"requestPermission":"Read","status":"Pending","createdDate":"0001-01-01T00:00:00.0000000+07:06","approvedBy":0,"approvedDate":"0001-01-01T00:00:00.0000000+07:06","note":"String","comment":"String","dueDate":"0001-01-01T00:00:00.0000000+07:06"}]}