Skip to content

Services and OData Provider

Services in the OData Provider can be built via different means.

Projections

Projections are the main mechanism of developing OData services for IFS Cloud. What is defined as a "Projection" in IFS Developer studio gets deployed as an OData service facilitated by IFS OData Provider. Projection is the place where IFS Business entities are modelled in OData context.

Projection in Database

Figure 1 - What becomes of a projection

Projections are exposed in the /ifsapplications/projection/ endpoint. Depending on the type of the projection, it can be exposed in the main, int, b2b or a combination of the endpoints.

Entity Service APIs

Entity Service APIs (a.k.a Data Entity Services) is another type of OData service exposed by the OData Provider. Entity Service APIs exposes underlying entities (logical units) as OData Services. These services needs to be activated via the API Explorer before they can be used.

Entity Service APIs are for system-to-system integrations and are only exposed in the /int/ifsapplications/entity/ endpoint.

See link for further details.

Metadata Cache

To improve the response time, OData Provider caches the service metadata once it is loaded from the database.

While maintaining the cache OData Provider needs to make sure that the cached metadata is up-to-date. To do this OData Provider validated the cached metadata version with that of the database each time when serving a request. If the validation fails, the request will fail with HTTP response code 503 and the response body will contain the error code as MI_MODIFIED_ERROR.

Then OData-Provider will invalidate the cached metadata, forcing it to be fetched from the database at the next request.

Response:

{
  "error": {
    "code": "MI_MODIFIED_ERROR",
    "message": "Cached Service metadata is outdated. Please try again."
  }
}

The Retry-After HTTP Header is also set in the response to notify the client that it can retry the request.

When a user gets this error response the OData-Provider expect the user to retry the same request again. Then OData-Provider will load the latest metadata from the database and serve the request accordingly.