Target API
- Base URL:
https://target.sls.epilot.io - API Docs: https://docs.epilot.io/api/target
This API allows managing targets.
Quick Startโ
# List available operations
epilot target
# Call an operation
epilot target createTarget
Common Flagsโ
| Flag | Description |
|---|---|
-p key=value | Set 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, --include | Include response headers in output |
--json | Output raw JSON (no formatting) |
-v, --verbose | Verbose output (show request details) |
--jsonata <expr> | JSONata expression to transform response |
--definition <file> | Override OpenAPI spec file/URL |
--guided | Prompt for all parameters interactively |
--no-interactive | Disable interactive prompts |
Operationsโ
Target
createTargetโ Create a new target entitygetTargetโ Read a specific target entity by a given idupdateTargetโ Completly replace a specific target entity's properties by a given id and a given payloadpatchTargetโ Partially update a specific target entity's properties by a given id and a given payloaddeleteTargetโ 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
targetId | path | string (uuid) | Yes | The target id |
hydrate | query | boolean | No | Hydrates entities in relations when passed true |
strict | query | boolean | No | When 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
targetId | path | string (uuid) | Yes | The 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
targetId | path | string (uuid) | Yes | The 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
targetId | path | string (uuid) | Yes | The 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": {}
}