Skip to main content

API

On the endpoint list screen for each API, you can create and configure APIs as well as endpoints.

Accessing the screen

In the left sidebar menu, click [API] and select the API you want to look at.

fetched from Gyazo

The main menu buttons appear at the top of the endpoint list screen.

fetched from Gyazo

[Add]

Opens the API editor.

fetched from Gyazo

ItemDescription
TitleTitle of the API (required field).
VersionVersion of the API (required field).
DescriptionOverview of the API (required field).
AddClick to create the API.

[Swagger UI]

Redirects to the Swagger UI screen for the current API.

Image (fetched from Gyazo) (See: Using Swagger UI to check the data structure of your content for details).

[Clear cache]

Clears the settings cache of the current API. Any changes to Kuroco's internal behavior clears the cache and applies/reflects the latest version.

[Security]

Configures the security settings for the current API.

Image (fetched from Gyazo) (See: API Security for details.)

[Operation CORS]

To enable CORS, customize the information that the Kuroco server returns to the response header.

Image (fetched from Gyazo) The origin configured for CORS is the one assigned in the Content-Security-Policy: frame-ancestors. For example, to access the Kuroco server from the local frontend http://localhost:8080, configure http://localhost:8080 as follows.

(See: MDN Web Docs for details.)

ItemCorresponding response headerSample http://localhost:8080
CORS_ALLOW_ORIGINSAccess-Control-Allow-Originhttp://localhost:8080
CORS_ALLOW_METHODSAccess-Control-Allow-MethodsGET,POST,OPTIONS
CORS_ALLOW_HEADERSAccess-Control-Allow-Headers*
CORS_MAX_AGEAccess-Control-Max-Age600
CORS_ALLOW_CREDENTIALSAccess-Control-Allow-Credentials

[Update API]

Updates the settings of the current API. The input fields are the same as for Create new API.

[Delete API]

Deletes the current API.
Note: Deleted APIs cannot be recovered.

[Export API]

Exports the current API in JSON/YAML format.

Image (fetched from Gyazo) The exported configuration file is in Kuroco's own format. To include pre-/post-processing settings, check the "Including pre/post processing blocks" box.

[Import API]

Imports the current API in JSON/YAML format.

Image from Gyazo Select "Import as new API" to create a new API. Selecting "Import to the current API" updates the current API.

[Add new endpoint]

Opens the "Add new endpoint" pop-up screen.

Image (fetched from Gyazo) (See: Reference - API - Endpoint settings for more details.)

Endpoint list

A list of endpoints for the current API is displayed below the main menu.

Image (fetched from Gyazo) This list appears only after you have added endpoints to a new API. The endpoints are grouped by category.

ItemDescription
EnabledIndicates whether the API is enabled or disabled.
MethodHTTP method.
PathPath of the endpoint.
ModelThe Kuroco model bound to the endpoint.
OperationThe operations associated with the model.
SummaryValue specified when creating the endpoint.
ParametersOperation parameters.
AuthenticationMethod of authentication.
[Update]Opens the "Configure endpoint" pop-up screen.
[Pre-processing]Displays the pre-processing settings editor.
The total number of pre-processes that have been set will be displayed.
[Post-processing]Displays the post-processing settings editor.
The total number of post-processes that have been set will be displayed.
[Delete]Deletes the endpoint.

Changelog

You can see a list of the history of editing from the endpoint settings screen.

Click the "Update" in the endpoint list, then open the endpoint settings.

Image from Gyazo

Click the "Changelog" to see a list of the history of editing the endpoint settings.

Image from Gyazo

Endpoint settings changelog

Image from Gyazo

Item  Description  
VersionDisplays the version.
You can see the target version after clicking the version link.
Updated onDisplays the date and time the content was updated.
Updated byDisplays the name of the member who updated the content.
ActionDisplays the type of processing performed.
There are six types of statuses as follows
  • Create new
  • Update
  • Deleted
  • Request
  • Approved
  • Reject Approval
CommentDisplays the comments at the time of update.
ContentDisplays the updated contents.

Support

If you have any other questions, please contact us or check out Our Slack Community.