GET rbac/access requests/:access request id/comments
From Social ID Developers
Revision as of 23:42, 10 August 2023 by Gabriel.prado (Talk | contribs)
Contents |
Description
Searches for Comments in an Access Request.
Resource URL
GET https://api.socialidnow.com/v1/rbac/access_requests/:access_request_id/comments
Parameters
URL Parameters
access_request_id | required | access request identifier. |
---|---|---|
actor_type | optional | actor type. Possible values: "login_user" or "custom". |
actor_id | optional | actor identifier. |
ids | optional | comma separated list of comment ids. Example: ids=1,2,3. |
page | optional | page number (each page contains page_size results). Default: 1. |
page_size | optional | maximum amount of results to be returned. Default: 8. |
Authentication
This API requires Account authentication. See Authentication.
Response
Response Status
ok (200) | The request was successful. |
---|---|
unauthorized (401) | The authentication is wrong. See Authentication. |
forbidden (403) | The account does not have access to this access request. |
internal_server_error (500) | An unknown error happened. |
Response Body
A successful search returns the following fields:
total | total amount of access request comments found. |
---|---|
offset | amount of discarded access request comments (page start). |
count | amount of access request comments returned in this page. |
results | array with access request comments details: |
id | access request comment identifier. |
access_request_id | access request identifier. |
actor_type | type of the actor performing the comment. Possible values: "login_user" or "custom". |
actor_id | actor identifier. |
comment | comment. |
created_at | date of access request comment creation. |
updated_at | date of access request comment latest update. |
Examples
Without search parameters
Request
curl -iX GET 'https://api.socialidnow.com/v1/rbac/access_requests/10/comments' \ --user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf
Response
Response Headers
HTTP/1.1 200 Ok Status: 200
Response Body
{ "total": 3, "offset": 0, "count": 3, "results": [ { "id": 1, "access_request_id": 10, "actor_type": "login_user", "actor_id": "100", "comment": "First Access Request Comment", "created_at": "2023-08-10T20:36:00Z", "updated_at": "2023-08-10T20:36:00Z" }, { "id": 2, "access_request_id": 10, "actor_type": "login_user", "actor_id": "200", "comment": "Second Access Request Comment", "created_at": "2023-08-10T20:37:00Z", "updated_at": "2023-08-10T20:37:00Z" }, { "id": 3, "access_request_id": 10, "actor_type": "custom", "actor_id": "admin", "comment": "First Access Request Comment", "created_at": "2023-08-10T20:38:00Z", "updated_at": "2023-08-10T20:38:00Z" } ] }
With search parameters
Request
curl -iX GET 'https://api.socialidnow.com/v1/rbac/access_requests/10/comments?page_size=1&page=2' \ --user 138:e8b9ca24f1b590af67e6271297d6e1f7226625d61c5b5daa1b2f215464e292cf
Response
Response Headers
HTTP/1.1 200 Ok Status: 200
Response Body
{ "total": 3, "offset": 1, "count": 1, "results": [ { "id": 2, "access_request_id": 10, "actor_type": "login_user", "actor_id": "200", "comment": "Second Access Request Comment", "created_at": "2023-08-10T20:37:00Z", "updated_at": "2023-08-10T20:37:00Z" } ] }