@@ -11,7 +11,8 @@ description: |
1111 `Class.HttpService:PostAsync()|PostAsync`. This service allows games to be
1212 integrated with off-Roblox web services such as analytics, data storage,
1313 remote server configuration, error reporting, advanced calculations or
14- real-time communication.
14+ real-time communication. Additionally, a few Roblox web APIs can also be
15+ accessed via HttpService (see below).
1516
1617 `HttpService` also houses the `Class.HttpService:JSONEncode()|JSONEncode` and
1718 `Class.HttpService:JSONDecode()|JSONDecode` methods which are useful for
@@ -46,15 +47,89 @@ description: |
4647 system. Beware that such software must be distributed separately from the
4748 plugin itself and can pose security hazards if you aren't careful.
4849
50+ ##### Calling Roblox domains
51+
52+ `HttpService` can currently only call a subset of the Open Cloud endpoints. We
53+ plan to extend this set over time so please use the Feedback button if you
54+ have specific endpoints you'd like to see:
55+
56+ ###### Groups
57+
58+ - [GetGroup](/cloud/reference/Group#Get-Group)
59+ - [ListGroupJoinRequests](/cloud/reference/GroupJoinRequest#List-Group-Join-Requests)
60+ - [AcceptGroupJoinRequest](/cloud/reference/GroupJoinRequest#Accept-Group-Join-Request)
61+ - [DeclineGroupJoinRequest](/cloud/reference/GroupJoinRequest#Decline-Group-Join-Request)
62+ - [ListGroupMemberships](/cloud/reference/GroupMembership#List-Group-Memberships)
63+ - [UpdateGroupMembership](/cloud/reference/GroupMembership#Update-Group-Membership)
64+ - [GetGroupRole](/cloud/reference/GroupRole#Get-Group-Role)
65+ - [ListGroupRoles](/cloud/reference/GroupRole#List-Group-Roles)
66+ - [GetGroupShout](/cloud/reference/GroupShout#Get-Group-Shout)
67+
68+ ###### Data Stores
69+
70+ Due to current restrictions on HttpService, only alphanumeric
71+ characters and the `-` character are allowed in URL path parameters to Roblox
72+ domains. This means Data Stores/entries with other special characters are
73+ currently inaccessible from `HttpService`.
74+
75+ - [ListDataStores](/cloud/reference/DataStore#Cloud_ListDataStores)
76+ - [ListDataStoreEntries](/cloud/reference/DataStoreEntry#Cloud_ListDataStoreEntries__Using_Universes)
77+ - [CreateDataStoreEntry](/cloud/reference/DataStoreEntry#Cloud_CreateDataStoreEntry__Using_Universes)
78+ - [GetDataStoreEntry](/cloud/reference/DataStoreEntry#Cloud_GetDataStoreEntry__Using_Universes_DataStores)
79+ - [DeleteDataStoreEntry](/cloud/reference/DataStoreEntry#Cloud_DeleteDataStoreEntry__Using_Universes_DataStores)
80+ - [UpdateDataStoreEntry](/cloud/reference/DataStoreEntry#Cloud_UpdateDataStoreEntry__Using_Universes_DataStores)
81+ - [IncrementDataStoreEntry](/cloud/reference/DataStoreEntry#Cloud_IncrementDataStoreEntry__Using_Universes_DataStores)
82+
83+ ###### Inventory Items
84+
85+ - [ListInventoryItems](/cloud/reference/InventoryItem#List-Inventory-Items)
86+
87+ ###### Creator Store
88+
89+ - [CreatorStoreAssetsSearch](/cloud/features/creator-store#/default/get_toolbox_service_v2_assets_search)
90+
91+ You can call these endpoints the same way that you'd call any other endpoint
92+ via HttpService. The only difference is that you must include an Open Cloud
93+ API key in the request:
94+
95+ 1. [Create an Open Cloud API key](/cloud/auth/api-keys#create-api-keys).
96+ 2. [Save the API key to your secrets store](/cloud-services/secrets#add-secrets).
97+ 3. Make the request (code example below).
98+
99+ Limitations include the following:
100+
101+ - Only the `x-api-key` and `content-type` headers are allowed.
102+ - The `x-api-key` header must be a `Datatype.Secret`.
103+ - Only alphanumeric characters and the `-` character are allowed in URL path parameters.
104+ - Only the `https://` protocol is supported.
105+
106+ ##### Rate Limiting
107+
108+ For each Roblox game server, there is a limit of 500 HTTP requests per minute.
109+ Exceeding this can cause request-sending methods to stall entirely for around
110+ 30 seconds. Your `Global.LuaGlobals.pcall()` may also fail with a message of
111+ "Number of requests exceeded limit."
112+
113+ - Open Cloud requests consume the same overall limit of 500 HTTP requests per
114+ minute enforced on all other requests.
115+ - Each Open Cloud endpoint has its own limit per API key owner (can be a user
116+ or a group) that is enforced no matter where the calls come from (HttpService,
117+ the web, etc.). The following headers are returned with every response and
118+ allow you to view the limits and your remaining quota:
119+
120+ - `x-ratelimit-limit` - The total number of requests allowed to be made per
121+ API key owner (usually per minute).
122+ - `x-ratelimit-remaining` - The number of requests the API key used is still
123+ allowed to make. If this number is 0 and you receive a HTTP 429 response
124+ status code, then you have reached the rate limit for this endpoint.
125+ - `x-ratelimit-reset` - The number of seconds left before the rate limit
126+ resets (i.e before `x-ratelimit-remaining` resets to `x-ratelimit-limit`).
127+
49128 ##### Additional considerations
50129
51130 - There are port restrictions. You cannot use port `1194` or any port below
52131 `1024`, except `80` and `443`. If you try to use a blocked port, you will
53132 receive either a `403 Forbidden` or `ERR_ACCESS_DENIED` error.
54- - For each Roblox game server, there is a limit of 500 HTTP requests per
55- minute. Exceeding this may cause request-sending methods to stall entirely
56- for about 30 seconds.
57- - Requests cannot be made to any Roblox website, such as www.roblox.com.
58133 - Web requests can fail for many reasons, so it is important to "code
59134 defensively" (use `Global.LuaGlobals.pcall()`) and have a plan for when
60135 requests fail.
@@ -69,6 +144,7 @@ code_samples:
69144 - Astronauts-in-Space
70145 - International-Space-Station
71146 - HttpService-Pastebin
147+ - OpenCloud-via-HttpService
72148inherits :
73149 - Instance
74150tags :
@@ -581,11 +657,10 @@ methods:
581657 ##### Limitations
582658
583659 The current limitation for sending and receiving HTTP requests is 500
584- requests per minute. Requests over this threshold will fail. Additionally,
585- Roblox domains are excluded. This means that HTTP requests cannot be sent
586- to any Roblox-owned site such as [www.roblox.com](https://www.roblox.com).
660+ requests per minute. Requests over this threshold will fail.
587661 code_samples :
588662 - sending-an-http-request
663+ - OpenCloud-via-HttpService
589664 parameters :
590665 - name : requestOptions
591666 type : Dictionary
0 commit comments