Skip to main content

Target API

This API allows managing targets.

Quick Startโ€‹

# List available operations
epilot target

# Call an operation
epilot target createTarget

Common Flagsโ€‹

FlagDescription
-p key=valueSet a named parameter
-d '{...}'Request body JSON
-H 'Key: Value'Custom header
-t, --token <token>Bearer token for authentication
--profile <name>Use a named profile
-s, --server <url>Override server base URL
-i, --includeInclude response headers in output
--jsonOutput raw JSON (no formatting)
-v, --verboseVerbose output (show request details)
--jsonata <expr>JSONata expression to transform response
--definition <file>Override OpenAPI spec file/URL
--guidedPrompt for all parameters interactively
--no-interactiveDisable interactive prompts

Operationsโ€‹

Target

  • createTarget โ€” Create a new target entity
  • getTarget โ€” Read a specific target entity by a given id
  • updateTarget โ€” Completly replace a specific target entity's properties by a given id and a given payload
  • patchTarget โ€” Partially update a specific target entity's properties by a given id and a given payload
  • deleteTarget โ€” Delete a specific target entity by a given id

createTargetโ€‹

Create a new target entity

POST /v1/target

Request Body (required)

Sample Call

epilot target createTarget

With request body:

epilot target createTarget \
-d '{
"_schema": "target",
"name": "string",
"description": "string",
"entity_schema": "string",
"entity_filters": {
"filter": {
"items": [
{
"key": "string",
"operator": "string",
"value": "string"
}
],
"combination": "string"
}
},
"_tags": ["string"],
"_purpose": ["string"],
"_files": {
"$relation": [
{
"entity_id": "123e4567-e89b-12d3-a456-426614174000",
"_tags": ["string"]
}
]
},
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
"__additional": {}
}'

Using stdin pipe:

cat body.json | epilot target createTarget

With JSONata filter:

epilot target createTarget --jsonata '$'
Sample Response
{
"_id": "123e4567-e89b-12d3-a456-426614174000",
"_schema": "target",
"_org": "string",
"_tags": ["string"],
"_files": {
"$relation": [
{
"entity_id": "123e4567-e89b-12d3-a456-426614174000",
"_tags": ["string"]
}
]
},
"_owners": [
{
"org_id": "123",
"user_id": "123"
}
],
"_title": "string",
"_created_at": "1970-01-01T00:00:00.000Z",
"_updated_at": "1970-01-01T00:00:00.000Z",
"_acl": {
"view": ["org:456"],
"edit": ["org:456"],
"delete": ["org:456"]
},
"name": "string",
"description": "string",
"entity_schema": "string",
"entity_filters": {
"filter": {
"items": [
{
"key": "string",
"operator": "string",
"value": "string"
}
],
"combination": "string"
}
},
"_purpose": ["string"],
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
"__additional": {}
}

getTargetโ€‹

Read a specific target entity by a given id

GET /v1/target/{targetId}

Parameters

NameInTypeRequiredDescription
targetIdpathstring (uuid)YesThe target id
hydratequerybooleanNoHydrates entities in relations when passed true
strictquerybooleanNoWhen passed true, the response will contain only fields that match the schema, with non-matching fields included in __additional

Sample Call

epilot target getTarget \
-p targetId=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot target getTarget 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot target getTarget -p targetId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'
Sample Response
{
"_id": "123e4567-e89b-12d3-a456-426614174000",
"_schema": "target",
"_org": "string",
"_tags": ["string"],
"_files": {
"$relation": [
{
"entity_id": "123e4567-e89b-12d3-a456-426614174000",
"_tags": ["string"]
}
]
},
"_owners": [
{
"org_id": "123",
"user_id": "123"
}
],
"_title": "string",
"_created_at": "1970-01-01T00:00:00.000Z",
"_updated_at": "1970-01-01T00:00:00.000Z",
"_acl": {
"view": ["org:456"],
"edit": ["org:456"],
"delete": ["org:456"]
},
"name": "string",
"description": "string",
"entity_schema": "string",
"entity_filters": {
"filter": {
"items": [
{
"key": "string",
"operator": "string",
"value": "string"
}
],
"combination": "string"
}
},
"_purpose": ["string"],
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
"__additional": {}
}

updateTargetโ€‹

Completly replace a specific target entity's properties by a given id and a given payload

PUT /v1/target/{targetId}

Parameters

NameInTypeRequiredDescription
targetIdpathstring (uuid)YesThe target id

Request Body (required)

Sample Call

epilot target updateTarget \
-p targetId=123e4567-e89b-12d3-a456-426614174000

With request body:

epilot target updateTarget \
-p targetId=123e4567-e89b-12d3-a456-426614174000 \
-d '{
"_schema": "target",
"name": "string",
"description": "string",
"entity_schema": "string",
"entity_filters": {
"filter": {
"items": [
{
"key": "string",
"operator": "string",
"value": "string"
}
],
"combination": "string"
}
},
"_tags": ["string"],
"_purpose": ["string"],
"_files": {
"$relation": [
{
"entity_id": "123e4567-e89b-12d3-a456-426614174000",
"_tags": ["string"]
}
]
},
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
"__additional": {}
}'

Using positional args for path parameters:

epilot target updateTarget 123e4567-e89b-12d3-a456-426614174000

Using stdin pipe:

cat body.json | epilot target updateTarget -p targetId=123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot target updateTarget -p targetId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'
Sample Response
{
"_id": "123e4567-e89b-12d3-a456-426614174000",
"_schema": "target",
"_org": "string",
"_tags": ["string"],
"_files": {
"$relation": [
{
"entity_id": "123e4567-e89b-12d3-a456-426614174000",
"_tags": ["string"]
}
]
},
"_owners": [
{
"org_id": "123",
"user_id": "123"
}
],
"_title": "string",
"_created_at": "1970-01-01T00:00:00.000Z",
"_updated_at": "1970-01-01T00:00:00.000Z",
"_acl": {
"view": ["org:456"],
"edit": ["org:456"],
"delete": ["org:456"]
},
"name": "string",
"description": "string",
"entity_schema": "string",
"entity_filters": {
"filter": {
"items": [
{
"key": "string",
"operator": "string",
"value": "string"
}
],
"combination": "string"
}
},
"_purpose": ["string"],
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
"__additional": {}
}

patchTargetโ€‹

Partially update a specific target entity's properties by a given id and a given payload

PATCH /v1/target/{targetId}

Parameters

NameInTypeRequiredDescription
targetIdpathstring (uuid)YesThe target id

Request Body (required)

Sample Call

epilot target patchTarget \
-p targetId=123e4567-e89b-12d3-a456-426614174000

With request body:

epilot target patchTarget \
-p targetId=123e4567-e89b-12d3-a456-426614174000 \
-d '{
"_schema": "target",
"name": "string",
"description": "string",
"entity_schema": "string",
"entity_filters": {
"filter": {
"items": [
{
"key": "string",
"operator": "string",
"value": "string"
}
],
"combination": "string"
}
},
"_tags": ["string"],
"_purpose": ["string"],
"_files": {
"$relation": [
{
"entity_id": "123e4567-e89b-12d3-a456-426614174000",
"_tags": ["string"]
}
]
},
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
"__additional": {}
}'

Using positional args for path parameters:

epilot target patchTarget 123e4567-e89b-12d3-a456-426614174000

Using stdin pipe:

cat body.json | epilot target patchTarget -p targetId=123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot target patchTarget -p targetId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'
Sample Response
{
"_id": "123e4567-e89b-12d3-a456-426614174000",
"_schema": "target",
"_org": "string",
"_tags": ["string"],
"_files": {
"$relation": [
{
"entity_id": "123e4567-e89b-12d3-a456-426614174000",
"_tags": ["string"]
}
]
},
"_owners": [
{
"org_id": "123",
"user_id": "123"
}
],
"_title": "string",
"_created_at": "1970-01-01T00:00:00.000Z",
"_updated_at": "1970-01-01T00:00:00.000Z",
"_acl": {
"view": ["org:456"],
"edit": ["org:456"],
"delete": ["org:456"]
},
"name": "string",
"description": "string",
"entity_schema": "string",
"entity_filters": {
"filter": {
"items": [
{
"key": "string",
"operator": "string",
"value": "string"
}
],
"combination": "string"
}
},
"_purpose": ["string"],
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
"__additional": {}
}

deleteTargetโ€‹

Delete a specific target entity by a given id

DELETE /v1/target/{targetId}

Parameters

NameInTypeRequiredDescription
targetIdpathstring (uuid)YesThe target id

Sample Call

epilot target deleteTarget \
-p targetId=123e4567-e89b-12d3-a456-426614174000

Using positional args for path parameters:

epilot target deleteTarget 123e4567-e89b-12d3-a456-426614174000

With JSONata filter:

epilot target deleteTarget -p targetId=123e4567-e89b-12d3-a456-426614174000 --jsonata '$'
Sample Response
{
"_id": "123e4567-e89b-12d3-a456-426614174000",
"_schema": "target",
"_org": "string",
"_tags": ["string"],
"_files": {
"$relation": [
{
"entity_id": "123e4567-e89b-12d3-a456-426614174000",
"_tags": ["string"]
}
]
},
"_owners": [
{
"org_id": "123",
"user_id": "123"
}
],
"_title": "string",
"_created_at": "1970-01-01T00:00:00.000Z",
"_updated_at": "1970-01-01T00:00:00.000Z",
"_acl": {
"view": ["org:456"],
"edit": ["org:456"],
"delete": ["org:456"]
},
"name": "string",
"description": "string",
"entity_schema": "string",
"entity_filters": {
"filter": {
"items": [
{
"key": "string",
"operator": "string",
"value": "string"
}
],
"combination": "string"
}
},
"_purpose": ["string"],
"_manifest": ["123e4567-e89b-12d3-a456-426614174000"],
"__additional": {}
}