To Design an API ----设计一个API

This procedure covers one way to create a RAML-based API in Anypoint Platform. You can create a modern RAML-based API from an existing SOAP-based API or start with just an idea and design the API from start to finish using RAML. In this procedure, you design the API from start to finish.

这个过程,是创建API的一种方式,通过Anypoint Platform创建基于RAML的API。你可以根据一个既存的基于SOAP的API来创建一个新的基于RAML的API,或者仅仅根据一个创意使用RAML从头至尾设计一个API。

Prerequisites

前提条件

To create an API in Anypoint Platform, you need an account and permissions. If you do not have an account, you can sign up for a free account in the cloud.

为了在Anypoint Platform上创建一个API,你需要一个账号以及相应权限。如果你还没有账号,可以免费申请一个cloud账号。

https://anypoint.mulesoft.com/login/#/signin

申请网址

If you set up your account in the cloud, you have the permissions to create an API. If you’re using an organization’s account, you might not have these permissioons. You need API Creators and/or Organization Administrator access. To determine your access level, after logging into Anypoint Platform, click Access Management.

如果你创建了cloud账号,你会自动获得创建API的许可。如果你创建的是机构账号,可能没有相应的许可。需要API创建者和/或机构管理员工权限。你可以在登入Anypoint Platform后,点击权限管理查看你的权限等级。

In the Access Management screen, click Roles, and look for API Creators or Organization Administrator. If one or both of these roles are visible in the Roles listing, you can proceed. If you cannot see these roles, contact your site administrator before proceeding with this procedure.

在权限管理界面,点击Roles(角色),确认是否是API创建者(API Creators)或者机构管理员(Organization Administrator)。如果角色列表里两者都有或者有其中之一,你就可以继续后面的操作了。如果列表里没有这两个角色,联系你的相应的负责人为你设定相应的角色。

Create an API Definition and Build a RAML File

创建 一个API定义并且创建一个RAML文件

An API definition is the name of an API and its version that you specify in the API Manager.

API定义包含了在API Manger中区分API的API名称以及版本号。

1. After signing in to Anypoint Platform, set up the API.

登入Anypoint Platform后,设置API

2. Design the basic RAML API.

设计基本的RAML API。

3. Simulate calls to the API.

模拟对API的调用

转自:https://www.jianshu.com/p/da552654cf7f

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值