After creating an API, you can manage it by performing tasks such as version management and changing the owner. This guide explains how to manage your APIs.
API list entry
In the top menu bar of the Dataphin home page, select Service > Development.
Select the service project in the upper left corner, then select API Service > API in the left-side navigation pane to access the API list page.
You can search for the desired API by its name or ID, or quickly filter Apis Submitted Today, My Apis, or by API type, data source, API group, recent submission time, pattern, current status, or owner.
My APIs: APIs for which I am responsible, excluding those for which I have requested usage permissions.
The API list displays the created APIs, including the API's name and ID, API type, data source, environment, current status, runtime environment, published version, publication information, data update frequency, API group, owner, the number of applications associated with the API, permission information, and other details.
You can perform the following operations in the operation list of the target API.
Operation
Description
Publish
Click Publish in the operation column or select the API to be published, click Batch Publish at the bottom, and in the API Publish dialog box, select the submitted version to be published and publish the API to the production environment. For more information, see Step 2: Publish API.
NoteIf there is already a published version online, the parameters will be validated during the process of publishing a new version of the API online, including adding mandatory request parameters, deleting request parameters, deleting return parameters, changing the data type of request parameters, and changing the invocation type.
The publication of a new version online will affect the invocation of the API. You can set different publication control mechanisms in the project. During API publication, it will be blocked or published according to the configuration of its associated project. For more information, see Create service projects.
APIs created based on logical tables do not support batch publishing.
If no version is selected during batch publishing, the API will not be published.
Edit
Click the Edit icon in the operation column to enter the edit API page.
NoteThe system defaults to the edit page of the latest version of the API. If you need to modify other versions of the API, you can switch the API version in the upper right corner of the edit page to edit different versions.
When the API version is in the submitted or draft state, you can switch to view the API in the upper left corner of the page. You can perform a fuzzy search for the API by its name or ID, and switch to the API with permissions in the current service project. The system will recommend the last 9 APIs you have accessed (including viewing, editing, testing, and adding) in the current project.
If the latest version of the API is in the published state, editing is not supported. The system will automatically create a new version based on the latest published version and automatically fill in the version number. After confirming that the version and version number are correct, click Confirm to enter the new API version page.
When the API version is in the submitted or draft state, you can directly enter the API edit page.
Test
Click the Test icon in the operation column to jump to the Development > API > API Test page. The system will automatically enter the latest testable version of the current API for testing (version is in the submitted or published state).
NoteIn the test environment, multiple API versions can coexist and be tested. Based on the test results of different API invocations, the one with better feedback will be published to the online application. For more information, see Step 1: Test API.
Version Management
Click the More icon in the operation column and select Version Management. In the Version Management panel, you can perform operations such as edit, test, version comparison, delete, and clone on different versions of the API.
NoteIf the API_ID of the downstream application invoking the API cannot be modified, after the data source or query conditions of the API change, you can develop and test through multiple versions, and then publish the new version to the production environment to overwrite the original version, avoiding adjustments on the downstream application side. For more information, see API Multi-Version Management.
Modify API Group
Click the More icon in the operation column and select Modify API Group. In the Modify API Group dialog box, select the API group and click Confirm.
Change Owner
Click the More icon in the operation column and select Change Owner. In the Change Owner dialog box, select User Account. You can transfer the API to other development users or project administrators in the project by clicking Confirm to change the owner.
Clone API
Click the More icon in the operation column and select Clone API. In the Clone API dialog box, select the version to be cloned and click Confirm to enter the new API page, where you can modify more information.
NoteCloning an API will clone all the information of the selected version of the API and create it as a new API. Since the API name is unique within the project, please modify the name of the newly created API to avoid being unable to submit the API.
The system defaults to the latest submitted (including published) version. Cloning an API supports cloning all status versions of the current API.
Delete
Click the More icon in the operation column and select Delete. If the API has no dependencies, click Confirm in the API Delete dialog box to delete it. If the API's permissions are authorized by an application or referenced by a composite API, you must revoke the permissions requested by the application or remove the reference to the API from the composite API before continuing to delete it.
API Multi-Version Management
Add New API Version
On the API list page, click Version Management in the operation list to open the Version Management panel.
In the Version Management panel, click Add New Version and configure the parameters.
Parameter
Description
Based On Existing Version
The most recent version is filled in by default, and you can select versions of all statuses of the current API.
Version Number
The version number is filled in by default and can be modified. Each API has a unique version number to facilitate comparison with the previous version information. The character limit is within 64, and the version number is unique under this API.
Click Confirm to proceed to the Add New API Version page and configure the parameter information.
After verifying that the information is correct, click Submit to complete the creation of the new API version. You can manage this API on the API list page.
Manage API Version
Area | Description |
①API Name | Displays the name of the current API. |
②List Area | Displays the version number, version status, creator, and update time information. |
③Operation Area | Different operations are supported for different status versions.
Operation details are as follows:
|