1.2.15 /api/v1/macros

Permits to load and save sat-nms macro definitions as well as to read the list of macros defined on a given M&C.

Supported HTTP methods: GET, PUT, DELETE, HEAD, OPTIONS

GET /api/v1/macros/{mncName}

Returns an ItemList document containing the list of macros defined on the given M&C.

Parameters:

Parameter Description
mncName The name of the M&C from which the macro list shall be loaded.

Return Codes:

Code Description
200 OK, returns an ItemList containing the requested macro list.
401 not logged in. In this case a ApiError document is returned, describing details of the error.
404 no M&C with the given name exists. In this case a ApiError document is returned, describing details of the error.

GET /api/v1/macros/{mncName}/{macroName}

Returns a Macro document containing the requested macro.

Parameters:

Parameter Description
mncName The name of the M&C from which the macro shall be loaded.
macroName The name of the macro to load.

Return Codes:

Code Description
200 OK, returns a Macro containing the requested macro.
401 not logged in. In this case a ApiError document is returned, describing details of the error.
404 either M&C with the given name exists or at the known M&C there exists no macro with the requested name. In this case a ApiError document is returned, describing details of the error.

PUT /api/v1/macros/{mncName}/{macroName}

Saves a macro on the given M&C. Expects Macro document containing the macro text to save as request body. The name field in the Macro document will be ignored, the macro will be saved under the name given in the URL. As every PUT request, this will either overwrite an existing macro with this name or create a new macro definition at the M&C if no macro with this name exists.

Parameters:

Parameter Description
mncName The name of the M&C on which the macro shall be saved.
macroName The name of the macro to save.

Return Codes:

Code Description
200 OK, returns the Macro containing the saved macro. This will have the name field set the name under which the macro actually has been saved.
401 not logged in. In this case a ApiError document is returned, describing details of the error.
404 no M&C with the given name exists. In this case a ApiError document is returned, describing details of the error.

DELETE /api/v1/macros/{mncName}/{macroName}

Deletes a macro at the given M&C.

Parameters:

Parameter Description
mncName The name of the M&C on which the macro shall be deleted.
macroName The name of the macro to delete.

Return Codes:

Code Description
200 OK, returns the Macro containing the deleted macro.
401 not logged in. In this case a ApiError document is returned, describing details of the error.
404 either M&C with the given name exists or at the known M&C there exists no macro with the requested name. In this case a ApiError document is returned, describing details of the error.