EDIT : although my answer below is actually not true, it is not complete at all. Basically, when you add the @Named annotation, the parameters will be included at the end of the request URL:
http:
If you are not using @Named , the parameter will be included (entered) in the POST data. You can see this very clearly by creating a testing endpoint with some named parameters and some unnamed, and using some query exploration tool like Firebug.
Obviously, the parameter types that support the @Named annotation @Named just a few (int, long, String, Boolean and their corresponding arrays, I think).
What I said in my original answer below is not false, but not a complete answer ...
The original answer . As far as I understand, the purpose of @Named is to specify the parameter name in the request URL. Thus, the parameter may have a name inside your application and another name open at the endpoint.
This is almost the same as @SerializedName in GSON or @Column in JDO. All of these annotations allow you to have 2 different names for your parameters, one in your application, the following Java naming conventions, and another name following other conventions such as URLs or JSON ...
In your example, you may not notice the difference, but you can have this method:
@ApiMethod( name = "remove", path = "remove", httpMethod = HttpMethod.DELETE) public void removeFoo(@Named("my_app_id") String myAppID){}
In this case, the parameter name in the URL will be:
https:
And no, the @Named object does not always have to be part of the path defined in ApiMethod.