-
Notifications
You must be signed in to change notification settings - Fork 0
Document service documentation
Gábor Pintér edited this page Nov 10, 2017
·
2 revisions
Store and query json
based objects in the database.
Action | Method | URL | App auth req | User auth req |
---|---|---|---|---|
Create document | POST | /documents |
Yes | No |
Get document | GET | /documents/{documentId} |
Yes | No |
Query document | GET | /documents?key={key}&value={value} |
Yes | No |
Update document | PUT | /documents/{:documentId} |
Yes | Yes |
Delete document | DELETE | /documents/{:documentId} |
Yes | Yes |
- Call: POST
/documents
- App Authentication is required
- User Authentication is required if
documentOwnerId
is provided
Property | Type | Mandatory |
---|---|---|
documentContent |
JSON Object | true |
documentOwnerId |
String | false |
- Call: GET
/documents/{documentId}
- App Authentication required
- Returns json document
- Call: GET
/documents?key={key}&value={value}&keySecondary={keySecondary}&valueSecondary={valueSecondary}
- App Authentication required
- If document has an owner ID then owner ID and Authenticated User ID have to match
- Call: PUT
/documents/{documentId}
- App Authentication required
- User Authentication required
- Owner ID and Authenticated User ID have to match
- Old json document will be replaced with provided json document
- Existing but unprovided fields will be lost
Property | Type | Mandatory |
---|---|---|
documentContent |
JSON Object | true |
- Call: DELETE
/documents/{documentId}
- App Authentication required
- User Authentication required
- Owner ID and Authenticated User ID have to match