Skip to content
logoBack to home screen

REST API CRUD Services

Create, read, update, delete (CRUD) services are provides by the /rest/v2/ endpoints. They allow you to perform operations on entities and properties inside accesses.

Overview

Basic create/read/update/delete (CRUD) operations on entity instances and their properties stored in deployed accesses are provided by /rest/v2/. This API is divided into 2 endpoints: /rest/v2/entities/ and /rest/v2/properties/, respectively grouping requests related to entities and entity properties.

Below is an overview of all the services that /rest/v2/ API offers:

Endpoint and URLGETPOSTPUTDELETEPATCH
/rest/v2/entities/{accessId}/{typeSignature}Entity searchEntity creationEntity update or creationEntity deletionEntity update
/rest/v2/entities/{accessId}/{typeSignature}/{id}/({partition})Entity returnEntity updateEntity update or creationEntity deletionEntity update
/rest/v2/properties/{accessId}/{typeSignature}/{id}/({partition})/{property}Property value returnAddition or removal collection elements

Only works on collection properties
Property value updateProperty value reset to default

int, long, double, float, BigDecimal = 0
Boolean = false
enums, entities, objects = null
maps, lists, sets = empty collection
Property value update

For each REST API call to /rest/v2, the entity.TypeSignature part may be replaced by the simple name (for example User instead of com.braintribe.model.user.User), but only when this simple name is unique in a given access (there are no other entities with the same simple name).

For more information and specific examples, see REST v2 /rest/v2/entities and REST v2 /rest/v2/properties.

Authentication

Send a POST call to /api/v1/authenticate for authentication. Make sure to provide your credentials in the body of the request:

ItemDescription
Method and LinkPOST host:port/tribefire-services/api/v1/authenticate
Body{ "user": "cortex", "password": "cortex" }
HeadersContent-Type: application/json

You have to include the session ID in every REST call. You can include it in the following:

  • URL parameter: sessionId=yourSessionId
  • header parameter: gm-session-id

You cannot include the session ID in the body of the request!

If you are not logged in (there is no valid session) and you paste a GET call in your browser, you will be redirected to a login screen. After logging in, you will see the result of your GET call.

The redirect does not happen for the /api/v1/authenticate call.

Try it Out

If you want to experiment with the API for yourself, use our integrated Swagger UI.

For more information, see Using Swagger UI.