Public API Specification
Welcome to the Flightdeck API by dope.security
. Modify custom categories, get endpoint statuses, and more via API! Stay tuned for upcoming updates that will enhance the capabilities and features of this API.
For details on how to create API client credentials please see API Client Credentials.
Use this API to generate an access token for use with the Flightdeck API. A valid access token returned from this API is required in all other Flightdeck API calls.
Token generation is based on the OAuth 2.0 Client Credentials Flow. The returned token is used within the HTTP Authorization header as follows:
Authorization: Bearer <access token>
Note:
- The required
client_id
andclient_secret
are created by an admin via the dope console. - Returned access tokens are valid for a limited time period. Clients must check the
expires_in
value in the response to generate a new access token before the current one expires. - The OAuth scopes parameter is not supported and if provided will be ignored. The scopes returned in the access token are set directly by the authorization server.
The type of grant requested. You must set this to client_credentials
Your application's Client ID.
Your application's Client Secret.
POST /v1/partner/oauth/token HTTP/1.1
Host: api.flightdeck.dope.security
Content-Type: application/json
Accept: */*
Content-Length: 77
{
"grant_type": "client_credentials",
"client_id": "text",
"client_secret": "text"
}
{
"access_token": "eyJz93a...k4laUWw",
"token_type": "bearer",
"expires_in": 3600
}
Generate Flightdeck API access tokens - Example
curl -X 'POST' \
'https://api.flightdeck.dope.security/v1/partner/oauth/token' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"grant_type": "client_credentials",
"client_id": "string",
"client_secret": "string"
}'
Use this API to get a list of all endpoints, or search for those matching a query parameter.
Note:
- To return a list of all endpoints do not include any additional parameter.
- Only one of the optional parameters is allowed to be specified per request.
- Results are returned in pages using cursor based pagination and ordered by the
lastSeen
property.
Broad search query across endpoints by device, user and email identities that contain this string (case-insensitive)
Search by email ids that contain this string (case-insensitive)
Search by device names that contain this string (case-insensitive)
Search by user ids that contain this string (case-insensitive). userId
for OIDC users is usually their email address.
Filter by this exact device OS version string
Filter by the fallback mode
Filter by this exact location id - with an underscore separating the case sensitive city and country values e.g. "City_Country"
Filter by this exact agent version
An optional pagination param that states the number of records requested from the start of the cursor
.
An optional pagination param that contains the current cursor
and indicates that records after the current cursor are requested.
The direction of the sort by the lastSeen
property. The default is to sort by descending
GET /v1/endpoints/search HTTP/1.1
Host: api.flightdeck.dope.security
Authorization: Bearer JWT
Accept: */*
{
"data": {
"pageInfo": {
"endCursor": "text",
"hasNextPage": true
},
"endpoints": [
{
"agentUUID": "10e68510c-0885-4943-a8b0-b6feb29a9f81",
"userUUID": "24c38805-1289-44fa-b974-2071a1702ba9",
"agentVersion": "1.0.00000",
"binaryType": "x86",
"cityName": "Cork",
"region": "Munster",
"countryName": "Ireland",
"cpuFamily": "Apple M1 Max",
"debugState": "1",
"deviceName": "Dope-MacBook-Pro.local",
"disableMode": false,
"errorMessage": "Agent is not running.",
"fallbackMode": false,
"configurationLastUpdated": "2023-10-10T10:10:00-0000",
"osVersion": "Mac13",
"policyName": "Base Policy",
"realtimeConnection": true,
"status": "healthy",
"lastSeen": "2023-10-10T10:10:00-0000",
"userId": "dope-user",
"emailId": "[email protected]"
}
]
}
}
List and Search Endpoints - Examples
List all endpoints
curl -X 'GET' \
'https://api.flightdeck.dope.security/v1/endpoints/search' \
-H 'accept: application/json' \
-H 'Authorization: Bearer access_token'
Search by email address
curl -X 'GET' \
'https://api.flightdeck.dope.security/v1/endpoints/search?emailId=string' \
-H 'accept: application/json' \
-H 'Authorization: Bearer access_token'
Use this API to add URLs to an existing custom category.
Specify the name of the custom category in the path parameter (custom_category_name
)
and provide a JSON array of URLs in the request body.
Ensure that URLs are properly formatted and included in the array.
The name of the custom category to add URLs to
POST /v1/custom_categories/{custom_category_name}/urls HTTP/1.1
Host: api.flightdeck.dope.security
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 48
{
"data": {
"urls": [
"dope.security",
"google.com"
]
}
}
No content
Add URLs to a Custom Category - Example
curl -X 'POST' \
'https://api.flightdeck.dope.security/v1/custom_categories/string/urls' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer access_token'
-d '{
"data": {
"urls": [
"dope.security",
"google.com"
]
}
}'
Use this API to delete a specific URL from an existing custom category.
Specify the name of the custom category in the path parameter (custom_category_name
).
Ensure that a given URL is encoded using URL encoding.
The name of the custom category to delete given URL from
The URL to be deleted (Ensure that URLs are properly URL-encoded using the UTF8 encoding method)
https%3A%2F%2Fdope.security
DELETE /v1/custom_categories/{custom_category_name}/url/{encoded_url} HTTP/1.1
Host: api.flightdeck.dope.security
Authorization: Bearer JWT
Accept: */*
No content
Delete a specific URL from a Custom Category - Example
curl -X 'DELETE' \
'https://api.flightdeck.dope.security/v1/custom_categories/some_category_name/url/url_encoded_string' \
-H 'accept: */*' \
-H 'Authorization: Bearer access_token'
Use this API to delete all URLs from an existing custom category.
Specify the name of the custom category in the path parameter (custom_category_name
).
This action will remove all URLs associated with the specified custom category.
The name of the custom category to delete all URLs from
DELETE /v1/custom_categories/{custom_category_name}/urls HTTP/1.1
Host: api.flightdeck.dope.security
Authorization: Bearer JWT
Accept: */*
No content
Delete All URLs from a Custom Category
curl -X 'DELETE' \
'https://api.flightdeck.dope.security/v1/custom_categories/string/urls' \
-H 'accept: */*' \
-H 'Authorization: Bearer access_token'
Use this API to get all URLs of an existing custom category.
The name of the custom category to get URLs from
GET /v1/custom_categories/{custom_category_name}/urls HTTP/1.1
Host: api.flightdeck.dope.security
Authorization: Bearer JWT
Accept: */*
{
"data": {
"urls": [
"dope.security",
"google.com"
]
}
}
curl -X 'GET' \
'https://api.flightdeck.dope.security/v1/custom_categories/some_category_name/urls' \
-H 'accept: */*' \
-H 'Authorization: Bearer access_token'
Last updated