1. List Clients
  2. Get Client
  3. Create Client
  4. Delete Client

/oauth2_clients

List Clients

URL:  /oauth2_clients 

Method: GET

Protocol: HTTP, HTTPS

Returns:

  • 200 (OK) + a collection of OAuth clients

Example:

$ curl -X GET http://api.giscloud.com/1/oauth2_clients

<?xml version="1.0"?>
<oauth2_clients total="3" page="1">
  <oauth2_client>
    <id>2</id>
    <client_id>ea4e501b580e9f330efb</client_id>
    <client_secret>ea4e501b580e9f330efb</client_secret>
    <redirect_uri>http://test_uri.example.com</redirect_uri>
    <owner>1</owner>
    <name>first</name>
    <description>Test OAuth2 client</description>
  </oauth2_client>
  <oauth2_client>
    <id>3</id>
    <client_id>0ed539704f247f3f0733</client_id>
    <client_secret>0ed539704f247f3f0733</client_secret>
    <redirect_uri>http://test_uri2.example.com</redirect_uri>
    <owner>1</owner>
    <name>second</name>
    <description>Test OAuth2 client 2</description>
  </oauth2_client>
</oauth2_clients>

Get Client

URL:  /oauth2_clients/{id} 

Method: GET

Protocol: HTTP, HTTPS

Parameters: id – OAuth client to be retrieved

Example:

$ curl -X GET http://api.giscloud.com/1/oauth2_clients/3

<oauth2_client>
  <id>3</id>
  <client_id>0ed539704f247f3f0733</client_id>
  <client_secret>0ed539704f247f3f0733</client_secret>
  <redirect_uri>http://test_uri2.example.com</redirect_uri>
  <owner>1</owner>
  <name>second</name>
  <description>Test OAuth2 client 2</description>
</oauth2_client>

Create Client

URL:  /oauth2_client 

Method: POST

Protocol: HTTPS

Returns:

  • 201 (Created) + a URL to the newly created resource in the Location
    • header of the response, if successful

Example:

$curl -X POST https://api.giscloud.com/1/oauth2_clients

Delete Client

URL:  /oauth2_clients/{id} 

Method: DELETE

Protocol: HTTPS

Parameters:

  • id – OAuth client to be deleted

Returns one of:

  • 204 (No Content) if successful
  • 404 (Not Found) if the resource wasn’t found