code: public static Context getContextByParamId(JSONObject params, String contextIdParamName)
  			throws ApiException {
  		int contextId = getIntParam(params, contextIdParamName);
  		Context context = Model.getSingleton().getSession().getContext(contextId);
  		if (context == null) {
  			throw new ApiException(Type.CONTEXT_NOT_FOUND, contextIdParamName);
  		}
  		return context;
  	}
docs: Gets the {@link Context} whose id is provided as a parameter with the given name. Throws an
  exception accordingly if not found or valid.
  
  @param params the params
  @param contextIdParamName the context id param name
  @return the context
  @throws ApiException the api exception