Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
api:api_applicants_id_trackers_id [2014/07/02 00:43] – [HEAD, GET] Lauri Elevantapi:api_applicants_id_trackers_id [2023/03/08 20:56] (current) – [PUT] Lauri Elevant
Line 3: Line 3:
 ===== HEAD, GET ===== ===== HEAD, GET =====
  
-Use the ''HEAD'' verb to test if the applicant in question has this tracker code. A request with the ''GET'' verb returns some additional information about the tracker (e.g created date, notes etc.).+Use the ''HEAD'' verb to test if the applicant in question has this tracker. A request with the ''GET'' verb returns some additional information about the tracker association (date assigned etc.).
  
-Note that this **does not delete the tracker itself**, only removing it's association with the applicant in question.+**Note that this will not return the tracker itself**, but rather represents the relationships between the applicant and the tracker. Follow the tracker URI in the response to retrieve further information about the tracker in question.
  
 ==== Syntax ==== ==== Syntax ====
Line 21: Line 21:
  
 | ''200 OK'' | The tracker is set | | ''200 OK'' | The tracker is set |
-| ''404 Not Found'' | The tracker was not set |+| ''404 Not Found'' | The tracker does not exist | 
 +| ''404 Not Found'' | The tracker was not set to this applicant | 
 + 
 +==== Response example ==== 
 + 
 +  { 
 +    "assigned": "2014-06-29T18:11:15+00:00", 
 +    "tracker": "/api/applicants/trackers/1" 
 +  }
  
 ===== PUT ===== ===== PUT =====
  
-Set a tracker code to the applicant in question. **This requires that the tracker code already exists.** Use ''POST'' to create a tracker code first, then this API call will allow you to ''PUT'' the tracker (identified by it's code) to any number of applicants. +Set a tracker to the applicant in question. **This requires that the tracker already exists.** Use ''POST'' [[api:api_applicants_trackers|/api/applicants/trackers]] to create a tracker first, then this API call will allow you to ''PUT'' the tracker (identified by it's code) to any number of applicants.  
 + 
 +In other words, this will not create a new tracker, but create a relationship (association) between an existing tracker and an applicant. 
 + 
 +NB!  The body of the request is left empty
 ==== Syntax ==== ==== Syntax ====
  
Line 40: Line 52:
  
 | ''204 No Content'' | Tracker was successfully set | | ''204 No Content'' | Tracker was successfully set |
-| ''404 Not Found''Tracker was not found |+| ''404 Not Found''The tracker does not exist |
  
  
 ===== DELETE ===== ===== DELETE =====
  
-Remove the tracker code from the applicant in question. +Remove the tracker from the applicant in question. Note that this **does not delete the tracker itself**, only removing it's association with the applicant in question.
 ==== Syntax ==== ==== Syntax ====
  
Line 61: Line 72:
  
 | ''204 No Content'' | Tracker was successfully deleted | | ''204 No Content'' | Tracker was successfully deleted |
 +| ''404 Not Found'' | The tracker does not exist |
 +| ''404 Not Found'' | The tracker was not set to this applicant |