Documentation for service endpoints #692

Closed
opened 2026-05-04 07:18:19 +00:00 by a22erigr · 18 comments
Collaborator

We need to write a wiki page to centralized and document all available endpoints that the services provide.

  • Following things should be documented
    • Path to endpoint
    • Values that the endpoint requires
    • Return values
      • When error occurs
      • When no error occurs
We need to write a wiki page to centralized and document all available endpoints that the services provide. + Following things should be documented + Path to endpoint + Values that the endpoint requires + Return values + When error occurs + When no error occurs
Collaborator

we will create diagrams for each services. Isn't that enough?

we will create diagrams for each services. Isn't that enough?
Author
Collaborator

@a24sakma The diagrams does not show.

  • Expected input.
  • Expected output
    The wiki page should show how you make calls to the endpoint.
  • How the parameters are passed
  • What datatyp the expected parameters should have
  • Is it post or get?
  • Example
    image
  • We also need to be clear on what data is returned.
  • Example
{
  "sensorId": "G-Building",
  "timestamp": "2026-05-04T08:12:08.838596",
  "temperature": 20.610000610351562
}
@a24sakma The diagrams does not show. + Expected input. + Expected output The wiki page should show how you make calls to the endpoint. + How the parameters are passed + What datatyp the expected parameters should have + Is it post or get? + Example ![image](/attachments/f7ad7933-ae40-4eef-82d2-3f78236e1981) + We also need to be clear on what data is returned. + Example ``` json { "sensorId": "G-Building", "timestamp": "2026-05-04T08:12:08.838596", "temperature": 20.610000610351562 } ```
Author
Collaborator
https://git.webug.se/Andras/BoundlessFlowCampus2K/wiki/Documentation-for-service-endpoints
Collaborator

I have noticed the naming convention is not always consistent, since not all files follow the same standard. So therefore, the wiki documentation is based of the existing files and may also be little inconsistent.

I have noticed the naming convention is not always consistent, since not all files follow the same standard. So therefore, the wiki documentation is based of the existing files and may also be little inconsistent.
Collaborator

Example some cases where there are UserID and userId.

Example some cases where there are UserID and userId.
Collaborator

The wiki is finished but for me really messy. There is a template that is followed but it hurts my eyes to go through the wiki. I would appreciate if someone would be so kind to structure it better. I also need a review on it so it is actually accurate in case I have totally misunderstood something about this issue.

The [wiki](https://git.webug.se/Andras/BoundlessFlowCampus2K/wiki/Documentation-for-service-endpoints) is finished but for me really messy. There is a template that is followed but it hurts my eyes to go through the wiki. I would appreciate if someone would be so kind to structure it better. I also need a review on it so it is actually accurate in case I have totally misunderstood something about this issue.
Collaborator

Also wondering If it is supposed to be like this. Currently all services has a file called Endpoints except energyService and roombookingApiMockup, is it supposed to be like this?

Also wondering If it is supposed to be like this. Currently all services has a file called Endpoints except energyService and roombookingApiMockup, is it supposed to be like this?
Author
Collaborator

@a24danwe wrote in #692 (comment):

Also wondering If it is supposed to be like this. Currently all services has a file called Endpoints except energyService and roombookingApiMockup, is it supposed to be like this?

This is not suppose to be the case. Those two services are about to be refactored to better follow the structure of the other services.
Good work with the wiki, I am sorry if i was a bit wage.

@a24danwe wrote in https://git.webug.se/Andras/BoundlessFlowCampus2K/issues/692#issuecomment-8359: > Also wondering If it is supposed to be like this. Currently all services has a file called Endpoints except energyService and roombookingApiMockup, is it supposed to be like this? This is not suppose to be the case. Those two services are about to be refactored to better follow the structure of the other services. Good work with the wiki, I am sorry if i was a bit wage.
Collaborator

@a22erigr wrote in #692 (comment):

@a24danwe wrote in #692 (comment):

Also wondering If it is supposed to be like this. Currently all services has a file called Endpoints except energyService and roombookingApiMockup, is it supposed to be like this?

This is not suppose to be the case. Those two services are about to be refactored to better follow the structure of the other services. Good work with the wiki, I am sorry if i was a bit wage.

Sounds good! And you were perfectly fine with your issue description, it is just me that did not know how to structure this well.

@a22erigr wrote in https://git.webug.se/Andras/BoundlessFlowCampus2K/issues/692#issuecomment-8379: > @a24danwe wrote in #692 (comment): > > > Also wondering If it is supposed to be like this. Currently all services has a file called Endpoints except energyService and roombookingApiMockup, is it supposed to be like this? > > This is not suppose to be the case. Those two services are about to be refactored to better follow the structure of the other services. Good work with the wiki, I am sorry if i was a bit wage. Sounds good! And you were perfectly fine with your issue description, it is just me that did not know how to structure this well.
Collaborator

Reviewed the wiki against the actual endpoint definitions in the code. All documented endpoints match what's in the code.
a22erigr showed an example for JSON response. The wiki has return value descriptions but no actual JSON examples.
Adding these examples would make the wiki more useful.
Overall though, the wiki does covers what was asked for and is accurate.

Reviewed the wiki against the actual endpoint definitions in the code. All documented endpoints match what's in the code. a22erigr showed an example for JSON response. The wiki has return value descriptions but no actual JSON examples. Adding these examples would make the wiki more useful. Overall though, the wiki does covers what was asked for and is accurate.
Author
Collaborator

@a24danwe can you update the wiki to contain actual JSON examples. After that the issue can be closed

@a24danwe can you update the wiki to contain actual JSON examples. After that the issue can be closed
Collaborator

I will do that.

I will do that.
Author
Collaborator

@a24danwe wrote in #692 (comment):

I will do that.

Write here when you are done so that i can close the issue

@a24danwe wrote in https://git.webug.se/Andras/BoundlessFlowCampus2K/issues/692#issuecomment-8650: > I will do that. Write here when you are done so that i can close the issue
Author
Collaborator

Can you clarify which service the endpoints exists for.
EX

energyService

GET /energy/all

Path to endpoint

GET /energy/all

Required values

None

Return values

Returns a JSON array:

  • sql_datatypes: database type info
  • id: sensor id
  • esensorid: sensor name
  • timestamp: time of reading
  • kilowatt: energy usage

When no error occurs

  • Returns all energy sensor data
  • Status: 200 OK

When error occurs

  • Server failure or database issue
  • Status: 500

tempService

Can you clarify which service the endpoints exists for. EX # energyService ## GET /energy/all ### Path to endpoint `GET /energy/all` ### Required values None ### Return values Returns a JSON array: - sql_datatypes: database type info - id: sensor id - esensorid: sensor name - timestamp: time of reading - kilowatt: energy usage ### When no error occurs - Returns all energy sensor data - Status: 200 OK ### When error occurs - Server failure or database issue - Status: 500 # tempService
Collaborator

Yes, I will do that aswell

Yes, I will do that aswell
Collaborator

@a22erigr Can you be so kind and explain how you use thisimage so I will be able to replicate the output. I have tried something called postman but it seems to not work for me.

@a22erigr Can you be so kind and explain how you use this![image](/attachments/afea1501-6723-4266-b751-0d4ac917bd81) so I will be able to replicate the output. I have tried something called postman but it seems to not work for me.
136 KiB
Collaborator

This issue can be closed.

This issue can be closed.
Author
Collaborator

@a24danwe wrote in #692 (comment):

This issue can be closed.

@a24danwe wrote in https://git.webug.se/Andras/BoundlessFlowCampus2K/issues/692#issuecomment-12265: > This issue can be closed.
Sign in to join this conversation.
No milestone
No project
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K#692
No description provided.