Get an item

Definition

GET /apis/v2/{SERVICE_ID}/{ITEM_NAME}/{ITEM_APPLICATION_KEY}

Description

Retrieve a specific full-described item.

Permissions

The user needs to have the permission:

SERVICE_ID=read

To read an item, the user needs to have the associated Application Publisher Profile, if not the item’s content mode should be set to any value but NONE.

Parameters

This request needs two query parameters:

Field’s name Type Mandatory Description
appKey string yes The application key of the item
name string yes The name of the item

Both fields are mandatory and can not be null.

Response

HTTP code Reason
200 Success
403 Unauthorized
404 Not found
500 Unexpected exception

When the query is successful, the HTTP response is a 200 OK and returns the requested service’s item:

{
    "name" : "_configuration",
    "appKey" : "ondiflo",
    "description" : { "EN" : "testing b2box Configuration Model (formerly named .configuration)" },
    "contentMode" : "READ",
    "lastModifiedBy" : "roxane.mace@amalto.com",
    "lastModifiedDate" : 1520595372482,
    "revisionId" : "2bfd604dfc3ed5df648dc67dab0b3dcd",
    "schema" : "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<xsd:schema xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" attributeFormDefault=\"unqualified\"\n  [...]"
}

If the user does not have the right permissions, the HTTP Response will be a 403 Unauthorized:

{
    "status": 403,
    "code": 403,
    "message": "Unexpected error getting the item from the configuration! Access to the item 'ondiflo._configuration' is not authorized. You need to have the permission 'read'.",
    "link": null,
    "developerMessage": "Unauthorized: access to the item 'ondiflo._configuration' is not authorized, permission 'read' is missing.",
    "conflictInformation": null
}

If the item is not found, it will return a 404 Not found:

{
    "status": 404,
    "code": 404,
    "message": "Unexpected error getting the item from the configuration! Item ondiflo._configuration is not found.",
    "link": null,
    "developerMessage": "Not found: the item 'ondiflo._configuration' is not found.",
    "conflictInformation": null
}