RemotePC APIはリクエストを受け付け、レスポンスを「JSON」形式で返します。API認証にはAPIキー認証機構とIPホワイトリストが使用されます。すべてのAPIで、APIキーを認証ヘッダーに追加する必要があります。
リセラーは、ウェブコンソールで自分のアカウント用に生成されたAPIキーを使用してAPIリクエストを送信できます。
APIキーを取得するには、
- RemotePCリセラーアカウントにログインします。
- マイアカウントタブに移動し、APIキーをクリックします。
- 表示をクリックし、アカウントのパスワードを入力して表示をクリックします。
- APIキーが表示されます。キーをコピーをクリックしてクリップボードにコピーします。
APIキーを変更するには、変更をクリックします。アカウントのパスワードを入力し、表示をクリックして新しいAPIキーを表示します。
1. ユーザー追加
URL:https://web1.remotepc.com/rpc-api/reseller/private/user/add
Method-Type: POST
Request headers:
- Authorization: Bearer <api key>
- Content-type: application/json
リクエスト
string firstName;
string lastName;
string invitedUserEmailId;
string password;
integer allotedComputers; //optional parameter, default is 0
boolean sendEmailToUser; //email notification to user is an optional parameter
HTTPレスポンスコード
200 (Success)
500 (Server Error)
400 (Invalid Parameters)
401 (Unauthorized)
403 (Invalid request)
リクエストサンプル
{
"firstName": "firstname",
"lastName": "lastname",
"invitedUserEmailId": "[email protected]",
"password": "password",
"allotedComputers": 1,
"sendEmailToUser": true
}
レスポンス
レスポンス成功例
{
"status": "OK",
"code": 200,
"message": "SUCCESS"
}
レスポンスエラー例e
{
"status": "BAD_REQUEST",
"code": 400,
"errorsCount": 1,
"errors": [
{
"description": "EMAIL_EXISTS"
}
]
}
{
"status": "UNAUTHORIZED",
"code": 401,
"errorsCount": 1,
"errors": [
{
"description": "NOT_AUTHORIZED"
}
]
}
{
"status": "INTERNAL_SERVER_ERROR",
"code": 500,
"errorsCount": 1,
"errors": [
{
"description": "INTERNAL_SERVER_ERROR"
}
]
}
{
"status": "Forbidden",
"code": 403,
"errorsCount": 1,
"errors": [
{
"description": "Forbidden "
}
]
}
説明には以下が含まれる場合があります:
- FIRSTNAME_REQUIRED,
- LASTNAME_REQUIRED,
- EMAILID_REQUIRED,
- ENTER_VALID_EMAIL,
- PASSWORD_REQUIRED,
- INVALID_PASSWORD
2. ユーザー招待
URL:https://web1.remotepc.com/rpc-api/reseller/private/user/invite
Method-Type: POST
Request headers:
- Authorization: Bearer <api key>
- Content-type: application/json
リクエスト
string invitedUserEmailId;
integer allotedComputers; //optional parameter, default is 0
HTTPレスポンスコード
200 (Success)
500 (Server Error)
400 (Invalid Parameters)
401 (Unauthorized)
403 (Invalid request)
リクエストサンプル
[
{
"invitedUserEmailId": "[email protected]",
"allotedComputers": 10
}
]
レスポンス成功例
{
"status": "OK",
"code": 200,
"message": [
{
"username": "[email protected]",
"status": "ALREADY_INVITED"
},
{
"username": "[email protected]",
"status": "EXISTS"
},
{
"username": "[email protected]",
"status": "INVITED"
}
]
}
Response error のサンプル
{
"status": "UNAUTHORIZED",
"code": 401,
"errorsCount": 1,
"errors": [
{
"description": "NOT_AUTHORIZED"
}
]
}
{
"status": "INTERNAL_SERVER_ERROR",
"code": 500,
"errorsCount": 1,
"errors": [
{
"description": "INTERNAL_SERVER_ERROR"
}
]
}
{
"status": "Forbidden",
"code": 403,
"errorsCount": 1,
"errors": [
{
"description": "Forbidden "
}
]
}
3. ユーザーサインイン
URL:https://web1.remotepc.com/rpc-api/reseller/private/user/signin
Method-Type: POST
Request headers:
- Authorization: Bearer <api key>
- Content-type: application/json
リクエスト
string username;
string password;
HTTPレスポンスコード
200 (Success)
500 (Server Error)
400 (Invalid Parameters)
401 (Unauthorized)
403 (Invalid request)
リクエストサンプル
{
"username": "username",
"password": "password"
}
レスポンス
レスポンス成功例
{
"status": "OK",
"code": 200,
"message": {
"rpc_redirect_link":"https://login.remotepc.com/rpcnew/process/autologin/eyJhbGciOiJIUzUxMiJ9"
}
}
注意: rpc_redirect_link を使用してアカウントに自動ログインできます。
レスポンスエラー例
{
"status": "BAD_REQUEST",
"code": 400,
"errorsCount": 1,
"errors": [
{
"description": "USERNAME_DOES_NOT_EXIST"
}
]
}
{
"status": "BAD_REQUEST",
"code": 400,
"errorsCount": 1,
"errors": [
{
"description": "ACTION_PARENT_ACCOUNT_SUSPENDED"
}
]
}
{
"status": "BAD_REQUEST",
"code": 400,
"errorsCount": 1,
"errors": [
{
"description": "IP_ADDRESS_BLOCKED"
}
]
}
{
"status": "BAD_REQUEST",
"code": 400,
"errorsCount": 1,
"errors": [
{
"description": "CANCELLED_ACCOUNT"
}
]
}
Description には以下が含まれる場合があります
EMAILID_REQUIRED,
INVALID_EMAIL,
PASSWORD_REQUIRED,
USERNAME_REQUIRED
{
"status": "UNAUTHORIZED",
"code": 401,
"errorsCount": 1,
"errors": [
{
"description": "NOT_AUTHORIZED"
}
]
}
{
"status": "INTERNAL_SERVER_ERROR",
"code": 500,
"errorsCount": 1,
"errors": [
{
"description": "INTERNAL_SERVER_ERROR"
}
]
}
4. ユーザー一覧
URL:https://web1.remotepc.com/rpc-api/reseller/private/user/list
Method-Type: POST
Request headers:
- Authorization: Bearer <api key>
- Content-type: application/json
HTTPレスポンスコード
200 (Success)
500 (Server Error)
401 (Unauthorized)
レスポンス
レスポンス成功例
{
"status": "OK",
"code": 200,
"message":{
"resellerUsersList": [
{
"alloted_computers": 1,
"created_date": "01-13-2023",
"isActive": true,
"utilized_computers": 0,
"username": "[email protected]"
},
{
"alloted_computers": 1,
"created_date": "01-13-2023",
"isActive": true,
"utilized_computers": 0,
"username": "[email protected]"
},
{
"alloted_computers": 0,
"created_date": "01-15-2023",
"isActive": true,
"utilized_computers": 0,
"username": "[email protected]"
},
{
"alloted_computers": 0,
"created_date": "01-15-2023",
"isActive": true,
"utilized_computers": 0,
"username": "[email protected]"
},
{
"alloted_computers": 0,
"created_date": "01-15-2023",
"isActive": true,
"utilized_computers": 0,
"username": "[email protected]"
},
{
"alloted_computers": 425,
"created_date": "01-25-2023",
"isActive": true,
"utilized_computers": 0,
"username": "[email protected]"
}
]
}
}
レスポンスエラー例
{
"status": "UNAUTHORIZED",
"code": 401,
"errorsCount": 1,
"errors": [
{
"description": "UNAUTHORIZED_ACCESS"
}
]
}
{
"status": "INTERNAL_SERVER_ERROR",
"code": 500,
"errorsCount": 1,
"errors": [
{
"description": "INTERNAL_SERVER_ERROR"
}
]
}