Package hudson.model
Class Api
java.lang.Object
hudson.model.AbstractModelObject
hudson.model.Api
- All Implemented Interfaces:
- ModelObject,- SearchableModelObject,- SearchItem
- Direct Known Subclasses:
- CrumbIssuer.RestrictedApi
Used to expose remote access API for ".../api/"
 
 If the parent object has a _api.jelly view, it will be included
 in the api index page.
- Author:
- Kohsuke Kawaguchi
- See Also:
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoiddoJson(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Exposes the bean as JSON.voiddoJson(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) Deprecated.voiddoPython(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Exposes the bean as Python literal.voiddoPython(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) Deprecated.voiddoSchema(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) Generate schema.voiddoXml(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp, String xpath, String wrapper, String tree, int depth) Exposes the bean as XML.Returns the URL of this item relative to the parentSearchItem.protected voidsetHeaders(org.kohsuke.stapler.StaplerResponse2 rsp) Methods inherited from class hudson.model.AbstractModelObjectgetSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendErrorMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.search.SearchItemgetSearchGroup, getSearchIcon
- 
Field Details- 
beanModel object to be exposed as XML/JSON/etc.
 
- 
- 
Constructor Details- 
Api
 
- 
- 
Method Details- 
getDisplayName
- 
getSearchUrlDescription copied from interface:SearchItemReturns the URL of this item relative to the parentSearchItem.- Returns:
- URL like "foo" or "foo/bar". The path can end with '/'. The path that starts with '/' will be interpreted as the absolute path (within the context path of Jenkins.)
 
- 
doXmlpublic void doXml(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp, @QueryParameter String xpath, @QueryParameter String wrapper, @QueryParameter String tree, @QueryParameter int depth) throws IOException, jakarta.servlet.ServletException Exposes the bean as XML.- Throws:
- IOException
- jakarta.servlet.ServletException
 
- 
doSchemapublic void doSchema(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException Generate schema.- Throws:
- IOException
- jakarta.servlet.ServletException
 
- 
doJsonpublic void doJson(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException Exposes the bean as JSON.- Throws:
- IOException
- jakarta.servlet.ServletException
 
- 
doJson@Deprecated @StaplerNotDispatchable public void doJson(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException Deprecated.- Throws:
- IOException
- javax.servlet.ServletException
 
- 
doPythonpublic void doPython(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException Exposes the bean as Python literal.- Throws:
- IOException
- jakarta.servlet.ServletException
 
- 
doPython@Deprecated @StaplerNotDispatchable public void doPython(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException Deprecated.- Throws:
- IOException
- javax.servlet.ServletException
 
- 
setHeaders@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) protected void setHeaders(org.kohsuke.stapler.StaplerResponse2 rsp) 
 
- 
doJson(StaplerRequest2, StaplerResponse2)