RemotePC API istekleri kabul eder ve yanıtları 'JSON' biçiminde döndürür. API'lerin kimliğini doğrulamak için IP beyaz listesiyle birlikte API Anahtarı Kimlik Doğrulama mekanizması kullanılır. Tüm API'ler için yetkilendirme başlığına API Anahtarı eklenmelidir.
Bayiler, web konsolunda hesapları için oluşturulan API Anahtarını kullanarak API isteklerini gönderebilirler.
API anahtarını almak için,
- RemotePC Bayi hesabınıza giriş yapın.
- Hesabım sekmesine gidin ve API Anahtarları'na tıklayın.
- Görüntüle'ye tıklayın, hesap parolasını girin ve Görüntüle'ye tıklayın.
- API Anahtarı görüntülenecektir. Panoya kopyalamak için Anahtarı Kopyala 'ya tıklayın.
API Anahtarını değiştirmek için Değiştir'e tıklayın. Hesap parolasını girin ve yeni API anahtarını görüntülemek için Görüntüle 'ye tıklayın.
1. Kullanıcı ekle
URL: https://web1.remotepc.com/rpc-api/reseller/private/user/add
Yöntem-Türü: POSTA
İstek başlıkları:
- Authorization: Bearer <api key>
- İçerik türü: application/json
İstek
string firstName;
string soyadı;
string invitedUserEmailId;
string şifre;
integer allotedComputers; //isteğe bağlı parametre, varsayılan değer 0
boolean sendEmailToUser; //kullanıcıya e-posta bildirimi isteğe bağlı bir parametredir
HTTP yanıt kodları
200 (Başarılı)
500 (Sunucu Hatası)
400 (Geçersiz Parametreler)
401 (Yetkisiz)
403 (Geçersiz istek)
Örnek talep edin
{
"firstName": "firstname",
"lastName": "lastname",
"invitedUserEmailId": "[email protected]",
"password": "password",
"allotedComputers": 1,
"sendEmailToUser": true
}
Yanıt
Yanıt başarı örneği
{
"status": "OK",
"code": 200,
"message": "SUCCESS"
}
Yanıt hatası örneği
{
"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 "
}
]
}
Açıklama şunları içerebilir:
- FIRSTNAME_REQUIRED,
- SOYADI_GEREKLI,
- EMAILID_REQUIRED,
- ENTER_VALID_EMAIL,
- PASSWORD_REQUIRED,
- INVALID_PASSWORD
2. Kullanıcıları davet edin
URL: https://web1.remotepc.com/rpc-api/reseller/private/user/invite
Yöntem-Türü: POSTA
İstek başlıkları:
- Authorization: Bearer <api key>
- İçerik türü: application/json
İstek
string invitedUserEmailId;
integer allotedComputers; //isteğe bağlı parametre, varsayılan değer 0
HTTP yanıt kodları
200 (Başarılı)
500 (Sunucu Hatası)
400 (Geçersiz Parametreler)
401 (Yetkisiz)
403 (Geçersiz istek)
Örnek talep edin
[
{
"invitedUserEmailId": "[email protected]",
"allotedComputers": 10
}
]
Yanıt başarı örneği
{
"status": "OK",
"code": 200,
"message": [
{
"username": "[email protected]",
"status": "ALREADY_INVITED"
},
{
"username": "[email protected]",
"status": "EXISTS"
},
{
"username": "[email protected]",
"status": "INVITED"
}
]
}
Yanıt hatası örneği
{
"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. Kullanıcı oturum açma
URL: https://web1.remotepc.com/rpc-api/reseller/private/user/signin
Yöntem-Türü: POSTA
İstek başlıkları:
- Authorization: Bearer <api key>
- İçerik türü: application/json
İstek
string kullanıcı adı;
string şifre;
HTTP yanıt kodları
200 (Başarılı)
500 (Sunucu Hatası)
400 (Geçersiz Parametreler)
401 (Yetkisiz)
403 (Geçersiz istek)
Örnek talep edin
{
"username": "username",
"password": "password"
}
Yanıt
Yanıt başarı örneği
{
"status": "OK",
"code": 200,
"message": {
"rpc_redirect_link":"https://login.remotepc.com/rpcnew/process/autologin/eyJhbGciOiJIUzUxMiJ9"
}
}
Not: Hesaba otomatik giriş yapmak için rpc_redirect_link kullanın.
Yanıt hatası örneği
{
"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"
}
]
}
Açıklama şunları içerebilir
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. Kullanıcı listesi
URL:https://web1.remotepc.com/rpc-api/reseller/private/user/list
Yöntem-Türü: POSTA
İstek başlıkları:
- Authorization: Bearer <api key>
- İçerik türü: application/json
HTTP yanıt kodları
200 (Başarılı)
500 (Sunucu Hatası)
401 (Yetkisiz)
Yanıt
Yanıt başarı örneği
{
"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]"
}
]
}
}
Yanıt hatası örneği
{
"status": "UNAUTHORIZED",
"code": 401,
"errorsCount": 1,
"errors": [
{
"description": "UNAUTHORIZED_ACCCESS"
}
]
}
{
"status": "INTERNAL_SERVER_ERROR",
"code": 500,
"errorsCount": 1,
"errors": [
{
"description": "INTERNAL_SERVER_ERROR"
}
]
}