Do not make Graniitti API requests in client-side code that is accessible to parties you do not trust, as this will expose your token to them. Use the Graniitti API only in server-side code and in client-side code that is only accessible to parties you trust.
Learn about the basics of Graniitti API requests:
The base URL for Graniitti API requests is
<graniitti> is the Graniitti API domain name of your Frosmo Platform instance, and
<version> is the API version you're using.
To get the base URL for the latest version in your platform instance:
- In the Frosmo Control Panel, in the header, click your username, and select API Access.
In the Graniitti API section, copy the base URL.
You now have the base URL for sending requests to the Graniitti API.
For more information about Graniitti API versions, see Graniitti API: Versioning.
The API supports the following standard HTTP methods for manipulating resources.
Table: Graniitti API methods
|GET||Retrieve a resource or a collection of resources.|
|POST||Create a new resource.|
|PUT||Update a whole resource.|
Update a portion of a resource.
This method is only used with company settings.
|DELETE||Delete a resource.|
The API accepts the following headers in a request.
Table: Graniitti API request headers
Media type of the request body.
This field is required for POST and PUT requests.
Access token for authenticating with the API.
This field is required for all requests.
For instructions on how to get the token, see Graniitti API authentication.
For more information about the standard HTTP headers, see the header fields registry maintained by IANA.
For POST, PUT, and PATCH requests, the body must be in the JSON format. If the body is not valid JSON, or if the data model represented by the JSON is incorrect, the API returns a
400 status code in the response.
A single resource is represented as an object. A collection of resources is represented as an array of objects. The following example shows a request body containing a single resource object.
The API automatically strips the following characters from the beginning and end of all string values in the request body:
- Carriage return (
- New line (
- NUL (
- Tab (
- Vertical tab (
The API uses the PHP
trim() function to strip the characters.
The following example shows a request body before and after trimming.
The API supports the following query parameters for GET requests. You can use the parameters to filter and otherwise process the results returned by the API.
Table: Query parameters for Graniitti API GET requests
Filter results based on resource field values.
For more information, see Filtering with field values.
Replace the custom code with a placeholder text string when retrieving the full contents of a custom script with a
When you use the
If you want to get the latest contents with the changes, first deploy the custom script with a
For more information about deploying the custom script, see Updating the custom script with the Graniitti API.
Select which fields are included in the response.
For more information, see Selecting which fields to return.
Use Feed Item Query Language (FIQL) to define advanced results filtering.
For more information, see Filtering with FIQL.
Embed related resources in the response.
For more information, see Embedding.
Specify the number of the page from which to return the results. Specifying this parameter enables pagination of results.
If you specify this parameter, the API returns the results only from the specified page. For example, if you set this parameter to
By default, results are not paginated, and requests that do not use pagination are limited to 10 000 results. If a request finds more than 10 000 results, the request returns an error. In this case, to get the results, use pagination.
For more information, see Paginating.
Specify the number of results to return per page. The default is 100 results.
This parameter has no effect unless you also specify the
For more information, see Paginating.
Sort the results by one or more fields.
For more information, see Sorting.