RemotePC API, istekleri kabul eder ve yanıtları 'JSON' formatında döner. API'leri doğrulamak için IP beyaz listeleme ile birlikte API Anahtarı Kimlik Doğrulama mekanizması kullanılır. Tüm API'ler için, API Anahtarı yetkilendirme başlığında eklenmelidir.
Bayiler, web konsolunda hesapları için oluşturulan API Anahtarı'nı kullanarak API isteklerini gönderebilir.
API anahtarını almak için,
- Kendi RemotePC Bayi hesabınıza giriş yapın.
- Git Hesabım sekme ve tıklama API Anahtarları.
- Tıkla Görünüm, hesap şifresini girin ve tıklayın Görünüm.
- API Anahtarı görüntülenecektir. Tıklayın Anahtarı Kopyala panoya kopyalamak.
API Anahtarını değiştirmek için tıklayın Değiştir. Hesap şifresini girin ve tıklayın Görünüm yeni API anahtarını görüntülemek için.
1. Kullanıcı ekle
URL: https://web1.remotepc.com/rpc-api/reseller/private/user/add
Method-Type: POST
Request headers:
- Authorization: Bearer <api key>
- Content-type: application/json
Talep
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 yanıt kodları
200 (Success)
500 (Server Error)
400 (Invalid Parameters)
401 (Unauthorized)
403 (Invalid request)
Numune talep et
{
"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 hata ö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:
- İSİM_GEREKLİ,
- SOYADI_GEREKLI,
- E-POSTA_GEREKLİ,
- GEÇERLİ_BİR_E-POSTA_GİRİN,
- PAROLA_GEREKLI
- GEÇERSİZ_ŞİFRE
2. Kullanıcıları davet et
URL: https://web1.remotepc.com/rpc-api/reseller/private/user/invite
Method-Type: POST
Request headers:
- Authorization: Bearer <api key>
- Content-type: application/json
Talep
string invitedUserEmailId;
integer allotedComputers; //optional parameter, default is 0
HTTP yanıt kodları
200 (Success)
500 (Server Error)
400 (Invalid Parameters)
401 (Unauthorized)
403 (Invalid request)
Numune talep et
[
{
"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 hata ö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ı girişi
URL: https://web1.remotepc.com/rpc-api/reseller/private/user/signin
Method-Type: POST
Request headers:
- Authorization: Bearer <api key>
- Content-type: application/json
Talep
string username;
string password;
HTTP yanıt kodları
200 (Success)
500 (Server Error)
400 (Invalid Parameters)
401 (Unauthorized)
403 (Invalid request)
Numune talep et
{
"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 hata ö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
E-POSTA_GEREKLİ,
GEÇERSİZ_EMAIL,
PAROLA_GEREKLI
KULLANICI_ADI_GEREKLI
{
"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
Method-Type: POST
Request headers:
- Authorization: Bearer <api key>
- Content-type: application/json
HTTP yanıt kodları
200 (Success)
500 (Server Error)
401 (Unauthorized)
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 hata örneği
{
"status": "UNAUTHORIZED",
"code": 401,
"errorsCount": 1,
"errors": [
{
"description": "UNAUTHORIZED_ACCESS"
}
]
}
{
"status": "INTERNAL_SERVER_ERROR",
"code": 500,
"errorsCount": 1,
"errors": [
{
"description": "INTERNAL_SERVER_ERROR"
}
]
}