Request/Response
Request Type
Samdock Microservices HTTPS request support is limited to a subset of RFC 2616.
Always Check Header
Never access the response body without confirming over the HTTP Response Header first.
Request Type | Supported | Description |
---|---|---|
GET | Yes | Used for retrieving a collection or single resource e.g. Read Organizations, Read Persons. |
POST | Yes | Used to create a new record. e.g. Add Person , Add Organizations. |
DELETE | Yes | Used to delete a specified record e.g. Delete Persons, Delete Organization by ID. |
PATCH | Yes | Used to update any existing record. e.g. Edit Person by ID, Add Last Seen Status |
PUT | Yes | Used to replace an entire resource rather than just updating a single field as done in PATCH e.g. Change Tenant Logo by ID |
Creating Entities with PATCH
Some of the Samdock Microservices has a tendency to create new entities if the passed id does not exist within our system. Here is the list of endpoints that has entity creation implemented over PATCH methods.
Response Codes
Samdock Microservices documentation does not include every possible result for each microservice. It is advised to view individual microservice for specific results associated with a given endpoint and assume there is a wide range of possible responses available for operations. This includes authorization failures, format issues, or platform-related operational issues.
Success Responses
Request successes are returned with HTTP status codes starting with 2xx
. Below is a partial list of responses.
HTTP Result | Result | Description |
---|---|---|
200 | Success | The request was successful. |
Failure Responses
Request errors are returned with HTTP status codes starting with 4xx
and server errors are starting with 5xx
codes.
Checking Error Codes
The developer shall ensure to handle appropriate application flows as per the Error Response Codes.
Same HTTP error codes are expected based on similar errors as depicted in the below list.
HTTP Result | Result | Description |
---|---|---|
401 | Failure | Unauthorized error or Token expired. User need to generated token. |
501 | Server Error | Server processor error. The user is advised to contact the Samdock Support. |
Additional HTTP Result Codes
Other standard HTTP errors may be generated by our stack and not directly from our API. Here are the categories of possible Standard HTTP response codes.
1xx: Communication transfer protocol-level information.
Informational2xx: This indicates that the client's request was accepted successfully.
Success3xx: Indicates that the client must take some additional action to complete their request.
Redirection4xx: This category of error status codes points to the clients.
Client Error5xx: This category of error is related to server exceptions due to an internal incapability to perform the request. The user is advised to contact the Samdock Support.
Server CodeFor more information please refer https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
Updated over 1 year ago