Show TOC

ATOM-Based APIsLocate this document in the navigation structure

Use

Within the Internet, the Atom standard is used to describe feeds of information. This is typically used by news Web sites to publish a list of new articles that are available for reading, for example. It is a simple XML-based format that is loaded by an HTTP request.

The SAP NetWeaver Business Client runtime exports the OData format (which is an extension of the Atom Syndication Format, see also http://www.odata.org/developers/protocols/atom-format) for publishing role information in a standard way that is understandable for other software. The base URL for accessing atom services is:

Note The following example refers to users using the server runtime for SAP NetWeaver UI services. When using the server runtime for SAP Business Client, leave out the addition ui2/.
Example http://<server>/ui2/nwbc/~atom

At the root level, a service catalog is rendered, containing a list of services currently active for publishing. Example of SAP Business Client root atom catalog:

<xml version="1.0 encoding="UTF-8" standalone="yes" ?>
<service xml:base="https//<server>/ui2/nwbc/~atom" 
 xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" 
 xmlns="http://www.w3.org/2007/app"> 
    <workspace>
        <atom:title>Services</atom:title>
        <collection href="roles">
          <atom:title>Roles Services</atom:title>
        </collection>
   </workspace>
</service>

Entity

Occurrence

Description

service

    xml:base attribute

1

Service root node

Service base address

workspace

1

Corresponds to the catalog root node

atom:title

1

Title of the catalog and service / or embedded service catalog names

collection

href attribute (in collection)

1..N

Corresponds to every available service or service catalog

Relative URL for services or embedded catalogs (relative to xml:base)

For navigation to published services or other catalogs, use xml:base and href. For the roles services, the URL is:

For users using the UI services runtime: https://<server>/ui2/nwbc/~atom/roles

For users using the SAP Business Client runtime: https://<server>/nwbc/~atom/roles

Roles Services Catalog

The roles services catalog is similar to the root catalog listing the roles services as containing a collection list.

Example of a roles services catalog:

Note The following example refers to users using the server runtime for SAP NetWeaver UI services. When using the server runtime for SAP Business Client, leave out the addition ui2/.
Sample Code
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<service xml:base="https://<server>/ui2/nwbc/~atom/roles/" 
 xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" 
 xmlns="http://www.w3.org/2007/app">
    <workspace>
        <atom:title>Roles Services</atom:title>
        <collection href="list">
            <atom:title>Roles List</atom:title>
        </collection>
    </workspace>
</service>

From within the roles services, use xml:base and href to access the role list. The URL is as follows:

https://<server>/ui2/nwbc/~atom/roles/list

Roles List Service

The roles list service exports the list of roles assigned to each user with a high-level entry that can be imbedded into any HTML page to visualize this specific role.

As a result of the service call, you obtain a feed document containing OData entries, where one entry represents a specific role. The request is for the specific user currently logged on, so the feed contains only the entries for roles assigned to the user.

If, for testing, such a service URL is called directly within a newer browser (for example, Firefox, Opera, Microsoft Internet Explorer 7 and higher), the browser itself recognizes the atom format and displays an HTML-rendered page for the content. To see the real XML representation of the data, use the View Source function of the browser.

Example of the response of roles list service:
Note The following example refers to users using the server runtime for SAP NetWeaver UI services. When using the server runtime for SAP Business Client, leave out the addition ui2/.
Sample Code
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 
<feed xml:base="https://<server>/nwbc/~atom/roles/" 
 xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" 
 xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" 
 xmlns="http://www.w3.org/2005/Atom">
    <title type="text">Roles List</title>
    <id>https://<server>/nwbc/~atom/roles/list</id>
    <updated>2010-04-16T12:23:00Z</updated>
    <link rel="self" title="Roles List" href="list" rel>
    <entry>
        <title type="text">Employee Self Services</title>
        <updated>2010-04-16T14:23:00Z</updated>
        <link rel="edit" title="Link" href="list('SAP_ROLE_ESS')" /> 
        <link rel="alternate" type="text/html" href=" /nwbc/SAP_ROLE_ESS/~canvas;window=embedded/sitemap/" /> 
        </entry>
</feed>

Entity

Occurrence

Description

feed

    xml:base attribute

    title node

    id node

    updated node

    link rel="self" node

1

 

1

1

1

Root service node

Base URL of the service catalog (not a service!)

Name of the service

ID of the service, containing the absolute service URL

Time stamp of the last role list change

Relative link to a service, from catalog base URL

entry node

    title node

    id node

    updated node

    link role="edit" node

    link role="alternate" node

0..N

1

1

1

1

1

Entry nodes corresponding to every role assigned to the user

Role name

Unique ID of the role entry, which can be used to retrieve role information directly

Time stamp of the last role modification to this role.

Obligatory node for direct access to role modification. Currently not supported.

Node with absolute link (attribute href) to a role service map

The URL itself gives a site map for one specific role.

More Information

For information about URL formats and generation, see Generating an External Startup URL for SAP Business Client.