Organization Resource

An organization resource is used to register (PUT), unregister (DELETE), update information (POST), and get organization information (GET).

Users are added or removed to and from an organization via the org_user resource. The org_user resource represents the relationship between users and organizations.

All of the org_user resources will be deleted for that organization but not the actual user resources (i.e. user accounts) when an organization is deleted.

Use the org_user GET method to get a list of users for an organization.

Organization names must be unique within GroveStreams during organization PUT and POST methods.

The user that is registering an organization (via PUT method) will automatically be added to the organization. An org_user will automatically be created during the PUT and that org_user is the organization owner. Only the organization owner has rights to GET, PUT, POST, DELETE organizations (unless an api_key is used that has these rights given to it).

GET organization/{organizationUid}



Get the organization with the specified uid.
Resource Information
Rate Limited? Yes
session token compatible? Yes
api_key compatible? No
org token required? No

Resource URL

http://grovestreams.com/api/organization/{organizationUid}

Parameters

none


Example Requests

/Organization/d251a8f2-f7b9-4df7-886d-b24c7f4929d4

Response Body
{
   "message":"",
   "organization":{
      "uid":" d251a8f2-f7b9-4df7-886d-b24c7f4929d4",
      "signupDate":1316112633197,
      "address":{
         "postalCode":"55433",
         "street":"16732 23rd Street North",
         "stateOrProvince":"MN",
         "country":"USA",
         "city":"Minneapolis"
      },
      "name":"Acme Organization",
      "contact":[ ]
   },
   "success":true
}


GET organization/new



Returns a default organization entity with a unique UID. Does not persist the new organization entity. It's the callers responsibility to PUT the new organization and register it.
Resource Information
Rate Limited? Yes
session token compatible? Yes
api_key compatible No
org token required? No

Resource URL

http://grovestreams.com/api/organization/new

Parameters

none

Example Requests

/organization/new

Response Body
{
   "message":"",
   "organization":{
      "uid":"d251a8f2-f7b9-4df7-886d-b24c7f4929d4
      "signupDate":0,
      "address":{
         "postalCode":"",
         "street":"",
         "stateOrProvince":"",
         "country":"",
         "city":""
      },
      "name":"",
      "contact":[ ]
   },
   "success":true
}


GET organization/name_exists/{name}    



Determines if an organization with a certain name exists within GroveStreams.
Resource Information
Rate Limited? Yes
session token compatible? Yes
api_key compatible No
org token required? No

Resource URL

http://grovestreams.com/api/organization/name_exists/{name}

Parameters

none


Example Requests

/organization/name_exists?Acme

Response Body

{
  "message": "",
  "nameExists": false,
  "success": true
}


GET organization/{orgUid}/name



Return the name of an organization.
Resource Information
Rate Limited? Yes
session token compatible? Yes
api_key compatible? Yes
org token required? No

Resource URL

http://grovestreams.com/api/organization/636a749c-f4c6-4b4a-a8bf-7bb0ed58a751/name

Parameters

none

Example Requests

organization/636a749c-f4c6-4b4a-a8bf-7bb0ed58a751/name

Response Body

{
  "message": "",
  "organization": {
    "name": "Acme"
  },
  "success": true
}


PUT organization



Registers a new organization. Any caller can register an organization. A session token is required. The caller that created the session (via the login resource) will be set as the organization owner.

The organization must have a unique name within GroveStreams or an error is returned.

The uid of the organization must be blank. A uid will be created on the server and the response body will contain the new uid.
Resource Information
Rate Limited? Yes
session token compatible? Yes
api_key compatible No
org token required? No

Resource URL

http://grovestreams.com/api/organization

Parameters

none

Example Requests

/organization

Request Body
{
   "organization":{
      "uid":"",
      "signupDate":1316112633197,
      "address":{
         "postalCode":"55433",
         "street":"16732 23rd Street North",
         "stateOrProvince":"MN",
         "country":"USA",
         "city":"Minneapolis"
      },
      "name":"Acme Organization",
      "contact":[ ]
   }
}


POST organization


Used to update organization information.
Resource Information
Rate Limited? Yes
session token compatible? Yes
api_key compatible Yes
org token required? No

Resource URL

http://grovestreams.com/api/organization

Parameters

none

Example Requests

/organization

Request Body

{
   "organization":{
      "uid":"d251a8f2-f7b9-4df7-886d-b24c7f4929d4",
      "signupDate":1316112633197,
      "address":{
         "postalCode":"55433",
         "street":"16732 23rd Street North",
         "stateOrProvince":"MN",
         "country":"USA",
         "city":"Minneapolis"
      },
      "name":"Acme Organization",
      "contact":[ ]
   }
}

DELETE organization/{organizationUid}



Deletes an organization and all resources that belong to it.
Resource Information
Rate Limited? Yes
session token compatible? Yes
api_key compatible No
org token required?
No

Resource URL

http://grovestreams.com/api/organization/{organizationUid}

Parameters

none

Example Requests

/organization/d251a8f2-f7b9-4df7-886d-b24c7f4929d4

Response Body

{
   "message" : "Deleted Organization with uid 'd251a8f2-f7b9-4df7-886d-b24c7f4929d4'","
   "success" : true
}



GET organization/{orgUid}/public



Get information about the organization public/private attributes.

listInRegistry, regDescription and regCategory attributes are future and are not currently used by GroveStreams.
Resource Information
Rate Limited? Yes
session, oauth and org tokens compatible? Yes
api_key compatible No

Resource URL

http://grovestreams.com/api/organization/636a749c-f4c6-4b4a-a8bf-7bb0ed58a751/public

Parameters

none

Example Requests

organization/9ba38412-bba3-4759-95a5-c4531f7b479b/public

Response Body
{
  "message": "",
  "orgPublic": {
    "listInRegistry": true,
    "uid": "9ba38412-bba3-4759-95a5-c4531f7b479b",
    "guestCompStudioRoleType": "NONE",
    "guestUid": "99ea77f6-85c5-4e3e-a2a2-e10f84886a8e",
    "regDescription": "Org Description for Registry",
    "regCategory": "BUSINESS",
    "allowGuests": true
  },
  "success": true
}


POST organization/{organizationUid}/public



Updates organization public information. Used to allow Guest users to access an organization.

listInRegistry, regDescription and regCategory attributes are future and are not currently used by GroveStream.

Available RoleTypes are: NONE, VIEWER, EDITOR
Resource Information
Rate Limited? Yes
session, oauth and org tokens compatible?
Yes
api_key compatible
No



Resource URL

http://grovestreams.com/api/organization/{organizationUid}/public

Parameters

none

Example Requests

/organization/4a906f6b-3962-4976-81d0-f569847c51e8

Request Body
{
  "orgPublic": {
    "listInRegistry": true,
    "uid": "4a906f6b-3962-4976-81d0-f569847c51e8",
    "guestCompStudioRoleType": "NONE",
    "guestUid": "",
    "regDescription": "Org Description for Registry",
    "regCategory": "BUSINESS",
    "allowGuests": true,
  }
}

GET organization/{orgUid}/public/indicator


Deletes an organization and all resources that belong to it.
Resource Information
Rate Limited? Yes
session, oauth and org tokens compatible? No
api_key compatible No


Resource URL

http://grovestreams.com/api/organization/636a749c-f4c6-4b4a-a8bf-7bb0ed58a751/public/indicator

Parameters

none

Example Requests

organization/636a749c-f4c6-4b4a-a8bf-7bb0ed58a751/public/indicator

Response Body
{
  "message": "",
  "allowGuests": true,
  "success": true
}