7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'app/controllers/railspress/api/v1/prime_controller.rb', line 7
def show
render json: {
data: {
service: "Railspress API",
version: "v1",
authentication: {
type: "bearer",
token_types: [ "api_key", "agent_bootstrap_key" ],
agent_bootstrap_exchange_endpoint: exchange_api_v1_agent_keys_path
},
defaults: {
post_status: "draft",
publish_with_explicit_status: true
},
capabilities: capabilities,
endpoints: endpoints,
key: {
id: current_api_key.id,
name: current_api_key.name,
status: current_api_key.status,
expires_at: current_api_key.expires_at,
last_used_at: current_api_key.last_used_at
},
server_time: Time.current
}
}
end
|