com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links' is unknown.

Publisher APIs

Publisher APIs provide the following REST resources.

Note

When you access any API other than the login and logout APIs through an external REST client such as cURL, first invoke the login API to ensure that user is authenticated. When the login API is invoked, the system stores the generated session cookie in a file, which we use in the next API invocations.

Alternatively, if you access these APIs from the API Publisher application itself, you do not have to invoke the login API first.

Login

DescriptionLog in to API Publisher web application.
URIhttp://localhost:9763/publisher/site/blocks/user/login/ajax/login.jag
URI Parametersaction=login&username=xxx&password=xxx
HTTP MethodsPOST
Examplecurl -X POST -c cookies http://localhost:9763/publisher/site/blocks/user/login/ajax/login.jag -d 'action=login&username=user1&password=xxx'

Logout

DescriptionLog out from API Publisher web application.
URIhttp://localhost:9763/publisher/site/blocks/user/login/ajax/login.jag
URI Parameters?action=logout
HTTP MethodsGET
Examplecurl -b cookies http://localhost:9763/publisher/site/blocks/user/login/ajax/login.jag?action=logout

Add/Update API

DescriptionAdd a new API or update an existing API.
URIhttp://localhost:9763/publisher/site/blocks/item-add/ajax/add.jag
URI Parameters

Add API : ?action=addAPI&name=xxx&version=xxx&description=xxx&endpoint=xxx&wsdl=xxx&tags=xxx&visibility=public&tiersCollection=xxx&context=xxx&resourceCount=0&resourceMethod-0=POST&resourceMethodAuthType-0=Application&uriTemplate-0=/*"

Update API : ?action=updateAPI&name=xxx&version=xxx&description=xxx&endpoint=xxx&wsdl=xxx&tags=xxx&visibility=public&tiersCollection=xxx&context=xxx&resourceCount=0&resourceMethod-0=POST&resourceMethodAuthType-0=Application&uriTemplate-0=/*"

HTTP MethodsPOST
Example

Add API :
curl -X POST -b cookies  http://localhost:9763/publisher/site/blocks/item-add/ajax/add.jag -d"action=addAPI&name=API1&version=1.0.0&description=TwitterSearch&endpoint=http://search.twitter.com&wsdl=&tags=twitter,open,social&tier=Silver&context=/twitter&tiersCollection=Gold&resourceCount=0&resourceMethod-0=POST&resourceMethodAuthType-0=Application&uriTemplate-0=/*"

Update API :
curl -X POST -b cookies http://localhost:9763/publisher/site/blocks/item-add/ajax/add.jag -d"action=updateAPI&name=API1&version=1.0.0&description=TwitterSearch&endpoint=http://search.twitter.com&wsdl=&tags=twitter,open,social&tier=Silver&context=/twitter&tiersCollection=Gold&resourceCount=0&resourceMethod-0=POST&resourceMethodAuthType-0=Application&uriTemplate-0=/*"

Get All APIs

DescriptionLists all the created APIs.
URI  http://localhost:9763/publisher/site/blocks/listing/ajax/item-list.jag
URI Parameters?action=getAllAPIs
HTTP MethodsGET
Examplecurl -b cookies  http://localhost:9763/publisher/site/blocks/listing/ajax/item-list.jag?action=getAllAPIs

Get an API

DescriptionGet details of a specific API.
URI  http://localhost:9763/publisher/site/blocks/listing/ajax/item-list.jag
URI Parametersaction=getAPI&name=xxx&version=xxx&provider=xxx
HTTP MethodsPOST
Examplecurl -X POST -b cookies http://localhost:9763/publisher/site/blocks/listing/ajax/item-list.jag -d "action=getAPI&name=API1&version=1.0.0&provider=user1"

Remove an API

DescriptionRemove an API.
URIhttp://localhost:9763/publisher/site/blocks/item-add/ajax/remove.jag
URI Parametersaction=removeAPI&name=xxx&version=xxx&provider=xxx
HTTP MethodsPOST
Examplecurl -X POST -b cookies http://localhost:9763/publisher/site/blocks/item-add/ajax/remove.jag -d "action=removeAPI&name=API1&version=1.0.0&provider=user1"

Copy an API

DescriptionCopy an API to a newer version.
URIhttp://localhost:9763/publisher/site/blocks/overview/ajax/overview.jag
URI Parameters

action=createNewAPI&provider=xxx&apiName=xxx&version=xxx&newVersion=xxx

HTTP MethodsPOST
Examplecurl -X POST -b cookies http://localhost:9763/publisher/site/blocks/overview/ajax/overview.jag -d "action=createNewAPI&provider=user1&apiName=API1&version=1.0.0&newVersion=2.0.0”

Check Older Version

DescriptionDoes older version of API exist.
URI http://localhost:9763/publisher/site/blocks/life-cycles/ajax/life-cycles.jag
URI Parameters

?action=isAPIOlderVersionExist&provider=xxx&name=xxx&version=xxx

HTTP MethodsGET
Examplecurl -X POST -b cookies   http://localhost:9763/publisher/site/blocks/life-cycles/ajax/life-cycles.jag?action=isAPIOlderVersionExist&provider=user1&name=API1&version=1.0.0

Change API Status

DescriptionChange the API's status.
URIhttp://localhost:9763/publisher/site/blocks/life-cycles/ajax/life-cycles.jag
URI Parameters

action=updateStatus&name=xxx&version=xxx&provider=xxx&status=xxx&publishToGateway=xxx&deprecateOldVersions=xxx&requireResubscription=xxx

HTTP MethodsPOST
Examplecurl -X POST -b cookies http://localhost:9763/publisher/site/blocks/life-cycles/ajax/life-cycles.jag -d “action=updateStatusname=API1&version=1.0.0&provider=user1&status=PUBLISHED&publishToGateway=true&&deprecateOldVersions=false&requireResubscription=true”

Add/Update an API Document

DescriptionAdd a new API document.
URI http://localhost:9763/publisher/site/blocks/documentation/ajax/docs.jag
URI Parameters

Add Document: action=addDocumentation&mode=xxx&provider=xxx&apiName=xxx&version=xxx&docName=xxx&docType=xxx&sourceType=xxx&docUrl=xxx&summary=xxx&docLocation=xxx

Update Document: action=addDocumentation&mode=xxx&provider=xxx&apiName=xxx&version=xxx&docName=xxx&docType=xxx&sourceType=xxx&docUrl=xxx&summary=xxx&docLocation=xxx

HTTP MethodsPOST
Examplecurl -X POST -b cookies http://localhost:9763/publisher/site/blocks/documentation/ajax/docs.jag -d “action=addDocumentation&mode=’’&provider=user1&apiName=API1&version=1.0.0&docName=doc1&docType=how to&sourceType=inline&docUrl=’’&summary=testing&docLocation=’’

Remove an API Document

DescriptionRemove an API document.
URI http://localhost:9763/publisher/site/blocks/documentation/ajax/docs.jag
URI Parameters

action=removeDocumentation&provider=xxx&apiName=xxx&version=xxx&docName=xxx&docType=xxx

HTTP MethodsPOST
Examplecurl -b cookies http://localhost:9763/publisher/site/blocks/documentation/ajax/docs.jag?action=removeDocumentation&provider=admin&apiName=API1&version=1.0.0&docName=doc1&docType=How To

 

 

com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.