user
4 Methoden verfügbar
Keine Methoden gefunden für ""
Returns all users of the given mandator
Rückgabewert
| Feld | Typ |
|---|---|
| item | EvalancheUser |
PHP Implementierung anzeigen
<?php
/**
* Returns all users of the given mandator
* Service: user
* @return ArrayOfEvalancheUser
* Felder:
* - item (EvalancheUser)
*/
$wsdlUrl = 'https://scnem.com/soap.php/wsdl/user';
$username = 'DEIN_USERNAME';
$password = 'DEIN_PASSWORD';
$options = [
'login' => $username,
'password' => $password,
'trace' => true,
'exceptions' => true,
];
try {
$client = new SoapClient($wsdlUrl, $options);
// Parameter
$params = [
'mandator_id' => 0, // int
];
$result = $client->getAll($params);
// Rückgabewert: ArrayOfEvalancheUser
// $result->item (EvalancheUser)
print_r($result);
} catch (SoapFault $e) {
echo 'SOAP Fehler: ' . $e->getMessage();
}
XML SOAP Request anzeigen
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tns:getAll xmlns:tns="https://scnem.com/soap.php/wsdl/user">
<mandator_id>0</mandator_id> <!-- int, optional -->
</tns:getAll>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
HTTP Header:
Content-Type: text/xml; charset=utf-8
SOAPAction: "https://scnem.com/soap.php/wsdl/user#getAll"
Authorization: Basic {base64(username:password)}
Returns user with given username
Rückgabewert
| Feld | Typ |
|---|---|
| id | int |
| mandator_id | int |
| username | string |
| string | |
| salutation | int |
| firstname | string |
| name | string |
| description | string |
| security_guideline_id | int |
| role_ids | ArrayOfInt |
| disabled | boolean |
| password | string |
PHP Implementierung anzeigen
<?php
/**
* Returns user with given username
* Service: user
* @return EvalancheUser
* Felder:
* - id (int)
* - mandator_id (int)
* - username (string)
* - email (string)
* - salutation (int)
* - firstname (string)
* - name (string)
* - description (string)
* - security_guideline_id (int)
* - role_ids (ArrayOfInt)
* - disabled (boolean)
* - password (string)
*/
$wsdlUrl = 'https://scnem.com/soap.php/wsdl/user';
$username = 'DEIN_USERNAME';
$password = 'DEIN_PASSWORD';
$options = [
'login' => $username,
'password' => $password,
'trace' => true,
'exceptions' => true,
];
try {
$client = new SoapClient($wsdlUrl, $options);
// Parameter
$params = [
'username' => '', // string (required)
];
$result = $client->getByUsername($params);
// Rückgabewert: EvalancheUser
// $result->id (int)
// $result->mandator_id (int)
// $result->username (string)
// $result->email (string)
// $result->salutation (int)
// $result->firstname (string)
// $result->name (string)
// $result->description (string)
// $result->security_guideline_id (int)
// $result->role_ids (ArrayOfInt)
// $result->disabled (boolean)
// $result->password (string)
print_r($result);
} catch (SoapFault $e) {
echo 'SOAP Fehler: ' . $e->getMessage();
}
XML SOAP Request anzeigen
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tns:getByUsername xmlns:tns="https://scnem.com/soap.php/wsdl/user">
<username></username> <!-- string, required -->
</tns:getByUsername>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
HTTP Header:
Content-Type: text/xml; charset=utf-8
SOAPAction: "https://scnem.com/soap.php/wsdl/user#getByUsername"
Authorization: Basic {base64(username:password)}
Updates a user. If the id is set to 0, a new user will be created.
Rückgabewert
| Feld | Typ |
|---|---|
| id | int |
| mandator_id | int |
| username | string |
| string | |
| salutation | int |
| firstname | string |
| name | string |
| description | string |
| security_guideline_id | int |
| role_ids | ArrayOfInt |
| disabled | boolean |
| password | string |
PHP Implementierung anzeigen
<?php
/**
* Updates a user. If the id is set to 0, a new user will be created.
* Service: user
* @return EvalancheUser
* Felder:
* - id (int)
* - mandator_id (int)
* - username (string)
* - email (string)
* - salutation (int)
* - firstname (string)
* - name (string)
* - description (string)
* - security_guideline_id (int)
* - role_ids (ArrayOfInt)
* - disabled (boolean)
* - password (string)
*/
$wsdlUrl = 'https://scnem.com/soap.php/wsdl/user';
$username = 'DEIN_USERNAME';
$password = 'DEIN_PASSWORD';
$options = [
'login' => $username,
'password' => $password,
'trace' => true,
'exceptions' => true,
];
try {
$client = new SoapClient($wsdlUrl, $options);
// Parameter
$params = [
'user' => '', // tns:EvalancheUser (required)
];
$result = $client->update($params);
// Rückgabewert: EvalancheUser
// $result->id (int)
// $result->mandator_id (int)
// $result->username (string)
// $result->email (string)
// $result->salutation (int)
// $result->firstname (string)
// $result->name (string)
// $result->description (string)
// $result->security_guideline_id (int)
// $result->role_ids (ArrayOfInt)
// $result->disabled (boolean)
// $result->password (string)
print_r($result);
} catch (SoapFault $e) {
echo 'SOAP Fehler: ' . $e->getMessage();
}
XML SOAP Request anzeigen
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tns:update xmlns:tns="https://scnem.com/soap.php/wsdl/user">
<user></user> <!-- tns:EvalancheUser, required -->
</tns:update>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
HTTP Header:
Content-Type: text/xml; charset=utf-8
SOAPAction: "https://scnem.com/soap.php/wsdl/user#update"
Authorization: Basic {base64(username:password)}
Test if the API is available and used credentials are valid. The result's property `random_message` has absolutely *no* relevance as the values are randomly taken from http://whatthecommit.com
Rückgabewert
| Feld | Typ |
|---|---|
| status | string |
| random_message | string |
PHP Implementierung anzeigen
<?php
/**
* Test if the API is available and used credentials are valid. The result's property `random_message` has absolutely *no* relevance as the values are randomly taken from http://whatthecommit.com
* Service: user
* @return IsAliveResult
* Felder:
* - status (string)
* - random_message (string)
*/
$wsdlUrl = 'https://scnem.com/soap.php/wsdl/user';
$username = 'DEIN_USERNAME';
$password = 'DEIN_PASSWORD';
$options = [
'login' => $username,
'password' => $password,
'trace' => true,
'exceptions' => true,
];
try {
$client = new SoapClient($wsdlUrl, $options);
// Parameter
$params = [
'isAliveResult' => '', // tns:IsAliveResult (required)
];
$result = $client->isAlive($params);
// Rückgabewert: IsAliveResult
// $result->status (string)
// $result->random_message (string)
print_r($result);
} catch (SoapFault $e) {
echo 'SOAP Fehler: ' . $e->getMessage();
}
XML SOAP Request anzeigen
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<tns:isAlive xmlns:tns="https://scnem.com/soap.php/wsdl/user">
<isAliveResult></isAliveResult> <!-- tns:IsAliveResult, required -->
</tns:isAlive>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
HTTP Header:
Content-Type: text/xml; charset=utf-8
SOAPAction: "https://scnem.com/soap.php/wsdl/user#isAlive"
Authorization: Basic {base64(username:password)}