D4Science D4Science Don't have a D4Science account? Create one Could not find what you are looking for? Contact us.

Posts Resource

REST interface for the social networking library (posts).

GET /2/posts/get-id-liked-posts

Request Parameters
name type description
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources
Content-Type header application/json
Response Codes
code condition
201 Sccessfull retrieved ids, they are reported in the 'result' field of the returned object
500 The error is reported into the 'message' field of the returned object
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /2/posts/get-id-liked-posts
Content-Type: */*
Accept: application/json
Authorization: ...

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
...
                
              

GET /2/posts/get-liked-posts

Request Parameters
name type description default constraints
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources    
Content-Type header application/json    
limit query 10 min: 0
Response Codes
code condition
200 Successfull retrieved posts, they are reported in the 'result' field of the returned object
500 The error is reported into the 'message' field of the returned object
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /2/posts/get-liked-posts
Content-Type: */*
Accept: application/json
Authorization: ...

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /2/posts/get-posts-app

Request Parameters
name type description
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources
Content-Type header application/json
Response Codes
code condition
200 Successfull created, the new post is reported in the 'result' field of the returned object
403 "There is no application profile with such token
500 The error is reported into the 'message' field of the returned object
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /2/posts/get-posts-app
Content-Type: */*
Accept: application/json
Authorization: ...

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /2/posts/get-posts-by-hashtag

Request Parameters
name type description constraints
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources  
Content-Type header application/json  
hashtag query required
Response Codes
code condition
201 Sccessfull retrieved posts, they are reported in the 'result' field of the returned object
500 The error is reported into the 'message' field of the returned object
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /2/posts/get-posts-by-hashtag
Content-Type: */*
Accept: application/json
Authorization: ...

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
...
                
              

GET /2/posts/get-posts-user

Request Parameters
name type description
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources
Content-Type header application/json
Response Codes
code condition
200 Successful retrieval of posts, reported in the 'result' field of the returned object
500 The error is reported into the 'message' field of the returned object
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /2/posts/get-posts-user
Content-Type: */*
Accept: application/json
Authorization: ...

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /2/posts/get-posts-user-quantity

Request Parameters
name type description default constraints
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources    
Content-Type header application/json    
quantity query 10 min: 0
Response Codes
code condition
200 Successful retrieval of posts, reported in the 'result' field of the returned object
500 The error is reported into the 'message' field of the returned object
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /2/posts/get-posts-user-quantity
Content-Type: */*
Accept: application/json
Authorization: ...

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /2/posts/get-posts-user-since

Request Parameters
name type description constraints
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources  
Content-Type header application/json  
time query required long, min: 0
Response Codes
code condition
200 Successful retrieval of posts, reported in the 'result' field of the returned object
500 The error is reported into the 'message' field of the returned object
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /2/posts/get-posts-user-since
Content-Type: */*
Accept: application/json
Authorization: ...

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

GET /2/posts/get-posts-vre

Request Parameters
name type description
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources
Content-Type header application/json
Response Codes
code condition
201 Sccessfull retrieved posts, they are reported in the 'result' field of the returned object
500 The error is reported into the 'message' field of the returned object
Response Body
media type data type description
application/json object (JSON)

Example

Request
GET /2/posts/get-posts-vre
Content-Type: */*
Accept: application/json
Authorization: ...

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
...
                
              

POST /2/posts/write-post-app

Request Parameters
name type description
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources
Content-Type header application/json
Request Body
media type data type
application/json PostInputBean (JSON)
Response Codes
code condition
200 Successfull created, the new post is reported in the 'result' field of the returned object
403 "There is no application profile with such token
500 The error is reported into the 'message' field of the returned object
Response Body
media type data type description
application/json object (JSON)

Example

Request
POST /2/posts/write-post-app
Content-Type: application/json
Accept: application/json
Authorization: ...

                
{
  "text" : "Dear vre members, ...",
  "preview_description" : "...",
  "preview_host" : "...",
  "preview_url" : "...",
  "image_url" : "...",
  "enable_notification" : true,
  "params" : "...",
  "previewtitle" : "..."
}
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

POST /2/posts/write-post-user

Request Parameters
name type description
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources
Content-Type header application/json
Request Body
media type data type
application/json PostInputBean (JSON)
Response Codes
code condition
201 Successfull created, the new post is reported in the 'result' field of the returned object
500 The error is reported into the 'message' field of the returned object
Response Body
media type data type description
application/json object (JSON)

Example

Request
POST /2/posts/write-post-user
Content-Type: application/json
Accept: application/json
Authorization: ...

                
{
  "text" : "Dear vre members, ...",
  "preview_description" : "...",
  "preview_host" : "...",
  "preview_url" : "...",
  "image_url" : "...",
  "enable_notification" : true,
  "params" : "...",
  "previewtitle" : "..."
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
...