AdminService¶
This is the API for product facing admin features. Not internal admin.
CreateKey¶
Creates an API key or SDK key for the authenticated user.
Request:
Response:
Example CURL¶
Bash
curl -X POST https://api.bitdrift.io/bitdrift.public.unary.admin.v1.AdminService/CreateKey \
-H "x-bitdrift-api-key: <key>" \
-H "Content-Type: application/json" \
-d '{
"name": "My Workflow",
"sdk_key": {
"app_id_postfix": "com.example.app",
"bundle_id_regex": "com.example.*"
}
}'
Example Response¶
JSON
{
"key": {
"created_at": "2024-01-15T09:30:00Z",
"expires_at": "2024-01-15T09:30:00Z",
"id": 1,
"name": "My Workflow",
"revoked": false,
"sdk_key": {
"app_id_postfix": "com.example.app",
"bundle_id_regex": "com.example.*",
"key": "example-key"
}
}
}
DeleteConnector¶
Delete a connector for the calling account.
Request:
Response:
Example CURL¶
Bash
curl -X POST https://api.bitdrift.io/bitdrift.public.unary.admin.v1.AdminService/DeleteConnector \
-H "x-bitdrift-api-key: <key>" \
-H "Content-Type: application/json" \
-d '{
"name": "example-connector"
}'
Example Response¶
JSON
{}
GetConnectors¶
Gets all connectors for the calling account.
Request:
Response:
Example CURL¶
Bash
curl -X POST https://api.bitdrift.io/bitdrift.public.unary.admin.v1.AdminService/GetConnectors \
-H "x-bitdrift-api-key: <key>" \
-H "Content-Type: application/json" \
-d '{}'
Example Response¶
JSON
{
"connectors": [
{
"cloudwatch_connector_config": {
"region": "us-east-1",
"role_arn": "arn:aws:iam::123456789012:role/CloudWatchConnectorRole"
},
"name": "example-connector"
}
]
}
GetKeys¶
Lists the API and SDK keys available to the authenticated user.
Request:
Response:
Example CURL¶
Bash
curl -X POST https://api.bitdrift.io/bitdrift.public.unary.admin.v1.AdminService/GetKeys \
-H "x-bitdrift-api-key: <key>" \
-H "Content-Type: application/json" \
-d '{}'
Example Response¶
JSON
{
"keys": [
{
"created_at": "2024-01-15T09:30:00Z",
"expires_at": "2024-01-15T09:30:00Z",
"id": 1,
"name": "My Workflow",
"revoked": false,
"sdk_key": {
"app_id_postfix": "com.example.app",
"bundle_id_regex": "com.example.*",
"key": "example-key"
}
}
]
}
RevokeKey¶
Revokes an API key or SDK key by ID.
Request:
Response:
Example CURL¶
Bash
curl -X POST https://api.bitdrift.io/bitdrift.public.unary.admin.v1.AdminService/RevokeKey \
-H "x-bitdrift-api-key: <key>" \
-H "Content-Type: application/json" \
-d '{
"id": 1
}'
Example Response¶
JSON
{}
UpsertConnector¶
Upsert a connector for the calling account.
Request:
Response:
Example CURL¶
Bash
curl -X POST https://api.bitdrift.io/bitdrift.public.unary.admin.v1.AdminService/UpsertConnector \
-H "x-bitdrift-api-key: <key>" \
-H "Content-Type: application/json" \
-d '{
"connector": {
"cloudwatch_connector_config": {
"region": "us-east-1",
"role_arn": "arn:aws:iam::123456789012:role/CloudWatchConnectorRole"
},
"name": "example-connector"
}
}'
Example Response¶
JSON
{}