RemotePC API accepteert verzoeken en retourneert antwoorden in het 'JSON'-formaat. Het API-sleutel authenticatiemechanisme wordt gebruikt samen met IP-whitelisting om de API's te verifiëren. Voor alle API's moet de API-sleutel worden toegevoegd in de autorisatieheader.
Resellers kunnen de API-verzoeken verzenden met de API-sleutel die voor hun account in de webconsole is gegenereerd.
Om de API-sleutel te krijgen,
- Log in op uw RemotePC Reseller-account.
- Ga naar Mijn account tab en klik API-sleutels.
- Klik Bekijken, voer het accountwachtwoord in en klik Bekijken.
- De API-sleutel wordt weergegeven. Klik Kopieer sleutel om naar het klembord te kopiëren
Om de API-sleutel te wijzigen, klik Veranderen. Voer het accountwachtwoord in en klik Bekijken om de nieuwe API-sleutel te bekijken.
1. Gebruiker toevoegen
URL: https://web1.remotepc.com/rpc-api/reseller/private/user/add
Method-Type: POST
Request headers:
- Authorization: Bearer <api key>
- Content-type: application/json
Verzoek
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-responscodes
200 (Success)
500 (Server Error)
400 (Invalid Parameters)
401 (Unauthorized)
403 (Invalid request)
Vraag een monster aan
{
"firstName": "firstname",
"lastName": "lastname",
"invitedUserEmailId": "[email protected]",
"password": "password",
"allotedComputers": 1,
"sendEmailToUser": true
}
Reactie
Respons succes voorbeeld
{
"status": "OK",
"code": 200,
"message": "SUCCESS"
}
Voorbeeld van respondfout
{
"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 "
}
]
}
Beschrijving kan bevatten:
- VOORNAAM_VEREIST,
- ACHTERNAAM_VEREIST,
- EMAILID_VERPLICHT
- VOER_GELDIG_EMAIL_IN,
- WACHTWOORD_VEREIST,
- ONGELDIG_WACHTWOORD
2. Nodig gebruikers uit
URL: https://web1.remotepc.com/rpc-api/reseller/private/user/invite
Method-Type: POST
Request headers:
- Authorization: Bearer <api key>
- Content-type: application/json
Verzoek
string invitedUserEmailId;
integer allotedComputers; //optional parameter, default is 0
HTTP-responscodes
200 (Success)
500 (Server Error)
400 (Invalid Parameters)
401 (Unauthorized)
403 (Invalid request)
Vraag een monster aan
[
{
"invitedUserEmailId": "[email protected]",
"allotedComputers": 10
}
]
Respons succes voorbeeld
{
"status": "OK",
"code": 200,
"message": [
{
"username": "[email protected]",
"status": "ALREADY_INVITED"
},
{
"username": "[email protected]",
"status": "EXISTS"
},
{
"username": "[email protected]",
"status": "INVITED"
}
]
}
Voorbeeld van respondfout
{
"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. Gebruiker aanmelden
URL: https://web1.remotepc.com/rpc-api/reseller/private/user/signin
Method-Type: POST
Request headers:
- Authorization: Bearer <api key>
- Content-type: application/json
Verzoek
string username;
string password;
HTTP-responscodes
200 (Success)
500 (Server Error)
400 (Invalid Parameters)
401 (Unauthorized)
403 (Invalid request)
Vraag een monster aan
{
"username": "username",
"password": "password"
}
Reactie
Respons succes voorbeeld
{
"status": "OK",
"code": 200,
"message": {
"rpc_redirect_link":"https://login.remotepc.com/rpcnew/process/autologin/eyJhbGciOiJIUzUxMiJ9"
}
}
Opmerking: Gebruik rpc_redirect_link om automatisch in te loggen op het account.
Voorbeeld van respondfout
{
"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"
}
]
}
Beschrijving kan omvatten
EMAILID_VERPLICHT
ONGELDIG_EMAIL,
WACHTWOORD_VEREIST,
GEBRUIKERSNAAM_VEREIST
{
"status": "UNAUTHORIZED",
"code": 401,
"errorsCount": 1,
"errors": [
{
"description": "NOT_AUTHORIZED"
}
]
}
{
"status": "INTERNAL_SERVER_ERROR",
"code": 500,
"errorsCount": 1,
"errors": [
{
"description": "INTERNAL_SERVER_ERROR"
}
]
}
4. Gebruikerslijst
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-responscodes
200 (Success)
500 (Server Error)
401 (Unauthorized)
Reactie
Respons succes voorbeeld
{
"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]"
}
]
}
}
Voorbeeld van respondfout
{
"status": "UNAUTHORIZED",
"code": 401,
"errorsCount": 1,
"errors": [
{
"description": "UNAUTHORIZED_ACCESS"
}
]
}
{
"status": "INTERNAL_SERVER_ERROR",
"code": 500,
"errorsCount": 1,
"errors": [
{
"description": "INTERNAL_SERVER_ERROR"
}
]
}