맞네요. ID_TOKEN 과 ACCESS_TOKEN 에 담긴 내용물이 유사하여 제가 잘못 기입했습니다.
죄송스럽게도 질문이 끝나지 않네요. 저의 시행착오가 다른 많은 분들께 도움이 되길 바라며, 하나 더 질문 좀 드리겠습니다.
이제, Consuming Cloud API 마지막의
https://platform.uipath.com/[account_logical_name]/[ service_instance_logical_name]/odata/Settings/UiPath.Server.Configuration.OData.GetLicense
결과를 바탕으로, Orchestrator 의 다양한 API 를 사용하고자 합니다.
예를 들어, https://orchestrator.uipath.com/v2019/reference#assets-requests
를 참고하여 Assets 을 가져오는 API 를 호출해보았습니다.
robotId 와 assetName 을 넘겨 주어야 하는데,
위에서 GetLicense 의 결과 데이터의 ID 와, 제가 클라우드에 등록해놓은 assetName 을 입력했습니다.
1.Request of GetRobotAsset
https://platform.uipath.com/odata/Assets/UiPath.Server.Configuration.OData.GetRobotAsset(robotId=‘10723’,assetName=‘PlatformLoginCredential’)
2.Response of GetLicense
{
"@odata.context": "https://platform.uipath.com/Seongwon/SeongwonDefrmpe54511/odata/$metadata#UiPath.Application.Dto.License.LicenseDto",
"HostLicenseId": null,
"Id": 10723,
"ExpireDate": 1623283199,
"AttendedConcurrent": false,
"DevelopmentConcurrent": false,
"IsRegistered": true,
"IsExpired": false,
"CreationTime": "2019-06-10T23:09:50.87Z",
"Code": "6108960a-9ef4-414b-8323-48a99868d236",
"Allowed": {
"Unattended": 1,
"Attended": 2,
"NonProduction": 0,
"Development": 2
},
"Used": {
"Unattended": 0,
"Attended": 1,
"NonProduction": 0,
"Development": 0
}
}
이에 대한 결과가 아래와 같은 오류로 반환됩니다.
{
"message": "Invalid robot key",
"errorCode": 1002,
"resourceIds": null
}
혹시, 로봇키는 다른 방법으로 얻어야 하는 것인지요?
저는 아래 세 가지로 각각 입력해보았습니다. (모두 실패)
- GetLicense 응답 데이터의 ID
- GetLicense 응답 데이터의 Code
- Machine Key