Through Swagger you will find a documentation page for both the live and training environments of Coachview. On this documentation page you will find the API's (entities) and possible instructions (requests) that are currently available.
Table of contents:
Documentation pages:
It is important to note that there are two documentation pages because there may be a difference in data and the API's available for Coachview's live and training environments.
This documentation page lists the different API's for which one or more requests are available. The requests are bundled by entity.
  1. Click here for the documentation page of the training environment of Coachview.
  2. Click here for the documentation page of the live environment of Coachview.


  1. It is not possible to test in the live environment with Swagger! 
  2. The Swagger page of the training environment may be different from the Swagger page of the live environment because new additions become available on training first.


Login:
If you only want to view the documentation then login is not necessary. If you want to test then login is necessary. You then use an access token. This gives you access to an API.
Click the 'Authorize' button, this gives you access to the API's and you can start testing.Next screen will open.
  1. A client_id is automatically generated.
  2. Always check 'api algemene toegang tot de api's'.
  3. List of scopes (APIs). Check those API'ss you want to use for the test. Are you testing and forgot to check the API's to be tested here? Then you will not get back the correct values but examples. All publicid's will be the same.
Then scroll down and click the 'Authorize' button.
Are you not yet logged into Coachview? Then the Coachview login screen appears. Log in with a user account with sufficient read and write privileges.
You are automatically returned to Swagger's documentation page.
  1. You can see here that you are authorized.
  2. Close the screen.
  3. Close the screen.
  4. Close the screen and logout.
Remember to log out when you are ready.List of API's:You will return to the documentation page. If the lock is closed then you are still authorized.
The page lists API's for which one or more requests are available.

Requests:
If you click on the name of an API (entity), you will see the requests that are possible within this API.
  1. Get: get data
  2. Post: add data.
  3. Put: change data.
  4. Delete: delete data.
  5. Patch: change a part of the data.
  1. A closed lock indicates that you are authorized and can test.
  2. An open lock indicates that you are not authorized and can only view the information.
If you click on the name of a request, you will see the documentation. As an example the GET for training retrieval.. You'll see a brief explanation and some examples first. 
Below that you will find the different parameters, with a brief explanation for each parameter and some examples. Search:
  1. Search options explanation.
  2. Example what you can fill in.
  3. Enter your own search criteria. ?Search= may be omitted. For example, the code or the name or part of the name of the course.
Filters: Depending on the GET, you have the option of setting one or more filters.

Example filter 1 text:
Text as a filter. In this example, you can add one or more places separated by a comma
?Plaats= you may omit.
Example filter 2 InclusiefVrijeVelden:
It is possible to set up one or more free fields in Coachview for different files, in this case training. In these, additional information is recorded that is not made available by Coachview.
  1. -- not applicable.
  2. true, yes give me information from the free fields.
  3. false, no I don't want to pick up.
Example filter 3 PublicID:A PublicID that references a file in Coachview. In this example, a teacher. You combine multiple ID's separated with a ',' (comma). ID's of, in this case, teachers you retrieve with another API.
Take:
The number of results to be retrieved. Default is 10 and the maximum is 100. Greater than 100 gives an error message.
?take=you may omit.
Skip:
Het aantal resultaten dat overgeslagen moet worden. Kun je gebruiken voor paginering van de opgehaalde data, in combinatie met take. 
Order by:
Sort options off (desc) or ascending (asc). You can use all fields at the highest level. For example, for training by name and/or code. It is also possible to combine multiple fields by separating them with a ',' (comma). By default, the sorting is ascending. 
Where:
Additional filters on one or more fields at the highest level. It is possible to combine multiple filters by separating the fields with a ',' (comma).
Example where 1 textveld:
Search on (part of) the field

Example where 2 date fields and numbers:These operators are allowed:
  1. Larger than:>
  2. Smaller than: <
  3. Equal to: =
  4. Not equal to: <>
  5. Greater than or equal to: >=
  6. Smaller than or equal to: <=

A range can be specified by separating two dates with a comma.
Example where 3 status fields:
Filtering on multiple values simultaneously is possible by separating the values with a ',' (comma). 
Example where 4 Yes/No fields:
Use true (Yes) or false (No).

Example where 5 free fields:
As the search criterion, you must include the code of the free field followed by the value to be searched. Only = (equal to) and <> (unequal to) are allowed.
In Coachview, we have as an example the free field at a course.
Count:
Only return the number of results, no data is retrieved.
Want to test and thus enter values? Then click on the "Try it out" button.
After the parameters you will find the "Execute" button. With this button you execute the requests. With the button 'Clear', appearing after the first execute, you delete the entered values. 


Server response:

The result is returned with codes and if successful with the retrieved data. At https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses you can read all about the "HTTP response status codes".



Code 200 -> Details:
Successful. Includes retrieved data.
Code 200 -> Description:
Example (no real) data. 

 
Code 401 of 403:
Errors.

Curl:
Information needed to make a request, for example, from Postman.
Click this icon to copy the result.
Request URL:
You can see here how the request was executed.
Behind /training you will see a ? to indicate that parameters follow. In this example 'Take=1' followed by a '&' to indicate that another parameter follows.