Creates one 30-minute one-time Agent enrollment code.
POST
/api/workspace/file-protection/agents/enrollments
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://example.com/api/workspace/file-protection/agents/enrollments"), Headers = { { "Authorization", "Bearer <token>" }, }, Content = new StringContent("{ \"OperatingSystem\": 0 }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}const url = 'https://example.com/api/workspace/file-protection/agents/enrollments';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"OperatingSystem":0}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/workspace/file-protection/agents/enrollments \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "OperatingSystem": 0 }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”access_token
string
Optional access token for clients that cannot set Authorization headers. Prefer Authorization: Bearer <token> when possible.
Request Body
Section titled “Request Body”Creates one 30-minute one-time enrollment code.
object
OperatingSystem
Operating systems supported by the universal File Protection tools.
integer format: int32
Creates one 30-minute one-time enrollment code.
object
OperatingSystem
Operating systems supported by the universal File Protection tools.
integer format: int32
Creates one 30-minute one-time enrollment code.
object
OperatingSystem
Operating systems supported by the universal File Protection tools.
integer format: int32
Responses
Section titled “Responses”OK
Media typeapplication/json
object
Data
One-time Agent enrollment delivery.
object
EnrollmentId
string
Code
string
ExpiresAtUtc
string format: date-time
WindowsDownloadUrl
string format: uri
LinuxDownloadUrl
string format: uri
Sources
Array<object>
OS-specific Agent mapping example for one existing logical source.
object
SourceId
string
DisplayName
string
ConfigurationSnippet
string
TargetAgentId
Existing Agent identity replaced by this enrollment, absent for a new connection.
string
AgentRowVersion
Current lifecycle version after replacing the connection.
string format: uuid
Errors
Array<object>
object
Code
required
string
Message
required
string
Target
string
Field
string
Metadata
object
key
additional properties
string
Type
integer format: int32
Severity
integer format: int32
Warnings
Array<object>
object
Code
required
string
Message
required
string
Target
string
Field
string
Metadata
object
key
additional properties
string
Type
integer format: int32
Severity
integer format: int32
Success
boolean
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}