Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mule 访问云中心API_Mule_Mule Studio_Mule Component_Cloudhub - Fatal编程技术网

Mule 访问云中心API

Mule 访问云中心API,mule,mule-studio,mule-component,cloudhub,Mule,Mule Studio,Mule Component,Cloudhub,/applications/{domain}/logs特征:基于环境的 检索应用程序的日志消息,按从最新到最旧的顺序排列 我正在尝试访问此api,但无法说明它要求的客户端id。此外,我无法与oauth身份验证联系起来。 我是mule新手。在使用CloudHub API或Anypoint平台API之前,您必须在Anypoint平台上创建帐户-检查Anypoint API平台的架构@ 在Anypoint API平台上完成注册后,您需要将用户、角色和权限设置为管理员- 作为管理员,您需要通过创建和

/applications/{domain}/logs特征:基于环境的 检索应用程序的日志消息,按从最新到最旧的顺序排列

我正在尝试访问此api,但无法说明它要求的客户端id。此外,我无法与oauth身份验证联系起来。
我是mule新手。

在使用CloudHub API或Anypoint平台API之前,您必须在Anypoint平台上创建帐户-检查Anypoint API平台的架构@

在Anypoint API平台上完成注册后,您需要将用户、角色和权限设置为管理员-

作为管理员,您需要通过创建和提供客户Id和客户机密来控制对API的访问-

我想那就是你所指的客户。它需要出现在所有API的请求中

就OAuth而言,它在Cloudhub API上并不完全起作用。你必须提出一张支持票。看看这个-

如果您是Mule新手,请浏览Mule简介视频,并尝试使用Anypoint Studio来体验Mulesoft应用程序


希望这有所帮助。

在使用CloudHub API或Anypoint平台API之前,您必须在Anypoint平台上创建帐户-检查Anypoint API平台的体系结构@

在Anypoint API平台上完成注册后,您需要将用户、角色和权限设置为管理员-

作为管理员,您需要通过创建和提供客户Id和客户机密来控制对API的访问-

我想那就是你所指的客户。它需要出现在所有API的请求中

就OAuth而言,它在Cloudhub API上并不完全起作用。你必须提出一张支持票。看看这个-

如果您是Mule新手,请浏览Mule简介视频,并尝试使用Anypoint Studio来体验Mulesoft应用程序


希望这有帮助。

来看看客户ID。登录到您的CloudHub帐户。单击右上角的“齿轮”图标。单击您所在组织的名称。您现在应该看到您的“clientID”和“ClientSecret”ID。

要查看clientID。登录到您的CloudHub帐户。单击右上角的“齿轮”图标。单击您所在组织的名称。您现在应该可以看到您的“clientID”和“ClientSecret”ID。

我正在分享从api访问应用程序详细信息的分步说明

步骤1:从Api获取访问令牌

https://anypoint.mulesoft.com/accounts/login?username=YOUR_USERNAME&password=YOUR_PASSWORD
注意:使用POST方法并添加标题Content Type=application/json

您将得到JSON格式的响应,如下所示

{
  "access_token": "44126898-7ed8-4453-8d28-skajnbf",
  "token_type": "bearer",
  "redirectUrl": "/home/"
}
"organization": {
  "name": "Sample",
  "id": "c1e68d1e-797d-47a5-b",
  "createdAt": "2016-11-29T09:45:27.903Z",
  "updatedAt": "2016-11-29T09:45:27.932Z",
  "ownerId": "68df9a5",
  "clientId": "7200350999564690",
  "domain": "******",
  "idprovider_id": "mulesoft",
  "isFederated": false,
  "parentOrganizationIds": [],
  "subOrganizationIds": [],
  "tenantOrganizationIds": [],
  "isMaster": true,
  "subscription": {
    "type": "Trial",
    "expiration": "2016-12-29T09:45:27.906Z"
  },
步骤2:获取组织id

https://anypoint.mulesoft.com/accounts/api/me
注意:使用GET方法并添加以下标题

内容类型=应用程序/json

授权=上面提到的承载访问权

Example : https://anypoint.mulesoft.com/accounts/api/organizations/c1e68d1e-797d-47a5-b/environments
示例:授权=承载44126898-7ed8-4453-8d28-skajnbf

在回复中,您将有一个部分,您将获得与组织相关的详细信息,如下所示

{
  "access_token": "44126898-7ed8-4453-8d28-skajnbf",
  "token_type": "bearer",
  "redirectUrl": "/home/"
}
"organization": {
  "name": "Sample",
  "id": "c1e68d1e-797d-47a5-b",
  "createdAt": "2016-11-29T09:45:27.903Z",
  "updatedAt": "2016-11-29T09:45:27.932Z",
  "ownerId": "68df9a5",
  "clientId": "7200350999564690",
  "domain": "******",
  "idprovider_id": "mulesoft",
  "isFederated": false,
  "parentOrganizationIds": [],
  "subOrganizationIds": [],
  "tenantOrganizationIds": [],
  "isMaster": true,
  "subscription": {
    "type": "Trial",
    "expiration": "2016-12-29T09:45:27.906Z"
  },
步骤3:获取环境详细信息

https://anypoint.mulesoft.com/accounts/api/organizations/YOUR_ORGANIZATION_ID_FROM_ABOVE/environments
https://anypoint.mulesoft.com/cloudhub/api/v2/applications/YOUR_CLOUDHUB_APP_NAME/logs
注意:使用GET方法并添加以下标题

内容类型=应用程序/json

授权=上面提到的承载访问权

Example : https://anypoint.mulesoft.com/accounts/api/organizations/c1e68d1e-797d-47a5-b/environments
您将在响应中获得JSON格式的所有可用环境,如下所示

{
  "data": [
    {
      "id": "042c933d-82ec-453c-99b2-asmbd",
      "name": "Production",
      "organizationId": "c1e68d1e-797d-47a5-b726-77asd",
      "isProduction": true
    }
  ],
  "total": 1
}
{
  "data": [
    {
      "loggerName": "Platform",
      "threadName": "system",
      "timestamp": 1480503796819,
      "message": "Deploying application to 1 workers.",
      "priority": "SYSTEM",
      "instanceId": "583eb1f1c4b27"
    },
    {
      "loggerName": "Platform",
      "threadName": "system",
      "timestamp": 1480503797404,
      "message": "Provisioning CloudHub worker...",
      "priority": "SYSTEM",
      "instanceId": "583eb1f1e4b27"
    }
  ],
  "total": 2
}
步骤4:现在指定域名并获取日志

https://anypoint.mulesoft.com/accounts/api/organizations/YOUR_ORGANIZATION_ID_FROM_ABOVE/environments
https://anypoint.mulesoft.com/cloudhub/api/v2/applications/YOUR_CLOUDHUB_APP_NAME/logs
示例:
https://anypoint.mulesoft.com/cloudhub/api/v2/applications/first-test-api-application/logs

注意:使用GET方法并添加以下标题

内容类型=应用程序/json

授权=上面提到的承载访问权

Example : https://anypoint.mulesoft.com/accounts/api/organizations/c1e68d1e-797d-47a5-b/environments
X-ANYPNT-ENV-ID=您在上面获得的环境ID

示例:X-ANYPNT-ENV-ID=042c933d-82ec-453c-99b2-asmbd

您将获得JSON格式的日志,如下所示

{
  "data": [
    {
      "id": "042c933d-82ec-453c-99b2-asmbd",
      "name": "Production",
      "organizationId": "c1e68d1e-797d-47a5-b726-77asd",
      "isProduction": true
    }
  ],
  "total": 1
}
{
  "data": [
    {
      "loggerName": "Platform",
      "threadName": "system",
      "timestamp": 1480503796819,
      "message": "Deploying application to 1 workers.",
      "priority": "SYSTEM",
      "instanceId": "583eb1f1c4b27"
    },
    {
      "loggerName": "Platform",
      "threadName": "system",
      "timestamp": 1480503797404,
      "message": "Provisioning CloudHub worker...",
      "priority": "SYSTEM",
      "instanceId": "583eb1f1e4b27"
    }
  ],
  "total": 2
}
注意:对于增强的日志记录,您应该选择适当的部署和实例ID,以类似的方式获取日志


希望这对初学者有所帮助

我正在分享从api访问应用程序详细信息的分步说明

步骤1:从Api获取访问令牌

https://anypoint.mulesoft.com/accounts/login?username=YOUR_USERNAME&password=YOUR_PASSWORD
注意:使用POST方法并添加标题Content Type=application/json

您将得到JSON格式的响应,如下所示

{
  "access_token": "44126898-7ed8-4453-8d28-skajnbf",
  "token_type": "bearer",
  "redirectUrl": "/home/"
}
"organization": {
  "name": "Sample",
  "id": "c1e68d1e-797d-47a5-b",
  "createdAt": "2016-11-29T09:45:27.903Z",
  "updatedAt": "2016-11-29T09:45:27.932Z",
  "ownerId": "68df9a5",
  "clientId": "7200350999564690",
  "domain": "******",
  "idprovider_id": "mulesoft",
  "isFederated": false,
  "parentOrganizationIds": [],
  "subOrganizationIds": [],
  "tenantOrganizationIds": [],
  "isMaster": true,
  "subscription": {
    "type": "Trial",
    "expiration": "2016-12-29T09:45:27.906Z"
  },
步骤2:获取组织id

https://anypoint.mulesoft.com/accounts/api/me
注意:使用GET方法并添加以下标题

内容类型=应用程序/json

授权=上面提到的承载访问权

Example : https://anypoint.mulesoft.com/accounts/api/organizations/c1e68d1e-797d-47a5-b/environments
示例:授权=承载44126898-7ed8-4453-8d28-skajnbf

在回复中,您将有一个部分,您将获得与组织相关的详细信息,如下所示

{
  "access_token": "44126898-7ed8-4453-8d28-skajnbf",
  "token_type": "bearer",
  "redirectUrl": "/home/"
}
"organization": {
  "name": "Sample",
  "id": "c1e68d1e-797d-47a5-b",
  "createdAt": "2016-11-29T09:45:27.903Z",
  "updatedAt": "2016-11-29T09:45:27.932Z",
  "ownerId": "68df9a5",
  "clientId": "7200350999564690",
  "domain": "******",
  "idprovider_id": "mulesoft",
  "isFederated": false,
  "parentOrganizationIds": [],
  "subOrganizationIds": [],
  "tenantOrganizationIds": [],
  "isMaster": true,
  "subscription": {
    "type": "Trial",
    "expiration": "2016-12-29T09:45:27.906Z"
  },
步骤3:获取环境详细信息

https://anypoint.mulesoft.com/accounts/api/organizations/YOUR_ORGANIZATION_ID_FROM_ABOVE/environments
https://anypoint.mulesoft.com/cloudhub/api/v2/applications/YOUR_CLOUDHUB_APP_NAME/logs
注意:使用GET方法并添加以下标题

内容类型=应用程序/json

授权=上面提到的承载访问权

Example : https://anypoint.mulesoft.com/accounts/api/organizations/c1e68d1e-797d-47a5-b/environments
您将在响应中获得JSON格式的所有可用环境,如下所示

{
  "data": [
    {
      "id": "042c933d-82ec-453c-99b2-asmbd",
      "name": "Production",
      "organizationId": "c1e68d1e-797d-47a5-b726-77asd",
      "isProduction": true
    }
  ],
  "total": 1
}
{
  "data": [
    {
      "loggerName": "Platform",
      "threadName": "system",
      "timestamp": 1480503796819,
      "message": "Deploying application to 1 workers.",
      "priority": "SYSTEM",
      "instanceId": "583eb1f1c4b27"
    },
    {
      "loggerName": "Platform",
      "threadName": "system",
      "timestamp": 1480503797404,
      "message": "Provisioning CloudHub worker...",
      "priority": "SYSTEM",
      "instanceId": "583eb1f1e4b27"
    }
  ],
  "total": 2
}
步骤4:现在指定域名并获取日志

https://anypoint.mulesoft.com/accounts/api/organizations/YOUR_ORGANIZATION_ID_FROM_ABOVE/environments
https://anypoint.mulesoft.com/cloudhub/api/v2/applications/YOUR_CLOUDHUB_APP_NAME/logs
示例:
https://anypoint.mulesoft.com/cloudhub/api/v2/applications/first-test-api-application/logs

注意:使用GET方法并添加以下标题

内容类型=应用程序/json

授权=上面提到的承载访问权

Example : https://anypoint.mulesoft.com/accounts/api/organizations/c1e68d1e-797d-47a5-b/environments
X-ANYPNT-ENV-ID=您在上面获得的环境ID

示例:X-ANYPNT-ENV-ID=042c933d-82ec-453c-99b2-asmbd

您将获得JSON格式的日志,如下所示

{
  "data": [
    {
      "id": "042c933d-82ec-453c-99b2-asmbd",
      "name": "Production",
      "organizationId": "c1e68d1e-797d-47a5-b726-77asd",
      "isProduction": true
    }
  ],
  "total": 1
}
{
  "data": [
    {
      "loggerName": "Platform",
      "threadName": "system",
      "timestamp": 1480503796819,
      "message": "Deploying application to 1 workers.",
      "priority": "SYSTEM",
      "instanceId": "583eb1f1c4b27"
    },
    {
      "loggerName": "Platform",
      "threadName": "system",
      "timestamp": 1480503797404,
      "message": "Provisioning CloudHub worker...",
      "priority": "SYSTEM",
      "instanceId": "583eb1f1e4b27"
    }
  ],
  "total": 2
}
注意:对于增强的日志记录,您应该选择适当的部署和实例ID,以类似的方式获取日志

希望这对初学者有帮助