request
Get all requests
Changed onReturns all requests if the user has the ADMIN or MANAGE_REQUESTS permissions. Otherwise, only the logged-in user's requests are returned.
If the requestedBy parameter is specified, only requests from that particular user ID will be returned.
get/request
Request
- Base URL: http://localhost:5055/api/v1
- URL: http://localhost:5055/api/v1/request
- Auth: one of:
- API key in cookie connect.sid
- API key in header X-Api-Key
Query parameters
takenumber nullable
Example:20
skipnumber nullable
filter'all' | 'approved' | 'available' | 'pending' | 'processing' | 'unavailable' | 'failed' | 'deleted' | 'completed' nullable
sort'added' | 'modified'
sortDirection'asc' | 'desc' nullable
requestedBynumber nullable
Example:1
mediaType'movie' | 'tv' | 'all' nullable
Response
Requests returned
Example response
{
"pageInfo": {
"page": 1,
"pages": 10,
"results": 100
},
"results": [
{
"id": 123,
"media": {
"createdAt": "2020-09-12T10:00:27.000Z",
"updatedAt": "2020-09-12T10:00:27.000Z"
},
"createdAt": "2020-09-12T10:00:27.000Z",
"updatedAt": "2020-09-12T10:00:27.000Z",
"requestedBy": {
"id": 1,
"email": "hey@itsme.com",
"userType": 1,
"createdAt": "2020-09-02T05:02:23.000Z",
"updatedAt": "2020-09-02T05:02:23.000Z",
"requestCount": 5
},
"modifiedBy": {
"id": 1,
"email": "hey@itsme.com",
"userType": 1,
"createdAt": "2020-09-02T05:02:23.000Z",
"updatedAt": "2020-09-02T05:02:23.000Z",
"requestCount": 5
}
}
]
}Changes
- info
added the optional property
//to the response with the status
- info