Connect a participant to a network
Information
This API allow you to connect a participant to a network.
Link to swaggerThis endpoint is
synchronous
The role
admin
is needed in order to use this endpointEndpoints
POST/v1/config/participant/:participantId/network
Body parameters
networkIdentifierstring (enum) - Required
Request
POST /v1/config/participant/:participantId/network
- bash
- javascript
- .NET
curl -X 'POST'
'https://api.ppd.iopole.fr//v1/config/participant/f47ac10b-58cc-4372-a567-0e02b2c3d479/network'
-H 'accept: application/json'
-H 'Content-Type: application/json'
-d '{
"networkIdentifier": "DOMESTIC_FR"
const got = require('got');
(async () => {
try {
const response = await got.post('https://api.ppd.iopole.fr//v1/config/participant/f47ac10b-58cc-4372-a567-0e02b2c3d479/network', {
headers: {
'accept': 'application/json',
'Content-Type': 'application/json'
},
json: {
networkIdentifier: "DOMESTIC_FR"
},
responseType: 'json'
});
console.log(response.body);
} catch (error) {
console.error(error.response.body);
}
})();
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
namespace HttpClientExample
{
class Program
{
static async Task Main(string[] args)
{
using (var client = new HttpClient())
{
var url = "https://api.ppd.iopole.fr//v1/config/participant/f47ac10b-58cc-4372-a567-0e02b2c3d479/network";
var requestData = new {
networkIdentifier = "DOMESTIC_FR"
};
var json = Newtonsoft.Json.JsonConvert.SerializeObject(requestData);
var content = new StringContent(json, Encoding.UTF8, "application/json");
client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
var response = await client.PostAsync(url, content);
if (response.IsSuccessStatusCode)
{
var responseData = await response.Content.ReadAsStringAsync();
Console.WriteLine("Response: " + responseData);
}
else
{
Console.WriteLine("Error: " + response.StatusCode);
}
}
}
}
}
Response
201 Created
{
"type": "PARTICIPANT",
"id": "127cfd27-33de-4bb6-832c-4eaf7518e8b9"
}