TENANT API REST API ACR API

SERVICE API

This page describes the K2HR3 SERVICE API. The purpose of the SERVICE API is for a tenant to create, show details, update, and delete a information of the K2HR3 SERVICEs of the tenant. Therefore, each method requires a tenant-scoped token. See the +SERVICE Usage page for the K2HR3 SERVICE details.

POST

Provides the following functions. A user token scoped to the service owner’s tenant in the HTTP request header is required.

Endpoint(URL)

http(s)://API SERVER:PORT/v1/service

Requires a user token scoped to a tenant who owns the service.

Content-Type: application/json
x-auth-token: U=<Scoped User Token>

Request Body

Create SERVICE

{
    "name":    <service name>
    "verify":  <verify url>
}

Add MEMBER to SERVICE / Modify VERIFY URL

{
    "tenant":  <tenant name> or [<tenant name>, ...]
    "clear_tenant": true/false or undefined
    "verify":  <verify url>
}

Response status

201、40x

Response Body(JSON)

{
    result:     <true/false>
    message:    <null or error message string>
}

PUT

This method provides the following functions. A user token scoped to the service owner’s tenant in the HTTP request header is required.

Endpoint(URL)

Create SERVICE

http(s)://API SERVER:PORT/v1/service?name=service name&verify=verify url

Add MEMBER to SERVICE

http(s)://API SERVER:PORT/v1/service/service name?tenant=tenant name

Modify VERIFY URL

http(s)://API SERVER:PORT/v1/service/service name?_verify=verify url

Header

Requires a user token scoped to a tenant who owns the service.

x-auth-token: U=<Scoped User Token>

URL Arguments

Create SERVICE

Add MEMBER to SERVICE

Modify VERIFY URL

Response status

201、40x

Response Body(JSON)

{
    result:     <true/false>
    message:    <null or error message string>
}

GET

Lists the information relevant to the service. A user token scoped to the service owner’s tenant in the HTTP request header is required.

Endpoint(URL)

http(s)://API SERVER:PORT/v1/service/service name

Header

Requires a user token scoped to a tenant.

Content-Type: application/json
x-auth-token: U=<Scoped User Token>

Response status

200、40x

Response Body(JSON)

{
    result:     <true/false>
    message:    <null or error message string>
    service:    {
        verify:     <verify url> or <static string> or <false>
        tenant:	[
            <tenant yrn full path>,
            ...
        ]
    }
}

Validates a service, including the service member. A user token scoped to the service owner’s tenant in the HTTP request header is required.

Endpoint(URL)

http(s)://API SERVER:PORT/v1/service/service name http(s)://API SERVER:PORT/v1/service/service name?urlarg

Header

Requires a user token scoped to a tenant who owns the service.

Content-Type: application/json
x-auth-token: U=<Scoped User Token>

URL Arguments

Validate MEMBER(Optional)

Response status

204、40x

Response Body(JSON)

Empty

DELETE

Provides the following functions. A user token scoped to the service owner’s tenant in the HTTP request header is required.

Endpoint(URL)

http(s)://API SERVER:PORT/v1/service/service name http(s)://API SERVER:PORT/v1/service/service name?urlarg

Header

Requires a user token scoped to a tenant who owns the service.

Content-Type: application/json
x-auth-token: U=<Scoped User Token>

URL Arguments

Delete MEMBER(Optional)

Response status

204、40x

Response Body(JSON)

Empty

TENANT API REST API ACR API