Difference between revisions of "Getting Site Information"

From Enterprise Help
Jump to: navigation, search
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
__NOTOC__After user provides authorization for the first time and access token is obtained, the first thing the client needs to do is get the user's Site ID(s). The Site ID will be necessary to make subsequent calls because it will be part of the request URL for endpoints other than Sites.
+
__NOTOC__
 +
After [[Getting Started|getting credentials]] and obtaining an [http://enterprisehelp.fishbowl.com/index.php/Getting_Started#Generating_Access_Token_.26_Refresh_Token acess token], the first piece of information needed is the Site-ID(s). The Site-ID will be necessary to make subsequent calls because it will be part of the request URL for endpoints other than Sites.
  
 +
<br/>''Note: It is possible for a user to have more than one site. If the user is managing multiple business entities under different names, each can be set up in its own site.''
  
''Note: It is possible for a user to have more than one site.  If the user is managing multiple business entities under different names, each can be set up in its own site.''
+
==== Sample Request:<br/> ====
  
 +
GET [https://services.fishbowl.com/api/odata/v1/Sites https://services.fishbowl.com/api/odata/v1/Sites] HTTP/1.1
 +
Accept: application/json
 +
Authorization: Bearer u7kBYz1UhHkoRSc7V4gruBs-4sEpIkFV-F4LGiFMwfGwJNnT_JzNft
 +
g6_Zm0yWi8P m60iPlmCCHUSwCX5Uru-OJq2jzhbT-E6nAc1OwzghTCmeoo0K69ubDBMFX5hyKlc
 +
AjA9H3Vs-ZNjNYKarpSO5rA5ubG5-Va5Aigm9mp-Pre-EaGAY_HBdxZi-LBMSQ_mSjyIDPBpLFYP
 +
BNzK3cu0xGobGsFLxPtDG3urs_4abXZtvxN8wm9rpsgr
  
==== Example: ====
 
  
 
 
  GET https://enterprise.qa.fishbowl.com/api/odata/v1/Sites HTTP/1.1
 
  Accept: application/json
 
  Authorization: Bearer u7kBYz1UhHkoRSc7V4gruBs-4sEpIkFV-F4LGiFMwfGwJNnT_JzNft
 
  g6_Zm0yWi8P m60iPlmCCHUSwCX5Uru-OJq2jzhbT-E6nAc1OwzghTCmeoo0K69ubDBMFX5hyKlc
 
  AjA9H3Vs-ZNjNYKarpSO5rA5ubG5-Va5Aigm9mp-Pre-EaGAY_HBdxZi-LBMSQ_mSjyIDPBpLFYP
 
  BNzK3cu0xGobGsFLxPtDG3urs_4abXZtvxN8wm9rpsgr
 
  
 
+
==== Sample Response:<br/> ====
==== Example Response: ====
+
 
 
   {   
 
   {   
      "odata.metadata":"http://enterprise.qa.fishbowl.com/API/odata/v1/
+
"odata.metadata":"[http://services.fishbowl.com/API/odata/v1/$metadata#Sites http://services.fishbowl.com/API/odata/v1/$metadata#Sites]",
                        $metadata#Sites",
+
"value":[   
      "value":[   
+
    {   
        {   
+
      "SiteID":"1234567890",
            "SiteID":"2147485429",
+
      "Name":"Fishbowl Demo API",
            "Name":"Fishbowl Local",
+
      "SiteGUID":"32cc6c0f-92a2-4548-94b6-123944c0d7bb",
            "SiteGUID":"32cc6c0f-92a2-4548-94b6-123944c0d7bb",
+
      "WebDomainName":"fishbowllocal.fbmta.com",
            "WebDomainName":"fishbowllocal.fbmta.com",
+
      "MailDomainName":"fishbowllocal.fbmta.com"  
            "MailDomainName":"fishbowllocal.fbmta.com"  
+
    }
        }
+
]
      ]
+
}
  }
+

Latest revision as of 13:59, 8 June 2015

After getting credentials and obtaining an acess token, the first piece of information needed is the Site-ID(s). The Site-ID will be necessary to make subsequent calls because it will be part of the request URL for endpoints other than Sites.


Note: It is possible for a user to have more than one site. If the user is managing multiple business entities under different names, each can be set up in its own site.

Sample Request:

GET https://services.fishbowl.com/api/odata/v1/Sites HTTP/1.1
Accept: application/json
Authorization: Bearer u7kBYz1UhHkoRSc7V4gruBs-4sEpIkFV-F4LGiFMwfGwJNnT_JzNft
g6_Zm0yWi8P m60iPlmCCHUSwCX5Uru-OJq2jzhbT-E6nAc1OwzghTCmeoo0K69ubDBMFX5hyKlc
AjA9H3Vs-ZNjNYKarpSO5rA5ubG5-Va5Aigm9mp-Pre-EaGAY_HBdxZi-LBMSQ_mSjyIDPBpLFYP
BNzK3cu0xGobGsFLxPtDG3urs_4abXZtvxN8wm9rpsgr


Sample Response:

  {  
"odata.metadata":"http://services.fishbowl.com/API/odata/v1/$metadata#Sites",
"value":[  
   {  
      "SiteID":"1234567890",
      "Name":"Fishbowl Demo API",
      "SiteGUID":"32cc6c0f-92a2-4548-94b6-123944c0d7bb",
      "WebDomainName":"fishbowllocal.fbmta.com",
      "MailDomainName":"fishbowllocal.fbmta.com" 
   }
]
}