List a post's attachments
GET
/categories/{category}/posts/{post}/attachments
const url = 'https://feed.work.optidata.cloud/api/categories/864/posts/2289/attachments';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://feed.work.optidata.cloud/api/categories/864/posts/2289/attachments \ --header 'Authorization: Bearer <token>'The files attached to the post.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”category
required
integer
Numeric id of the community.
post
required
integer
Numeric id of the post.
Responses
Section titled “ Responses ”The attachments.
Media typeapplication/json
Array<object>
A file attached to a post.
object
id
integer
mime_type
string
size_bytes
integer
source
string
key
additional properties
any
Examples
Exampleexample
[]No authentication key was sent.
Media typeapplication/json
Authentication failures use an error key.
object
error
required
string
Examples
Exampleexample
{ "error": "JWT passport exception: Missing bearer token in request"}The caller is not allowed to perform this action.
Media typeapplication/json
object
message
required
string
Examples
Exampleexample
{ "message": "This action is unauthorized."}No matching resource, or it is not reachable through this path.
Media typeapplication/json
object
message
required
string
Examples
Exampleexample
{ "message": "No query results for model [App\\Models\\Category] 864"}The authentication key is expired or not recognised. Get a fresh one and retry.
Media typeapplication/json
Authentication failures use an error key.
object
error
required
string
Examples
Exampleexample
{ "error": "JWT passport expired: Passport expired"}