json.extract! command, :id, :name, :trigger, :body, :created_at, :updated_at json.url command_url(command, format: :json)