Auth-Sessions
Create AuthSession - Start
Start creating an AuthSession.
POST
/
{workspaceId}
/
projects
/
{projectName}
/
auth-sessions
/
create
CreateOrUpdateAuthSessionStart
import { IntunedClient } from "@intuned/client";
const client = new IntunedClient({
workspaceId: "123e4567-e89b-12d3-a456-426614174000",
apiKey: process.env["INTUNED_API_KEY"] ?? "",
});
async function run() {
const result = await client.projects.authSessions.create.start(
"my-project",
{
parameters: {
"param1": "value1",
"param2": 42,
"param3": true
},
},
);
console.log(result);
}
run();
from intuned_client import IntunedClient
from intuned_client import models
import os
with IntunedClient(
workspace_id="123e4567-e89b-12d3-a456-426614174000",
api_key=os.getenv("INTUNED_API_KEY", ""),
) as client:
res = client.projects.auth_sessions.create.start(
project_name="my-project",
body=models.AuthSessionsCreateStartRequestBody(
parameters={
"param1": "value1",
"param2": 42,
"param3": True,
},
id="auth-session-123",
proxy="http://username:password@proxy.example.com:8080",
createAttempts=3,
),
)
print(res)curl --request POST \
--url https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/auth-sessions/create \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"parameters": {
"username": "john.doe",
"password": "password"
},
"proxy": "http://proxy.example.com:8080",
"createAttempts": 3,
"checkAttempts": 3,
"saveTrace": true,
"requestTimeout": 60000
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
parameters: {username: 'john.doe', password: 'password'},
proxy: 'http://proxy.example.com:8080',
createAttempts: 3,
checkAttempts: 3,
saveTrace: true,
requestTimeout: 60000
})
};
fetch('https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/auth-sessions/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/auth-sessions/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'parameters' => [
'username' => 'john.doe',
'password' => 'password'
],
'proxy' => 'http://proxy.example.com:8080',
'createAttempts' => 3,
'checkAttempts' => 3,
'saveTrace' => true,
'requestTimeout' => 60000
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/auth-sessions/create"
payload := strings.NewReader("{\n \"parameters\": {\n \"username\": \"john.doe\",\n \"password\": \"password\"\n },\n \"proxy\": \"http://proxy.example.com:8080\",\n \"createAttempts\": 3,\n \"checkAttempts\": 3,\n \"saveTrace\": true,\n \"requestTimeout\": 60000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/auth-sessions/create")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"parameters\": {\n \"username\": \"john.doe\",\n \"password\": \"password\"\n },\n \"proxy\": \"http://proxy.example.com:8080\",\n \"createAttempts\": 3,\n \"checkAttempts\": 3,\n \"saveTrace\": true,\n \"requestTimeout\": 60000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/auth-sessions/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"parameters\": {\n \"username\": \"john.doe\",\n \"password\": \"password\"\n },\n \"proxy\": \"http://proxy.example.com:8080\",\n \"createAttempts\": 3,\n \"checkAttempts\": 3,\n \"saveTrace\": true,\n \"requestTimeout\": 60000\n}"
response = http.request(request)
puts response.read_body{
"status": "started",
"operationId": "aabbccddeeffggh"
}Authorizations
API Key used to authenticate your requests. How to create one.
Body
application/json
Create AuthSession input schema
The parameters to be passed to the API.
Example:
{ "param1": "value1", "param2": 42, "param3": true }
The unique identifier for the authentication session
Minimum string length:
3Pattern:
^[a-zA-Z0-9-(),_]+$Example:
"auth-session-123"
Proxy configuration for the job
Example:
"http://username:password@proxy.example.com:8080"
Number of attempts to create a new AuthSession if the current one is invalid or expired.
Example:
3
Number of attempts to check the validity of the AuthSession before recreating it.
Example:
3
⌘I
CreateOrUpdateAuthSessionStart
import { IntunedClient } from "@intuned/client";
const client = new IntunedClient({
workspaceId: "123e4567-e89b-12d3-a456-426614174000",
apiKey: process.env["INTUNED_API_KEY"] ?? "",
});
async function run() {
const result = await client.projects.authSessions.create.start(
"my-project",
{
parameters: {
"param1": "value1",
"param2": 42,
"param3": true
},
},
);
console.log(result);
}
run();
from intuned_client import IntunedClient
from intuned_client import models
import os
with IntunedClient(
workspace_id="123e4567-e89b-12d3-a456-426614174000",
api_key=os.getenv("INTUNED_API_KEY", ""),
) as client:
res = client.projects.auth_sessions.create.start(
project_name="my-project",
body=models.AuthSessionsCreateStartRequestBody(
parameters={
"param1": "value1",
"param2": 42,
"param3": True,
},
id="auth-session-123",
proxy="http://username:password@proxy.example.com:8080",
createAttempts=3,
),
)
print(res)curl --request POST \
--url https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/auth-sessions/create \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"parameters": {
"username": "john.doe",
"password": "password"
},
"proxy": "http://proxy.example.com:8080",
"createAttempts": 3,
"checkAttempts": 3,
"saveTrace": true,
"requestTimeout": 60000
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
parameters: {username: 'john.doe', password: 'password'},
proxy: 'http://proxy.example.com:8080',
createAttempts: 3,
checkAttempts: 3,
saveTrace: true,
requestTimeout: 60000
})
};
fetch('https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/auth-sessions/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/auth-sessions/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'parameters' => [
'username' => 'john.doe',
'password' => 'password'
],
'proxy' => 'http://proxy.example.com:8080',
'createAttempts' => 3,
'checkAttempts' => 3,
'saveTrace' => true,
'requestTimeout' => 60000
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/auth-sessions/create"
payload := strings.NewReader("{\n \"parameters\": {\n \"username\": \"john.doe\",\n \"password\": \"password\"\n },\n \"proxy\": \"http://proxy.example.com:8080\",\n \"createAttempts\": 3,\n \"checkAttempts\": 3,\n \"saveTrace\": true,\n \"requestTimeout\": 60000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/auth-sessions/create")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"parameters\": {\n \"username\": \"john.doe\",\n \"password\": \"password\"\n },\n \"proxy\": \"http://proxy.example.com:8080\",\n \"createAttempts\": 3,\n \"checkAttempts\": 3,\n \"saveTrace\": true,\n \"requestTimeout\": 60000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.intuned.io/api/v1/workspace/{workspaceId}/projects/{projectName}/auth-sessions/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"parameters\": {\n \"username\": \"john.doe\",\n \"password\": \"password\"\n },\n \"proxy\": \"http://proxy.example.com:8080\",\n \"createAttempts\": 3,\n \"checkAttempts\": 3,\n \"saveTrace\": true,\n \"requestTimeout\": 60000\n}"
response = http.request(request)
puts response.read_body{
"status": "started",
"operationId": "aabbccddeeffggh"
}