api Convo {convoId} - nonduality345/Convos GitHub Wiki
/api/Convo/{convoId}
Note, {convoId} is a valid number (long) representing the Id of the Convo
-
DELETE
When performing the DELETE method on this endpoint, the application deletes the specific Convo from the system. If a Convo is deleted, its messages are no longer accessible through the API.
-
Request
-
Custom Headers
- X-Authorization: {userId} Required
-
Body
None
-
-
Response
-
Custom Headers
-
X-Message
In the case of 4xx responses from the API where the custom result code is > 0, this header will hold a message describing the client based error that occurred.
-
X-Result-Code:
This header holds the custom result code of the operation. A successful response will return 6 (DELETED) to the client. Details of results codes can be found here.
-
-
Body
None
-
Status
A 204 (No Content) status code is sent for successful requests. Requests with bad client information will return a 4xx level error and if there are problems with the server, a 5xx level status code is sent.
-
-
-
GET
When performing the GET method on this endpoint, the application returns the specific Convo object with the supplied convoId.
-
Request
-
Custom Headers
- X-Authorization: {userId} Required
-
Body
None
-
-
Response
-
Custom Headers
-
X-Last-Modified
This header holds the date and time at which the Convo was last modified.
-
X-Message
In the case of 4xx responses from the API where the custom result code is > 0, this header will hold a message describing the client based error that occurred.
-
X-Result-Code:
This header holds the custom result code of the operation. A successful response will return 0 (OK) to the client. Details of results codes can be found here.
-
-
Body
The specific Convo object that was requested is returned.
-
Status
A 200 (OK) status code is sent for successful requests. Requests with bad client information will return a 4xx level error and if there are problems with the server, a 5xx level status code is sent.
-
-
-
PATCH
When performing a PATCH operation on this endpoint, the specific Convo object will be partially updated with the supplied information.
-
Request
-
Custom Headers
- X-Authorization: {userId} Required
-
Body
{ "Subject":"Subject of the Convo" }
The body of a patch request is an object with just one field. The "Subject" field contains the new value for the subject for the specific Convo. There is a maximum character limit of 140 characters on this field. The participant field is not update-able for the Convo object. For a given Convo, there may be already exist messages that exist between the participants. Changing a participant of a Convo would then grant them access to these messages which would be a breach of security.
-
-
Response
-
Custom Headers
-
X-Message
In the case of 4xx responses from the API where the custom result code is > 0, this header will hold a message describing the client based error that occurred.
-
X-Result-Code:
This header holds the custom result code of the operation. A successful response will return 0 (OK) to the client. Details of results codes can be found here.
-
-
Body
None
-
Status
A 200 (OK) status code is sent for successful requests. Requests with bad client information will return a 4xx level error and if there are problems with the server, a 5xx level status code is sent.
-
-