Search API Menu

Globus SearchOverviewAPI Usage & BasicsIngestQueryTypes, Type Detection, and SchemasError Handling
API Reference
Create or Update EntryDelete by QueryDelete by SubjectDelete EntryGet EntryGET QueryGet SubjectGet TaskIndex Create (BETA)Index ListIngestPOST QueryRole CreateRole DeleteRole ListScroll QueryShow IndexTask List
Guides
Role Based Filtering
Globus Search LimitsAPI Change History
Skip to main content
Globus Docs
  • APIs
    • Auth
    • Transfer
    • Groups
    • Search
    • Python SDK
    • Helper Pages
  • How To
  • Guides
    • Globus Connect Server Installation Guides
    • High Assurance Collections for Protected Data
    • Management Console Guide
    • Command Line Interface
    • Premium Storage Connectors
    • Security
    • Modern Research Data Portal
  • Support
    • FAQs
    • Mailing Lists
    • Contact Us
    • Check Support Tickets
  1. Home
  2. Globus APIs
  3. Globus Search
  4. API Reference

Role Create

This API allows creation of roles on an index.

Method

POST

URL

/v1/index/<index_id>/role

Authentication required?

yes

Required Roles

owner or admin on the index

Request Body

a RoleCreate document

Response Body

a Role document

Authentication & Authorization

Tokens for this call must have this scope:

urn:globus:scopes:search.api.globus.org:all

In order to create an owner role, you must have the owner role yourself.

Example curl

To delete the role MDAwMzU0 the index 450538fb-cf9c-48fc-bd6f-08abc5e86da9:

curl \
  -XPOST \
  -H "Authorization: Bearer $SEARCH_TOKEN" \
  'https://search.api.globus.org/v1/index/450538fb-cf9c-48fc-bd6f-08abc5e86da9/role' \
  -d '
{
  "role_name": "writer",
  "principal": "urn:globus:auth:identity:ae341a98-d274-11e5-b888-dbae3a8ba545"
}
'

where $SEARCH_TOKEN is an access token.

Request Schemas

RoleCreate

A role creation document is a partial Role document containing only the fields which are needed to create the role.

Field Name Type Description

role_name

String

One of {"owner", "admin", "writer"}

principal

String

The identity or group with the role, in Principal URN format

Role

A Role document, describes a single permission on an index.

Field Name Type Description

id

String

The ID of this role

role_name

String

One of {"owner", "admin", "writer"}

index_id

String

The ID of the index for this role

principal

String

The identity or group with the role, in Principal URN format

principal_type

String

One of "identity" or "group"

Globus SearchOverviewAPI Usage & BasicsIngestQueryTypes, Type Detection, and SchemasError Handling
API Reference
Create or Update EntryDelete by QueryDelete by SubjectDelete EntryGet EntryGET QueryGet SubjectGet TaskIndex Create (BETA)Index ListIngestPOST QueryRole CreateRole DeleteRole ListScroll QueryShow IndexTask List
Guides
Role Based Filtering
Globus Search LimitsAPI Change History
© 2010- The University of Chicago Legal Accessibility