Get all roles for a self-service user

get

/crmRestApi/resources/11.13.18.05/selfServiceRoles

Request

Query Parameters
  • When this parameter is provided, the specified children are included in the resource payload (instead of just a link). The value of this query parameter is "all" or "". More than one child can be specified using comma as a separator. Example: ?expand=Employees,Localizations. Nested children can also be provided following the format "Child.NestedChild" (Example: ?expand=Employees.Managers). If a nested child is provided (Example: Employees.Managers), the missing children will be processed implicitly. For example, "?expand=Employees.Managers" is the same as "?expand=Employees,Employees.Managers" (which will expand Employees and Managers).
  • This parameter filters the resource fields. Only the specified fields are returned, which means that if no fields are specified, no fields are returned (useful to get only the links). If an indirect child resource is provided (Example: Employees.Managers), the missing children will be processed implicitly. For example, "?fields=Employees.Managers:Empname" is the same as "?fields=;Employees:;Employees.Managers:Empname" (which will only return the "Empname" field for Managers). the value of this query parameter is a list of resource fields. The attribute can be a direct (Example: Employees) or indirect (Example: Employees.Managers) child. It cannot be combined with expand query parameter. If both are provided, only fields will be considered.

    Format: ?fields=Attribute1,Attribute2

    Format for fields in child resource: ?fields=Accessor1:Attribute1,Attribute2
  • Used as a predefined finder to search the collection.

    Format: ?finder=<finderName>;<variableName>=<variableValue>,<variableName2>=<variableValue2>

    The following are the available finder names and corresponding finder variables:

    • MyRoles: Finds the roles for a specified user.
      Finder Variables:
      • ContactPartyId; string; The unique identifier of the contact record of the user associated with the role.
    • PrimaryKey: Finds a self-service role with the specified role identifier.
      Finder Variables:
      • RoleId; integer; The unique identifier of the role.
  • This parameter restricts the number of resources returned inside the resource collection. If the limit exceeds the resource count then the framework will only return the available resources.
  • This parameter can be used to show only certain links while accessing a singular resource or a resource collection. The parameter value format is a comma-separated list of : <link_relation>

    Example:
    self,canonical
  • Used to define the starting position of the resource collection. If offset exceeds the resource count then no resources are returned. Default value is 0.
  • The resource item payload will be filtered in order to contain only data (no links section, for example).
  • This parameter orders a resource collection based on the specified fields. The parameter value is a comma-separated string of attribute names, each optionally followed by a colon and "asc" or "desc". Specify "asc" for ascending and "desc" for descending. The default value is "asc". For example, ?orderBy=field1:asc,field2:desc
  • This query parameter defines the where clause. The resource collection will be queried using the provided expressions. The value of this query parameter is one or more expressions. Example: ?q=Deptno>=10 and <= 30;Loc!=NY

    Format: ?q=expression1;expression2

    You can use these queryable attributes to filter this collection resource using the q query parameter:
    • AccountPartyId; integer; The unique identifier of the account of the self-service user associated with the role.
    • AccountPartyName; string; The account party name associated with the role.
    • AccountPartyNumber; string; The unique identifier of the account of the self-service user associated with the role.
    • ContactPartyId; integer; The unique identifier of the contact record of the self-service user associated with the role.
    • ContactPartyName; string; The name of the account of the self-service user associated with the role.
    • ContactPartyNumber; string; The unique identifier of the contact record of the self-service user associated with the role.
    • CreatedBy; string; The user who created the role record.
    • CreationDate; string; The date when the role record was created.
    • EmailAddress; string; The email address of the self-service user associated with the role.
    • EndDate; string; The date when the role was deleted from the user.
    • LastUpdateDate; string; The date when the role record was last updated.
    • LastUpdateLogin; string; The login of the user who last updated the record.
    • LastUpdatedBy; string; The user who last updated the record.
    • LoginId; string; The login Id of the self-service user associated with the role.
    • RegistrationId; integer; The unique identifier of the self-service registration request whose approval was used to grant the role.
    • RelationshipTypeCd; string; The code indicating the type of role. The list of accepted values is defined in the lookup type ORA_SVC_CSS_REL_TYPE_CD.
    • RequestTypeCd; string; The code indicating the type of registration request. The list of accepted values is defined in the lookup type ORA_SVC_CSS_REQ_TYPE_CD.
    • RoleId; integer; The unique identifier of the role.
    • StartDate; string; The date when the self service role starts.
  • The resource collection representation will include the "estimated row count" when "?totalResults=true", otherwise the count is not included. The default value is "false".
Header Parameters
  • If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
  • The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.

There's no request body for this operation.

Back to Top

Response

Supported Media Types

Default Response

The following table describes the default response for this task.
Headers
  • If the REST API supports runtime customizations, the shape of the service may change during runtime. The REST client may isolate itself from these changes or choose to interact with the latest version of the API by specifying this header. For example: Metadata-Context:sandbox="TrackEmployeeFeature".
  • The protocol version between a REST client and service. If the client does not specify this header in the request the server will pick a default version for the API.
Body ()
Root Schema : selfServiceRoles
Type: object
Show Source
Nested Schema : Items
Type: array
Title: Items
The items in the collection.
Show Source
Nested Schema : selfServiceRoles-item-response
Type: object
Show Source
  • Title: Account ID
    The unique identifier of the account of the self-service user associated with the role.
  • Title: Account
    Read Only: true
    Maximum Length: 360
    The account party name associated with the role.
  • Title: Account Party Number
    Read Only: true
    Maximum Length: 30
    The unique identifier of the account of the self-service user associated with the role.
  • Title: Can Delete
    Read Only: true
    Default Value: true
    Indicates if the record can be deleted.
  • Title: Can Update
    Read Only: true
    Default Value: false
    Indicates if the record can be updated. The default value is false.
  • Title: Contact ID
    The unique identifier of the contact record of the self-service user associated with the role.
  • Title: Name
    Read Only: true
    Maximum Length: 360
    The name of the account of the self-service user associated with the role.
  • Title: Contact Party Number
    Read Only: true
    Maximum Length: 30
    The unique identifier of the contact record of the self-service user associated with the role.
  • Title: Created By
    Read Only: true
    Maximum Length: 64
    The user who created the role record.
  • Title: Creation Date
    Read Only: true
    The date when the role record was created.
  • Title: Email
    Read Only: true
    Maximum Length: 320
    The email address of the self-service user associated with the role.
  • Title: End Date
    Read Only: true
    The date when the role was deleted from the user.
  • Title: Last Updated Date
    Read Only: true
    The date when the role record was last updated.
  • Title: Last Updated By
    Read Only: true
    Maximum Length: 64
    The user who last updated the record.
  • Title: Last Update Login
    Read Only: true
    Maximum Length: 32
    The login of the user who last updated the record.
  • Links
  • Title: Login ID
    Maximum Length: 320
    The login Id of the self-service user associated with the role.
  • Title: Registration ID
    Read Only: true
    The unique identifier of the self-service registration request whose approval was used to grant the role.
  • Title: Relationship Type
    Maximum Length: 320
    The code indicating the type of role. The list of accepted values is defined in the lookup type ORA_SVC_CSS_REL_TYPE_CD.
  • Title: Role Value
    Read Only: true
    Maximum Length: 80
    The code indicating the role type. The list of accepted values is defined in the lookup type ORA_SVC_CSS_REL_TYPE_CD.
  • Title: Request Type
    Maximum Length: 30
    The code indicating the type of registration request. The list of accepted values is defined in the lookup type ORA_SVC_CSS_REQ_TYPE_CD.
  • Title: Role ID
    Read Only: true
    The unique identifier of the role.
  • Title: Start Date
    Read Only: true
    The date when the self service role starts.
Back to Top

Examples

Use GET with the following URI syntax to get all roles for a self-service user:

Example of Request URI

The following shows an example of the request URL.

https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/selfServiceRoles

Example of Request Header

The following shows an example of the request header.

GET  crmRestApi/resources/11.13.18.05/selfServiceRoles HTTP/1.1
HOST: servername.fa.us2.oraclecloud.com
authorization: Basic U0FMRVNfQURNSU46V2VsY29tZTE=
content-type: application/vnd.oracle.adf.resourceitem+json

Example of Response Header

The following shows an example of the response header.

HTTP/1.1 200 OK
Date: Fri, 22 Mar 2017 09:30:10 GMT
Server: Oracle-HTTP-Server-11g
Content-Type: application/vnd.oracle.adf.resourceitem+json
Content-Language: en

Example of Response Body

The following shows an example of the response body in JSON format.

Content type:
{
  "items": [
    {
      "AccountPartyId": 300100090027782,
      "ContactPartyId": 300100090028149,
      "CreatedBy": "autocssadmin",
      "CreationDate": "2016-09-27T13:58:54-07:00",
      "EndDate": null,
      "LastUpdateDate": "2016-09-27T13:58:54-07:00",
      "LastUpdateLogin": "3D847FA984374D39E0530E8EF50AF6E2",
      "LastUpdatedBy": "autocssadmin",
      "RegistrationId": 300100090028148,
      "RelationshipTypeCd": "ORA_CSS_USER",
      "RoleId": 300100090028154,
      "StartDate": "2016-09-27",
      "AccountPartyName": "CSS Automation Test8",
      "ContactPartyName": "Wanda Doug",
      "EmailAddress": "csstest.scn1_2760759235590836@oracle.com",
      "links": [
        {
          "rel": "self",
          "href": "http://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/selfServiceRoles/300100090028154",
          "name": "selfServiceRoles",
          "kind": "item",
          "properties": {
            "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000003737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787200106A6176612E6C616E672E4F626A656374000000000000000000000078700000000178"
          }
        },
        {
          "rel": "canonical",
          "href": "http://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/selfServiceRoles/300100090028154",
          "name": "selfServiceRoles",
          "kind": "item"
        },
        {
          "rel": "lov",
          "href": "http://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/selfServiceRoles/300100090028154/lov/RelationshipTypeCDLookupVO",
          "name": "RelationshipTypeCDLookupVO",
          "kind": "collection"
        }
      ]
    },
    {
      "AccountPartyId": 300100090027782,
      "ContactPartyId": 300100090028149,
      "CreatedBy": "autocssacctadmin_cua@oracle.com",
      "CreationDate": "2016-09-27T13:58:58-07:00",
      "EndDate": null,
      "LastUpdateDate": "2016-09-27T13:58:58-07:00",
      "LastUpdateLogin": "3D847FA984384D39E0530E8EF50AF6E2",
      "LastUpdatedBy": "autocssacctadmin_cua@oracle.com",
      "RegistrationId": null,
      "RelationshipTypeCd": "ORA_CSS_ACC_ADMIN",
      "RoleId": 300100090028158,
      "StartDate": "2016-09-27",
      "AccountPartyName": "CSS Automation Test8",
      "ContactPartyName": "Wanda Doug",
      "EmailAddress": "csstest.scn1_2760759235590836@oracle.com",
      "links": [
        {
          "rel": "self",
          "href": "http://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/selfServiceRoles/300100090028158",
          "name": "selfServiceRoles",
          "kind": "item",
          "properties": {
            "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000003737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B020000787200106A6176612E6C616E672E4F626A656374000000000000000000000078700000000178"
          }
        },
        {
          "rel": "canonical",
          "href": "http://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/selfServiceRoles/300100090028158",
          "name": "selfServiceRoles",
          "kind": "item"
        },
        {
          "rel": "lov",
          "href": "http://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/selfServiceRoles/300100090028158/lov/RelationshipTypeCDLookupVO",
          "name": "RelationshipTypeCDLookupVO",
          "kind": "collection"
        }
      ]
    },

. . .


  ],
  "count": 25,
  "hasMore": true,
  "limit": 25,
  "offset": 0,
  "links": [
    {
      "rel": "self",
      "href": "http://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/selfServiceRoles",
      "name": "selfServiceRoles",
      "kind": "collection"
    }
  ]
}
Back to Top