organizations - Keyrock command

This command allows you to manage organizations for Keyrock.

Common Options

Options Description
--host value, -h value specify host or alias
--token value specify oauth token
--help show help (default: false)

List organizations

This command lists all organizations.

ngsi organizations [command options] list [options]

Options

Options Description
--pretty, -P pretty format (default: false)
--help show help (default: false)

Examples

Request:

ngsi organizations list --pretty
{
  "organizations": [
    {
      "role": "owner",
      "Organization": {
        "id": "f1f2fd72-12ee-4ced-bbe8-1d99803fa0ca",
        "name": "test",
        "description": "test organizations",
        "image": "default",
        "website": null
      }
    },
    {
      "role": "owner",
      "Organization": {
        "id": "f672e00e-9f19-430b-8e0b-06b3ac7a8e4d",
        "name": "test",
        "description": "test organizations",
        "image": "default",
        "website": null
      }
    }
  ]
}

Get an organization

This command gets an organization.

ngsi organization [command options] get [options]

Options

Options Description
--oid value, -o value organization id
--pretty, -P pretty format (default: false)
--help show help (default: false)

Examples

Request:

ngsi organizations get --oid f672e00e-9f19-430b-8e0b-06b3ac7a8e4d --pretty
{
  "organization": {
    "id": "f672e00e-9f19-430b-8e0b-06b3ac7a8e4d",
    "name": "test",
    "description": "test organizations",
    "website": null,
    "image": "default"
  }
}

Create an organization

This command creates an organization.

ngsi organization [command options] create [options]

Options

Options Description
--name value, -n value organization name
--description value, -d value description
--website value, -w value website
--verbose, -v verbose (default: false)
--pretty, -P pretty format (default: false)
--help show help (default: false)

Examples

Request:

ngsi organizations create --name test --description "test organizations"
f672e00e-9f19-430b-8e0b-06b3ac7a8e4d

Update an organization

This command updates an organization.

ngsi organization [command options] update [options]

Options

Options Description
--oid value, -o value organization id
--name value, -n value organization name
--description value, -d value description
--website value, -w value website
--verbose, -v verbose (default: false)
--pretty, -P pretty format (default: false)
--help show help (default: false)

Examples

Request:

ngsi organizations update --oid f672e00e-9f19-430b-8e0b-06b3ac7a8e4d --website https://www.letsfiware.jp/ --pretty
{
  "values_updated": {
    "website": "https://www.letsfiware.jp/"
  }
}

Delete an organization

This command deletes an organization.

ngsi organization [command options] delete [options]

Options

Options Description
--oid value, -o value organization
--help show help (default: false)

Examples

Request:

ngsi organizations delete --oid f672e00e-9f19-430b-8e0b-06b3ac7a8e4d