Mangrove Server API (0.1.0)

Download OpenAPI specification:Download

Submit and retrieve reviews, as well as aggregate statistics about reviews. See Mangrove Original UI for more information and Mangrove Client JS Library for a JavaScript wrapper.

Submit a new review.

Submit a new review.

path Parameters
jwt_review
required
string <jwt>
Example: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ii0tLS0tQkVHSU4gUFVCTElDIEtFWS0tLS0tTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFcDc4Zms1eUNqYmlZYXZ5UjZGQ2xxcTlBRkJUaXpBSG1ZdU9rcTR3cy9aYmdleG41SVQ2bi83NGt2YlZ0UGxNc3A5Z2luTysxMVZ4ZUorbVFJQ1pZamc9PS0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLSIsImp3ayI6IntcImNydlwiOlwiUC0yNTZcIixcImV4dFwiOnRydWUsXCJrZXlfb3BzXCI6W1widmVyaWZ5XCJdLFwia3R5XCI6XCJFQ1wiLFwieFwiOlwicDc4Zms1eUNqYmlZYXZ5UjZGQ2xxcTlBRkJUaXpBSG1ZdU9rcTR3c19aWVwiLFwieVwiOlwiNEhzWi1TRS1wXy0tSkwyMWJUNVRMS2ZZSXB6dnRkVmNYaWZwa0NBbVdJNFwifSJ9.eyJpYXQiOjE1ODA5MTAwMjIsInN1YiI6Imh0dHBzOi8vbWFuZ3JvdmUucmV2aWV3cyIsInJhdGluZyI6NzUsIm9waW5pb24iOiJHcmVhdCB3ZWJzaXRlIGZvciByZXZpZXdzLiIsIm1ldGFkYXRhIjp7Im5pY2tuYW1lIjoiam9objEyMyIsImNsaWVudF9pZCI6Imh0dHA6Ly9sb2NhbGhvc3Q6MzAwMCJ9fQ.7xQtIlHuDdCVioyztj8i3zJ8dk3oCSfKr6VCR5RtBn6sBcqvpfyvs13PlKGJoamKzx8xUgQTQJjRPv5s91-VLQ

Mangrove Review in JSON Web Token format. Please use https://example.com in subject sub field for testing.

Responses

200

Review is in the database.

400

Provided request has incorrect format.

500

Server encountered an error when processing the request.

put/submit/{jwt_review}
https://api.mangrove.reviews/submit/{jwt_review}

Request reviews matching the provided query.

Request reviews matching the provided query.

query Parameters
q
string
Example: q=restaurants in zurich

Search for reviews that have this string in sub or opinion field.

signature
string

Review with this signature value.

kid
string
Example: kid=-----BEGIN PUBLIC KEY-----MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEDo6mN4kY6YFhpvF0u3hfVWD1RnDElPweX3U3KiUAx0dVeFLPAmeKdQY3J5agY3VspnHo1p/wH9hbZ63qPbCr6g==-----END PUBLIC KEY-----

Reviews by issuer with the following PEM public key.

iat
number

Reviews issued at this UNIX time.

gt_iat
number

Reviews with UNIX timestamp greater than this.

sub
string <uri>

Reviews of the given subject URI.

rating
number [ 0 .. 100 ]

Reviews with the given rating.

opinion
string

Reviews with the given opinion.

limit
number

Maximum number of reviews that will be returned.

opinionated
boolean

Only reviews which either contain or do not contain an opinion.

issuers
boolean

Include aggregate information about review issuers.

maresi_subjects
boolean

Include aggregate information about reviews of returned reviews.

Responses

200
400

Provided request has incorrect format.

500

Server encountered an error when processing the request.

get/reviews
https://api.mangrove.reviews/reviews

Response samples

Content type
Copy
Expand all Collapse all
{
  • "issuers":
    {
    },
  • "maresi_subjects":
    {
    },
  • "reviews":
    [
    ]
}

Request review with the specified signature.

Request review with the specified signature.

path Parameters
signature
required
string
Example: PDSpnKtHioXykdBCMA15y5cLuYrRbSexscvySt_ryjppDWaW1I1AijjWercZE6K-cbS18bCwSmgIPqRIuL-cow

Signature of the review being requested.

Responses

200

Success

400

Provided request has incorrect format.

500

Server encountered an error when processing the request.

get/review/{signature}
https://api.mangrove.reviews/review/{signature}

Response samples

Content type
Copy
Expand all Collapse all
{
  • "jwt": "string",
  • "kid": "string",
  • "payload":
    {
    },
  • "signature": "string"
}

Request aggregate information about the subject.

Request aggregate information about the subject.

path Parameters
sub
required
string
Example: https://nytimes.com

Unique subject identifying URI.

Responses

200

Success

400

Provided request has incorrect format.

500

Server encountered an error when processing the request.

get/subject/{sub}
https://api.mangrove.reviews/subject/{sub}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "confirmed_count": 0,
  • "count": 0,
  • "opinion_count": 0,
  • "positive_count": 0,
  • "quality": 0,
}

Request aggregate information about the reviewer.

Request aggregate information about the reviewer.

path Parameters
pem
required
string
Example: -----BEGIN PUBLIC KEY-----MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEDo6mN4kY6YFhpvF0u3hfVWD1RnDElPweX3U3KiUAx0dVeFLPAmeKdQY3J5agY3VspnHo1p/wH9hbZ63qPbCr6g==-----END PUBLIC KEY-----

Responses

200

Success

400

Provided request has incorrect format.

500

Server encountered an error when processing the request.

get/issuer/{pem}
https://api.mangrove.reviews/issuer/{pem}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "count": 0,
  • "neutrality": 0
}

Retrieve aggregates for multiple subjects or issue

Retrieve aggregates for multiple subjects or issuers.

Request Body schema: application/json
pems
required
Array of strings Nullable

List of issuer public keys to get information about.

subs
required
Array of strings <uri> Nullable

List of subject URIs to get information about.

Responses

200

Success

400

Provided request has incorrect format.

500

Server encountered an error when processing the request.

post/batch
https://api.mangrove.reviews/batch

Request samples

Content type
application/json
Copy
Expand all Collapse all
{}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "issuers":
    {
    },
  • "subjects":
    {
    }
}