org.keycloak.services.resources.admin

## Class ClientsResource

- java.lang.Object
- - org.keycloak.services.resources.admin.ClientsResource

-     public class ClientsResource
      extends Object

  Base resource class for managing a realm's clients.
  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static ServicesLogger` | `logger`
    `protected RealmModel` | `realm`
    `protected KeycloakSession` | `session`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientsResource(RealmModel realm, RealmAuth auth, AdminEventBuilder adminEvent)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.ws.rs.core.Response` | `createClient(javax.ws.rs.core.UriInfo uriInfo, ClientRepresentation rep)` Create a new client Client's client_id must be unique!
    `ClientResource` | `getClient(String id)` Base path for managing a specific client.
    `List<ClientRepresentation>` | `getClients(String clientId)` Get clients belonging to the realm Returns a list of clients belonging to the realm

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### logger

          protected static final ServicesLogger logger

    - #### realm

          protected RealmModel realm

    - #### session

          @Context
          protected KeycloakSession session

  - ### Constructor Detail

    - #### ClientsResource

          public ClientsResource(RealmModel realm,
                                 RealmAuth auth,
                                 AdminEventBuilder adminEvent)

  - ### Method Detail

    - #### getClients

          @GET
           @Produces(value="application/json")
          public List<ClientRepresentation> getClients(@QueryParam(value="clientId")
                                                                                                 String clientId)

      Get clients belonging to the realm Returns a list of clients belonging to the realm
      Parameters:
        `clientId` - filter by clientId

    - #### createClient

          @POST
           @Consumes(value="application/json")
          public javax.ws.rs.core.Response createClient(@Context
                                                                                                   javax.ws.rs.core.UriInfo uriInfo,
                                                                                                   ClientRepresentation rep)

      Create a new client Client's client_id must be unique!
      Parameters:
        `uriInfo` -
        `rep` -
      Returns:

    - #### getClient

          @Path(value="{id}")
          public ClientResource getClient(@PathParam(value="id")
                                                              String id)

      Base path for managing a specific client.
      Parameters:
        `id` - id of client (not client-id)
      Returns:

Copyright © 2016 JBoss by Red Hat. All rights reserved.