title: REST practices for validating a resource
body: <p>I am currently implementing a "token" REST service. </p>
  
  <p>A token is just a string, built from some parameters, which is then hashed and expires after a certain amount of time. </p>
  
  <p>I want to have an endpoint in my REST service which can validate a token, but I'm not 100% sure how to implement it in a RESTful way </p>
  
  <ol>
  <li>I assume this should be done via GET because it doesn't change state and so long as i set cache controls correctly it can be cached for a sensible amount of time. i.e <code>mysite.com/token/kjfhwekjfwekj</code></li>
  <li>What are the appropriate return codes? I would assume 200 if it is valid, but what about if it's invalid? I feel a 400 is wrong because although the resource itself is invalid, the client isn't calling the endpoint incorrectly. Is 404 correct here? If we think of tokens as short lived resources I guess so? </li>
  </ol>