Skip to content
Malcolm Dzimati edited this page Jul 19, 2022 · 28 revisions

Endpoint prefix:

https://<API-ID>.execute-api.us-east-1.amazonaws.com/dev/

Sign Up

  • Endpoint: prefix+signup
  • Type: Post
  • Request Body:

email
username
password
dateOfBirth

  • Response Body:

apiKey
email
username

Login

  • Endpoint: prefix+/login
  • Type: Post
  • Request Body:

email
password

  • Response Body:

apiKey
email
username

  • Invalid password or nonexistent email (more meaningful error responses coming):

statusCode: 403

Search

  • Endpoint: prefix+searchTweets
  • Type: Post
  • Request Body:

apiKey
keyword
numOfTweets
sortBy

byLikes
byComments
byRetweets

filterBy

noneReply
verifiedTweets

Generate Report

  • Endpoint: prefix+generateReport
  • Type: Post
  • Request Body:

apiKey
resultSetID
author

  • Response Body:

Report

reportID
resultSetID
apiKey
dateCreated
author

Tweets [

username
fullname
dateOT
numComments
numLikes
numRetweets
text
tweetId
resultSetId
]

Get All Published Reports

  • Endpoint: prefix+getAllPublishedReports
  • Type: get
  • Request Body:
  • Response Body:

Reports[

ReportID
title
author
dateCreated
]

Get All My Draft Reports

  • Endpoint: prefix+getAllMyDraftReports
  • Type: post
  • Request Body:

apiKey

  • Response Body:

Reports[

ReportID
title
author
dateCreated
]

get Report

  • Endpoint: prefix+getReport
  • Type: post
  • Request Body:

reportID
apiKey

  • Response Body:

permissions: 'OWNER' | 'VIEWER' | 'EDITOR' report: report [

block[

blockType
position
Tweet/RichText
]
numOfBlocks
]

When you getReport, please make sure you check the permissions to return the correct report view, as in if the permission is "VIEWER", display the report in view mode and as well if the the report is published, always return it in view mode and only the owner should have the ability to unpublish it, i.e permission should be "OWNER". And if a report is a draft report only the "OWNER" can share it. As well only the owner can share the report for editing and only when the report is a draft(and only the owner can share a draft report". But everyone can share a report only in view mode tho.

Publish report

  • Endpoint: prefix+publishReport
  • Type: post
  • Request Body:

reportID
apiKey

  • Response Body:

Unpublish report

  • Endpoint: prefix+unpublishReport
  • Type: post
  • Request Body:

reportID
apiKey

  • Response Body:

Delete Draft report

  • Endpoint: prefix+deleteDraftReport
  • Type: post
  • Request Body:

reportID
apiKey

  • Response Body:

report

reportID
status
dateCreated
title
author

Delete result set

  • Endpoint: prefix+deleteResultSet
  • Type: post
  • Request Body:

resultSetID
apiKey

  • Response Body:

Share report

  • Endpoint: prefix+shareReport
  • Type: post
  • Request Body:
  • type: (Either "EDITOR" or "VIEWER")

reportID
apiKey
email

  • Response Body:

get Share report

  • Endpoint: prefix+getSharedReport
  • Type: post
  • Request Body:

apiKey

  • Response Body:

Reports[

ReportID
title
author
dateCreated
]

delete report block

  • Endpoint: prefix+deleteReportBlock
  • Type: post
  • Request Body:

apiKey
reportID
reportBlockID

  • Response Body:

Get All My Publish Reports

  • Endpoint: prefix+getAllMyPublishedReports
  • Type: post
  • Request Body:

apiKey

  • Response Body:

Reports[

ReportID
title
author
dateCreated
]

Get result set

  • Endpoint: prefix+getResultSet
  • Type: post
  • Request Body:

apiKey
resultSetID

  • Response Body:

sortOption
filterOption
dateCreated
searchPhrase
id
tweets [

tweetIDs ]

Add custom tweets

  • Endpoint: prefix+addCustomTweet
  • Type: post
  • Request Body:

apiKey
reportID
url

  • Response Body:

reorder tweets

  • Endpoint: prefix+reorderTweets
  • Type: post
  • Request Body:

apiKey
reportID
reportBlockID1
reportBlockID2

  • Response Body: